/* =========================================================================
   Layout: site chrome (header, mega menu, drawer, footer, floating
   actions). Desktop breakpoint: 1080px.
   ========================================================================= */

/* ---- Header ----
   Transparent over the hero; `.is-solid` is added by js/header.js on scroll
   or while the mega menu is open. */
.site-header {
  --header-ink: var(--rova-floral);
  --header-line: rgb(249 243 236 / 0.35);

  position: sticky;
  z-index: var(--z-header);
  top: 0;
  height: var(--header-h);
  margin-bottom: calc(-1 * var(--header-h));
  transition:
    background-color var(--dur-base) var(--ease-flow),
    box-shadow var(--dur-base) var(--ease-flow);
}

.site-header.is-solid {
  --header-ink: var(--rova-oxford-blue);
  --header-line: var(--color-border-strong);

  background: rgb(249 243 236 / 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--color-border), var(--shadow-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100%;
}

.site-header__logo {
  flex-shrink: 0;
}

.site-header__logo img {
  width: auto;
  height: 34px;
}

.site-header__logo-dark,
.site-header.is-solid .site-header__logo-light {
  display: none;
}

.site-header.is-solid .site-header__logo-dark {
  display: block;
}

.main-nav,
.site-header__actions {
  display: none;
  align-items: center;
}

.main-nav {
  flex: 1;
  gap: 2px;
}

.main-nav__link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 44px;
  padding-inline: var(--space-3);
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--header-ink);
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

/* Underline grows from the start edge on hover. */
.main-nav__link::after {
  content: "";
  position: absolute;
  bottom: 8px;
  inset-inline: var(--space-3);
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-flow);
}

[dir="rtl"] .main-nav__link::after { transform-origin: right; }

.main-nav__link:hover {
  color: var(--header-ink);
}

.main-nav__link:hover::after,
.site-header.is-mega-open .main-nav__products::after {
  transform: scaleX(1);
}

.main-nav__chevron {
  transition: transform var(--dur-base) var(--ease-valve);
}

.site-header.is-mega-open .main-nav__chevron {
  transform: rotate(180deg);
}

.site-header__actions {
  gap: var(--space-2);
}

.site-header__icon-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-pill);
  background: none;
  color: var(--header-ink);
}

.site-header__icon-btn--outlined {
  border: 1.5px solid var(--header-line);
}

.lang-btn {
  min-width: 52px;
  height: 44px;
  padding-inline: 14px;
  border: 1.5px solid var(--header-line);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--header-ink);
  font-size: 15px;
  font-weight: 600;
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}

.lang-btn:hover {
  border-color: var(--header-ink);
}

/* The button shows the *other* language, so its font follows that language. */
.lang-btn[lang="ar"] { font-family: var(--font-sans-ar); }
.lang-btn[lang="en"] { font-family: "Fira Sans", system-ui, sans-serif; }

/* CTA is light over the hero and blue once the header is solid. */
.site-header__cta {
  height: 46px;
  background: var(--rova-floral);
  color: var(--rova-oxford-blue);
  font-size: 15px;
}

.site-header__cta:hover {
  background: var(--rova-white);
  color: var(--rova-oxford-blue);
}

.site-header.is-solid .site-header__cta {
  background: var(--rova-green-blue);
  color: var(--rova-white);
}

.site-header.is-solid .site-header__cta:hover {
  background: var(--blue-700);
}

.site-header__mobile {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-inline-start: auto;
}

/* ---- Mega menu ---- */
.mega {
  position: absolute;
  top: calc(var(--header-h) - 4px);
  inset-inline: 0;
  display: none;
  padding-inline: var(--gutter);
}

.site-header.is-mega-open .mega {
  display: block;
  animation: fade-in var(--dur-base) var(--ease-valve);
}

.mega__panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.15fr);
  gap: var(--space-8);
  max-width: calc(var(--container) - 2 * var(--gutter));
  margin-inline: auto;
  padding: var(--space-8);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--rova-white);
  box-shadow: var(--shadow-lg);
}

.mega__column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.mega__title {
  margin-bottom: 12px;
  color: var(--rova-green-blue);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.mega__link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding-block: 7px;
  color: var(--rova-oxford-blue);
  font-size: 15px;
}

