/* Загальні стилі та тема */
:root{
    --bg-1: #121826; /* основний фон */
    --bg-2: #1C2230; /* блоки */
    --accent: #FF7A00; /* акценти */
    --header-height: 72px; /* fixed header height used to offset page content */
    --muted: #9aa6b6;
    --text-primary: #e6eef8;
    --bg-secondary: rgba(255,255,255,0.02);
    --header-bg: var(--bg-2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-1);
    color: var(--text-primary);
    line-height: 1.6;
    /* keep content visible below fixed header */
    padding-top: var(--header-height);
}

body.modal-open {
    overflow: hidden;
    padding-right: var(--scrollbar-width, 0px); /* Компенсація ширини скроллбара */
}

/* Шапка сайту */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(180deg, var(--bg-2), rgba(28,34,48,0.98));
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(2,6,23,0.2);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* keep left padding but reserve extra right space for absolute profile button */
        padding-left: 0; /* moved logo closer to screen edge */
    padding-right: 280px;
}

/* Make container a positioning context so profile can be absolute to the right */
.nav-container { position: relative; }

.logo h1 {
    color: var(--accent);
    font-size: 1.8rem;
    font-weight: 700;
    transition: color 200ms ease;
}

.logo h1:hover {
    color: var(--accent-hover);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    /* allow nav to take available space and be centered */
    flex: 1 1 auto;
    justify-content: center;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 200ms ease,
                transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: right;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    /* push actions (search, login/profile) to the far right */
    margin-left: auto;
}

/* Keep logo and actions fixed size so nav stays centered */
.logo {
    flex: 0 0 auto;
    margin-left: -48px; /* push logo far to the left */
}

.nav-actions {
    flex: 0 0 auto;
}

.search-container {
    display: flex;
    align-items: center;
}

.login-btn {
    background: linear-gradient(90deg, var(--accent), rgba(255,122,0,0.95));
    color: var(--text-primary);
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 200ms ease,
                background 200ms ease;
    box-shadow: 0 4px 12px rgba(255,122,0,0.15);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255,122,0,0.25);
}

/* Profile dropdown (visible when logged in) */
.profile-container {
    position: relative;
    display: flex;
    align-items: center;
}

/* Float the profile block to the far right of the header (visually detached) */
.profile-container {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, rgba(255,122,0,0.15), rgba(255,122,0,0.05));
    color: var(--text-primary);
    border: 1.5px solid rgba(255,122,0,0.4);
    padding: 0.7rem 1.4rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(255,122,0,0.15);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    margin-left: 20px;
    margin-right: 1px;
}

.profile-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 600ms ease;
}

.profile-btn:hover {
    background: linear-gradient(135deg, rgba(255,122,0,0.25), rgba(255,122,0,0.1));
    border-color: rgba(255,122,0,0.6);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255,122,0,0.25);
}

.profile-avatar {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(255,122,0,0.18), rgba(255,122,0,0.08));
    color: #222;
    font-size: 1.2rem;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: background 180ms ease, transform 180ms ease;
}

.profile-avatar.has-image {
    color: transparent;
}

.profile-btn:hover::before {
    transform: translateX(100%);
}

.profile-btn:active {
    transform: translateY(-1px);
}

.profile-name {
    font-size: 0.95rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
}

.profile-btn i {
    font-size: 0.85rem;
    color: var(--accent);
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-btn[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.profile-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.8rem);
    background: linear-gradient(180deg, rgba(28,34,48,0.99), rgba(18,24,38,0.99));
    border: 1px solid rgba(255,122,0,0.2);
    border-radius: 12px;
    padding: 0.6rem;
    min-width: 180px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    display: none;
    z-index: 1500;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-menu.open {
    display: flex;
    flex-direction: column;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.profile-menu-item {
    padding: 0.6rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: background-color 200ms ease, color 200ms ease;
    display: block;
    white-space: nowrap;
}

.profile-menu-item:hover {
    background-color: rgba(255, 122, 0, 0.15);
    color: var(--accent);
}

/* Hide any unexpected input inside profile menu/dropdowns (removes header search in account dropdown) */
.profile-menu input,
.profile-container input {
    display: none !important;
}

#searchInput {
    padding: 0.5rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
    color: var(--text-primary);
    width: 220px;
    margin-right: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease, transform 200ms ease;
}

/* Responsive search width so header doesn't overflow when logged in */
#searchInput {
    max-width: 34vw;
    min-width: 120px;
}

