/* ==========================================================================
   CPRTTF - Council for Promotion, Research & Trade in Traditional Foods
   Master Design System & Stylesheet (Modern Heritage Aesthetic)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary: #1b4d3e;
    --primary-light: #2a6855;
    --primary-dark: #0f3329;
    --gold: #c99e32;
    --gold-light: #f4e8c1;
    --gold-dark: #9a761c;
    --accent: #d96b43;
    --bg-sand: #faf7f2;
    --bg-card: rgba(255, 255, 255, 0.9);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(212, 175, 55, 0.25);
    --text-dark: #1a202c;
    --text-muted: #4a5568;
    --text-light: #718096;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --border-radius-full: 9999px;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 10px 30px rgba(27, 77, 62, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-width: 1280px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-sand);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--primary-dark);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
h4 { font-size: 1.1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

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

a:hover {
    color: var(--gold-dark);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Glassmorphism Navigation */
.header-topbar {
    background: var(--primary-dark);
    color: var(--gold-light);
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.topbar-contact {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.topbar-contact a {
    color: var(--gold-light);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.topbar-contact a:hover {
    color: #ffffff;
}

.topbar-address, .topbar-hours {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.site-logo-img {
    height: 48px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    display: flex;
    align-items: center;
    margin: 0;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    padding: 0.4rem 0.75rem;
    border-radius: var(--border-radius-sm);
    display: inline-flex;
    align-items: center;
    height: 40px;
    line-height: 1;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
    background: rgba(27, 77, 62, 0.06);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0.75rem;
    right: 0.75rem;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.65rem 1.5rem;
    border-radius: var(--border-radius-full);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.btn-nav {
    padding: 0.45rem 1.25rem;
    font-size: 0.9rem;
    height: 40px;
    line-height: 1;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #ffffff;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #ffffff;
}

.btn-gold:hover {
    background: linear-gradient(135deg, #d8ba4e 0%, var(--gold) 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
}

.mobile-nav-toggle {
    display: none;
    background: rgba(27, 77, 62, 0.08);
    border: 1px solid rgba(27, 77, 62, 0.2);
    border-radius: var(--border-radius-sm);
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--primary-dark);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-nav-toggle:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 4.5rem 0 5.5rem;
    background: linear-gradient(135deg, rgba(15, 51, 41, 0.92) 0%, rgba(27, 77, 62, 0.85) 100%),
                url('../assets/images/hero_banner.jpg') center/cover no-repeat;
    color: #ffffff;
    border-bottom: 4px solid var(--gold);
    overflow: hidden;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 3rem;
    align-items: center;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.25);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 0.4rem 1rem;
    border-radius: var(--border-radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.25rem;
}

.hero-title {
    color: #ffffff;
    margin-bottom: 1.25rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-title span {
    color: var(--gold-light);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-card-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius-lg);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.stat-item {
    text-align: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.25);
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.35rem;
    font-weight: 800;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Feature Sections & Section Headers */
.section {
    padding: 4.5rem 0;
}

.section-header {
    text-align: center;
    max-width: 750px;
    margin: 0 auto 3rem;
}

.section-badge {
    display: inline-block;
    color: var(--gold-dark);
    background: var(--gold-light);
    font-weight: 700;
    font-size: 0.78rem;
    padding: 0.3rem 0.85rem;
    border-radius: var(--border-radius-full);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.75rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.05rem;
}

/* Grid Layout System */
.grid-2col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
    align-items: center;
}

.grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
}

.card {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-md);
    background: linear-gradient(135deg, var(--gold-light) 0%, rgba(212, 175, 55, 0.15) 100%);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.card-title {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

/* Tabs & Filter System */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.tab-btn {
    font-family: var(--font-heading);
    font-weight: 600;
    padding: 0.55rem 1.35rem;
    border-radius: var(--border-radius-full);
    border: 1px solid var(--primary);
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active, .tab-btn:hover {
    background: var(--primary);
    color: #ffffff;
}

/* Modal Dialog Styles */
dialog.custom-modal {
    border: none;
    border-radius: var(--border-radius-lg);
    background: #ffffff;
    max-width: 600px;
    width: 90%;
    margin: auto;
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
}

dialog.custom-modal::backdrop {
    background: rgba(15, 51, 41, 0.65);
    backdrop-filter: blur(6px);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #edf2f7;
}

.modal-close {
    background: #edf2f7;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--accent);
    color: #ffffff;
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid #cbd5e0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.15);
}

/* Footer */
.site-footer {
    background: var(--primary-dark);
    color: #ffffff;
    padding: 4.5rem 0 2rem;
    border-top: 5px solid var(--gold);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 1.25rem;
    font-size: 1.15rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--gold-light);
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Responsive Breakpoints & Mobile Optimization
   ========================================================================== */

@media (max-width: 1080px) {
    .mobile-nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 1.25rem 1.5rem;
        box-shadow: var(--shadow-lg);
        border-bottom: 4px solid var(--gold);
        transform: translateY(-150%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
        z-index: 999;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        width: 100%;
        height: 44px;
        padding: 0 1rem;
        font-size: 1rem;
        border-radius: var(--border-radius-sm);
    }

    .nav-link.active::after {
        display: none;
    }

    .btn-nav {
        width: 100%;
        height: 46px;
        margin-top: 0.5rem;
    }

    .grid-4col {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .grid-2col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .grid-3col {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .hero-section {
        padding: 3rem 0 4rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-card-glass {
        padding: 1.5rem;
    }

    .hero-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stat-item {
        padding: 0.85rem 0.5rem;
    }

    .stat-number {
        font-size: 1.85rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .card {
        padding: 1.5rem;
    }

    .grid-4col {
        grid-template-columns: 1fr;
    }

    .filter-tabs {
        gap: 0.4rem;
    }

    .tab-btn {
        padding: 0.45rem 1rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .header-topbar {
        font-size: 0.78rem;
    }

    .topbar-contact {
        gap: 0.5rem;
        font-size: 0.78rem;
    }

    .topbar-hours {
        font-size: 0.78rem;
    }

    .topbar-address {
        display: none;
    }

    .site-logo-img {
        height: 38px;
    }

    dialog.custom-modal {
        width: 95%;
        padding: 1.25rem;
        border-radius: var(--border-radius-md);
    }
}
