@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Rye&display=swap');

:root {
    /* Updated ADA Compliant Farm Palette */
    --barn-red: #bc4749;
    --barn-red-hover: #9e3c3e;
    /* Darkened for hover/focus states */
    --earth-green: #386641;
    --earth-green-hover: #2b4f32;
    --cream: #FDFBF7;
    /* Soft off-white to reduce screen glare */
    --text-dark: #1A1A1A;
    --text-light: #636363;
    /* Darkened from #555 to pass WCAG 4.5:1 contrast */
    --white: #FFFFFF;

    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: clip;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
.brand-font {
    font-family: 'Rye', serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: #bc4749;
}


/* --- Call to Action Button --- */
.cta-btn {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 2.5rem;
    background-color: var(--earth-green);
    color: var(--white);
    text-decoration: none;
    font-size: 1.3rem;
    border-radius: 40px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 2px solid transparent;
}

.cta-btn:hover,
.cta-btn:focus-visible {
    background-color: var(--earth-green-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: #FFEA70;
    /* Yellow contrast border on hover/focus */
    color: var(--white);
}

hero .p {
    color: var(--white);
}

/* ADA Keyboard Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--earth-green);
    outline-offset: 4px;
    border-radius: 4px;
}

/* Glassmorphism Sticky Header */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(188, 71, 73, 0.95);
    /* RGB equivalent of #bc4749 */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.logo {
    font-size: clamp(1.5rem, 2vw + 1rem, 2.5rem);
    margin-top: 1rem;
    text-decoration: none;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding: 0.5rem 0;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    /* Slightly thicker for better visibility */
    bottom: 0;
    left: 0;
    background-color: #FFD700;
    transition: var(--transition);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Page Containers */
main {
    flex: 1;
    margin-top: 80px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 5rem 5%;
}

/* Modern Hero Section */
.hero {
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 5%;
    position: relative;
    background: url('images/farm.webp') center/cover no-repeat;
}


.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(188, 71, 73, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(#f2e8cf);
    max-width: 700px;
}

.hero h1 {
    font-size: clamp(3rem, 6vw + 1rem, 6.5rem);
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    line-height: 1.05;
    margin-bottom: 1.5rem;
    color: var(#f2e8cf);
}

.hero p {
    font-size: clamp(1.2rem, 2vw, 1.5rem);
    font-weight: 400;
    color: #fff;
    /* Increased weight for readability over images */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
    border-left: 4px solid var(--earth-green);
    padding-left: 1rem;
}

/* Modern Asymmetrical Split Section */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 5rem;
}

.split-text h2 {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    color: var(--barn-red);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.split-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.split-image {
    position: relative;
}

.split-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    position: relative;
}

/* Decorative background block behind image */
.split-image::before {
    content: '';
    position: absolute;
    top: -20px;
    right: -20px;
    width: 100%;
    height: 100%;
    background-color: var(--earth-green);
    border-radius: 12px;
    z-index: 1;
}

/* Reverse Split for alternating layout */
.split-reverse .split-text {
    order: 2;
}

.split-reverse .split-image {
    order: 1;
}

.split-reverse .split-image::before {
    right: auto;
    left: -20px;
    background-color: var(--barn-red);
}

/* Community Banner */
.community-banner {
    background-color: var(--earth-green);
    color: var(--white);
    padding: 6rem 5%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.community-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/eggs2.webp') center/cover;
    opacity: 0.15;
    z-index: 0;
}

.community-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.community-content h2 {
    font-size: clamp(2.5rem, 4vw, 4rem);
    margin-bottom: 1.5rem;
    color: #FFEA70;
    /* Lightened from pure gold for higher contrast */
}

.community-content p {
    font-size: 1.2rem;
    font-weight: 400;
}

/* Reviews Widget */
.review-widget {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    margin: 5rem auto;
    max-width: 800px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    border-top: 6px solid var(--earth-green);
}

.review-widget::before {
    content: '“';
    font-family: 'Rye', serif;
    font-size: 8rem;
    color: rgba(188, 71, 73, 0.1);
    position: absolute;
    top: -2rem;
    left: 2rem;
    line-height: 1;
}

.stars {
    color: #D97706;
    /* Darkened amber to pass contrast ratio on white */
    font-size: 2rem;
    letter-spacing: 0.2rem;
    margin-bottom: 1.5rem;
}

.review-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-dark);
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.review-author {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--barn-red);
}

/* Multi-Column Footer */
.site-footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 5rem 5% 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 3rem;
}

.footer-brand {
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 1rem;
    display: block;
}

.footer-info p {
    color: #CCCCCC;
    /* Lightened from A0A0A0 for better contrast on dark bg */
    margin-bottom: 0.5rem;
}

.footer-info a {
    color: #FBBF24;
    /* Brightened amber for link visibility */
    text-decoration: none;
    font-weight: 600;
}

.footer-info a:hover {
    text-decoration: underline;
}

.footer-column h4 {
    font-family: 'Rye', serif;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 50%;
    height: 3px;
    background-color: var(--barn-red);
}

.footer-hours-list {
    list-style: none;
    color: #CCCCCC;
}

.footer-hours-list li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.2);
    padding-bottom: 0.25rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #CCCCCC;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover,
