/*
 * ==========================================================================
 * DESIGN SYSTEM — Nutritionist Landing Page
 * Palette inspired by ddwellness.ru: natural, calm tones with sage green accents
 * ==========================================================================
 */

/* ----- CSS Variables (Design Tokens) ----- */
:root {
    /* Colors */
    --bg-main:       #FAF8F5;
    --bg-alt:        #F2EDE7;
    --bg-dark:       #2D2D2D;
    --text-primary:  #2D2D2D;
    --text-secondary:#6B6B6B;
    --text-light:    #9A9A9A;
    --accent:        #7B8B6F;
    --accent-hover:  #6A7A5E;
    --accent-light:  #E8EDE4;
    --gold:          #C9A96E;
    --gold-light:    #F5EED9;
    --white:         #FFFFFF;
    --danger:        #D45D5D;
    --success:       #5DA87B;

    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Montserrat', -apple-system, sans-serif;

    /* Spacing */
    --section-py: clamp(60px, 8vw, 120px);
    --gap:        clamp(16px, 2vw, 32px);

    /* Radius */
    --radius:     12px;
    --radius-lg:  20px;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(0,0,0,0.06);
    --shadow-md:  0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.12);

    /* Transitions */
    --ease:       cubic-bezier(0.4, 0, 0.2, 1);
    --duration:   0.3s;
}


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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--duration) var(--ease);
}

a:hover {
    color: var(--accent-hover);
}

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


/* ----- Container ----- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--gap);
}


/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 248, 245, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: box-shadow var(--duration) var(--ease);
}

.site-header.scrolled {
    box-shadow: var(--shadow-sm);
}

.site-header nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-primary);
    position: relative;
    padding: 4px 0;
}

.nav-links a:not(.nav-cta)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--duration) var(--ease);
}

.nav-links a:not(.nav-cta):hover::after {
    width: 100%;
}

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--duration) var(--ease);
    border-radius: 2px;
}

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


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--accent);
    color: var(--white);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--accent);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
    letter-spacing: 0.02em;
}

.btn-cta:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 139, 111, 0.3);
}

.btn-cta--lg {
    padding: 16px 36px;
    font-size: 1rem;
}

.btn-cta--sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-cta--full {
    width: 100%;
    justify-content: center;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: transparent;
    color: var(--accent);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid var(--accent);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    text-decoration: none;
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(123, 139, 111, 0.3);
}

.btn-outline--lg {
    padding: 16px 36px;
    font-size: 1rem;
}


/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background:
        linear-gradient(135deg, rgba(123,139,111,0.08) 0%, rgba(201,169,110,0.06) 50%, rgba(250,248,245,0.95) 100%),
        url('https://images.unsplash.com/photo-1490645935967-10de6ba17061?w=1920&q=80') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(250, 248, 245, 0.88) 0%,
        rgba(250, 248, 245, 0.75) 40%,
        rgba(250, 248, 245, 0.6) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 0 140px;
}

.hero-text {
    max-width: 680px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    margin-bottom: 20px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}


/* ==========================================================================
   SECTIONS (shared)
   ========================================================================== */

.section {
    padding: var(--section-py) 0;
}

.section.services,
.section.reviews {
    background: var(--bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: clamp(40px, 5vw, 70px);
}

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}


/* ==========================================================================
   ABOUT
   ========================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 60px;
    align-items: start;
    margin-bottom: 60px;
}

.about-photo {
    position: relative;
}

.about-photo-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 3/4;
    background: var(--bg-alt);
}

.about-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-photo-accent {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.4;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    gap: 12px;
}

.photo-placeholder i {
    font-size: 4rem;
    opacity: 0.4;
}

.about-text p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.about-stats {
    display: flex;
    gap: 40px;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--bg-alt);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 4px;
}


/* --- Diplomas --- */

.diplomas-section {
    margin-top: 40px;
}

.diplomas-section h3 {
    text-align: center;
    font-size: 1.6rem;
    margin-bottom: 30px;
}

.diplomas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.diploma-card {
    text-align: center;
    cursor: pointer;
}

.diploma-img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid rgba(0,0,0,0.08);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.diploma-img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.diploma-title {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}


/* ==========================================================================
   SERVICES
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--gap);
}

.service-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
    display: flex;
    flex-direction: column;
}

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

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.service-icon i {
    font-size: 1.5rem;
    color: var(--accent);
}

.service-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
}

.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    flex: 1;
    margin-bottom: 24px;
}

.service-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.service-price {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold);
}

.services-callback {
    text-align: center;
    margin-top: 50px;
}

.services-callback p {
    color: var(--text-secondary);
    margin-bottom: 16px;
}


/* ==========================================================================
   REVIEWS
   ========================================================================== */

