/* ============================================
   LEZZET YOLCULUĞU - MAIN STYLES
   Modern, Mobile-First CSS
   ============================================ */

/* CSS Variables - Design Tokens */
:root {
    /* Colors - Light Mode (Default) */
    --color-bg: #fafaf9;
    --color-bg-secondary: #f5f5f4;
    --color-surface: #ffffff;
    --color-text: #1c1917;
    --color-text-secondary: #78716c;
    --color-text-muted: #a8a29e;
    --color-border: #e7e5e4;
    --color-accent: #059669;
    --color-accent-hover: #047857;
    --color-accent-light: #d1fae5;
    --color-error: #dc2626;
    --color-error-light: #fee2e2;

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

    /* Spacing Scale (8px base) */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 1.5rem;    /* 24px */
    --space-xl: 2rem;      /* 32px */
    --space-2xl: 3rem;     /* 48px */
    --space-3xl: 4rem;     /* 64px */
    --space-4xl: 6rem;     /* 96px */

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --nav-height: 64px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

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

    /* 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: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode */
[data-theme="dark"] {
    --color-bg: #0c0a09;
    --color-bg-secondary: #1c1917;
    --color-surface: #292524;
    --color-text: #fafaf9;
    --color-text-secondary: #a8a29e;
    --color-text-muted: #78716c;
    --color-border: #44403c;
    --color-accent: #10b981;
    --color-accent-hover: #34d399;
    --color-accent-light: #064e3b;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-base), color var(--transition-base);
}

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

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition-fast);
}

input,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-lg);
    }
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: rgba(250, 250, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: var(--transition-base);
}

[data-theme="dark"] .nav {
    background: rgba(12, 10, 9, 0.95);
}

.nav-transparent {
    background: transparent;
    border-bottom-color: transparent;
    backdrop-filter: none;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-text);
}

.nav-logo img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 2px solid white;
    display: block;
    transition: transform var(--transition-fast);
}

.nav-logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: none;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    position: relative;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text);
}

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

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

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--color-text);
    background: transparent;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--color-bg-secondary);
}

.theme-toggle-dark {
    display: none;
}

[data-theme="dark"] .theme-toggle-light {
    display: none;
}

[data-theme="dark"] .theme-toggle-dark {
    display: block;
}

.nav-auth {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-accent);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.nav-auth:hover {
    background: var(--color-accent-light);
}

.nav-user {
    display: none;
    align-items: center;
    gap: var(--space-sm);
}

.nav-user-name {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text);
}

.nav-logout {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--color-text-secondary);
    background: transparent;
    transition: var(--transition-fast);
}

.nav-logout:hover {
    background: var(--color-error-light);
    color: var(--color-error);
}

/* Mobile Navigation Toggle */
.nav-mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: var(--space-sm);
    background: transparent;
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: var(--transition-fast);
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-lg);
    flex-direction: column;
    gap: var(--space-md);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.mobile-menu.active {
    display: flex;
}

.mobile-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    padding: var(--space-sm) 0;
    transition: color var(--transition-fast);
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--color-text);
}

.mobile-user {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-md);
    margin-top: var(--space-md);
    border-top: 1px solid var(--color-border);
}

.mobile-user-name {
    font-weight: 500;
    color: var(--color-text);
}

.mobile-logout {
    font-size: 0.875rem;
    color: var(--color-error);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    font-weight: 500;
}

.mobile-logout:hover {
    background: var(--color-error-light);
}

/* Tablet & Desktop Navigation */
@media (min-width: 768px) {
    .nav-links,
    .nav-user {
        display: flex;
    }

    .nav-mobile-toggle {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    .nav-logo {
        font-size: 1.25rem;
    }

    .nav-logo img {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: var(--nav-height);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    animation: heroZoom 20s ease-out forwards;
}

.hero-bg .slide.active {
    opacity: 1;
}

@keyframes heroZoom {
    from {
        transform: scale(1.1);
    }
    to {
        transform: scale(1);
    }
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--space-lg);
    max-width: 800px;
    width: 100%;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 600;
    color: #ffffff;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.3s both;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-xl);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out 0.5s both;
    line-height: 1.5;
}

.hero-search {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out 0.7s both;
    border: 2px solid transparent;
    transition: border-color var(--transition-fast);
}

.hero-search:focus-within {
    border-color: var(--color-accent);
}

.hero-search-input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    border: none;
    background: transparent;
    font-size: 1rem;
    color: var(--color-text);
    outline: none;
}

.hero-search-input::placeholder {
    color: var(--color-text-muted);
}

.hero-search-btn {
    padding: var(--space-md) var(--space-lg);
    background: var(--color-accent);
    color: white;
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.hero-search-btn:hover {
    background: var(--color-accent-hover);
}

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

/* Tablet & Desktop Hero */
@media (min-width: 768px) {
    .hero {
        height: 70vh;
        min-height: 500px;
    }

    .hero-content {
        padding: var(--space-xl);
    }
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main {
    padding: var(--space-2xl) 0;
}

@media (min-width: 768px) {
    .main {
        padding: var(--space-3xl) 0;
    }
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    justify-content: center;
}

.filter-btn {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-btn:hover {
    background: var(--color-border);
    color: var(--color-text);
    transform: translateY(-1px);
}

.filter-btn.active {
    background: var(--color-accent);
    color: white;
    box-shadow: var(--shadow-sm);
}

/* Recipes Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 640px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .recipes-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: var(--space-xl);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    opacity: 0.5;
}

.empty-state-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.empty-state-text {
    color: var(--color-text-secondary);
    margin-bottom: var(--space-lg);
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-bg-secondary);
    padding: var(--space-2xl) 0 var(--space-lg);
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    align-items: center;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.footer-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-logo img {
    border-radius: 50%;
}

.footer-tagline {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-top: var(--space-xs);
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

/* Tablet & Desktop Footer */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        text-align: left;
    }

    .footer-links {
        justify-content: flex-end;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: var(--color-accent-light);
    color: var(--color-text);
}
