/* ============================================
   BestFinder - Premium Recipe Discovery
   Sophisticated, authoritative, trustworthy
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&display=swap');

/* ============================================
   Design System Variables
   ============================================ */
:root {
    /* Premium Color Palette */
    --snow: #FAFBFC;
    --platinum: #F5F7FA;
    --white: #FFFFFF;
    --silver: #E8ECF1;
    --navy: #1E3A5F;
    --navy-deep: #152B47;
    --royal: #2E5984;
    --royal-bright: #3D6FA8;
    --gold: #D4AF37;
    --gold-rich: #BF9B30;
    --bronze: #CD7F32;
    --copper: #B87333;
    --midnight: #0F1419;
    --slate: #4A5568;
    --graphite: #2D3748;
    
    /* Typography System */
    --typeface-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --typeface-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing Scale */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2.5rem;
    --space-xl: 4rem;
    --space-2xl: 6rem;
    
    /* Border Radius */
    --round-sm: 6px;
    --round-md: 10px;
    --round-lg: 16px;
    --round-xl: 24px;
    --round-full: 999px;
    
    /* Box Shadows */
    --shadow-sm: 0 2px 16px rgba(30, 58, 95, 0.08);
    --shadow-md: 0 6px 28px rgba(30, 58, 95, 0.12);
    --shadow-lg: 0 12px 40px rgba(30, 58, 95, 0.16);
    --shadow-xl: 0 20px 52px rgba(30, 58, 95, 0.2);
    
    /* Transitions */
    --ease-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --ease-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Container Widths */
    --width-max: 1440px;
    --width-content: 980px;
}

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

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

body {
    font-family: var(--typeface-body);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--graphite);
    background-color: var(--snow);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ease-fast);
}

ul, ol {
    list-style: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--typeface-display);
    font-weight: 800;
    line-height: 1.2;
    color: var(--midnight);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.025em;
}

h3 {
    font-size: clamp(1.875rem, 4vw, 2.875rem);
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--slate);
}

/* ============================================
   Container System
   ============================================ */
.container-max {
    max-width: var(--width-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.container-max--narrow {
    max-width: var(--width-content);
}

.text-center {
    text-align: center;
}

/* ============================================
   Button Components
   ============================================ */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    padding: 1.125rem 2.5rem;
    font-family: var(--typeface-display);
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: var(--round-full);
    cursor: pointer;
    transition: all var(--ease-normal);
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn-action--primary {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-action--primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-action--secondary {
    background: linear-gradient(135deg, var(--royal) 0%, var(--royal-bright) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-action--secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-action--accent {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-rich) 100%);
    color: var(--navy-deep);
    box-shadow: var(--shadow-sm);
}

.btn-action--accent:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-action svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   Top Header
   ============================================ */
.top-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(30, 58, 95, 0.08);
    transition: all var(--ease-normal);
}

.top-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.top-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

/* Logo Brand */
.logo-brand {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--typeface-display);
    font-size: 1.875rem;
    font-weight: 900;
    color: var(--midnight);
    transition: transform var(--ease-fast);
}

.logo-brand:hover {
    transform: scale(1.04);
}

.logo-brand__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--round-md);
}

.logo-brand__text span {
    background: linear-gradient(135deg, var(--navy) 0%, var(--gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.main-navigation__list {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.main-navigation__item {
    font-weight: 700;
    color: var(--slate);
    position: relative;
    padding: 0.75rem 0;
    transition: color var(--ease-fast);
    font-size: 0.9375rem;
}

.main-navigation__item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    transition: width var(--ease-normal);
    border-radius: 2px;
}

.main-navigation__item:hover {
    color: var(--navy);
}

.main-navigation__item:hover::after,
.main-navigation__item.active::after {
    width: 100%;
}

.main-navigation__item.active {
    color: var(--navy);
}

/* Mobile Menu Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
}

.mobile-toggle span {
    width: 30px;
    height: 3px;
    background: var(--midnight);
    border-radius: 2px;
    transition: all var(--ease-normal);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 340px;
    height: 100vh;
    background: white;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    z-index: 1001;
    padding: var(--space-xl) var(--space-lg);
    transition: right var(--ease-normal);
}

.mobile-drawer.open {
    right: 0;
}

.mobile-drawer__close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--midnight);
    line-height: 1;
}

.mobile-drawer__menu {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    margin-top: var(--space-xl);
}

.mobile-drawer__link {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--platinum);
    transition: color var(--ease-fast);
}

.mobile-drawer__link:hover {
    color: var(--navy);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 76px;
}

.hero-section__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-section__background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-section__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.92) 0%, rgba(21, 43, 71, 0.88) 100%);
}

.hero-section__content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 920px;
    padding: var(--space-xl) var(--space-md);
    animation: fadeSlideUp 1s ease;
}

.hero-section__badge {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--round-full);
    color: var(--gold);
    font-weight: 800;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-md);
}

.hero-section__title {
    color: white;
    margin-bottom: var(--space-md);
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.hero-section__subtitle {
    font-size: 1.375rem;
    color: rgba(255, 255, 255, 0.96);
    margin-bottom: var(--space-lg);
    line-height: 1.75;
}

.hero-section__actions {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-section__indicator {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    color: white;
    font-size: 0.875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    animation: pulse 2s infinite;
}

.hero-section__indicator svg {
    width: 26px;
    height: 26px;
}

/* ============================================
   Content Section
   ============================================ */
.content-section {
    padding: var(--space-2xl) 0;
}

.content-section--white {
    background: var(--white);
}

.content-section--snow {
    background: var(--snow);
}

.content-section--platinum {
    background: var(--platinum);
}

.content-section--silver {
    background: var(--silver);
}

.content-section__header {
    max-width: 780px;
    margin: 0 auto var(--space-xl);
    text-align: center;
}

.content-section__tag {
    display: inline-block;
    font-family: var(--typeface-display);
    font-size: 0.875rem;
    font-weight: 800;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: var(--space-sm);
}

.content-section__title {
    margin-bottom: var(--space-md);
}

.content-section__description {
    font-size: 1.1875rem;
    color: var(--slate);
    line-height: 1.75;
}

.content-section__separator {
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    margin: var(--space-md) auto 0;
    border-radius: 3px;
}

/* ============================================
   Recipe Grid
   ============================================ */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-lg);
}

/* Recipe Box */
.recipe-box {
    background: white;
    border-radius: var(--round-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--ease-normal);
}

.recipe-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.recipe-box a {
    display: block;
}

.recipe-box__image {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.recipe-box__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ease-slow);
}