.footer-links a:focus-visible {
    color: var(--white);
    padding-left: 5px;
}

.dev-credit {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #CCCCCC;
}

.dev-credit a {
    color: #FBBF24;
    text-decoration: none;
}

.dev-credit a:hover {
    text-decoration: underline;
}

/* Scroll Animations */
.fade-in-up {
    opacity: 1;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Dynamic Menu / In-Store Gallery Styles --- */
.in-store-gallery {
    margin: 6rem 0;
}

.category-nav-wrapper {
    position: sticky;
    top: 7.5rem;
    /* Changed from 110px to sit flush under the header */
    z-index: 900;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 2px solid var(--earth-green);
    margin-bottom: 3rem;
}

#category-nav {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
}

#category-nav::-webkit-scrollbar {
    height: 6px;
}

#category-nav::-webkit-scrollbar-thumb {
    background-color: var(--earth-green);
    border-radius: 4px;
}

.category-btn {
    background: var(--white);
    border: 2px solid var(--barn-red);
    color: var(--barn-red);
    padding: 0.5rem 1.5rem;
    font-size: 1.2rem;
    border-radius: 30px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

/* Active state for the currently viewed category */
.category-btn.active {
    background: var(--earth-green);
    color: var(--white);
    border-color: var(--earth-green);
    /* transform: scale(1.05); */
    box-shadow: 0 4px 10px rgba(56, 102, 65, 0.3);
}


.category-btn:hover,
.category-btn:focus-visible {
    background: var(--barn-red);
    color: var(--white);
    /* transform: translateY(-2px); */
}

.menu-category-section {
    margin-bottom: 4rem;
    scroll-margin-top: 140px;
}

.menu-category-title {
    font-size: 2.5rem;
    color: var(--earth-green);
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.5rem;
}

.menu-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.menu-item-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
    /* Added slight border for high contrast */
}

.menu-item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.item-img-wrapper {
    position: relative;
    height: 200px;
}

.item-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-price {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--barn-red);
    color: var(--white);
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.item-info {
    padding: 1.5rem;
    flex: 1;
}