.reviews-slider {
    position: relative;
}

.reviews-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--gap);
}

.review-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease);
}

.review-card:hover {
    transform: translateY(-4px);
}

.review-quote i {
    font-size: 2.5rem;
    color: var(--accent-light);
    line-height: 1;
}

.review-text {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 16px 0 24px;
    font-style: italic;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-light);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.review-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.reviews-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 32px;
}

.slider-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all var(--duration) var(--ease);
}

.slider-btn:hover {
    background: var(--accent);
    color: var(--white);
}


/* ==========================================================================
   CONTACTS
   ========================================================================== */

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--gap);
    margin-bottom: 40px;
}

.contact-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform var(--duration) var(--ease);
}

.contact-card:hover {
    transform: translateY(-4px);
}

.contact-card i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 16px;
}

.contact-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.contact-card a,
.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Social buttons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all var(--duration) var(--ease);
    color: var(--white);
    text-decoration: none;
}

.social-btn:hover {
    transform: translateY(-3px);
    color: var(--white);
}

.social-telegram {
    background: #2AABEE;
}
.social-telegram:hover {
    background: #229ED9;
    box-shadow: 0 6px 20px rgba(42, 171, 238, 0.35);
}

.social-vk {
    background: #4C75A3;
}
.social-vk:hover {
    background: #3D6899;
    box-shadow: 0 6px 20px rgba(76, 117, 163, 0.35);
}

.social-max {
    background: var(--gold);
}
.social-max:hover {
    background: #B89558;
    box-shadow: 0 6px 20px rgba(201, 169, 110, 0.35);
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
    background: var(--bg-dark);
    padding: 40px 0;
    color: rgba(255,255,255,0.7);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--white);
}

.footer-logo i {
    color: var(--accent);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    transition: all var(--duration) var(--ease);
}

.footer-socials a:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: 0.85rem;
    width: 100%;
    text-align: center;
    margin-top: 8px;
}


/* ==========================================================================
   MODALS
   ========================================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-dialog {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    z-index: 2001;
    pointer-events: auto !important;
}

.modal-dialog * {
    pointer-events: auto !important;
}



.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--bg-alt);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--duration) var(--ease);
}

.modal-close:hover {
    background: var(--accent-light);
}

.modal-dialog h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.modal-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 28px;
}


/* --- Form elements in modals --- */

.modal-form .form-group {
    margin-bottom: 20px;
}

.modal-form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.modal-form .required {
    color: var(--danger);
}

.modal-form input,
.modal-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bg-alt);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-main);
    transition: border-color var(--duration) var(--ease);
    outline: none;
}

.modal-form input:focus,
.modal-form select:focus {
    border-color: var(--accent);
}

.modal-form input::placeholder {
    color: var(--text-light);
}

.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(93, 168, 123, 0.1);
    color: var(--success);
    border: 1px solid rgba(93, 168, 123, 0.2);
}

.form-message.error {
    display: block;
    background: rgba(212, 93, 93, 0.1);
    color: var(--danger);
    border: 1px solid rgba(212, 93, 93, 0.2);
}


/* --- Lightbox modal --- */

.lightbox-overlay {
    background: rgba(0,0,0,0.9);
    cursor: zoom-out;
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    color: var(--white);
    z-index: 2001;
}

.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius);
}


/* ==========================================================================
   RESPONSIVE — Mobile First
   ========================================================================== */

/* Tablet and below */
@media (max-width: 991.98px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-photo {
        max-width: 320px;
        margin: 0 auto;
    }

    .about-stats {
        justify-content: center;
    }
}

/* Mobile nav */
@media (max-width: 767.98px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(300px, 80vw);
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 100px 40px 40px;
        gap: 24px;
        box-shadow: var(--shadow-lg);
        transition: right var(--duration) var(--ease);
        z-index: 999;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn-cta,
    .hero-actions .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .reviews-track {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .modal-dialog {
        padding: 28px 20px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .social-links {
        flex-direction: column;
        align-items: center;
    }

    .social-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

/* Small phones */
@media (max-width: 400px) {
    .about-stats {
        flex-direction: column;
        gap: 20px;
    }

    .service-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .diplomas-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}


/* ==========================================================================
   UTILITIES / ANIMATIONS
   ========================================================================== */

/* Disable AOS on mobile for better performance if needed */
@media (max-width: 767.98px) {
    [data-aos] {
        transition-duration: 400ms !important;
    }
}

/* Loading state for buttons */
.btn-loading {
    pointer-events: none;
    opacity: 0.7;
    position: relative;
}

.btn-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