/* A short brass line slides in before the hovered link. */
.mega__link::before {
  content: "";
  width: 0;
  height: 1px;
  background: var(--brass-500);
  transition: width var(--dur-base) var(--ease-flow);
}

.mega__link:hover {
  color: var(--rova-green-blue);
}

.mega__link:hover::before {
  width: 14px;
}

.mega__feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: var(--space-3);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--rova-floral);
}

/* The ROVA symbol sits centred inside the ring. */
.mega__feature-media {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
}

.mega__feature-media::before {
  content: "";
  position: absolute;
  height: 92%;
  aspect-ratio: 1;
  border: 1.5px solid var(--rova-jordy-blue);
  border-radius: 50%;
}

.mega__feature-media img {
  position: relative;
  width: 36%;
}

.mega__feature-title {
  color: var(--rova-oxford-blue);
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
}

.mega__feature-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* ---- Mobile drawer (<dialog>) ---- */
.drawer {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 20px clamp(1rem, 5vw, 2rem);
  border: 0;
  overflow: auto;
}

.drawer[open] {
  display: flex;
  flex-direction: column;
}

.drawer::backdrop {
  background: transparent;
}

.drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.drawer__top img {
  width: auto;
  height: 32px;
}

.drawer__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid rgb(215 230 245 / 0.3);
  border-radius: var(--radius-pill);
  background: none;
  color: var(--rova-floral);
}

.drawer__nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  margin-top: var(--space-6);
}

.drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-border-inverse);
  color: var(--rova-floral);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.drawer__link:hover { color: var(--rova-floral); }

.drawer__link::-webkit-details-marker {
  display: none;
}

.drawer__chevron {
  color: var(--rova-jordy-blue);
  transition: transform var(--dur-base) var(--ease-valve);
}

.drawer__group[open] .drawer__chevron {
  transform: rotate(180deg);
}

.drawer__sub {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-block: var(--space-4) var(--space-5);
}

.drawer__sub-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer__sub-group a {
  padding-block: 6px;
  color: var(--rova-colombia);
}

.drawer__sub-title {
  color: var(--rova-jordy-blue);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
}

.drawer__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  padding-top: var(--space-6);
}

/* ---- Footer ----
   The water splash from the presentation template sits on the template's
   blue, under a dark navy layer so the full footer content stays readable. */
.site-footer {
  position: relative;
  overflow: hidden;
  background: var(--brand-gradient);
  color: var(--rova-white);
  isolation: isolate;
}

.site-footer__splash {
  position: absolute;
  z-index: -2;
  top: -22%;
  left: 50%;
  width: max(120%, 1200px);
  max-width: none;
  pointer-events: none;
  transform: translateX(-50%);
}

.site-footer::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(17 24 41 / 0.28) 0%, rgb(17 24 41 / 0.6) 34%, rgb(17 24 41 / 0.9) 62%, var(--navy-950) 100%);
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-10) var(--space-8);
  padding-top: clamp(3rem, 5vw, 4.5rem);
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-5);
  grid-column: 1 / -1;
}

.site-footer__brand > img {
  width: auto;
  height: 40px;
}

.site-footer__about {
  max-width: 40ch;
  color: var(--rova-white);
  font-size: 15px;
  line-height: 1.7;
}

.socials {
  display: flex;
  gap: var(--space-2);
}

.socials__link {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgb(215 230 245 / 0.24);
  border-radius: 50%;
  color: var(--rova-white);
  transition: border-color var(--dur-fast), background-color var(--dur-fast);
}

