/* ==========================================================================
   Layout — header, footer, sections, page hero, floating actions
   ========================================================================== */

/* ---------- Header / navbar ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: var(--etw-gradient-dark);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.site-header .navbar { min-height: var(--etw-header-height); padding-block: .5rem; }

.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--etw-white); }
.brand:hover { color: var(--etw-white); }
.brand-logo {
  width: 52px; height: 52px; flex: none; border-radius: 50%;
  background: var(--etw-white); padding: 2px; object-fit: cover;
  box-shadow: 0 0 0 2px rgba(18, 189, 242, .45);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--etw-font-heading); font-weight: 700; font-size: 1.15rem; }
.brand-tagline { font-size: .72rem; color: rgba(255, 255, 255, .7); letter-spacing: .02em; }

.site-header .navbar-nav { gap: .15rem; }
.site-header .nav-link {
  color: rgba(255, 255, 255, .85); font-weight: 500; font-size: .95rem;
  padding: .55rem .85rem; border-radius: var(--etw-radius-pill);
}
.site-header .nav-link:hover,
.site-header .nav-link:focus-visible { color: var(--etw-white); background: rgba(255, 255, 255, .08); }
.site-header .nav-link.active { color: var(--etw-white); background: rgba(37, 99, 235, .45); }
.site-header .nav-link.show,
.site-header .nav-link:active { color: var(--etw-white); background: rgba(255, 255, 255, .12); }   /* keep label readable while its dropdown is open */
.site-header .navbar-toggler { border-color: rgba(255, 255, 255, .35); padding: .45rem .65rem; }
.site-header .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(18, 189, 242, .5); }
/* Hamburger icon: explicit white strokes. The toggler lives outside .navbar so Bootstrap's icon variable is undefined there,
   and Bootstrap's dark theme would otherwise supply a light icon that the old invert() filter turned dark. Works in both themes. */
.site-header .navbar-toggler-icon {
  filter: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
@media (min-width: 1200px) { .header-top .navbar-toggler { display: none; } }   /* desktop shows the nav row instead */

.site-header .dropdown-menu {
  border: 1px solid var(--etw-border); border-radius: var(--etw-radius);
  box-shadow: var(--etw-shadow-lg); padding: .5rem; min-width: 290px;
  --bs-dropdown-bg: var(--etw-surface); --bs-dropdown-color: var(--etw-text); --bs-dropdown-border-color: var(--etw-border); --bs-dropdown-divider-bg: var(--etw-border);
}
.site-header .dropdown-item { border-radius: var(--etw-radius-sm); padding: .55rem .75rem; font-weight: 500; color: var(--etw-text); white-space: normal; }
.site-header .dropdown-item:hover, .site-header .dropdown-item:focus { background: var(--etw-blue-50); color: var(--etw-link); }
.site-header .dropdown-item .bi { color: var(--etw-link); margin-right: .5rem; }

/* Header search */
/* Two-row header: .header-top (brand · search · actions) + .header-nav (links) */
.header-top-inner { display: flex; align-items: center; gap: 1rem; padding-block: .75rem; }
.header-top .brand { flex: none; }
.header-nav { padding: 0; background: rgba(0, 0, 0, .28); border-top: 1px solid rgba(255, 255, 255, .08); min-height: 0; }
.header-nav .navbar-nav { gap: .25rem 1.25rem; }
.header-nav .nav-link { white-space: nowrap; }
.header-top .navbar-toggler { margin-left: auto; }
.header-search {
  display: flex; align-items: stretch; flex: 1 1 250px; min-width: 250px; max-width: 460px; margin-left: auto;
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; overflow: hidden;
  background: rgba(255, 255, 255, .06);
}
.header-search-input {
  flex: 1; min-width: 0; padding: .55rem 1rem; border: 0; outline: 0;
  background: transparent; color: #fff; font-size: .95rem;
}
.header-search-input::placeholder { color: rgba(255, 255, 255, .7); }
.header-search-btn {
  border: 0; padding: 0 .9rem; background: var(--etw-cyan); color: #fff; cursor: pointer;
}
.header-search-btn:hover, .header-search-btn:focus-visible { filter: brightness(1.1); }
.header-search:focus-within { box-shadow: 0 0 0 3px rgba(18, 189, 242, .5); }
.nav-cta { display: flex; align-items: center; flex-wrap: nowrap; gap: .75rem; flex: none; }
.nav-cta .btn { white-space: nowrap; }

/* Below xl: top row wraps (brand + toggler, then search, then buttons); nav row collapses */
@media (max-width: 1199.98px) {
  .header-top-inner { flex-wrap: wrap; }
  .header-top .navbar-toggler { order: 2; }
  .header-search { order: 3; flex: 1 1 100%; max-width: none; margin-left: 0; }
  .nav-cta { order: 4; flex: 1 1 100%; }
  .nav-cta .btn { flex: 1; }
  .header-nav .navbar-collapse { margin: 0; padding: .5rem 0; border-top: 0; }
}

/* ---------- Sections ---------- */
.section { padding-block: var(--etw-section-y); }
.section-alt { background: var(--etw-section-alt); }
.section-light { background: var(--etw-blue-50); }
.section-dark { background: var(--etw-gradient-dark); color: rgba(255, 255, 255, .82); }
.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4 { color: var(--etw-white); }

.section-head { max-width: 720px; margin: 0 auto 2.75rem; text-align: center; }
.section-head p { color: var(--etw-text-muted); }
.section-eyebrow {
  display: inline-block; margin-bottom: .6rem;
  font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--etw-link);
}
.section-dark .section-eyebrow { color: var(--etw-cyan); }
.section-title-bar::after {
  content: ""; display: block; width: 56px; height: 4px; margin: .9rem auto 0;
  border-radius: 4px; background: var(--etw-gradient-brand);
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 6vw, 5rem);
  background: var(--etw-gradient-dark); color: rgba(255, 255, 255, .85);
}
.page-hero::before, .page-hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.page-hero::before { width: 420px; height: 420px; right: -120px; top: -160px; background: radial-gradient(circle, rgba(18, 189, 242, .28), transparent 70%); }
.page-hero::after { width: 360px; height: 360px; left: -140px; bottom: -200px; background: radial-gradient(circle, rgba(37, 99, 235, .4), transparent 70%); }
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { color: var(--etw-white); margin-bottom: .75rem; }
.page-hero .lead { color: rgba(255, 255, 255, .78); max-width: 680px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { --bs-breadcrumb-divider-color: rgba(255, 255, 255, .5); font-size: .88rem; margin-bottom: 1rem; }
.breadcrumb-item a { color: var(--etw-cyan); }
.breadcrumb-item.active { color: rgba(255, 255, 255, .8); }
.breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .5); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--etw-footer-bg); color: rgba(255, 255, 255, .72);
  border-top: 3px solid var(--etw-blue);
  padding-top: clamp(2.5rem, 5vw, 4rem);
}
.site-footer h2, .site-footer .footer-heading {
  font-size: 1.05rem; color: var(--etw-cyan); margin-bottom: 1.1rem; font-weight: 600;
}
.footer-brand-text { font-size: .93rem; margin-block: 1rem; max-width: 340px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: .55rem; }
.footer-links a { color: rgba(255, 255, 255, .72); font-size: .93rem; }
.footer-links a:hover { color: var(--etw-white); }
.footer-links .bi { font-size: .65rem; color: var(--etw-cyan); margin-right: .4rem; }
.footer-contact { list-style: none; padding: 0; margin: 0; font-size: .93rem; }
.footer-contact li { display: flex; gap: .7rem; margin-bottom: .8rem; }
.footer-contact .bi { color: var(--etw-cyan); margin-top: .2rem; flex: none; }
.footer-contact a { color: rgba(255, 255, 255, .85); word-break: break-word; }
.footer-contact a:hover { color: var(--etw-white); }

