/* ========================================
   MASHA HMELINKO - Corrected Full Styles
   ======================================== */

:root {
    --bg-primary: #0f0f0f;
    --bg-secondary: #161616;
    --accent: #ff2e7a;
    --accent-hover: #ff5a9e;
    --text-primary: #f5f5f5;
    --text-secondary: #b8b8b8;
    --text-muted: #8a8a8a;
    --card-bg: #1a1a1a;
    --border-subtle: #2a2a2a;
    --font-sans: 'Inter', system_ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); line-height: 1.7; }

.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; line-height: 1.2; color: var(--text-primary); }
h1 { font-size: clamp(2.4rem, 5.5vw, 3.8rem); font-weight: 700; }
h2.section-title { font-size: clamp(1.8rem, 4vw, 2.4rem); }

/* Header - FIXED */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; background: #0a0a0a; border-bottom: 1px solid #222; }
.header-container { display: flex; align-items: center; justify-content: space-between; height: 78px; gap: 24px; }
.logo-group { display: flex; align-items: center; gap: 14px; }

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.brand-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.15;
    margin: 0;
}

.brand-subtitle {
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--accent);
    margin-top: 1px;
    line-height: 1.1;
}

.nav-desktop ul { display: flex; gap: 32px; list-style: none; }

.nav-desktop .nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.2s ease;
}

/* Розовая линия подчёркивания с анимацией */
.nav-desktop .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent); /* розовый цвет */
    transition: width 0.3s ease;
}

/* При наведении и при активном состоянии */
.nav-desktop .nav-link:hover::after,
.nav-desktop .nav-link.active::after {
    width: 100%;
}

.nav-desktop .nav-link.active {
    color: var(--text-primary);
}

.header-socials { display: flex; gap: 14px; }
.social-icon { width: 36px; height: 36px; color: var(--text-secondary); background: var(--bg-secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: all .2s; text-decoration: none; }
.social-icon:hover { color: var(--accent); background: #ffe0e8; }

/* Logo link in header - remove unwanted blue underline from "Маша Хмелинко" and subtitle */
.logo-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
}

.logo-link:hover {
    text-decoration: none;
}

.brand-name,
.brand-subtitle {
    text-decoration: none;
}

/* Hero */
.hero { position: relative; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding-top: 78px; overflow: hidden; }
.hero-parallax { position: absolute; inset: 0; background-size: cover; background-position: center; filter: brightness(0.75) saturate(1.1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.65) 50%, rgba(0,0,0,0.85) 100%); }
.hero-content { position: relative; z-index: 3; max-width: 780px; text-align: center; }
.hero-subtitle { font-size: 1.25rem; color: var(--text-secondary); max-width: 620px; margin: 0 auto 36px; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 14px 32px; font-weight: 600; text-decoration: none; border-radius: 8px; transition: all .2s; border: 2px solid transparent; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-subtle); }
.btn-secondary:hover { background: var(--bg-secondary); border-color: var(--accent); }

