/*
Theme Name: نادر ثيم
Theme URI: https://hmrecipes.com
Author: Nader
Author URI: https://hmrecipes.com
Description: Beautiful modern recipe theme with glass morphism design
Version: 10.0
License: GNU General Public License v2 or later
Text Domain: nader-theme
Tags: recipes, food, blog, custom-menu, featured-images
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary: #D4583A;
    --primary-dark: #B84832;
    --primary-light: #E67A5F;
    --accent: #F5A623;
    --accent-light: #FFD166;
    --bg-cream: #FFFBF5;
    --bg-white: #FFFFFF;
    --bg-light: #FFF8F0;
    --bg-alt: #F9F5F0;
    --bg-dark: #2C2C2C;
    --text-dark: #1A1A1A;
    --text-medium: #4A4A4A;
    --text-light: #7A7A7A;
    --text-white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --font-primary: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --font-script: 'Dancing Script', cursive;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary: #E67A5F;
    --primary-dark: #D4583A;
    --primary-light: #F09A82;
    --accent: #FFD166;
    --accent-light: #FFE299;
    --bg-cream: #1A1A1A;
    --bg-white: #242424;
    --bg-light: #2C2C2C;
    --bg-alt: #1E1E1E;
    --bg-dark: #0F0F0F;
    --text-dark: #F5F5F5;
    --text-medium: #D0D0D0;
    --text-light: #A0A0A0;
    --text-white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] body {
    background: var(--bg-cream);
    color: var(--text-dark);
}

[data-theme="dark"] .site-header {
    background: rgba(36, 36, 36, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .recipe-card {
    background: linear-gradient(145deg, rgba(42, 42, 42, 0.95), rgba(36, 36, 36, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .sidebar-card {
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .quick-info {
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-cream);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s ease;
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Utility */
.highlight {
    color: var(--primary);
    font-style: italic;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    height: 80px;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

.site-logo .icon {
    font-size: 1.75rem;
}

.site-logo .accent {
    color: var(--primary);
}

/* Navigation */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-dark);
    padding: 0.5rem 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: 0.3s ease;
}

.main-nav a:hover::after,
.main-nav .current-menu-item a::after {
    width: 100%;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Search */
.header-search {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    border-radius: var(--radius-xl);
    padding: 0.25rem;
}

.header-search input {
    width: 150px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    background: transparent;
    border: none;
    outline: none;
}

.header-search button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search button:hover {
    background: var(--primary-dark);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: 0.3s ease;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 88, 58, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.0625rem;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-light), var(--bg-alt));
}

.hero-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hero-title .script {
    font-family: var(--font-script);
    font-size: 4.5rem;
    font-weight: 600;
    color: var(--primary);
}

.hero-title .divider {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-light);
    opacity: 0.5;
}

.hero-tagline {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--text-medium);
    margin-bottom: 2.5rem;
    font-style: italic;
}

/* ============================================
   SECTION STYLES
   ============================================ */
.section {
    padding: 80px 0;
}

.section-alt {
    background: var(--bg-alt);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
}

.section-link {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-link:hover {
    gap: 0.75rem;
}

/* ============================================
   RECIPE GRID
   ============================================ */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* ============================================
   RECIPE CARD - Glass Style
   ============================================ */
.recipe-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(255, 248, 245, 0.9));
    backdrop-filter: blur(20px);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 220, 210, 0.4);
    box-shadow: 0 8px 32px rgba(212, 88, 58, 0.08);
    transition: all 0.4s ease;
}

.recipe-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 50px rgba(212, 88, 58, 0.15);
}

.recipe-card a {
    display: block;
    color: inherit;
}

.recipe-card .thumbnail {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.recipe-card .thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.recipe-card:hover .thumbnail img {
    transform: scale(1.15);
}

.recipe-card .badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(212, 88, 58, 0.95);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-xl);
}

