/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #910000;
    --color-secondary: #d35400;
    --color-text: #333;
    --color-text-light: #666;
    --color-bg-beige: #f2f0e6;
    --color-bg-tan: #f2f0e6;
    --color-bg-white: #fff;
    --color-border: #D2B48C;
    
    /* Typography */
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-script: 'Brush Script MT', cursive, 'Dancing Script', cursive;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 16px rgba(139, 26, 26, 0.15), 0 12px 32px rgba(0, 0, 0, 0.1);
    --shadow-button: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    --shadow-button-hover: 0 7px 14px rgba(0, 0, 0, 0.15), 0 3px 6px rgba(0, 0, 0, 0.1), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
    
    /* Transitions */
    --transition: 0.3s ease;
}

/* Base Elements */
body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-beige);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: #5C1010;
}

::selection {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: var(--color-bg-white);
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.site-header {
    background-color: rgba(245, 245, 220, 0.95);
    border-bottom: 2px solid var(--color-border);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-links a {
    color: var(--color-primary);
    transition: transform var(--transition), color var(--transition);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

.social-links a:hover {
    transform: scale(1.15);
    color: var(--color-secondary);
}

/* Navigation */
.main-nav {
    max-width: 1200px;
    margin: 0 auto;
}

.menu-toggle {
    display: none;
    background: var(--color-primary);
    color: var(--color-bg-white);
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-radius: 4px;
    margin: 0 auto;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-bg-white);
}

.menu-icon {
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
}

.menu-icon::before { top: -8px; }
.menu-icon::after { bottom: -8px; }

.menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.menu-item {
    position: relative;
}

.menu-item > a {
    display: block;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: background-color var(--transition);
}

.menu-item > a:hover,
.menu-item > a.active {
    background-color: var(--color-bg-beige);
    border-radius: 4px;
}

.has-submenu > a::after {
    content: ' ▼';
    font-size: 0.7em;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 100;
}

.has-submenu:hover .submenu {
    display: block;
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.submenu a:hover,
.submenu a.active {
    background-color: var(--color-bg-beige);
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Hero Section (shared) */
.hero,
.page-hero {
    text-align: center;
    padding: 4rem 2rem;
    background-image: url('/images/hero-farm.jpg');
    background-size: cover;
    background-position: center;
    color: var(--color-bg-white);
    margin-bottom: 2rem;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-hero {
    min-height: 300px;
}

.hero::before,
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.3);
    z-index: 1;
}

.hero > *,
.page-hero > * {
    position: relative;
    z-index: 2;
}

.site-title,
.site-subtitle {
    font-family: var(--font-script);
    color: var(--color-primary);
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
}

.site-title {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.site-subtitle {
    font-size: 2rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* CTA Buttons */
.cta-button {
    display: inline-block;
    background-color: var(--color-secondary);
    color: var(--color-bg-white);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-button);
    transition: transform var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.cta-button:hover {
    background-color: #B8541E;
    transform: translateY(-3px);
    box-shadow: var(--shadow-button-hover);
    color: var(--color-bg-white);
}

.cta-button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* Homepage - Intro Section */
.intro-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    margin: 3rem 0;
    padding: 0 1rem;
}

.intro-image {
    border: 6px double var(--color-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 8px 24px rgba(0, 0, 0, 0.1);
    transition: transform var(--transition), box-shadow var(--transition);
}

.intro-image img {
    width: 100%;
    height: auto;
    display: block;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
}

.intro-text .cta-button {
    margin-top: 1.5rem;
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: var(--color-bg-white);
    border: 6px double var(--color-primary);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-card a {
    display: block;
    color: var(--color-text);
}

.feature-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.feature-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.feature-card h3 {
    font-family: var(--font-heading);
    padding: 1rem 1.5rem 0.5rem;
    color: var(--color-primary);
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
}

.feature-card p {
    padding: 0 1.5rem 1rem;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    color: var(--color-primary);
    padding: 0 1.5rem 1.5rem;
    font-weight: 600;
    text-align: center;
    width: 100%;
}

/* Contact Sections */
.contact-info,
.contact-grid-reserve {
    display: grid;
    gap: 2rem;
    margin: 3rem 0;
    padding: 2rem;
    background: var(--color-bg-white);
    border-top: 4px solid var(--color-primary);
    box-shadow: var(--shadow-md);
}

.contact-info {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.contact-grid-reserve {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h3 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.contact-grid-reserve .contact-item p,
.contact-grid-reserve .contact-item a {
    word-wrap: break-word;
}

.contact-grid-reserve .contact-item img {
    margin-top: 1rem;
    max-width: 200px;
}

/* Content Pages */
.content-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* All Headings (excluding hero) */
.content-page h1,
.content-page h2,
.content-page h3,
.reserve-page h1,
.reserve-page h2,
.page-hero h1,
.error-hero h1,
.error-hero h2 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    font-weight: 700;
}

.content-page h1,
.reserve-page h1,
.page-hero h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
}

.page-hero h1 {
    text-shadow: 2px 2px 4px rgba(255, 255, 255, 0.8);
    margin: 0;
}

.reserve-page h1 {
    margin-bottom: 1rem;
}

.content-page h2,
.reserve-page h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-secondary);
}

.reserve-page h2 {
    border-bottom: none;
    font-size: 1.5rem;
    margin: 1.5rem 0 1rem;
}

.content-page h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
}

.page-content {
    line-height: 1.8;
}

.page-content p {
    margin-bottom: 1.5rem;
}

.page-content img {
    margin: 2rem auto;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.page-content em {
    display: block;
    text-align: center;
    font-style: italic;
    color: var(--color-text-light);
    margin-top: 0.5rem;
}

.page-content ul,
.page-content ol {
    margin: 1rem 0 1.5rem 2rem;
}

.page-content li {
    margin-bottom: 0.5rem;
}

.page-content hr {
    border: none;
    border-top: 2px solid var(--color-border);
    margin: 2rem 0;
}

.page-content strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* Footer */
.site-footer {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    padding: 2rem 1rem;
    margin-top: 4rem;
    text-align: center;
}

.site-footer .social-links {
    margin: 0 0 1.5rem 0;
}

.site-footer .social-links a {
    color: var(--color-bg-white);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.3));
}

.footer-copyright {
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0.9;
}

.footer-tagline {
    font-family: var(--font-script);
    font-size: 1.3rem;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Recipe Card */
.recipe-card {
    background: linear-gradient(to bottom, #FFF8DC 0%, #FAEBD7 100%);
    border: 3px solid var(--color-primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding: 2rem;
    margin: 3rem auto;
    max-width: 600px;
    position: relative;
    font-family: Georgia, serif;
}

.recipe-card::before {
    content: '';
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(139, 26, 26, 0.3);
    pointer-events: none;
}

.recipe-card::after {
    content: '✿';
    position: absolute;
    top: -15px;
    right: 20px;
    font-size: 2rem;
    color: var(--color-primary);
    background: #FFF8DC;
    padding: 0 10px;
}

.recipe-card h3 {
    font-family: var(--font-script);
    color: var(--color-primary);
    font-size: 2rem;
    margin-bottom: 0.5rem;
    text-align: center;
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
}

.recipe-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #2c2416;
}

.recipe-attribution {
    font-style: italic;
    text-align: center;
    color: #5c4a3a;
    font-size: 0.95rem;
    margin: 1.5rem 0;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.4);
    border-left: 3px solid var(--color-primary);
    border-right: 3px solid var(--color-primary);
}

/* 404 Error Page */
.error-page {
    text-align: center;
    padding: 2rem 1rem;
}

.error-hero {
    margin: 3rem 0;
}

.error-hero h1 {
    font-size: 8rem;
    margin: 0;
}

.error-hero h2 {
    font-size: 2rem;
    color: var(--color-text);
    margin: 1rem 0;
}

.error-content {
    max-width: 600px;
    margin: 2rem auto;
    line-height: 1.8;
}

.error-content ul {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.error-content li {
    margin: 0.75rem 0;
}

.error-content a {
    font-weight: 600;
    font-size: 1.1rem;
}

.error-content a:hover {
    text-decoration: underline;
}

/* Image Carousel */
.image-carousel {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 2rem 0;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-container {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--color-bg-beige);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.carousel-slide.active {
    opacity: 1;
    pointer-events: auto;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(139, 26, 26, 0.8);
    color: var(--color-bg-white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    z-index: 10;
}

.carousel-btn:hover {
    background: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--color-bg-white);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    padding: 0;
}

.carousel-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.carousel-indicator.active {
    background: var(--color-bg-white);
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .menu {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0;
        margin-top: 1rem;
    }

    .menu.active { display: flex; }

    .menu-item {
        width: 100%;
        border-bottom: 1px solid var(--color-border);
    }

    .menu-item > a { padding: 1rem; }

    .has-submenu .submenu {
        position: static;
        display: none;
        border: none;
        box-shadow: none;
        background: var(--color-bg-tan);
    }

    .has-submenu.active .submenu { display: block; }

    .site-title { font-size: 2.5rem; }
    .site-subtitle { font-size: 1.5rem; }
    
    .hero {
        padding: 3rem 1rem;
        min-height: 300px;
    }
    
    .page-hero {
        padding: 2rem 1rem;
        min-height: 200px;
    }
    
    .page-hero h1 { font-size: 1.8rem; }
    
    .intro-section,
    .contact-grid-reserve {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .features { grid-template-columns: 1fr; }
    .content-page h1 { font-size: 2rem; }
    .content-page h2 { font-size: 1.5rem; }
    .error-hero h1 { font-size: 5rem; }
}

@media (max-width: 480px) {
    .site-title { font-size: 2rem; }
    .site-subtitle { font-size: 1.2rem; }
    
    .hero {
        padding: 2rem 1rem;
        min-height: 250px;
    }
       
    .page-hero {
        padding: 1.5rem 1rem;
        min-height: 150px;
    }
    
    .page-hero h1 { font-size: 1.5rem; }
    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    main { margin: 1rem auto; }
    .error-hero h1 { font-size: 4rem; }
    .error-hero h2 { font-size: 1.5rem; }
}

@media print {
    .site-header,
    .site-footer,
    .cta-button,
    .menu-toggle { display: none; }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a {
        color: var(--color-text);
        text-decoration: underline;
    }
}
