/* VARIABLES & RESET */
:root {
    --primary: #A31621;
    --primary-dark: #7F111A;
    --beige: #F5F0E1;
    --text: #2c2c2c;
    --white: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    font-family: 'Inter', sans-serif; 
    line-height: 1.6; 
    color: var(--text); 
    background-color: var(--white); 
    padding-top: 80px; 
    overflow-x: hidden; /* Prevents mobile zoom/white gap */
    width: 100%;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { margin-bottom: 60px; }

/* TYPOGRAPHY */
.section-title { font-family: 'Merriweather', serif; font-size: 32px; font-weight: 700; color: #2c2c2c; margin-bottom: 16px; line-height: 1.3; }
.section-subtitle { font-family: 'Inter', sans-serif; font-size: 18px; color: #1A1A1A; margin-bottom: 32px; font-weight: 400; line-height: 1.5; }

/* HEADER & NAV */
.header-nav {
    background: var(--white);
    padding: 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}

/* Flex Container for Header Alignment */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo { 
    font-family: 'Merriweather', serif; 
    font-size: 24px; 
    font-weight: 700; 
    color: var(--primary); 
    flex-shrink: 0; 
}

/* DESKTOP MENU */
.nav-menu { display: flex; gap: 24px; list-style: none; align-items: center; margin-left: 40px; }
.nav-menu a { text-decoration: none; color: var(--text); font-weight: 500; font-size: 14px; transition: color 0.3s; }
.nav-menu a:hover { color: var(--primary); }
.dropdown-icon { font-size: 10px; color: #666; margin-left: 4px; }

/* DESKTOP ACTIONS (Newsletter/Search) */
.nav-actions { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.relative-container { position: relative; /* Crucial for Popup positioning */ }

.newsletter-btn { 
    background: var(--primary); color: white; padding: 10px 20px; border: none; 
    border-radius: 6px; font-weight: 700; cursor: pointer; font-size: 14px;
}

.search-icon { width: 24px; height: 24px; cursor: pointer; color: var(--text); }

/* POPUPS (Fixed Positioning) */
.popup-box {
    position: absolute;
    top: 100%; /* Opens directly below */
    right: 0; /* Aligns to right edge of button */
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 15px;
    border-radius: 8px;
    width: 300px;
    margin-top: 10px;
    display: none;
    z-index: 1100;
}
.popup-box.active { display: block; }
.popup-form { display: flex; gap: 8px; }
.popup-input { flex: 1; padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-family: 'Inter', sans-serif; }
.popup-submit { background: var(--primary); color: white; border: none; padding: 8px 12px; border-radius: 4px; cursor: pointer; font-weight: 600; }
.popup-close { cursor: pointer; margin-left: 8px; color: #999; line-height: 2; }

/* HERO SECTION */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
    margin-bottom: 60px;
}
.hero-title { font-family: 'Merriweather', serif; font-size: 48px; font-weight: 700; margin-bottom: 16px; text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 20px; margin-bottom: 32px; font-style: italic; }

/* BUTTONS */
.cta-buttons { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.button-beige, .button-primary, .button-secondary {
    padding: 16px 32px; border-radius: 8px; font-weight: 700; text-transform: uppercase; 
    text-decoration: none; display: inline-flex; align-items: center; justify-content: center; 
    transition: 0.3s; height: 52px; border: none; cursor: pointer;
}
.button-beige { background: var(--beige); color: var(--primary); border: 2px solid var(--primary); }
.button-beige:hover { background: white; }
.button-primary { background: var(--primary); color: white; }
.button-secondary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.button-secondary:hover { background: var(--primary); color: white; }
.full-width { width: 100%; margin-top: 10px; }

/* BOXES */
.boxes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; margin-bottom: 40px; }
.box { 
    background-color: var(--beige); padding: 40px 20px; border-radius: 12px; 
    border: 1px solid rgba(163, 22, 33, 0.1); transition: transform 0.3s ease; 
    cursor: pointer; text-align: center; min-height: 220px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.box:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.box-icon { font-size: 50px; margin-bottom: 16px; display: block; }
.box-title { font-family: 'Inter', sans-serif; font-size: 18px; font-weight: 700; color: var(--text); }

/* FLOATING CARDS */
.floating-cards { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; margin: -100px 0 60px 0; position: relative; z-index: 10; }
.floating-card { background: var(--beige); padding: 30px; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,0.15); text-align: center; border: 1px solid rgba(163, 22, 33, 0.1); height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: 0.3s; }
.floating-card:hover { transform: translateY(-4px); }
.floating-card .icon { font-size: 40px; margin-bottom: 12px; color: var(--primary); }
.floating-card .title { font-weight: 700; font-size: 16px; line-height: 1.3; }

/* RECIPE CARDS */
.recipe-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-bottom: 24px; }
.recipe-card { background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(0,0,0,0.1); transition: 0.3s; }
.recipe-card:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.recipe-image { width: 100%; height: 200px; overflow: hidden; }
.recipe-image img { width: 100%; height: 100%; object-fit: cover; }
.recipe-info { padding: 16px; }
.recipe-title { font-weight: 600; font-size: 16px; margin-bottom: 8px; }
.recipe-tag { display: inline-block; background: var(--beige); color: var(--primary); padding: 4px 12px; border-radius: 16px; font-size: 12px; font-weight: 500; text-transform: uppercase; }
.recipes-cta { display: flex; justify-content: flex-end; }

/* EMAIL SIGNUP */
.email-signup { background: var(--beige); padding: 60px 0; text-align: center; margin: 60px 0; }
.email-form { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; max-width: 500px; margin: 0 auto; }
.email-input { flex: 1; min-width: 200px; padding: 14px 16px; border: none; border-radius: 8px; font-family: 'Inter', sans-serif; }

/* FOOTER */
.footer-section { background-color: var(--beige); padding: 60px 0 40px; margin-top: 60px; }
.footer-content { display: grid; grid-template-columns: 1fr; gap: 40px; text-align: center; }
.footer-logo { font-family: 'Merriweather', serif; font-size: 24px; font-weight: 700; color: var(--primary); margin-bottom: 16px; }
.footer-social { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }
.footer-social-link { width: 36px; height: 36px; background-color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.3s; }
.footer-social-link:hover { background-color: var(--primary-dark); }
.footer-bottom { border-top: 1px solid rgba(44,44,44,0.1); padding-top: 20px; margin-top: 40px; font-size: 12px; color: #666; text-align: center;}

/* MOBILE ELEMENTS */
.mobile-menu-btn { display: none; flex-direction: column; gap: 6px; cursor: pointer; width: 30px; }
.mobile-menu-btn span { width: 100%; height: 3px; background-color: var(--text); border-radius: 2px; }

/* Slide Out Menu */
.mobile-menu-overlay { 
    position: fixed; top: 0; left: -100%; width: 280px; height: 100vh; 
    background: var(--white); box-shadow: 2px 0 10px rgba(0,0,0,0.1); 
    transition: left 0.3s ease; z-index: 2000; padding: 25px; 
    overflow-y: auto;
}
.mobile-menu-overlay.active { left: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 1px solid #eee; padding-bottom: 15px; }
.mobile-menu-title { font-weight: 700; font-size: 20px; color: var(--primary); }
.mobile-close { font-size: 24px; cursor: pointer; color: #666; }
.mobile-links { list-style: none; margin: 20px 0; }
.mobile-links li { margin-bottom: 16px; }
.mobile-links a { text-decoration: none; color: var(--text); font-size: 18px; font-weight: 500; display: block; }

/* Mobile Inside Menu Inputs */
.mobile-search-section, .mobile-newsletter-section { margin-bottom: 30px; }
.mobile-input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: 14px; background: #f9f9f9; }
.mobile-newsletter-section h4 { font-size: 14px; margin-bottom: 10px; color: #666; }

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
    /* Header Fixes */
    .nav-menu, .nav-actions { display: none; } /* Hide Desktop Nav */
    .mobile-menu-btn { display: flex; margin-right: 20px; } /* Separation from Logo */
    
    .nav-container { 
        justify-content: flex-start; /* Align Items Left */
        padding: 0 20px;
    }
    
    .logo { 
        font-size: 20px; 
    }
    
    /* Layout Fixes */
    .hero-section { padding: 80px 0; background-attachment: scroll; }
    .hero-title { font-size: 32px; }
    
    .boxes-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .box { padding: 20px 10px; min-height: 160px; }
    .box-icon { font-size: 36px; }
    .box-title { font-size: 15px; }
    
    .recipe-cards { grid-template-columns: 1fr; } /* 1 Column for Recipes on Mobile */
    
    .floating-cards { display: none; } /* Hide desktop cards */
}