#searchInput:focus {
    outline: none;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(0,0,0,0.08));
    border-color: rgba(255,255,255,0.08);
    color: var(--text-primary);
    transform: scale(1.02);
}

.search-btn {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.2rem;
    transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), color 200ms ease;
}

.search-btn:hover {
    color: var(--accent-hover);
    transform: scale(1.1);
}

/* Inline SVG inside search button sizing */
.search-btn svg {
    width: 1.2rem;
    height: 1.2rem;
    display: block;
}



/* Hero секція */
.hero {
    margin-top: 0;
    padding: 2rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.02), var(--bg-2));
    border-radius: 14px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    box-shadow: 0 8px 28px rgba(2,6,23,0.65);
}

.hero-image {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-type {
    color: #ff6b35;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.hero-content h2 {
    font-size: 2.5rem;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1rem;
    color: #a0aec0;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.cta-button {
    padding: 0.8rem 1.25rem;
    background: linear-gradient(90deg, var(--accent), rgba(255,122,0,0.95));
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 220ms cubic-bezier(.2,.9,.2,1), box-shadow 220ms ease;
    align-self: flex-start;
    box-shadow: 0 6px 16px rgba(255,122,0,0.12);
}

.cta-button:hover {
    transform: translateY(-3px);
}

/* Секція рецептів */
.recipes-section {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    background-color: #0d1420;
}

.recipes-section h2 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #ffffff;
    font-weight: 500;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    padding: 0.5rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.category-container h3 {
    margin-bottom: 1.5rem;
    color: #ffffff;
}

.recipe-cards {
    display: grid;
    gap: 1.5rem;
}

.recipe-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 18px rgba(2,6,23,0.6);
    transition: transform 280ms cubic-bezier(.2,.9,.2,1), 
                box-shadow 280ms ease, 
                border-color 280ms ease,
                background 280ms ease;
    position: relative;
    isolation: isolate;
}

.recipe-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(255,122,0,0.03));
    opacity: 0;
    transition: opacity 280ms ease;
    z-index: -1;
    pointer-events: none;
}

.recipe-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 36px rgba(2,6,23,0.7);
    border-color: rgba(255,122,0,0.15);
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.14));
}

.recipe-card:hover::after {
    opacity: 1;
}

.recipe-image {
    height: 170px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.recipe-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(0,0,0,0.28) 100%);
    transition: opacity 260ms ease;
    opacity: 0.9;
}

.recipe-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.recipe-info h4 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.1rem;
    font-weight: 600;
}

.recipe-description {
    color: #94a3b8;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cook-time {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Unified badge + cook-time appearance across all pages */
.recipe-meta .cook-time { color: #ffffff !important; }
.recipe-category {
    background: rgba(0,0,0,0.28) !important;
    color: #ff7a00 !important;
    padding: 0.18rem 0.5rem !important;
    border-radius: 16px !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18) !important;
    margin-left: 0 !important;
    margin-right: 4px !important;
}

.recipe-category {
    background-color: #334155;
    color: #94a3b8;
    padding: 0.16rem 0.5rem;
    border-radius: 999px;
    font-size: 0.78rem;
    margin-left: 0;
    margin-right: 4px;
}

.meta-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recipe-button {
    background: linear-gradient(90deg, var(--accent), rgba(255,122,0,0.95));
    color: #fff;
    border: none;
    padding: 0.28rem 0.9rem;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 600;
    height: 30px;
    cursor: pointer;
    transition: transform 180ms cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 180ms ease,
                background 180ms ease;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.recipe-button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 400ms ease;
}

.recipe-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(255,122,0,0.18);
}

.recipe-button:hover::after {
    transform: translateX(100%);
}

