/* ===========================================
   DIYDOLLAR SHARED STYLES
   Include this file in all pages: <link rel="stylesheet" href="../Assets/shared-styles.css">
   
   FOLDER STRUCTURE:
   DIYDollar.com - Live site\
   ├── Assets\                    (shared files live here)
   │   ├── shared-styles.css      (this file)
   │   ├── shared-functions.js
   │   ├── site-data.js
   │   ├── dynamic-content.js
   │   ├── header-include.html
   │   └── footer-include.html
   ├── subpages\                  (all pages live here)
   │   └── [budgeting_basics.html, etc.]
   └── index.html
   =========================================== */

/* ===========================================
   GLOBAL RESET & BASE STYLES
   =========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', Georgia, serif;
    line-height: 1.7;
    color: #1a1a1a;
    background: #ffffff;
}

/* ===========================================
   HEADER & NAVIGATION
   =========================================== */
header {
    background: #ffffff;
    border-bottom: 3px solid #1a1a1a;
    padding: 1.5rem 0;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 350px 1fr;
    align-items: center;
    gap: 2rem;
}

.logo-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    justify-self: start;
}

.logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 70px;
    width: auto;
    display: block;
}

.site-title {
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 2px;
    line-height: 1;
}

.site-title .diy {
    color: #1a1a1a;
}

.site-title .dollar {
    color: #2d5016;
}

nav {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

nav > ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

nav > ul > li {
    position: relative;
}

nav a {
    color: #1a1a1a;
    text-decoration: none;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
    transition: color 0.3s;
}

nav > ul > li > a {
    padding: 0.5rem 0;
    display: block;
}

nav a:hover {
    color: #c9a961;
}

/* Mega Menu Dropdown */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border: 2px solid #1a1a1a;
    min-width: 600px;
    padding: 2rem;
    display: none;
    z-index: 1000;
    margin-top: 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mega-menu::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: 0;
    right: 0;
    height: 1rem;
    background: transparent;
}

nav > ul > li:hover .mega-menu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.mega-menu-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1rem;
    color: #c9a961;
    font-family: Arial, sans-serif;
}

.mega-menu-section ul {
    list-style: none;
}

.mega-menu-section li {
    margin-bottom: 0.75rem;
}

.mega-menu-section a {
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-menu-section .icon {
    font-size: 1rem;
}

.view-all {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e0e0e0;
    margin-top: 1rem;
}

.view-all a {
    color: #c9a961;
    font-weight: 600;
}

/* ===========================================
   SEARCH FUNCTIONALITY
   =========================================== */

/* Desktop Search - Slide-out from Icon */
.desktop-search-container {
    position: fixed;
    top: 1.5rem;
    right: 2rem;
    z-index: 1000;
}

.search-slide-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

.slide-search-form {
    overflow: hidden;
    max-width: 0;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-slide-wrapper.active .slide-search-form {
    max-width: 350px;
    margin-right: 0.5rem;
}

.slide-search-input {
    width: 350px;
    padding: 0.75rem 1.25rem;
    border: 2px solid #1a1a1a;
    background: #ffffff;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
    color: #1a1a1a;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease;
}

.slide-search-input::placeholder {
    color: #999;
    font-style: italic;
    font-family: Georgia, serif;
}

.slide-search-input:focus {
    outline: none;
    border-color: #c9a961;
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
}

/* Fixed Search Icon */
.fixed-search-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid transparent;
    color: #1a1a1a;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.fixed-search-icon:hover {
    color: #c9a961;
    border-color: #c9a961;
    background: rgba(201, 169, 97, 0.05);
    box-shadow: 0 4px 16px rgba(201, 169, 97, 0.3);
    transform: scale(1.1);
}

.fixed-search-icon:active {
    transform: scale(0.95);
}

.search-slide-wrapper.active .fixed-search-icon {
    border-color: #c9a961;
}

/* ===========================================
   STAY INFORMED SECTION
   =========================================== */
.stay-informed-section {
    background: #f5f5f5;
    padding: 4rem 2rem;
}

.stay-informed-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1a1a1a;
}

.informed-cards-grid {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.informed-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    color: white;
    padding: 2.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.informed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.informed-card .card-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: contain;
}

.informed-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-family: 'Playfair Display', Georgia, serif;
}

.informed-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #ccc;
    font-family: Georgia, serif;
    line-height: 1.6;
}

.informed-card ul {
    text-align: left;
    max-width: 400px;
    margin: 1rem auto 1.5rem auto;
    line-height: 1.8;
    list-style: none;
    padding-left: 0;
}

.informed-card ul li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.informed-card-button {
    padding: 1rem 2.5rem;
    background: #c9a961;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: Arial, sans-serif;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.informed-card-button:hover {
    background: #b39451;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(201, 169, 97, 0.4);
}

.newsletter-subtext {
    font-size: 0.85rem;
    color: #999;
    margin-top: 1rem;
    font-style: italic;
}

/* ===========================================
   FOOTER
   =========================================== */
footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 2rem;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #c9a961;
    font-family: Georgia, serif;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: #999;
    text-decoration: none;
    transition: color 0.3s;
    font-family: Georgia, serif;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-view-all {
    display: block;
    margin-top: 0.75rem;
    color: #c9a961 !important;
    text-decoration: none;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 0.85rem;
    text-align: center;
    transition: opacity 0.3s ease;
}

.footer-view-all:hover {
    color: #c9a961 !important;
    opacity: 0.7;
}

.footer-bottom {
    max-width: 1300px;
    margin: 0 auto;
    padding-top: 2rem;
    border-top: 1px solid #333;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
    font-family: Georgia, serif;
}

/* ===========================================
   STATS SECTION
   =========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    color: white;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card h3 {
    font-size: 3em;
    margin-bottom: 10px;
    color: #c9a961;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.stat-card p {
    font-size: 1.1em;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: white;
}

/* ===========================================
   KEY TAKEAWAYS SECTION
   =========================================== */
.key-takeaways {
    background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 100%);
    color: white;
    padding: 3rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.key-takeaways h2 {
    color: #c9a961;
    border-bottom: 2px solid #c9a961;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
}

.key-takeaways ul {
    font-size: 1.1rem;
    line-height: 2;
    margin-top: 1.5rem;
    padding-left: 2rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.key-takeaways li {
    margin-bottom: 0.75rem;
}

/* ===========================================
   RESPONSIVE DESIGN
   =========================================== */
@media (max-width: 768px) {
    .header-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .logo-title-wrapper {
        justify-self: center;
    }
    
    nav > ul {
        gap: 1.5rem;
        font-size: 0.85rem;
    }

    .desktop-search-container {
        top: 1rem;
        right: 1rem;
    }
    
    .mega-menu {
        min-width: 90vw;
        left: 5vw;
        transform: none;
    }
    
    .informed-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .stay-informed-section h2 {
        font-size: 2rem;
    }
}
