/* ========================================
   DineLocal - Award-Winning Design System
   ======================================== */

/* --- CSS Variables & Tokens --- */
:root {
    /* Primary Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;

    /* Accent Colors */
    --accent-warm: #f59e0b;
    --accent-cool: #06b6d4;
    --accent-success: #10b981;
    --accent-warning: #f97316;

    /* Neutral Palette */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.01);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Z-Index Scale */
    --z-base: 1;
    --z-dropdown: 1000;
    --z-sticky: 1050;
    --z-modal-backdrop: 1100;
    --z-modal: 1200;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

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

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

/* --- Container & Layout --- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    font-size: 2rem;
    line-height: 1;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
}

.nav-links a {
    font-weight: 500;
    color: var(--gray-600);
    position: relative;
    padding: var(--space-sm) 0;
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-600);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-500), var(--accent-cool));
    transition: width var(--transition-base);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: var(--space-sm);
}

/* --- Buttons --- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    border-color: var(--primary-400);
    color: var(--primary-600);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* --- Hero Section --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: var(--space-3xl);
    max-width: 900px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: var(--space-md);
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero .subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    margin-bottom: var(--space-xl);
    opacity: 0.95;
}

/* --- Search Bar --- */
.search-container {
    max-width: 600px;
    margin: var(--space-2xl) auto 0;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: var(--radius-xl);
    padding: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-container input {
    flex: 1;
    padding: 1rem var(--space-md);
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-full);
    font-size: 1rem;
    color: var(--gray-800);
}

.search-container input::placeholder {
    color: var(--gray-400);
}

.search-container select {
    padding: 0.75rem var(--space-md);
    border: none;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    color: var(--gray-600);
    cursor: pointer;
}

.search-btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-base);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
}

/* --- Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-xl);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    color: white;
    font-size: 0.875rem;
    opacity: 0.9;
}

.scroll-line {
    width: 40px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* --- Stats Bar --- */
.stats-bar {
    position: relative;
    z-index: 2;
    background: white;
    border-top: 1px solid rgba(226, 232, 240, 0.7);
    border-bottom: 1px solid rgba(226, 232, 240, 0.7);
    padding: var(--space-lg) 0;
    margin-top: -var(--space-3xl);
}

.stats-bar {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 120px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-600);
    display: block;
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(226, 232, 240, 0.7), transparent);
}

/* --- Section Styles --- */
.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-header h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin-bottom: var(--space-sm);
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.125rem;
}

/* --- Featured Restaurants Grid --- */
.featured-section {
    padding: var(--space-3xl) 0;
    background: white;
}

.restaurants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.restaurant-card {
    background: white;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
}

.restaurant-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.restaurant-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    position: relative;
}

.restaurant-badge {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.restaurant-rating {
    position: absolute;
    bottom: var(--space-md);
    left: var(--space-md);
    background: rgba(251, 191, 36, 0.95);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 700;
}

.restaurant-content {
    padding: var(--space-md);
}

.restaurant-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
    color: var(--gray-900);
}

.restaurant-cuisine {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.cuisine-tag {
    background: var(--primary-50);
    color: var(--primary-700);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.restaurant-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.restaurant-price {
    background: linear-gradient(135deg, #fbbf24, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

/* --- Neighborhoods Section --- */
.neighborhoods-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, #f9fafb 0%, #e5e7eb 100%);
}

.neighborhood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.neighborhood-card {
    position: relative;
    height: 300px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
}

.neighborhood-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.neighborhood-card:hover .neighborhood-image {
    transform: scale(1.1);
}

.neighborhood-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-lg);
}

.neighborhood-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.neighborhood-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* --- Categories Section --- */
.categories-section {
    padding: var(--space-3xl) 0;
    background: white;
}

.categories-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    padding-bottom: var(--space-lg);
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-card {
    min-width: 200px;
    height: 350px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

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

.category-card:hover .category-image {
    transform: scale(1.15);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-lg);
}

.category-name {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.category-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* --- Testimonials Section --- */
.testimonials-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(180deg, #f9fafb 0%, white 100%);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.testimonial-card {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

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

.testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-100);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-weight: 700;
    color: var(--gray-900);
}

.testimonial-location {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.testimonial-rating {
    color: #fbbf24;
    margin-bottom: var(--space-sm);
}

.testimonial-text {
    color: var(--gray-600);
    line-height: 1.7;
    font-style: italic;
}

/* --- CTA Section --- */
.cta-section {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.875rem, 4vw, 2.5rem);
    margin-bottom: var(--space-sm);
}

.cta-section > p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.cta-section form {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    max-width: 480px;
    margin: 0 auto var(--space-2xl);
}

.cta-section input[type="email"] {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-full);
    border: none;
    font-size: 1rem;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

/* --- Footer --- */
.site-footer {
    background: #0f172a;
    color: rgba(255, 255, 255, 0.8);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(4, 1fr);
    gap: var(--space-2xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand .logo {
    color: white;
    margin-bottom: var(--space-md);
}

.footer-brand p {
    font-size: 0.875rem;
    line-height: 1.7;
    max-width: 280px;
    margin-bottom: var(--space-lg);
}

.social-links {
    display: flex;
    gap: var(--space-md);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-600);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-legal h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--space-md);
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 0.5rem;
}

.footer-links a,
.footer-legal a {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    transition: all var(--transition-fast);
}

.footer-links a:hover,
.footer-legal a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.footer-bottom p {
    margin: 0;
}

/* --- Floating Action Button --- */
.fab {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    z-index: var(--z-sticky);
}

.fab:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* --- Animations & Fade-ins --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .restaurants-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero-content {
        padding: var(--space-2xl);
    }
    
    .search-container {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-brand p,
    .social-links {
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .restaurants-grid,
    .neighborhood-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}