.recipe-like {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-like:hover {
    color: #f97316;
}

.recipe-like svg {
    width: 20px;
    height: 20px;
}

.view-recipe {
    padding: 0.4rem 0.8rem;
    background-color: transparent;
    color: #ff6b35;
    border: 1px solid #ff6b35;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.view-recipe:hover {
    background-color: #ff6b35;
    color: #ffffff;
}

/* Сезонна секція */
.seasons-section {
    padding: 4rem 2rem;
    background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
    border-top: 1px solid rgba(255,255,255,0.03);
    border-bottom: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 20px 40px rgba(2,6,23,0.4);
}

.seasons-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--accent);
    font-size: 2rem;
    font-weight: 600;
}

.seasons-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 0.5rem;
}

.season-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    height: 240px;
    border: 1px solid rgba(255,255,255,0.04);
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
    box-shadow: 0 6px 18px rgba(2,6,23,0.6);
    transition: transform 280ms cubic-bezier(.2,.9,.2,1), 
                box-shadow 280ms ease, 
                border-color 280ms ease;
}

.season-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms cubic-bezier(.2,.9,.2,1);
}

.season-card:hover {
    transform: translateY(-6px) scale(1.01);
    box-shadow: 0 18px 36px rgba(2,6,23,0.7);
    border-color: rgba(255,122,0,0.15);
}

.season-card:hover img {
    transform: scale(1.08);
}

.season-card h3 {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.5rem 1.2rem;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.4rem;
    transform: translateY(0);
    transition: transform 280ms cubic-bezier(.2,.9,.2,1);
}

.season-card:hover h3 {
    transform: translateY(-8px);
}

/* Футер */
.footer {
    background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
    padding: 4rem 2rem 2rem;
    border-top: 1px solid rgba(255,255,255,0.03);
    box-shadow: 0 -10px 40px rgba(2,6,23,0.4);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.footer-info h3 {
    color: var(--accent);
    margin-bottom: 1.2rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
}

.social-link {
    color: var(--muted);
    text-decoration: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(0,0,0,0.1));
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 16px;
    transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.social-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, var(--accent), rgba(255,122,0,0.8));
    opacity: 0;
    transition: opacity 250ms ease;
    z-index: -1;
}