section { padding: 80px 0; }
.section-header { margin-bottom: 48px; text-align: center; }
.section-label { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* Intro */
.intro { background: var(--bg-secondary); }
.intro-grid { display: grid; grid-template-columns: 380px 1fr; gap: 48px; align-items: start; }
.intro-photo { border-radius: 16px; overflow: hidden; border: 1px solid var(--border-subtle); }
.intro-photo img { width: 100%; height: auto; display: block; }
@media (max-width: 900px) { .intro-grid { grid-template-columns: 1fr; } }
.intro-text { font-size: 1.1rem; color: var(--text-secondary); line-height: 1.8; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; margin-top: 20px; }
.pricing-card { background: #1a1a1a; border: 1px solid #333; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: transform .3s; }
.pricing-card:hover { transform: translateY(-6px); border-color: #ff6b9d; }
.pricing-header { background: #111; padding: 24px; text-align: center; border-bottom: 1px solid #333; }
.video-count { font-size: 3.5rem; font-weight: 700; color: #ff6b9d; }
.pricing-body { padding: 24px; flex: 1; color: #ccc; }
.pricing-footer { padding: 20px 24px; background: #111; border-top: 1px solid #333; text-align: center; }
.price { font-size: 2rem; font-weight: 700; color: #fff; }
.price span { font-size: 1rem; color: #ff6b9d; }

/* Portfolio */
.portfolio { background: var(--bg-primary); }
.video-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: 20px; }
.video-card { position: relative; border-radius: 12px; overflow: hidden; background: #111; cursor: pointer; aspect-ratio: 9/16; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: transform .3s; }
.video-card:hover { transform: scale(1.02); }
.video-card img.video-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play-overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.3); }
.video-card:hover .play-overlay { background: rgba(0,0,0,0.5); }
.video-card .play-button { width: 72px; height: 72px; background: #ff2e7a; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 8px 25px rgba(255,46,122,0.6); }
.video-card:hover .play-button { background: #ff5a9e; transform: scale(1.08); }

/* Why Me */
.why-me { padding: 80px 0; background: #111; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; margin-top: 30px; }
.why-card { background: #1a1a1a; border: 1px solid #333; border-radius: 16px; padding: 28px 24px; transition: all .3s; }
.why-card:hover { border-color: #ff6b9d; transform: translateY(-4px); }
.why-icon { font-size: 2.2rem; margin-bottom: 16px; }

/* Process */
.process { background: var(--bg-secondary); }
.process-photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.process-photo { overflow: hidden; border-radius: 14px; border: 1px solid var(--border-subtle); aspect-ratio: 16/9; cursor: pointer; }
.process-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.process-photo:hover img { transform: scale(1.08); }

/* Contact - FIXED */
.contact { background: var(--bg-primary); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 40px; align-items: stretch; }
.contact-channels { display: flex; flex-direction: column; gap: 12px; }
.contact-channel { display: flex; align-items: center; gap: 18px; background: var(--card-bg); border: 1px solid var(--border-subtle); padding: 15px 18px; border-radius: 14px; text-decoration: none; color: inherit; }
.contact-channel:hover { border-color: var(--accent); transform: translateX(4px); }
.channel-icon { width: 52px; height: 52px; background: #ffe0e8; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.contact-photo { width: 100%; height: 100%; max-height: 360px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border-subtle); }
.contact-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.footer { background: #0a0a0a; padding: 40px 0 30px; border-top: 1px solid #222; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* Modal - Vertical 9:16 support + BIG PINK CLOSE BUTTON */
.modal { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal[aria-hidden="false"] { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.92); }

.modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 420px;           /* vertical friendly width */
    max-height: 92vh;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
}

/* BIG PINK CLOSE BUTTON - repaired (visible and tappable on phone) */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 48px;
    height: 48px;
    border: none;
    background: #ff2e7a;
    color: white;
    font-size: 28px;
    font-weight: bold;
    border-radius: 50%;
    cursor: pointer;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 46, 122, 0.7);
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ff5a9e;
    transform: scale(1.1);
}

/* Mobile: bigger tap target, always inside visible area */
@media (max-width: 600px) {
    .modal-close {
        width: 46px;
        height: 46px;
        font-size: 26px;
        top: 8px;
        right: 8px;
    }
}

.modal-video-wrapper {
    width: 100%;
    aspect-ratio: 9 / 16;       /* Vertical 9:16 player */
    background: #000;
    position: relative;
}

#modal-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

/* Image Modal */
.image-modal { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; padding: 20px; }
.image-modal[aria-hidden="false"] { display: flex; }
.image-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.92); backdrop-filter: blur(8px); }
.image-modal-content { position: relative; z-index: 2; max-width: 95vw; max-height: 92vh; border-radius: 16px; overflow: hidden; }
.image-modal-content img { max-width: 100%; max-height: 92vh; object-fit: contain; }
.image-modal-close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: none; background: rgba(0,0,0,0.6); color: white; font-size: 28px; border-radius: 50%; cursor: pointer; }

/* Reveal - improved smooth animation */
.reveal {
    opacity: 0;
    transform: translateY(45px) scale(0.985);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.revealed {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ========================================
   MOBILE ONLY STYLES (iPhone / phones < 768px)
   Desktop and tablets (iPad 768px+) remain 100% unchanged and perfect.
   All animations, desktop layout, and existing styles are preserved.
   ======================================== */
@media (max-width: 767px) {
  /* === HEADER: only "Цены" + "Портфолио" visible. Social icons hidden on phones ===
     Tablets keep full nav + Telegram/WhatsApp/Email icons as requested */
  .nav-desktop li:nth-child(3),
  .nav-desktop li:nth-child(4) {
    display: none;
  }
  .header-socials {
    display: none;
  }

  /* Slightly more compact header on mobile */
  .header-container {
    height: 68px;
    padding: 0 16px;
    gap: 16px;
  }
  .brand-name {
    font-size: 0.92rem;
  }
  .brand-subtitle {
    font-size: 0.62rem;
  }
  .nav-desktop ul {
    gap: 22px;
  }

  /* === HERO BUTTONS: same size + clear gap between them === */
  .hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .hero-cta .btn {
    flex: 1 1 0;
    min-width: 150px;
    text-align: center;
    padding: 14px 18px;
    font-size: 0.95rem;
  }

  /* === HERO BACKGROUND PHOTO: much less darkening on mobile === */
  .hero-overlay {
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.12) 0%,
      rgba(0,0,0,0.32) 50%,
      rgba(0,0,0,0.52) 100%
    );
  }

  /* === PORTFOLIO: 5 rows by 2 columns (was 2 rows by 5) === */
  .video-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .video-card {
    aspect-ratio: 9/16;
  }

  /* === PROCESS: 4 rows by 2 columns (was 2 rows by 4) === */
  .process-photos {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}
