/* ============================================
   sugoria.eg.je · responsive tightening overrides
   Loaded after styles.css. Goal: each block fits
   one screen, scales fluidly across all viewports.
   ============================================ */

/* fluid container padding */
.container { padding: 0 clamp(16px, 4vw, 48px); }

/* section padding fluid */
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--tight { padding: clamp(36px, 5vw, 64px) 0; }

/* hero — keep full screen but cap content height */
.hero { min-height: auto; padding: clamp(80px, 11vw, 140px) 0 clamp(40px, 5vw, 64px); }
.hero__inner { min-height: auto; gap: clamp(24px, 4vw, 56px); }
.hero__visual { min-height: clamp(320px, 38vw, 560px); }
.hero__title { font-size: clamp(36px, 5.5vw, 72px); line-height: 1.0; }
.hero__lead { font-size: clamp(14px, 1.1vw, 17px); }

/* directions — 3 cards in a row, tightened */
.dir { min-height: clamp(280px, 34vw, 420px); padding: clamp(20px, 2.5vw, 32px); }

/* AGZS — already fits, just tighten min */
.agzs__list { row-gap: 8px; }
.agzs__item { padding: clamp(14px, 1.6vw, 22px) clamp(16px, 2vw, 28px); }

/* B2B — pull min-height in */
.b2b__hero { min-height: clamp(360px, 42vw, 520px); padding: clamp(28px, 3.6vw, 56px); }
.b2b__hero h3 { font-size: clamp(32px, 4vw, 56px); }
.b2b__card { padding: clamp(20px, 2.4vw, 32px); }
.b2b__card-num { font-size: clamp(44px, 5vw, 64px); }

/* eco banner — fix awkward 1.5 viewport stretching */
.eco-banner { min-height: clamp(360px, 44vw, 520px); }
.eco-banner__side { padding: clamp(28px, 3.6vw, 48px); }
@media (max-width: 768px) {
  .eco-banner__side { min-height: clamp(220px, 50vw, 280px); }
}

/* loyalty — keep 3 tiers, but tighter */
.loyalty { min-height: auto; }
.loyalty__main { padding: clamp(32px, 4vw, 56px); }

/* charity / company — pull tall sections in */
.split__visual { min-height: clamp(280px, 32vw, 440px); }
.charity__hero { min-height: clamp(320px, 38vw, 480px); padding: clamp(28px, 3.6vw, 56px); }

/* О компании — занимает полный экран */
#company {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(64px, 9vw, 120px) 0;
}
#company .timeline { margin-top: auto; margin-bottom: auto; }
@media (max-width: 900px) {
  #company { min-height: auto; padding: clamp(48px, 8vw, 96px) 0; }
}

/* contacts — tight card */
.contact-card { padding: clamp(24px, 3vw, 40px); }

/* sec-head — keep margins reasonable on desktop */
.sec-head { margin-bottom: clamp(28px, 4vw, 56px); }
.sec-head__title { font-size: clamp(28px, 4vw, 56px); line-height: 1.04; }

/* nav — keep clean across sizes */
.nav { padding: clamp(10px, 1.4vw, 16px) clamp(16px, 4vw, 48px); }
.nav__phone { font-size: clamp(13px, 1vw, 15px); }

/* ============================================
   GRID FALLBACKS at narrow widths
   ============================================ */

/* tablets (1024 → 700) — keep 2 cols, smaller paddings */
@media (max-width: 1100px) {
  .b2b { grid-template-columns: 1fr; }
  .b2b__cards { grid-template-rows: auto auto; grid-template-columns: 1fr 1fr; }
  .hero__inner { grid-template-columns: 1.2fr 1fr; }
}
@media (max-width: 900px) {
  .hero { padding: clamp(64px, 9vw, 100px) 0 clamp(32px, 4vw, 56px); }
  .hero__inner { grid-template-columns: 1fr; gap: clamp(20px, 4vw, 36px); }
  .hero__visual { min-height: clamp(260px, 60vw, 400px); }
  .hero__stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .b2b__cards { grid-template-columns: 1fr; }
  .charity { grid-template-columns: 1fr; }
}

