/* Ramitech — main menu: zoom-on-hover links, animated mega dropdowns (desktop),
   accordion sub-menus inside the phone/tablet drawer. Loaded after theme.css. */

.menu { list-style: none; margin: 0; padding: 0; }
.menu__toggle { display: none; }

/* ============ Desktop (wide screens) ============ */
@media (min-width: 1181px) {
  .site-header__inner { position: relative; }
  .menu { display: flex; align-items: center; gap: 2px; }
  .menu__item { position: static; }
  .menu__icon { display: none; }
  .menu__link {
    position: relative; display: flex; align-items: center; gap: 3px; white-space: nowrap;
    padding: 9px 10px; border-radius: 10px; font-size: 14.5px; font-weight: 500; color: var(--text);
    transition: transform .18s cubic-bezier(.2, .8, .2, 1), color .15s, background-color .15s;
  }
  .menu__chev { display: inline-flex; color: var(--muted); transition: transform .2s; }
  /* the "zoom" when you hover a menu item */
  .menu__item:hover > .menu__link,
  .menu__item:focus-within > .menu__link { transform: scale(1.08); color: var(--brand); background: var(--brand-tint); }
  .menu__item:hover > .menu__link .menu__chev,
  .menu__item:focus-within > .menu__link .menu__chev { transform: rotate(180deg); color: var(--brand); }
  .menu__link[aria-current="page"] { color: var(--brand); font-weight: 700; }
  .menu__link[aria-current="page"]::before {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 3px; border-radius: 2px;
    background: var(--grad-stripe, var(--brand));
  }
  /* invisible bridge from the link down to the dropdown so the hover doesn't drop */
  .has-sub > .menu__link::after { content: ""; position: absolute; left: -6px; right: -6px; top: 100%; height: 30px; }

  .mega {
    position: absolute; top: calc(100% - 6px); left: 50%; z-index: 60;
    width: min(900px, calc(100vw - 48px));
    display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px;
    padding: 22px; background: #fff; border-radius: 20px;
    box-shadow: 0 30px 70px rgba(12, 30, 70, .22), 0 0 0 1px rgba(12, 30, 70, .06);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateX(-50%) translateY(10px) scale(.94); transform-origin: top center;
    transition: opacity .22s ease, transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s linear .28s;
  }
  .has-sub:hover > .mega,
  .has-sub:focus-within > .mega {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateX(-50%) translateY(0) scale(1);
    transition: opacity .22s ease, transform .28s cubic-bezier(.2, .8, .2, 1), visibility 0s;
  }
  .mega__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 18px; }
  .mega__col { display: flex; flex-direction: column; gap: 4px; }
  .mega__title {
    margin: 0 0 6px 10px; font-family: var(--mono); font-size: 11.5px; font-weight: 500; letter-spacing: .1em;
    text-transform: uppercase; color: var(--brand); min-height: 32px;
  }
  .mega__title small { display: block; font-family: var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); font-size: 12px; margin-top: 2px; }
  .mega__link {
    display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; color: var(--text);
    transition: background-color .15s, transform .15s;
  }
  .mega__link:hover { background: var(--brand-tint); color: var(--text); transform: translateX(4px); }
  .mega__link b { display: block; font-size: 14.5px; font-weight: 600; }
  .mega__link small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; margin-top: 1px; }
  .mega__ico {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 11px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand-tint), var(--tint-2, #DDF6FD)); color: var(--brand);
  }
  .mega__link:hover .mega__ico { background: var(--grad-brand, var(--brand)); color: #fff; }
  /* links slide in one after another when the dropdown opens */
  .has-sub:hover .mega__link, .has-sub:focus-within .mega__link { animation: mega-in .35s cubic-bezier(.2, .8, .2, 1) both; }
  .mega__col:nth-child(1) .mega__link:nth-of-type(1) { animation-delay: .04s; }
  .mega__col:nth-child(1) .mega__link:nth-of-type(2) { animation-delay: .08s; }
  .mega__col:nth-child(1) .mega__link:nth-of-type(3) { animation-delay: .12s; }
  .mega__col:nth-child(2) .mega__link:nth-of-type(1) { animation-delay: .08s; }
  .mega__col:nth-child(2) .mega__link:nth-of-type(2) { animation-delay: .12s; }
  .mega__col:nth-child(2) .mega__link:nth-of-type(3) { animation-delay: .16s; }
  @keyframes mega-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

  .mega__promo {
    border-radius: 16px; padding: 20px; color: #fff; display: flex; flex-direction: column; gap: 10px; overflow: hidden; position: relative;
    background:
      radial-gradient(260px 160px at 100% 0%, rgba(var(--glow, 61, 220, 255), .45), transparent 65%),
      linear-gradient(150deg, var(--deep-1, #0B2F86), var(--deep-2, #1650D6));
  }
  .mega__kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--sky); }
  .mega__promo-text { font-size: 13px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
  .mega__promo-cta {
    margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 14px; border-radius: 999px; background: #fff; color: var(--wa, #15803D); font-weight: 700; font-size: 13.5px;
  }
  .mega__promo-cta:hover { color: var(--wa-ink, #116932); transform: scale(1.04); }
}

/* Medium desktops: tighter menu; "Get a quote" hides (Contact is in the menu) */
@media (min-width: 1181px) and (max-width: 1340px) {
  .menu__link { padding: 8px 7px; font-size: 14px; }
  .site-header .hide-md { display: none; }
  .site-header .logo__mark { width: 44px; height: 44px; }
  .site-header .logo__text b { font-size: 21px; }
}

/* Rotating slogans ("Strong network." → "Browse with speed." → …) */
.slogans { position: relative; display: block; height: 2.5em; font-family: var(--display); font-weight: 800; font-size: 22px; line-height: 1.12; }
.slogans > span { position: absolute; left: 0; right: 0; top: 0; opacity: 0; animation: slogan 10s infinite; }
.slogans > span:nth-child(2) { animation-delay: 2.5s; }
.slogans > span:nth-child(3) { animation-delay: 5s; }
.slogans > span:nth-child(4) { animation-delay: 7.5s; }
/* 4 slogans x 2.5s: each fades in as the previous fades out, so one is always showing */
@keyframes slogan {
  0% { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  3%, 24% { opacity: 1; transform: none; filter: none; }
  27%, 100% { opacity: 0; transform: translateY(-12px); filter: blur(4px); }
}
.slogans > span:first-child { animation-delay: -.3s; }

/* ============ Tablet & phone: menu lives in the slide-in drawer ============ */
@media (max-width: 1180px) {
  .nav-toggle, .show-md { display: inline-flex; }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 60;
    display: flex; flex-direction: column; align-items: stretch; gap: 20px; padding: 10px 20px 28px;
    overflow-y: auto; overscroll-behavior: contain;
    background: #fff; box-shadow: -12px 0 40px rgba(11, 24, 48, .2);
    transform: translateX(100%); transition: transform .25s; visibility: hidden;
  }
  .nav.is-open { transform: none; visibility: visible; }
  .nav__head { display: flex; align-items: center; min-height: 44px; margin-right: 56px; font-family: var(--display); font-weight: 700; font-size: 22px; }
  .nav__status {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px;
    background: var(--ground); font-size: 14px; line-height: 1.45; color: var(--muted);
  }
  .nav__status strong { color: var(--text); }
  .nav__dot { width: 10px; height: 10px; flex-shrink: 0; margin-top: 5px; border-radius: 50%; background: #98A2B3; }
  .nav__status.is-open { background: var(--wa-tint); }
  .nav__status.is-open .nav__dot { background: var(--wa); box-shadow: 0 0 0 4px rgba(21, 128, 61, .18); }
  .nav__contact { display: flex; flex-direction: column; gap: 10px; }
  .nav__contact .btn--wa { min-height: 56px; font-size: 17px; }
  .nav__contact-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .nav__topics { display: flex; flex-direction: column; gap: 10px; }
  .nav__label { font-size: 14px; color: var(--muted); }
  .nav .nav__cta-mobile { display: inline-flex; }
  .nav-toggle { position: relative; z-index: 70; }
  body.nav-open { overflow: hidden; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(11, 24, 48, .45); z-index: 45; }
  body.nav-open .bottom-nav, body.nav-open .callbar { display: none; }

  .menu { display: flex; flex-direction: column; }
  .menu__item { position: relative; border-bottom: 1px solid var(--line); }
  .menu__item:last-child { border-bottom: 0; }
  .menu__link { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 0 52px 0 4px; font-size: 17px; font-weight: 500; color: var(--text); }
  .menu__link[aria-current="page"] { background: var(--brand-tint); color: var(--brand); border-radius: 10px; padding-left: 10px; font-weight: 600; }
  .menu__icon {
    display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 9px; background: linear-gradient(135deg, var(--brand-tint), var(--tint-2, #DDF6FD)); color: var(--brand);
  }
  .menu__chev { display: none; }
  .menu__toggle {
    display: flex; align-items: center; justify-content: center; position: absolute; right: 0; top: 6px;
    width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--ground); color: var(--text); cursor: pointer;
    transition: transform .2s, background-color .15s;
  }
  .menu__item.is-open > .menu__toggle { transform: rotate(180deg); background: var(--brand-tint); color: var(--brand); }
  .mega { display: none; padding: 2px 0 12px 50px; }
  .menu__item.is-open > .mega { display: block; animation: drawer-sub .25s ease both; }
  @keyframes drawer-sub { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
  .mega__promo { display: none; }
  .mega__cols, .mega__col { display: flex; flex-direction: column; }
  .mega__title { margin: 8px 0 2px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--brand); }
  .mega__title small { display: none; }
  .mega__title--spacer { display: none; }
  .mega__link { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 6px; border-radius: 8px; color: var(--text); font-size: 15px; }
  .mega__link:active { background: var(--brand-tint); }
  .mega__link small { display: none; }
  .mega__link b { font-weight: 500; }
  .mega__ico { display: flex; color: var(--brand); }
  .mega__ico .ic { width: 18px; height: 18px; }
}

/* Scrolling slogan ticker under the home hero */
.ticker { overflow: hidden; background: #fff; border-bottom: 1px solid var(--line); position: relative; }
.ticker::before, .ticker::after { content: ""; position: absolute; top: 0; bottom: 0; width: 60px; z-index: 1; pointer-events: none; }
.ticker::before { left: 0; background: linear-gradient(to right, #fff, transparent); }
.ticker::after { right: 0; background: linear-gradient(to left, #fff, transparent); }
.ticker__track { display: flex; width: max-content; animation: ticker 38s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item {
  display: inline-flex; align-items: center; gap: 10px; padding: 18px 30px; white-space: nowrap;
  font-family: var(--display); font-weight: 800; font-size: 18px; letter-spacing: -.01em; color: var(--text);
}
.ticker__item .ic { color: var(--brand); }
.ticker__item::after { content: ""; width: 7px; height: 7px; margin-left: 30px; border-radius: 50%; background: var(--accent); }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (max-width: 767px) { .ticker__item { font-size: 15px; padding: 14px 18px; } .ticker__item::after { margin-left: 18px; } }

/* Home hero: faded people photos behind the blue, slowly crossfading (18s loop, 6s each) */
.hero__photos { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero__photo {
  position: absolute; inset: 0; background-size: cover; background-position: center 30%;
  opacity: 0; animation: hero-photo 18s ease-in-out infinite;
}
.hero__photo--1 { background-image: url("../img/hero/hero-family.jpg"); animation-delay: 0s; }
.hero__photo--2 { background-image: url("../img/hero/hero-friends.jpg"); animation-delay: 6s; }
.hero__photo--3 { background-image: url("../img/hero/hero-girl.jpg"); animation-delay: 12s; background-position: 70% 35%; }
@keyframes hero-photo {
  0% { opacity: 0; transform: scale(1.04); }
  8%, 33% { opacity: 1; }
  41%, 100% { opacity: 0; transform: scale(1); }
}
/* the "fade": Ramitech blue over the photos — strongest on the text side, lighter on the right */
.hero__photos::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 36, 110, .92) 0%, rgba(14, 58, 170, .82) 45%, rgba(22, 80, 214, .62) 100%);
}
@media (max-width: 767px) {
  .hero__photo--1 { background-image: url("../img/hero/hero-family-sm.jpg"); }
  .hero__photo--2 { background-image: url("../img/hero/hero-friends-sm.jpg"); }
  .hero__photo--3 { background-image: url("../img/hero/hero-girl-sm.jpg"); }
  .hero__photos::after { background: linear-gradient(180deg, rgba(8, 36, 110, .9), rgba(14, 58, 170, .86)); }
}
.hero--fiber .fiber-bg { z-index: 0; }
/* inner pages: photos under the fiber lines and the text */
.page-hero .hero__lines { z-index: 0; }
.page-hero > .container { position: relative; z-index: 1; }

/* Home hero: rotating headlines that "pop" in */
.hero-slides { display: grid; }
.hero-slide { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 24px; opacity: 0; visibility: hidden; pointer-events: none; }
.hero-slide.is-active { opacity: 1; visibility: visible; pointer-events: auto; }
/* Card flip: the old headline flips away, the new one flips in (only for a moment — JS removes the classes) */
.hero-slides { perspective: 1400px; }
.hero-slide { backface-visibility: hidden; transform-origin: 50% 50%; }
.hero-slide.is-popping { animation: flip-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.hero-slide.is-leaving { visibility: visible; animation: flip-out .4s ease-in both; }
@keyframes flip-out { from { opacity: 1; transform: rotateX(0); } to { opacity: 0; transform: rotateX(90deg); } }
@keyframes flip-in { 0% { opacity: 0; transform: rotateX(-90deg); } 40% { opacity: 0; transform: rotateX(-90deg); } 100% { opacity: 1; transform: rotateX(0); } }
.hero-slide__link { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.hero-slide__link:hover { color: var(--cyan, #3DDCFF); }
.hero-dots { display: flex; gap: 8px; align-items: center; }
.hero-dots button {
  position: relative; overflow: hidden; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 5px; cursor: pointer;
  background: rgba(255, 255, 255, .35); transition: width .3s, background-color .3s;
}
.hero-dots button[aria-selected="true"] { background: #fff; }

/* Fiber Home packages (speeds only — prices are given per area) */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.plan {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow-card, 0 8px 24px rgba(12,30,70,.08));
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift, 0 16px 40px rgba(12,30,70,.16)); border-color: var(--brand); }
.plan__speed { display: flex; align-items: baseline; gap: 6px; margin: 0; }
.plan__speed b {
  font-family: var(--display); font-weight: 800; font-size: 48px; line-height: 1; letter-spacing: -.03em;
  background: var(--grad-brand, var(--brand)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.plan__speed span { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--brand); }
.plan__name { margin: 0; font-weight: 700; font-size: 17px; }
.plan__fit { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.5; min-height: 44px; }
.plan__devices { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--text); }
.plan__devices .ic { color: var(--brand); }
.plan .btn { margin-top: auto; }
.plan--top { border-color: var(--brand); background: linear-gradient(180deg, var(--brand-tint), #fff 60%); }
.plans__note { display: flex; align-items: flex-start; gap: 8px; margin: 18px 0 0; font-size: 14px; color: var(--muted); }
.plans__note .ic { color: var(--accent); margin-top: 2px; }
.plan.is-picked { border-color: var(--wa, #15803D); box-shadow: 0 0 0 3px rgba(21, 128, 61, .2); }
@media (min-width: 768px) and (max-width: 980px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .plans { display: flex; } .plan__fit { min-height: 0; } }

/* Home services: networking colour + the "not sure?" card */
.service--networking { --svc: #4F46E5; --svc-2: #22C3EE; }
.service--cta { --svc: var(--accent); --svc-2: #F59E0B; background: var(--ground); }

@media (prefers-reduced-motion: reduce) {
  .hero-slide.is-popping, .hero-slide.is-leaving { animation: none; }
  .hero__photo { animation: none; }
  .hero__photo--1 { opacity: 1; }
  .ticker__track { animation: none; flex-wrap: wrap; width: auto; }
  .ticker__item[aria-hidden="true"] { display: none; }
  .slogans > span { animation: none; }
  .slogans > span:first-child { opacity: 1; }
  .menu__link, .mega, .mega__link { transition: none !important; animation: none !important; }
}