.recipe-card .time-badge {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    padding: 0.5rem 0.875rem;
    background: white;
    border-radius: var(--radius-xl);
    font-size: 0.8125rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    box-shadow: var(--shadow-sm);
}

.recipe-card .time-badge i {
    color: var(--primary);
}

.recipe-card .content {
    padding: 1.75rem;
}

.recipe-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.recipe-card .category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 0.35rem 0.75rem;
    background: rgba(212, 88, 58, 0.1);
    border-radius: var(--radius-xl);
}

.recipe-card .rating {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.recipe-card .rating i {
    color: #FFB800;
    font-size: 0.85rem;
}

.recipe-card .rating span {
    margin-left: 0.5rem;
    font-weight: 600;
}

.recipe-card .title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.35;
    transition: color 0.3s ease;
}

.recipe-card:hover .title {
    color: var(--primary);
}

.recipe-card .excerpt {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card .info {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    margin-bottom: 1.25rem;
}

.recipe-card .info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.recipe-card .info-item i {
    font-size: 1.1rem;
    color: var(--primary);
}

.recipe-card .info-item span {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-medium);
}

.recipe-card .read-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-weight: 600;
    border-radius: var(--radius-xl);
    box-shadow: 0 4px 15px rgba(212, 88, 58, 0.3);
    transition: 0.3s ease;
}

.recipe-card .read-more:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 88, 58, 0.4);
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
}

.about-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(212, 88, 58, 0.3);
}

.about-badge .emoji {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.about-badge .text {
    font-weight: 600;
    font-size: 0.875rem;
}

.about-content .subtitle {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.about-content h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-content .quote {
    font-size: 1.125rem;
    color: var(--text-medium);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-style: italic;
}

/* ============================================
   NEWSLETTER
   ============================================ */
.newsletter {
    background: var(--primary);
    padding: 80px 0;
    text-align: center;
}

.newsletter h2 {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-xl);
    border: none;
    font-size: 1rem;
}

.newsletter-form button {
    padding: 1rem 2rem;
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: var(--radius-xl);
    font-weight: 600;
    cursor: pointer;
}

.newsletter-form button:hover {
    background: var(--bg-dark);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin: 1rem 0;
    line-height: 1.7;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-recipe {
    padding-top: 80px;
}

.recipe-hero {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.recipe-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-hero .overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.recipe-hero .hero-content {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    width: 100%;
    max-width: 1280px;
    padding: 0 20px;
}

.recipe-hero .hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.recipe-body {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.recipe-meta-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.meta-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
}

.meta-card i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    display: block;
}

.meta-card .label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.meta-card .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.recipe-content {
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--text-medium);
}

.recipe-content h2,
.recipe-content h3 {
    font-family: var(--font-heading);
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.recipe-content p {
    margin-bottom: 1.5rem;
}

.recipe-content ul,
.recipe-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    list-style: disc;
}

.recipe-content li {
    margin-bottom: 0.5rem;
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.page-content {
    padding-top: 100px;
    min-height: 70vh;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.75rem;
    color: var(--text-dark);
}

.page-body {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.9;
    color: var(--text-medium);
}

/* ============================================
   ARCHIVE/CATEGORY
   ============================================ */
.archive-header {
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-light));
    padding: 100px 0 60px;
    text-align: center;
}

.archive-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-dark);
}

/* ============================================
   404 PAGE
   ============================================ */
.error-404 {
    padding-top: 100px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-light));
}

.error-404 .icon {
    font-size: 6rem;
    margin-bottom: 1rem;
}

.error-404 h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--primary);
}

.error-404 h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
}