/* phones (≤ 600) — single column everywhere */
@media (max-width: 600px) {
  .section { padding: clamp(40px, 8vw, 64px) 0; }
  .hero__title { font-size: clamp(30px, 9vw, 44px); }
  .hero__cta-row { flex-direction: column; align-items: stretch; }
  .hero__cta-row .btn { justify-content: center; }
  .nav__links { display: none; }
  .nav__cta { gap: 8px; }
  .nav__phone { display: none; }
  .dirs { grid-template-columns: 1fr !important; }
  .dir { min-height: auto; }
  .b2b__hero { min-height: 320px; padding: 24px; }
  .b2b__hero h3 { font-size: clamp(26px, 7vw, 36px); }
  .loyalty__tiers { grid-template-columns: 1fr; gap: 10px; }
  .charity__hero { min-height: 280px; padding: 28px; }
  .contacts { grid-template-columns: 1fr !important; }
  .footer__cols { grid-template-columns: 1fr 1fr !important; gap: 24px; }
  .ticker { font-size: 14px; padding: 10px 0; }
  .agzs__item { flex-wrap: wrap; row-gap: 6px; }
}

/* very small phones (≤ 380) — last-mile tightening */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero__title { font-size: clamp(26px, 9vw, 34px); }
  .sec-head__title { font-size: clamp(24px, 7vw, 32px); }
  .b2b__card-num { font-size: 36px; }
  .footer__cols { grid-template-columns: 1fr !important; }
}

/* large screens (≥ 1600) — keep readable, prevent over-stretch */
@media (min-width: 1600px) {
  .container { max-width: 1480px; }
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  body.no-anim *,
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Safari/iOS */
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; }
input, textarea, select { font-size: 16px; }  /* prevent iOS zoom */

/* ============================================
   MOBILE BUG FIXES (after user screenshots)
   ============================================ */

/* Eco-banner: on mobile the title overlaps the «БЕНЗИН» side-label.
   Move title above the stack and resize side-labels to non-overlapping. */
@media (max-width: 768px) {
  .eco-banner {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    min-height: auto;
  }
  .eco-banner__title {
    position: static !important;
    transform: none !important;
    grid-row: 1;
    padding: 24px 24px 8px;
    font-size: clamp(28px, 8vw, 40px) !important;
    line-height: 1.05 !important;
    text-align: left;
    background: var(--ink);
    color: white;
    margin: 0;
  }
  .eco-banner__side--bad { grid-row: 2; }
  .eco-banner__center { display: none; }
  .eco-banner__side--good { grid-row: 3; }
  .eco-banner__cta {
    grid-row: 4;
    margin: 0;
    border-radius: 0;
    justify-content: center;
    text-align: center;
    width: 100%;
  }
  .eco-banner__side {
    min-height: 180px;
    padding: 28px 24px !important;
  }
  .eco-banner__label {
    font-size: clamp(36px, 9vw, 56px) !important;
    line-height: 1 !important;
  }
  .eco-banner__sub { font-size: 14px !important; max-width: 90%; }
}

/* Loyalty card: «Воздух» text breaks the card on mobile. Cap font. */
@media (max-width: 900px) {
  .loyalty__card { aspect-ratio: 1.586/1; min-height: 220px; padding: 20px !important; }
  .loyalty__card-name {
    font-size: clamp(40px, 12vw, 80px) !important;
    line-height: 1 !important;
  }
  .loyalty__card-yellow { width: 40% !important; height: 60% !important; }
  .loyalty__card-blob { display: none !important; }
}
@media (max-width: 480px) {
  .loyalty__card-name { font-size: clamp(32px, 11vw, 56px) !important; }
  .loyalty__card-head { font-size: 9px !important; gap: 6px !important; flex-wrap: wrap; }
}