.socials__link:hover {
  border-color: var(--rova-jordy-blue);
  background: rgb(249 243 236 / 0.06);
  color: var(--rova-white);
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

/* Every row is the same height (24px line + 6px padding each side), so the
   rows of all columns line up, contact included. */
.site-footer__col > a,
.site-footer__col > address {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-block: 6px;
  color: var(--rova-white);
  font-size: 15px;
  font-style: normal;
  line-height: 24px;
}

.site-footer__title {
  margin-bottom: var(--space-4);
  color: var(--rova-white);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
}

/* Link columns: a dot beside each link that stretches into a dash on hover. */
.site-footer__links > a::before {
  content: "";
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin-top: 9px;
  border-radius: var(--radius-pill);
  background: var(--rova-white);
  opacity: 0.55;
  transition:
    width var(--dur-base) var(--ease-flow),
    opacity var(--dur-base) var(--ease-flow);
}

.site-footer__links > a:hover::before {
  width: 16px;
  opacity: 1;
}

/* Contact: the icon takes the dot's place and nudges forward on hover. */
.site-footer__contact-line .icon {
  flex-shrink: 0;
  margin-top: 4px;
  color: var(--rova-white);
  transition: transform var(--dur-base) var(--ease-flow);
}

a.site-footer__contact-line:hover .icon { transform: translateX(4px); }
[dir="rtl"] a.site-footer__contact-line:hover .icon { transform: translateX(-4px); }

.site-footer__hotline {
  gap: 6px !important;
  font-family: var(--font-display);
  font-size: 22px !important;
  font-weight: 700;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-6);
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border-inverse);
  color: var(--rova-white);
  font-size: var(--text-sm);
}

.site-footer__bottom a {
  color: var(--rova-white);
}

.site-footer__bottom a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  margin-inline-start: auto;
}

/* Brass dot between the links; the link underline draws in on hover. */
.site-footer__legal a {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
}

.site-footer__legal a + a::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brass-400);
  box-shadow: 0 0 0 3px rgb(201 162 75 / 0.18);
}

.site-footer__legal a span {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  padding-bottom: 2px;
  transition: background-size var(--dur-base) var(--ease-flow);
}

[dir="rtl"] .site-footer__legal a span { background-position: 100% 100%; }

.site-footer__legal a:hover { text-decoration: none; }
.site-footer__legal a:hover span { background-size: 100% 1px; }

@media (min-width: 720px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1080px) {
  .site-footer__grid {
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) minmax(0, 1.35fr);
  }

  .site-footer__brand {
    grid-column: auto;
  }
}

/* ---- Floating actions ----
   WhatsApp sits on top; "back to top" grows into the slot under it
   (`.is-visible`, from js/floating-actions.js), lifting WhatsApp up. */
.floating-actions {
  --fab-size: 52px;
  position: fixed;
  z-index: var(--z-fab);
  bottom: 24px;
  inset-inline-end: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.back-to-top {
  display: grid;
  place-items: center;
  width: var(--fab-size);
  height: 0;
  margin-top: 0;
  border-radius: 50%;
  background: var(--rova-white);
  box-shadow: 0 10px 30px -10px rgb(26 34 55 / 0.35);
  color: var(--rova-oxford-blue);
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  transition:
    height var(--dur-slow) var(--ease-flow),
    margin-top var(--dur-slow) var(--ease-flow),
    opacity var(--dur-base) var(--ease-flow),
    transform var(--dur-slow) var(--ease-flow),
    visibility 0s linear var(--dur-slow);
}

.back-to-top.is-visible {
  height: var(--fab-size);
  margin-top: var(--space-3);
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}

.whatsapp-fab {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 10px 30px -8px rgb(17 24 41 / 0.45);
  color: var(--rova-white);
}

/* Pulse ring behind the icon. */
.whatsapp-fab::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  border-radius: 50%;
  background: var(--whatsapp);
  animation: ping 2s var(--ease-flow) infinite;
}

.whatsapp-fab:hover {
  color: var(--rova-white);
}

.whatsapp-fab__tip {
  position: absolute;
  top: 50%;
  inset-inline-end: 68px;
  padding: var(--space-2) 14px;
  border-radius: var(--radius-pill);
  background: var(--rova-oxford-blue);
  color: var(--rova-floral);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity var(--dur-fast);
}

.whatsapp-fab:hover .whatsapp-fab__tip,
.whatsapp-fab:focus-visible .whatsapp-fab__tip {
  opacity: 1;
}

/* ---- Desktop ---- */
@media (min-width: 1080px) {
  .main-nav,
  .site-header__actions { display: flex; }
  .site-header__mobile { display: none; }
}

/* Lock page scroll while the drawer is open. */
body:has(.drawer[open]) {
  overflow: hidden;
}