.social-links { display: flex; gap: .6rem; }
.social-links a {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 50%; background: rgba(255, 255, 255, .08); color: var(--etw-white);
  transition: background var(--etw-transition), transform var(--etw-transition);
}
.social-links a:hover { background: var(--etw-blue); transform: translateY(-2px); color: var(--etw-white); }

.footer-bottom {
  margin-top: 2.5rem; padding-block: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, .1); font-size: .86rem;
}
.footer-bottom a { color: rgba(255, 255, 255, .72); }
.footer-bottom a:hover { color: var(--etw-white); }

/* Social icons on light backgrounds */
.contact-social a { background: var(--etw-chip-bg); }

/* Legal pages: numbered cards with a blue accent edge */
.legal-card { border-left: 4px solid var(--etw-blue); height: 100%; padding: 1.6rem 1.75rem; }
.legal-card h2 { font-size: 1.15rem; margin-bottom: .6rem; }
.legal-card p, .legal-card li { color: var(--etw-text-muted); font-size: .95rem; }
.legal-card ul { padding-left: 1.1rem; margin-bottom: 0; }
.legal-card p:last-child { margin-bottom: 0; }

/* ---------- Floating actions ---------- */
.whatsapp-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 1040;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.8rem;
  background: #25D366; color: var(--etw-white);
  box-shadow: 0 8px 22px rgba(37, 211, 102, .45);
  transition: transform var(--etw-transition);
}
.whatsapp-float:hover { color: var(--etw-white); transform: scale(1.08); }

.back-to-top {
  position: fixed; right: 22px; bottom: 88px; z-index: 1039;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: var(--etw-chip-bg); color: var(--etw-white); box-shadow: var(--etw-shadow);
  opacity: 0; visibility: hidden; transition: opacity var(--etw-transition), visibility var(--etw-transition);
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Theme toggle (header) ---------- */
.theme-toggle {
  flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .06);
  color: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0;
  transition: background var(--etw-transition), transform var(--etw-transition);
}
.theme-toggle:hover { background: rgba(255, 255, 255, .16); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle .bi-moon-stars-fill { display: none; color: #FDE68A; }
.theme-toggle .bi-sun-fill { color: #FBBF24; }
html[data-bs-theme="dark"] .theme-toggle .bi-sun-fill { display: none; }
html[data-bs-theme="dark"] .theme-toggle .bi-moon-stars-fill { display: inline-block; }
html[data-bs-theme="dark"] .back-to-top { border: 1px solid var(--etw-border); }