/*
Theme Name: Mullercare Custom Theme
Author: Ayoub Ennour
Description: Custom theme for Mullercare with responsive mega menus.
Version: 1.1
*/

/* --- 1. FONTS --- */
@font-face {
    font-family: 'IvyJournal';
    src: url('./assets/fonts/IvyJournal-Regular.woff2') format('woff2'),
         url('./assets/fonts/IvyJournal-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IvyJournal';
    src: url('./assets/fonts/IvyJournal-SemiBold.woff2') format('woff2'),
         url('./assets/fonts/IvyJournal-SemiBold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IvyJournal';
    src: url('./assets/fonts/IvyJournal-Bold.woff2') format('woff2'),
         url('./assets/fonts/IvyJournal-Bold.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --primary-red: #90BAAF;
    --primary-red-hover: #4b747a;
    --text-dark: #333333;
    --bg-cream: #faf7f2;
    --bg-light-blue: #e8f1f5;
    --bg-dark-brown: #544b46;
    --font-main: 'IvyJournal', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { font-family: var(--font-main); font-weight: 400; color: var(--text-dark); line-height: 1.6; background-color: #f4f4f4; }
h1, h2, h3, h4, h5, h6 { font-weight: 600; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
strong, b { font-weight: 900; }

/* --- 2. HEADER & STICKY BEHAVIOR --- */
.site-header { position: sticky; top: 0; z-index: 999; background: #fff; border-bottom: 1px solid #eaeaea; }
.header-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 40px; }
.header-logo img { height: 40px; margin: 15px 0; }
.main-nav { display: flex; gap: 30px; height: 100%; }
.nav-item { padding: 30px 0; cursor: pointer; font-weight: 600; display: flex; align-items: center; }
.nav-item > a { display: flex; align-items: center; gap: 5px; }
.nav-item > a::after { content: 'v'; font-size: 10px; transform: scaleX(1.5); }
.header-actions { display: flex; align-items: center; gap: 15px; }
.btn-contact { background-color: var(--primary-red); color: #fff; padding: 10px 24px; border-radius: 30px; font-weight: 600; transition: background 0.3s; }
.btn-contact:hover { background-color: var(--primary-red-hover); }
.btn-search { background-color: #f7dcdb; border: none; width: 45px; height: 45px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.3s; }
.btn-search:hover { background-color: #f2c7c5; }

/* --- 3. MEGA MENUS (DESKTOP) --- */
.mega-menu-container { position: absolute; top: 100%; left: 0; width: 100%; background: transparent; box-shadow: 0 10px 20px rgba(0,0,0,0.05); opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; border-top: 2px solid var(--primary-red); cursor: default; }
.nav-item:hover .mega-menu-container, .mega-menu-container:hover { opacity: 1; visibility: visible; }
.mega-menu-grid { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr 1fr; min-height: 400px; }
.mega-left { padding: 40px 30px; background: #fff; }
.mega-left h2 { font-size: 28px; margin-bottom: 20px; font-weight: 600; }
.mega-left p { margin-bottom: 20px; font-size: 15px; font-weight: 400; }
.mega-link { font-weight: 900; color: var(--text-dark); display: inline-block; margin-top: 10px; border-bottom: 2px solid transparent; transition: border-color 0.3s;}
.mega-link:hover { border-color: var(--primary-red); }
.mega-middle { padding: 40px; background: #fff; display: flex; gap: 50px; }
.menu-column h3 { font-size: 18px; color: #7a2b2b; border-bottom: 2px solid #7a2b2b; display: inline-block; margin-bottom: 15px; padding-bottom: 5px; font-weight: 600;}
.menu-column ul li { margin-bottom: 10px; border-bottom: 1px solid #eaeaea; padding-bottom: 5px; }
.menu-column ul li a { font-size: 15px; font-weight: 400;}
.menu-column ul li a:hover { color: var(--primary-red); }
.mega-right { padding: 40px; background: var(--bg-cream); }
.mega-right h3 { font-size: 18px; color: #7a2b2b; margin-bottom: 15px; }
.mega-card img { width: 100%; border-radius: 4px; margin-bottom: 15px; }
.mega-card h4 { font-size: 16px; margin-bottom: 10px; font-weight: 600;}
.mega-card p { font-size: 14px; margin-bottom: 15px; font-weight: 400;}
.mega-bottom-bar { grid-column: 1 / -1; background: var(--bg-light-blue); display: flex; justify-content: space-between; padding: 15px 40px; font-weight: 600; font-size: 14px; }
.mega-middle-articles { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }

/* --- 4. SEARCH BAR DROP-DOWN --- */
.site-search-bar { position: absolute; top: 100%; left: 0; width: 100%; background: #fff; padding: 20px 40px; border-top: 1px solid #eaeaea; box-shadow: 0 5px 15px rgba(0,0,0,0.05); display: none; }
.site-search-bar.active { display: block; }
.search-form { max-width: 800px; margin: 0 auto; display: flex; gap: 10px; }
.search-form input[type="search"] { flex-grow: 1; padding: 12px 20px; border: 2px solid #eaeaea; border-radius: 30px; font-family: var(--font-main); font-size: 16px; outline: none; }
.search-form input[type="search"]:focus { border-color: var(--primary-red); }
.search-form button { background: var(--primary-red); color: #fff; border: none; padding: 10px 25px; border-radius: 30px; font-weight: 600; cursor: pointer; }

/* --- 5. FOOTER STYLES (Restored) --- */
.site-footer { background: #fff; padding-top: 60px; margin-top: 60px; }
.footer-top { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding: 0 40px 60px; }
.footer-logo { margin-bottom: 20px; }
.footer-col h4 { color: #7a2b2b; margin-bottom: 20px; font-size: 16px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul li a { font-size: 15px; text-decoration: underline; text-decoration-color: transparent; transition: 0.3s; }
.footer-col ul li a:hover { text-decoration-color: var(--primary-red); }
.footer-bottom { background: #5a1e1e; color: #fff; padding: 15px 40px; }
.footer-bottom-container { max-width: 1400px; margin: 0 auto; display: flex; justify-content: space-between; font-size: 13px; }
.footer-links { display: flex; gap: 20px; }

/* --- 6. MOBILE MENU & RESPONSIVE --- */
.mobile-menu-toggle { display: none; background: none; border: none; font-size: 28px; cursor: pointer; color: var(--primary-red); }
.mobile-nav-overlay { display: none; } /* HIDDEN ON DESKTOP */

@media (max-width: 1024px) {
    .main-nav, .header-actions { display: none; } 
    .mobile-menu-toggle { display: block; padding: 15px 0; }
    .header-container { padding: 0 20px; }
    
    /* Reveal Mobile Menu Overlay */
    .mobile-nav-overlay {
        display: block; /* Make it exist in the layout on mobile */
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: #fff;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .mobile-nav-overlay.open { transform: translateX(0); }
    
    .mobile-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #f0f0f0; }
    .mobile-close { background: #f7dcdb; border: none; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 20px; cursor: pointer; color: var(--text-dark); }
    
    .mobile-content { padding: 20px; }
    .mobile-btn-contact { display: block; width: 100%; text-align: center; background: var(--primary-red); color: #fff; padding: 15px; border-radius: 30px; font-weight: 600; font-size: 16px; margin-bottom: 20px; }
    
    .mobile-search-trigger { display: flex; align-items: center; gap: 15px; padding: 15px 0; border-bottom: 1px solid #f0f0f0; cursor: pointer; }
    .mobile-search-trigger span { font-weight: 900; font-size: 16px; border-bottom: 2px solid var(--primary-red); padding-bottom: 2px;}
    .mobile-search-trigger .icon { background: #f7dcdb; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
    
    .mobile-accordion { list-style: none; margin-top: 10px;}
    .mobile-accordion-item { border-bottom: 1px solid #f0f0f0; }
    .mobile-accordion-header { width: 100%; display: flex; justify-content: space-between; align-items: center; padding: 20px 0; background: none; border: none; font-family: var(--font-main); font-size: 18px; font-weight: 600; cursor: pointer; color: var(--primary-red); }
    
    .mobile-accordion-content { display: none; padding-bottom: 20px; }
    .mobile-accordion-content.active { display: flex; flex-direction: column; gap: 15px; } /* Stack vertically */
    
    /* Mobile Mega Menu Inner Styles */
    .mobile-mega-text h4 { font-size: 18px; color: var(--text-dark); margin-bottom: 5px; }
    .mobile-mega-text p { font-size: 14px; color: #555; }
    .mobile-menu-list h3 { font-size: 16px; color: #7a2b2b; margin-bottom: 10px; border-bottom: 1px solid #7a2b2b; display: inline-block; }
    .mobile-menu-list ul li { padding: 8px 0; border-bottom: 1px solid #f9f9f9; }
    .mobile-menu-list ul li a { color: #555; font-size: 15px; }
    .mobile-mega-img { width: 100%; border-radius: 8px; margin-top: 10px; }
    .mobile-bottom-link { background: var(--bg-light-blue); padding: 15px; text-align: center; border-radius: 5px; font-weight: 600; font-size: 14px; margin-top: 10px;}
    
    .footer-top { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom-container { flex-direction: column; gap: 15px; text-align: center; align-items: center;}
}