.error-404 p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header {
        height: 70px;
    }

    .main-nav {
        display: none;
    }

    .hero-title .script {
        font-size: 2.5rem;
    }

    .hero-title .divider {
        font-size: 2rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-badge {
        right: 50%;
        transform: translateX(50%);
    }

    .section-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .recipe-meta-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ENHANCED DARK MODE STYLES
   ============================================ */
[data-theme="dark"] .site-header {
    background: rgba(30, 30, 30, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .search-dropdown {
    background: var(--bg-white);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .search-form-full input[type="text"] {
    background: var(--bg-light);
    color: var(--text-dark);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .search-close {
    background: var(--bg-light);
    color: var(--text-medium);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-light), var(--bg-alt));
}

[data-theme="dark"] .newsletter {
    background: linear-gradient(135deg, #E67A5F, #D4583A);
}

[data-theme="dark"] .site-footer {
    background: #0F0F0F;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .footer-social a {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .meta-card {
    background: var(--bg-white);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .archive-header {
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-alt));
}

[data-theme="dark"] .error-404 {
    background: linear-gradient(135deg, var(--bg-cream), var(--bg-alt));
}

/* Dark mode transitions */
body,
.site-header,
.recipe-card,
.search-dropdown,
.newsletter,
.site-footer,
.meta-card {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   MICROANIMATIONS
   ============================================ */
/* Button Animations */
.btn,
.read-more,
button[type="submit"] {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.25s ease;
}

.btn:hover,
.read-more:hover,
button[type="submit"]:hover {
    transform: translateY(-3px);
}

.btn:active,
.read-more:active,
button[type="submit"]:active {
    transform: translateY(-1px);
}

/* Card Hover Animation */
.recipe-card {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-card:hover {
    transform: translateY(-12px) scale(1.02);
}

/* Image Zoom */
.recipe-card .thumbnail img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-card:hover .thumbnail img {
    transform: scale(1.1);
}

/* Social Icon Animation */
.footer-social a {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.footer-social a:hover {
    transform: translateY(-5px) scale(1.1);
}

/* Navigation Links */
.nav-list li a::after {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Badge/Tag Animation */
.recipe-card .badge,
.recipe-card .category {
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.recipe-card:hover .badge {
    transform: scale(1.05);
}

/* Time Badge Pop */
.recipe-card .time-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover .time-badge {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Rating Stars Animation */
.recipe-card .rating i {
    transition: transform 0.2s ease;
}

.recipe-card:hover .rating i {
    animation: starPulse 0.6s ease infinite;
    animation-delay: calc(var(--i, 0) * 0.1s);
}

.recipe-card .rating i:nth-child(1) { --i: 0; }
.recipe-card .rating i:nth-child(2) { --i: 1; }
.recipe-card .rating i:nth-child(3) { --i: 2; }
.recipe-card .rating i:nth-child(4) { --i: 3; }
.recipe-card .rating i:nth-child(5) { --i: 4; }

@keyframes starPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scale In Animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations on scroll (JS will add .animate class) */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.4s ease forwards;
}

/* Stagger delay for grid items */
.recipe-grid .recipe-card:nth-child(1) { animation-delay: 0.1s; }
.recipe-grid .recipe-card:nth-child(2) { animation-delay: 0.2s; }
.recipe-grid .recipe-card:nth-child(3) { animation-delay: 0.3s; }
.recipe-grid .recipe-card:nth-child(4) { animation-delay: 0.4s; }
.recipe-grid .recipe-card:nth-child(5) { animation-delay: 0.5s; }
.recipe-grid .recipe-card:nth-child(6) { animation-delay: 0.6s; }

/* Pulse animation for loading states */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Theme toggle animation */
.theme-toggle {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.theme-toggle:hover {
    transform: rotate(15deg);
}

.theme-toggle:active {
    transform: rotate(-15deg) scale(0.95);
}

/* Search toggle animation */
.search-toggle:hover {
    transform: scale(1.1);
}

/* Logo hover effect */
.logo-badge {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-badge:hover {
    transform: translateY(-3px) scale(1.02);
}

/* ============================================
   LAZY LOADING STYLES
   ============================================ */
/* Placeholder for lazy images */
.lazy-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

[data-theme="dark"] .lazy-image {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Fade in when loaded */
img[data-src] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded {
    opacity: 1;
}

/* ============================================
   SCROLL REVEAL (for JS)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