.recipe-box:hover .recipe-box__image img {
    transform: scale(1.08);
}

.recipe-box__badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    padding: 0.625rem 1.25rem;
    background: var(--navy);
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--round-full);
}

.recipe-box__content {
    padding: var(--space-md);
}

.recipe-box__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--midnight);
    margin-bottom: var(--space-sm);
    transition: color var(--ease-fast);
}

.recipe-box:hover .recipe-box__title {
    color: var(--navy);
}

.recipe-box__text {
    color: var(--slate);
    margin-bottom: var(--space-md);
    font-size: 1rem;
    line-height: 1.65;
}

.recipe-box__meta {
    display: flex;
    gap: var(--space-md);
}

.recipe-box__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--graphite);
    font-weight: 700;
}

.recipe-box__meta-item svg {
    width: 20px;
    height: 20px;
    stroke: var(--navy);
}

/* ============================================
   Category Grid
   ============================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    gap: var(--space-lg);
}

/* Category Box */
.category-box {
    position: relative;
    height: 360px;
    border-radius: var(--round-lg);
    overflow: hidden;
    transition: transform var(--ease-normal);
}

.category-box:hover {
    transform: translateY(-8px);
}

.category-box__image {
    width: 100%;
    height: 100%;
}

.category-box__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ease-slow);
}

.category-box:hover .category-box__image img {
    transform: scale(1.12);
}

.category-box__gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(30, 58, 95, 0) 0%, rgba(30, 58, 95, 0.92) 100%);
    transition: background var(--ease-normal);
}

.category-box:hover .category-box__gradient {
    background: linear-gradient(180deg, rgba(30, 58, 95, 0) 0%, rgba(30, 58, 95, 0.96) 100%);
}

.category-box__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-lg);
    color: white;
    z-index: 2;
}

.category-box__name {
    font-size: 2.125rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.category-box__total {
    font-size: 1.0625rem;
    font-weight: 700;
    opacity: 0.92;
}

/* ============================================
   Article Grid
   ============================================ */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
    gap: var(--space-lg);
}

/* Article Box */
.article-box {
    background: white;
    border-radius: var(--round-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--ease-normal);
}

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

.article-box a {
    display: block;
}

.article-box__image {
    height: 250px;
    overflow: hidden;
}

.article-box__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--ease-slow);
}

.article-box:hover .article-box__image img {
    transform: scale(1.08);
}

.article-box__content {
    padding: var(--space-md);
}

.article-box__date {
    font-size: 0.8125rem;
    font-weight: 800;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-sm);
}

.article-box__title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--midnight);
    margin-bottom: var(--space-sm);
    transition: color var(--ease-fast);
}

.article-box:hover .article-box__title {
    color: var(--navy);
}

.article-box__excerpt {
    color: var(--slate);
    font-size: 1rem;
    line-height: 1.65;
}

/* ============================================
   Page Footer
   ============================================ */
.page-footer {
    background: var(--midnight);
    color: rgba(255, 255, 255, 0.87);
    padding: var(--space-xl) 0 var(--space-lg);
}

.page-footer__columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.page-footer__column h4 {
    color: white;
    font-size: 1.1875rem;
    margin-bottom: var(--space-md);
    font-weight: 800;
}

.page-footer__links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.page-footer__link {
    color: rgba(255, 255, 255, 0.77);
    transition: color var(--ease-fast);
    font-weight: 600;
}

.page-footer__link:hover {
    color: var(--gold);
}

.page-footer__text {
    line-height: 1.75;
    font-size: 1rem;
}

.page-footer__divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.16);
    margin: var(--space-lg) 0;
}

.page-footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.68);
}

.page-footer__copyright {
    font-weight: 600;
}

.page-footer__legal {
    display: flex;
    gap: var(--space-md);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-16px);
    }
}

.animate-in {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease;
}

.animate-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .page-footer__columns {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero-section {
        min-height: 88vh;
    }
    
    .hero-section__title {
        font-size: 2.75rem;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .page-footer__columns {
        grid-template-columns: 1fr;
    }
    
    .page-footer__bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --space-2xl: 4rem;
    }
    
    .hero-section__actions {
        flex-direction: column;
    }
    
    .article-grid {
        grid-template-columns: 1fr;
    }
}
