/* The Nashville Foodies - Enhanced Styles with Animations & Interactivity */

/* ===========================
   1. CSS VARIABLES & RESET
   =========================== */
:root {
    /* Colors */
    --primary-color: #D94E28;
    --primary-hover: #B73E1F;
    --secondary-color: #2C3E50;
    --accent-color: #F39C12;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --black: #000000;
    --success: #27AE60;
    --error: #E74C3C;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 20px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Universal Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

/* ===========================
   2. LOADING SCREEN
   =========================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
}

.loading-logo {
    font-size: 64px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--bg-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===========================
   3. PROGRESS BAR
   =========================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    width: 0%;
    z-index: 9998;
    transition: width 0.2s ease;
}

/* ===========================
   4. BACK TO TOP BUTTON
   =========================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
}

/* ===========================
   5. NAVIGATION
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    align-items: center;
}

.nav-link {
    position: relative;
    padding: 8px 0;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-normal);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.cta-nav {
    background: var(--primary-color);
    color: var(--white) !important;
    padding: 8px 20px;
    border-radius: var(--radius-md);
}

.cta-nav::after {
    display: none;
}

.cta-nav:hover {
    background: var(--primary-hover);
}

.search-toggle {
    font-size: 20px;
    color: var(--text-dark);
    padding: 8px;
    transition: color var(--transition-fast);
}

.search-toggle:hover {
    color: var(--primary-color);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all var(--transition-normal);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 65px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 65px);
        background: var(--white);
        flex-direction: column;
        padding: 40px 20px;
        gap: 20px;
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 18px;
        width: 100%;
        text-align: center;
        padding: 15px;
    }
}

/* ===========================
   6. SEARCH OVERLAY
   =========================== */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-container {
    max-width: 800px;
    width: 90%;
    color: var(--white);
}

.search-container h2 {
    font-family: var(--font-heading);
    font-size: 36px;
    margin-bottom: 30px;
    text-align: center;
}

.search-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 40px;
    color: var(--white);
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.search-close:hover {
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.search-box input {
    flex: 1;
    padding: 18px 24px;
    font-size: 18px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    transition: border-color var(--transition-fast);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-btn {
    padding: 18px 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 18px;
    transition: background var(--transition-fast);
}

.search-btn:hover {
    background: var(--primary-hover);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 30px;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-result-item {
    background: rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.search-result-item:hover {
    background: rgba(255,255,255,0.2);
    transform: translateX(10px);
}

.result-category {
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.result-title {
    font-size: 18px;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 40px;
    opacity: 0.7;
}

.popular-searches h3 {
    font-size: 16px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.search-tag {
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-tag:hover {
    background: var(--primary-color);
}

/* ===========================
   7. HERO SECTION
   =========================== */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    margin-top: 65px;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 1s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 900px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: clamp(18px, 3vw, 24px);
    margin-bottom: 40px;
    opacity: 0.95;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 15px 35px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-normal);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(217, 78, 40, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--text-dark);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.slider-btn:hover {
    background: rgba(255,255,255,0.4);
}

.slider-btn.prev {
    left: 30px;
}

.slider-btn.next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.dot.active, .dot:hover {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 24px;
    animation: floatUpDown 2s ease-in-out infinite;
}

@keyframes floatUpDown {
    0%, 100% { transform: translate(-50%, 0); }
    50% { transform: translate(-50%, 10px); }
}

/* ===========================
   8. STATS SECTION
   =========================== */
.stats-section {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.stat-card {
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    opacity: 0.9;
}

/* ===========================
   9. FEATURED SECTION
   =========================== */
.featured-section {
    padding: var(--section-padding);
    background: var(--bg-light);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 5vw, 48px);
    color: var(--text-dark);
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-light);
}

.filter-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
}

.filter-btn {
    padding: 10px 25px;
    border-radius: 25px;
    background: var(--white);
    color: var(--text-dark);
    font-weight: 500;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.article-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    opacity: 1;
    transform: scale(1);
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.article-card:hover .card-image img {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 12px;
    background: var(--primary-color);
    color: var(--white);
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.card-badge.hot {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
}

.card-content {
    padding: 25px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-light);
}

.card-category {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--primary-color);
    font-weight: 600;
}

.card-reading-time {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-title a {
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

.card-title a:hover {
    color: var(--primary-color);
}

.card-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    transition: gap var(--transition-fast);
}

.card-link:hover {
    gap: 12px;
}

.load-more-container {
    text-align: center;
}

.btn-secondary {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* ===========================
   10. CATEGORIES SECTION
   =========================== */
.categories-section {
    padding: var(--section-padding);
    background: var(--white);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.category-card:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-card.hot {
    background: linear-gradient(135deg, #FF6B6B, #FF8E53);
    color: var(--white);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.category-card h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin-bottom: 10px;
}

.category-card p {
    opacity: 0.9;
    font-size: 14px;
}

/* ===========================
   11. NEWSLETTER SECTION
   =========================== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color), #E85D3A);
    color: var(--white);
    padding: 80px 20px;
}

.newsletter-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.newsletter-text h2 {
    font-family: var(--font-heading);
    font-size: 40px;
    margin-bottom: 20px;
}

.newsletter-text p {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.95;
}

.newsletter-benefits {
    list-style: none;
}

.newsletter-benefits li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 16px;
}

.newsletter-benefits i {
    color: var(--accent-color);
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.newsletter-form input {
    flex: 1;
    padding: 15px 20px;
    border-radius: var(--radius-md);
    border: none;
    font-size: 16px;
}

.newsletter-form input:focus {
    outline: 3px solid rgba(255,255,255,0.3);
}

.newsletter-form .btn {
    white-space: nowrap;
}

.form-note {
    font-size: 14px;
    opacity: 0.8;
}

.form-message {
    padding: 15px;
    border-radius: var(--radius-md);
    margin-top: 15px;
    display: none;
    font-weight: 500;
}

.form-message.success {
    background: rgba(39, 174, 96, 0.2);
    border: 2px solid var(--success);
}

.form-message.error {
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid var(--error);
}

/* ===========================
   12. FOOTER
   =========================== */
.footer {
    background: var(--secondary-color);
    color: rgba(255,255,255,0.8);
    padding: 60px 20px 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 20px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-col p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 18px;
    transition: all var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 25px;
}

/* ===========================
   13. RESPONSIVE DESIGN
   =========================== */
@media (max-width: 992px) {
    .newsletter-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-buttons {
        flex-direction: column;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .slider-btn.prev {
        left: 10px;
    }

    .slider-btn.next {
        right: 10px;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .search-container h2 {
        font-size: 28px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ===========================
   14. ANIMATIONS & UTILITIES
   =========================== */
.fade-in-visible {
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
}

/* Selection color */
::selection {
    background: var(--primary-color);
    color: var(--white);
}

/* Focus states for accessibility */
button:focus, a:focus, input:focus {
    outline: 3px solid rgba(217, 78, 40, 0.5);
    outline-offset: 2px;
}

/* ===========================
   END OF STYLES
   =========================== */