.item-info h4 {
    font-size: 1.2rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.item-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* --- Mobile Navigation Styles (Hamburger) --- */
.mobile-menu-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

/* Google Map Widget */
/* --- Google Map Styling Enhancements --- */
.map-container {
    border-radius: 16px;
    margin-top: 20px;
    overflow: hidden;
    height: 450px;
    /* New styling */
    border: 6px solid var(--white);
    outline: 2px solid var(--earth-green);
    outline-offset: -1px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transition: var(--transition);
}

.map-container:hover {
    box-shadow: 0 25px 35px -5px rgba(0, 0, 0, 0.15), 0 15px 15px -5px rgba(0, 0, 0, 0.08);
    transform: translateY(-5px);
}

/* === MEDIA QUERIES === */

/* Standard Tablet/Mobile Nav and Layout Breakpoints */
@media (max-width: 968px) {
    .split-section {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .split-reverse .split-text {
        order: 1;
    }

    .split-reverse .split-image {
        order: 2;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav#main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        max-width: 350px;
        height: 100vh;
        background: rgba(188, 71, 73, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.5);
    }

    nav#main-nav.active {
        right: 0;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3rem;
    }

    nav a {
        font-size: 1.8rem;
    }

    /* Hamburger to 'X' Animation */
    .mobile-menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* Small Mobile / Product Menu Grid Fixes */
@media (max-width: 900px) {
    .menu-items-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .menu-category-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .item-img-wrapper {
        height: 220px;
    }

    .in-store-gallery {
        margin: 3rem 0;
    }

    .category-nav-wrapper {
        top: 8.5rem;
        padding: 0.5rem 0;
        z-index: 9999;
    }
}

/* --- Thanksgiving Page & Form Enhancements --- */

/* Match rounded image styling and hover effects across cards */
.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

/* Card Container Styling */
.card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-content {
    padding: 1.8rem;
    flex: 1;
}

.card-content h3 {
    color: var(--barn-red);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.card-content p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.6;
}

/* Form Container & Inputs Styling */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border-top: 6px solid var(--earth-green);
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group .required {
    color: var(--barn-red);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border: 2px solid #D0C9C0;
    border-radius: 8px;
    background-color: var(--cream);
    color: var(--text-dark);
    transition: var(--transition);
}

.form-control:focus-visible {
    border-color: var(--earth-green);
    outline: 3px solid var(--earth-green);
    outline-offset: 2px;
}

/* Mobile Media Query Overrides */
@media (max-width: 768px) {
    .form-container {
        padding: 1.8rem 1.2rem;
        border-radius: 12px;
    }

    .card-img-wrapper {
        height: 200px;
    }

    .card-content {
        padding: 1.2rem;
    }

    .card-content h3 {
        font-size: 1.3rem;
    }
}

/* --- 4-Column Responsive Grid Setup --- */
.grid {
    display: grid;
    /* Desktop default: 4 equal columns */
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 5rem;
}

/* Tablet Override (Medium screens) */
@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile Override (Single column feed) */
@media (max-width: 768px) {
    .grid {
        /* Single column for mobile */
        grid-template-columns: 1fr;
        /* Tightened gap specifically for smooth mobile scrolling */
        gap: 1.25rem;
        margin-bottom: 3.5rem;
    }
}

/* --- Top Announcement Banner Styles --- */
.top-announcement-banner {
    background-color: var(--earth-green);
    color: var(--white);
    text-align: center;
    padding: 0.6rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
    /* Sits above the sticky header */
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15); */
}

.top-announcement-banner a {
    color: #FFEA70;
    /* High-contrast gold link */
    text-decoration: underline;
    margin-left: 0.5rem;
    transition: var(--transition);
}

.top-announcement-banner a:hover,
.top-announcement-banner a:focus-visible {
    color: var(--white);
}

/* Adjust layout offsets for pages containing the banner */
body:has(.top-announcement-banner) header {
    top: 38px;
    /* Offset the main header by the height of the banner */
}

body:has(.top-announcement-banner) main {
    margin-top: 118px;
    /* Prevents hero content from slipping under the header */
}

body:has(.top-announcement-banner) {
    top: 112px;
    /* Recalculate sticky category bar offset for products.html */
}

/* Adjustments for mobile viewports */
@media (max-width: 968px) {
    body:has(.top-announcement-banner) nav#main-nav {
        top: 38px;
        height: calc(100vh - 38px);
    }
}

@media (max-width: 768px) {
    .top-announcement-banner {
        font-size: 0.85rem;
        padding: 0.5rem;
    }

    body:has(.top-announcement-banner) {
        top: 102px;
    }
}

/* Styling specifically for the sub-logo text */
header .logo .sub-logo {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: #FFEA70;
    /* Soft gold accent color */
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: -1rem;
    margin-left: 0.35rem;
    display: inline-block;
    vertical-align: middle;
}

/* Mobile scaling adjustment */
@media (max-width: 768px) {
    .logo {
        margin-top: 2rem
    }

    header .logo .sub-logo {
        font-size: 0.8rem;
        margin-left: 0.25rem;
    }

}