.social-link i {
    font-size: 1.5rem;
    transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.social-link:hover {
    color: #fff;
    border-color: rgba(255,122,0,0.3);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 28px rgba(255,122,0,0.2);
}

.social-link:hover::before {
    opacity: 1;
}

.social-link:hover i {
    transform: scale(1.15);
}

/* Специфічні кольори для соціальних мереж при наведенні */
.social-link.facebook:hover::before {
    background: linear-gradient(45deg, #1877f2, #0a3d80);
}

.social-link.instagram:hover::before {
    background: linear-gradient(45deg, #833AB4, #FD1D1D, #F77737);
}

.social-link.twitter:hover::before {
    background: linear-gradient(45deg, #1DA1F2, #0c85d0);
}

.social-link.pinterest:hover::before {
    background: linear-gradient(45deg, #E60023, #ab001b);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.04);
    color: var(--muted);
    font-size: 0.95rem;
}

/* Адаптивний дизайн */
@media (max-width: 1200px) {
    .seasons-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .logo { margin-left: 0; } /* reset negative margin on mobile */

    .nav-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        padding-right: 1rem;
        align-items: stretch;
    }

    /* reduce header height on small screens so padding-top isn't excessive */
    :root { --header-height: 64px; }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        width: 100%;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: inline-block;
        width: 100%;
        padding: 0.75rem 0;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        margin-left: 0;
        position: relative;
    }

    .profile-container {
        position: static;
        transform: none;
        right: auto;
        top: auto;
        width: 100%;
    }

    .profile-btn {
        width: 100%;
        justify-content: space-between;
        margin-left: 0;
    }

    .login-btn,
    .catalog-button {
        width: 100%;
        max-width: 100%;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-image {
        height: 320px;
    }

    .hero-content {
        padding: 1.2rem;
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .recipes-section,
    .about-content,
    .contact-main,
    .footer,
    .seasons-section {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .recipes-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .recipes-header h2 {
        font-size: 1.75rem;
    }

    .recipes-header .header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .page-search {
        width: 100%;
        max-width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .social-links {
        justify-content: center;
    }

    .seasons-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
}

@media (max-width: 600px) {
    .header {
        padding: 0.8rem 0;
    }

    .nav-container {
        padding: 0.8rem 0.9rem;
    }

    .hero-image {
        height: 260px;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h2 {
        font-size: 1.75rem;
    }

    .recipe-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.6rem;
    }

    .recipe-button,
    .login-btn,
    .catalog-button,
    .submit-btn {
        width: 100%;
    }

    .page-search {
        font-size: 0.95rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .footer {
        padding: 3rem 1rem 2rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
    }

    .seasons-section {
        padding: 2rem 1rem;
    }

    .modal-content {
        width: min(100%, 94vw);
        padding: 1.2rem;
    }
}

@media (max-width: 480px) {
    .hero-image {
        height: 220px;
    }

    .hero-content {
        padding: 0.9rem;
    }

    .nav-links a {
        padding: 0.7rem 0;
    }

    .profile-btn {
        padding: 0.75rem 1rem;
    }

    .footer {
        padding: 2rem 0.8rem 1.5rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .recipe-button,
    .login-btn,
    .catalog-button,
    .submit-btn {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Стилі для зображень рецептів */
.recipe-image {
    background-image: url('../images/recipe1.jpg');
}

.pasta-img {
    background-image: url('../images/pasta.jpg');
}

.dessert-img {
    background-image: url('../images/dessert.jpg');
}

.burger-btn {
    display: none;
}

.mobile-menu {
    display: none;
}

.mobile-fab {
    display: none;
}

@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1100;
        padding: 0.85rem 0 0.5rem;
        background: linear-gradient(180deg, var(--bg-2), rgba(28,34,48,0.96));
    }

    .nav-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        max-width: 100%;
        padding: 0 15px;
    }

    .nav-links {
        display: none !important;
    }

    .burger-btn {
        display: none !important;
    }

    .burger-btn span {
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: #fff;
    }

    .login-btn {
        display: none;
    }

    .profile-btn {
        width: auto;
        min-width: 0;
        padding: 0.65rem 1rem;
        gap: 0.65rem;
    }

    .mobile-menu {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        display: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 220ms ease, visibility 220ms ease;
        z-index: 1200;
        overflow-x: hidden;
    }

    .mobile-fab {
        display: inline-flex;
        position: fixed;
        right: 20px;
        bottom: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #ff7a33;
        color: #fff;
        align-items: center;
        justify-content: center;
        border: none;
        box-shadow: 0 18px 32px rgba(255,119,51,0.28);
        cursor: pointer;
        z-index: 9999; /* Above all other elements */
        transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 220ms ease, visibility 220ms ease;
    }

    .mobile-fab:hover {
        transform: scale(1.04);
        box-shadow: 0 20px 38px rgba(255,119,51,0.34);
    }

    .mobile-fab:active {
        transform: scale(0.96);
    }

    .mobile-fab::before {
        content: '';
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 1px;
        box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
    }

    .menu-open .mobile-fab,
    .mobile-fab.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(0.92);
    }

    .mobile-menu.open {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
    }

    .mobile-menu__panel {
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: min(320px, 78vw);
        background: #111b2c;
        padding: 1.25rem 1rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        transform: translateX(100%);
        transition: transform 240ms ease;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.35);
    }

    .mobile-menu.open .mobile-menu__panel {
        transform: translateX(0);
    }

    .mobile-menu__close {
        align-self: flex-end;
        width: 42px;
        height: 42px;
        border: none;
        border-radius: 50%;
        background: rgba(255,255,255,0.08);
        color: #fff;
        font-size: 1.4rem;
        cursor: pointer;
    }

    .mobile-menu__nav {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-top: 0.5rem;
    }

    .mobile-menu__nav a {
        display: block;
        color: var(--text-primary);
        text-decoration: none;
        padding: 0.95rem 1rem;
        border-radius: 14px;
        background: rgba(255,255,255,0.05);
        transition: background 200ms ease;
    }

    .mobile-menu__nav a:hover {
        background: rgba(255,122,0,0.14);
    }

    .mobile-menu__login {
        margin-top: auto;
        width: 100%;
        min-height: 44px;
        border: none;
        border-radius: 14px;
        background: var(--accent);
        color: #fff;
        font-weight: 700;
        cursor: pointer;
    }

    /* Мобільний профіль (коли залогінений) */
    .mobile-menu__profile {
        margin-top: auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .mobile-profile-link {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.85rem 1rem;
        background: rgba(255, 122, 0, 0.15);
        border: 2px solid var(--accent);
        border-radius: 14px;
        text-decoration: none;
        color: #fff;
        font-weight: 700;
        text-transform: uppercase;
        font-size: 0.9rem;
        transition: all 200ms ease;
    }

    .mobile-profile-link:hover {
        background: rgba(255, 122, 0, 0.25);
        transform: scale(1.02);
    }

    .mobile-profile-avatar {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--accent);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        flex-shrink: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }

    .mobile-profile-avatar.has-image {
        font-size: 0;
    }

    .mobile-profile-name {
        flex: 1;
        word-break: break-word;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-profile-logout {
        width: 100%;
        min-height: 44px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
        font-weight: 600;
        cursor: pointer;
        transition: all 200ms ease;
    }

    .mobile-profile-logout:hover {
        background: rgba(255, 255, 255, 0.12);
    }

    .profile-menu,
    .profile-menu.open,
    .profile-menu-item,
    #profileMenu,
    .profile-menu a,
    .profile-menu button {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    .hero {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 15px 1.5rem;
    }

    .hero-image {
        width: 100%;
        border-radius: 18px;
        overflow: hidden;
    }

    .hero-image img {
        width: 100%;
        display: block;
        object-fit: cover;
        height: auto;
    }

    .hero-content {
        text-align: center;
        padding: 0;
    }

    .hero-content h2 {
        font-size: 2.2rem;
        line-height: 1.08;
        margin: 0.75rem 0 0.85rem;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.7;
        color: #cbd5e1;
        margin: 0 auto 1.5rem;
        max-width: 42rem;
    }

    .cta-button {
        width: 100%;
        min-height: 44px;
        border-radius: 14px;
        font-size: 1rem;
        padding: 1rem 1.1rem;
    }

    .recipes-section {
        padding: 0 15px 1.5rem;
    }

    .recipes-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
        padding-left: 0;
    }

    .categories-grid {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .categories-grid > * {
        flex: 0 0 84%;
        min-width: 84%;
        scroll-snap-align: start;
    }

    .categories-grid::-webkit-scrollbar {
        display: none;
    }

    .recipe-card {
        width: auto;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.1);
        box-shadow: none;
        overflow: hidden;
        background: rgba(255,255,255,0.03);
    }

    .recipe-image {
        aspect-ratio: 16 / 9;
        min-height: 180px;
    }

    .recipe-card .recipe-info {
        padding: 1rem;
    }

    .recipe-info h4 {
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .recipe-description {
        font-size: 1rem;
        margin-bottom: 1rem;
        color: #cbd5e1;
    }

    .recipe-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .recipe-button {
        min-height: 44px;
        border-radius: 14px;
        padding: 0.95rem 1rem;
    }

    .recipe-like {
        min-width: 44px;
        min-height: 44px;
        border-radius: 14px;
        background: rgba(255,255,255,0.08);
    }

    .seasons-section {
        padding: 1.5rem 15px 2rem;
    }

    .seasons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.9rem;
    }

    .season-card {
        min-height: 180px;
        border-radius: 16px;
        overflow: hidden;
    }

    .season-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .season-card h3 {
        font-size: 1rem;
        padding: 1rem;
    }

    .footer {
        padding: 2rem 15px 2rem;
    }
}

@media (max-width: 480px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1100;
        padding: 0.85rem 15px;
        background: linear-gradient(180deg, var(--bg-2), rgba(28,34,48,0.96));
    }

    .nav-container {
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .logo {
        margin-left: 0;
    }

    .nav-actions {
        gap: 0.75rem;
    }

    .nav-links {
        display: none !important;
    }

    .login-btn {
        display: none !important;
    }

    .profile-container {
        display: none !important;
    }

    .burger-btn {
        display: none !important;
    }

    .mobile-fab {
        display: inline-flex;
        position: fixed;
        right: 20px;
        bottom: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: #ff7a33;
        color: #fff;
        align-items: center;
        justify-content: center;
        border: none;
        box-shadow: 0 18px 32px rgba(255,119,51,0.28);
        cursor: pointer;
        z-index: 9999; /* Above all other elements */
        transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, opacity 220ms ease, visibility 220ms ease;
    }

    .mobile-fab:hover {
        transform: scale(1.04);
        box-shadow: 0 20px 38px rgba(255,119,51,0.34);
    }

    .mobile-fab:active {
        transform: scale(0.96);
    }

    .mobile-fab::before {
        content: '';
        width: 20px;
        height: 2px;
        background: #fff;
        border-radius: 1px;
        box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
    }

    .menu-open .mobile-fab,
    .mobile-fab.hidden {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: scale(0.92);
    }

    .hero {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem 15px 1.25rem;
    }

    .hero-image {
        width: 100%;
        border-radius: 18px;
        overflow: hidden;
        min-height: 180px;
    }

    .hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .hero-content {
        text-align: center;
        padding: 0;
    }

    .hero-content h2 {
        font-size: 22px;
        line-height: 1.2;
        margin: 0.75rem 0 0.85rem;
    }

    .hero-content p {
        font-size: 15px;
        line-height: 1.7;
        margin: 0 auto 1.25rem;
        max-width: 100%;
        color: #cbd5e1;
    }

    .cta-button {
        width: 100%;
        min-height: 48px;
        border-radius: 14px;
        font-size: 1rem;
        padding: 1rem 1rem;
    }

    .recipes-section {
        padding: 0 15px 1.5rem;
    }

    .recipes-section h2 {
        font-size: 1.4rem;
        margin-bottom: 0.85rem;
    }

    .categories-grid {
        display: flex;
        gap: 1rem;
        overflow-x: auto;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .categories-grid > * {
        flex: 0 0 84%;
        min-width: 84%;
        scroll-snap-align: start;
    }

    .categories-grid::-webkit-scrollbar {
        display: none;
    }

    .recipe-card {
        width: auto;
        min-width: 84%;
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.08);
        box-shadow: none;
        overflow: hidden;
        background: rgba(255,255,255,0.03);
    }

    .recipe-card .recipe-info {
        padding: 1rem;
    }

    .recipe-info h4 {
        font-size: 1.1rem;
        margin-bottom: 0.7rem;
    }

    .recipe-description {
        font-size: 0.95rem;
        margin-bottom: 0.9rem;
        color: #cbd5e1;
    }

    .recipe-meta {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .recipe-button,
    .recipe-like {
        min-height: 44px;
        border-radius: 14px;
    }

    .seasons-section {
        padding: 1.5rem 15px 2rem;
    }

    .seasons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .season-card {
        min-height: 160px;
        border-radius: 16px;
        overflow: hidden;
        position: relative;
    }

    .season-card img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .season-card::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,0.75) 100%);
        pointer-events: none;
    }

    .season-card h3 {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 1rem;
        z-index: 1;
        color: #fff;
        font-size: 1rem;
        line-height: 1.3;
    }

    .footer {
        padding: 2rem 15px 2rem;
        text-align: center;
    }

    .footer-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
    }

    .social-links {
        justify-content: center;
        gap: 15px;
    }

    .footer .social-link {
        width: 44px;
        height: 44px;
    }
}

/* Page transition container */
.fade-page {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* ========== INDEX.HTML SPECIFIC MOBILE FIXES ========== */
@media (max-width: 768px) {
    /* Fix Hero section positioning */
    .hero {
        position: relative;
        z-index: 1;
        margin-bottom: 2rem;
    }

    /* Fix categories grid for index.html - horizontal scrolling carousel */
    .recipes-section .categories-grid {
        display: flex !important;
        flex-direction: row !important;
        gap: 1rem !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        white-space: nowrap !important;
        padding: 0 15px 10px 15px !important;
        margin-bottom: 2rem !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE/Edge */
    }

    /* Hide scrollbar for WebKit browsers */
    .recipes-section .categories-grid::-webkit-scrollbar {
        display: none !important;
    }

    .recipes-section .categories-grid > .recipe-card {
        flex-shrink: 0 !important;
        width: 280px !important;
        max-width: 280px !important;
        min-width: 280px !important;
        margin: 0 !important;
        scroll-snap-align: start !important;
    }

    /* Ensure recipe cards display properly on index.html */
    .recipes-section .recipe-card {
        display: flex !important;
        flex-direction: column !important;
        background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12)) !important;
        border: 1px solid rgba(255,255,255,0.04) !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        box-shadow: 0 6px 18px rgba(2,6,23,0.6) !important;
        transition: transform 280ms cubic-bezier(.2,.9,.2,1),
                    box-shadow 280ms ease,
                    border-color 280ms ease,
                    background 280ms ease !important;
        cursor: pointer !important;
    }

    .recipes-section .recipe-card:hover {
        transform: translateY(-4px) scale(1.02) !important;
        box-shadow: 0 12px 24px rgba(2,6,23,0.7) !important;
        border-color: rgba(255,122,0,0.15) !important;
    }

    .recipes-section .recipe-image {
        height: 180px !important;
        background-size: cover !important;
        background-position: center !important;
    }

    .recipes-section .recipe-info {
        padding: 1.25rem !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }

    .recipes-section .recipe-info h4 {
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        color: #f8fafc !important;
        margin: 0 !important;
    }

    .recipes-section .recipe-description {
        color: #94a3b8 !important;
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }

    .recipes-section .recipe-meta {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        margin-top: 0.5rem !important;
    }

    .recipes-section .meta-left {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .recipes-section .cook-time {
        color: #ffffff !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
    }

    .recipes-section .recipe-category {
        background: rgba(0,0,0,0.28) !important;
        color: #ff7a00 !important;
        padding: 0.18rem 0.5rem !important;
        border-radius: 16px !important;
        font-size: 0.85rem !important;
        font-weight: 700 !important;
        box-shadow: inset 0 -3px 0 rgba(0,0,0,0.18) !important;
    }

    .recipes-section .meta-right {
        display: flex !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .recipes-section .recipe-button {
        background: linear-gradient(90deg, var(--accent), rgba(255,122,0,0.95)) !important;
        color: #fff !important;
        border: none !important;
        padding: 0.5rem 1rem !important;
        border-radius: 8px !important;
        font-size: 0.9rem !important;
        font-weight: 500 !important;
        cursor: pointer !important;
        transition: transform 180ms ease !important;
    }

    .recipes-section .recipe-button:hover {
        transform: translateY(-1px) !important;
    }

    .recipes-section .recipe-like {
        background: rgba(255,255,255,0.08) !important;
        border: none !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        color: #94a3b8 !important;
        transition: all 180ms ease !important;
    }

    .recipes-section .recipe-like:hover {
        background: rgba(255,255,255,0.12) !important;
        color: #ff6b6b !important;
    }

    .recipes-section .recipe-like.liked {
        color: #ff6b6b !important;
        background: rgba(255,107,107,0.1) !important;
    }

    /* Seasons section mobile fixes */
    .seasons-section {
        padding: 2rem 15px !important;
    }

    .seasons-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .season-card {
        height: auto !important;
        min-height: 180px !important;
        display: block !important;
        padding: 0 !important;
        border-radius: 14px !important;
        overflow: hidden !important;
        background: transparent !important;
        color: white !important;
        text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    }

    .season-card img {
        width: 100% !important;
        height: 180px !important;
        object-fit: cover !important;
    }

    .season-card h3 {
        position: relative !important;
        bottom: auto !important;
        left: auto !important;
        right: auto !important;
        padding: 1rem !important;
        background: rgba(0,0,0,0.6) !important;
        margin: 0 !important;
        font-size: 1rem !important;
        transform: none !important;
    }
}

/* ========== MODAL Z-INDEX FIX FOR INDEX.HTML ========== */
.recipe-modal-overlay {
    z-index: 10000 !important;
}

/* Ensure modal appears above all index.html elements */
.fade-page .recipe-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    z-index: 10000 !important;
}
.fade-page.visible {
    opacity: 1;
}
.fade-page.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Modal styles */
.recipe-modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: rgba(3,6,12,0.95);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 280ms cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2000;
    overflow-y: auto;
    padding: 2rem 1rem;
}

.recipe-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.recipe-modal {
    width: min(920px, 95%);
    margin: auto;
    background: var(--bg-1);
    border-radius: 12px;
    color: var(--text-primary);
    position: relative;
    transform: translateY(24px) scale(0.98);
    transition: transform 320ms cubic-bezier(.2,.9,.2,1);
    padding: 0;
    overflow: hidden;
}

.recipe-modal-overlay.open .recipe-modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
    transition: color 180ms ease;
}

.modal-close:hover {
    color: var(--accent);
}

.modal-image-wrap {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.modal-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.3), transparent);
    pointer-events: none;
}

.modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-image-wrap {
    width: 100%;
    height: 260px;
    overflow: hidden;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    position: relative;
}

.modal-image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, var(--bg-2) 0%, transparent 100%);
    opacity: 0.8;
    pointer-events: none;
}

.modal-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 400ms ease;
}

.recipe-modal:hover .modal-image-wrap img {
    transform: scale(1.04);
}

.modal-body {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

#modalTitle {
    color: #fff;
    font-size: 2rem;
    margin: 0 0 1.5rem 0;
    font-weight: 600;
}

.modal-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.difficulty {
    background: var(--accent);
    color: #111;
    padding: 0.25rem 1rem;
    border-radius: 6px;
    font-weight: 600;
}

.cook-time {
    color: #ffffff;
}

.ingredients {
    margin-bottom: 2rem;
}

.ingredients h4,
.preparation h4 {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 2rem;
    margin: 0;
}

.modal-body ul li {
    color: #fff;
    position: relative;
    padding-left: 1rem;
}

.modal-body ul li::before {
    content: "•";
    color: var(--accent);
    position: absolute;
    left: 0;
}

.modal-body ol {
    color: #fff;
    padding-left: 1.2rem;
    margin: 0;
}

.modal-body ol li {
    margin-bottom: 0.5rem;
}

.modal-body ol li:last-child {
    margin-bottom: 0;
}

