/* Shared accessibility, typography and image treatments for the IVIS Auto prototype. */

/* Mega menu: one clear heading and genuinely legible sub-service links. */
.mega-panel{background:#0b0d0e}
.mega-top{padding:19px 29px}
.mega-top strong{display:block;font-size:27px;line-height:1.25;letter-spacing:.075em}
.mega-group{min-height:252px;padding:24px 27px 27px}
.mega-group-title{font-size:18px;line-height:1.35;letter-spacing:.075em;margin-bottom:14px}
.mega-links{gap:5px}
.mega-links a{font-size:16px;line-height:1.5;padding:3px 0;color:#d3c8bf}
.mega-links a:hover,.mega-links a:focus-visible{color:#ffc194}
.mega-bottom span{font-size:12px}

/* Loosen large Cyrillic display titles everywhere, including generated categories. */
.section-head,.heading,.inner-hero .hero-h1,.category-photo-hero .hero-h1,
.detail-hero .hero-h1,.prose-section h2,.contact-band .heading{
  letter-spacing:.008em;
  line-height:1.025;
  overflow-wrap:break-word;
}
.hero h1{letter-spacing:.008em;line-height:1.02}
.category-photo-hero .hero-h1{max-width:1070px}
.repair-body h3,.symptom-card h3,.work-step h3,.related-card strong,.popular-card h3{
  letter-spacing:.025em;line-height:1.18;
}

/* Homepage service cards: editorial, service-specific photography. */
.service-tile{isolation:isolate;overflow:hidden;min-height:340px;background:#151616;padding:25px;transition:transform .3s,border-color .3s}
.service-tile:hover{background:#151616;transform:translateY(-3px)}
.service-tile .tile-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;z-index:-2;filter:saturate(.65) brightness(.66);transition:transform .7s ease,filter .5s ease}
.service-tile::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(5,7,8,.62) 0%,rgba(5,7,8,.15) 31%,rgba(5,7,8,.90) 76%,#090a0bf5 100%)}
.service-tile:hover .tile-image{transform:scale(1.065);filter:saturate(.85) brightness(.84)}
.service-tile .service-top{color:#f0b585;text-shadow:0 1px 8px #000}
.service-tile h3{font-size:clamp(26px,2.15vw,36px);line-height:1.13;letter-spacing:.03em;text-shadow:0 2px 14px #000b}
.service-tile p{font-size:13px;line-height:1.65;color:#eee0d4;text-shadow:0 1px 10px #000e}
.service-tile a{z-index:3}

/* Homepage popular repair slider: a photo per repair with a readable text overlay. */
.popular-card{isolation:isolate;position:relative;overflow:hidden;min-height:370px;background:#151616;transition:transform .3s}
.popular-card:hover{background:#151616;transform:translateY(-3px)}
.popular-card .popular-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;filter:brightness(.70) saturate(.72);transition:transform .7s,filter .5s}
.popular-card::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,#080a0b9e 0%,#07090b1a 33%,#090a0bdd 69%,#090a0bf5 100%)}
.popular-card:hover .popular-image{transform:scale(1.065);filter:brightness(.86) saturate(.9)}
.popular-card .num{color:#f3b98d;text-shadow:0 1px 8px #000}
.popular-card h3{font-size:clamp(28px,2.2vw,34px);text-shadow:0 2px 12px #000}
.popular-card p{font-size:13px;line-height:1.65;color:#e6dbd0;text-shadow:0 1px 9px #000}
.popular-card a{font-size:13px;color:#f5b88e;position:relative;z-index:2}

@media(max-width:1100px){
  .mega-group{min-height:0}
  .mega-links a{font-size:16px}
  .service-tile h3{font-size:30px}
}
@media(max-width:780px){
  .mega-top{padding:18px 21px}
  .mega-top strong{font-size:25px}
  .mega-group{min-height:0;padding:19px 22px 22px}
  .mega-links{grid-template-columns:1fr;gap:4px}
  .mega-links a{font-size:15.5px;line-height:1.5;padding:4px 0}
  .mega-group-title{font-size:18px}
  .service-tile{min-height:300px}
  .popular-card{min-height:355px}
  .section-head,.heading,.inner-hero .hero-h1,.category-photo-hero .hero-h1{line-height:1.055}
}
@media(max-width:440px){
  .service-tile{min-height:275px}
  .service-tile h3{font-size:29px}
  .popular-card{min-height:335px}
  .section-head,.heading{font-size:clamp(45px,11vw,64px)}
  .inner-hero .hero-h1,.category-photo-hero .hero-h1{font-size:clamp(43px,10vw,59px)}
}