.modal-section h4 {
    margin: 0.6rem 0 0.6rem 0;
    color: #ff8a5b;
    font-size: 1rem;
}

.ingredients-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 0.5rem 1.2rem;
    padding: 0.6rem 0 0 0;
    margin: 0;
}
.ingredients-list li {
    position: relative;
    padding-left: 1.2rem;
    color: #cbd5e1;
}
.ingredients-list li::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 999px;
    position: absolute;
    left: 0.2rem;
    top: 0.6rem;
}

.preparation ol {
    margin: 0.5rem 0 0 1.1rem;
    color: #cbd5e1;
    padding-right: 0.5rem;
}
.preparation li { margin-bottom: 0.6rem; }

@media (max-width: 680px) {
    .modal-image-wrap { height: 180px; }
    .ingredients-list { grid-template-columns: 1fr; }
    .recipe-modal { width: 96%; }
}

/* Desktop tweaks for long usernames: truncate to avoid stretching header */
.profile-name {
    max-width: 9ch;
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* On small screens keep profile in normal flow */
@media (max-width: 768px) {
    .profile-container {
        position: static;
        transform: none;
        right: auto;
        margin-left: 0;
    }
}

/* Final mobile override for navigation */
@media (max-width: 768px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1100;
        background: linear-gradient(180deg, var(--bg-2), rgba(28,34,48,0.96));
    }

    .nav-links {
        display: none !important;
    }

    .burger-btn {
        display: inline-flex !important;
    }

    .login-btn {
        display: none !important;
    }

    .profile-container {
        display: none !important;
    }

    .mobile-menu {
        display: none;
    }

    .mobile-menu.open {
        display: block;
    }
}
