:root {
  --blue: #0f2b46;
  --blue-2: #16405f;
  --slate: #475569;
  --slate-light: #e2e8f0;
  --amber: #eab308;
  --amber-2: #facc15;
  --amber-soft: #fef9c3;
  --white: #ffffff;
  --bg: #f8fafc;
  --text: #1e293b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 43, 70, .12);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
.container { width: min(1140px, 92%); margin: 0 auto; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ---------- Header / Nav ---------- */
header { background: linear-gradient(90deg, var(--blue), var(--blue-2)); color: var(--white); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow); }
.nav-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; flex-wrap: wrap; gap: 10px; }
.logo-text { font-family: 'Quakez', 'Impact', sans-serif; font-size: 1.6rem; letter-spacing: 3px; color: #fff; text-transform: uppercase; white-space: nowrap; }
.logo-text em { font-style: normal; color: #f97316; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; letter-spacing: .5px; }
.logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.brand small { display: block; font-size: .65rem; font-weight: 500; color: var(--amber-soft); letter-spacing: 2px; text-transform: uppercase; }
.nav-toggle { background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; padding: 6px 12px; border-radius: 8px; cursor: pointer; display: none; }
nav ul { display: flex; gap: 18px; flex-wrap: wrap; }
nav a { font-size: .92rem; padding: 6px 4px; position: relative; }
nav a::after { content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--amber-2); transition: width .25s; }
nav a:hover::after, nav a.active::after { width: 100%; }

/* ---------- Nav "Teams" dropdown (progressive enhancement, injected by js) ----------
   The <li> must stay a normal block box so the anchor lays out and underlines
   exactly like every other nav item. Only the caret lives inside the anchor;
   the tap-target button is desktop-hidden so it cannot shift the label. */
nav li.has-sub { position: relative; }
nav .caret { display: inline-block; font-size: .62em; line-height: 1; margin-left: 3px; vertical-align: middle; opacity: .85; transition: transform .2s; }
nav li.has-sub.open .caret { transform: rotate(180deg); }
.sub-toggle { display: none; background: none; border: none; color: rgba(255,255,255,.8); cursor: pointer; font-size: .7rem; line-height: 1; padding: 6px 4px 6px 0; border-radius: 6px; }
.sub-toggle:hover { background: rgba(255,255,255,.12); }
nav ul.sub { display: none; position: absolute; top: 100%; right: 0; width: min(460px, 92vw); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px 12px; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 2px 8px; z-index: 60; }
nav li.has-sub:hover ul.sub, nav li.has-sub:focus-within ul.sub, nav li.has-sub.open ul.sub { display: grid; }
nav ul.sub .sub-label { grid-column: 1 / -1; font-size: .64rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; color: var(--slate); padding: 10px 10px 3px; }
nav ul.sub .sub-label:first-child { padding-top: 2px; }
nav ul.sub a { display: block; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: .86rem; line-height: 1.35; }
nav ul.sub a strong { display: block; color: var(--blue); font-size: .88rem; font-weight: 700; }
nav ul.sub a em { display: block; color: var(--slate); font-style: normal; font-size: .74rem; }
nav ul.sub a:hover { background: var(--bg); }
nav ul.sub a.civil strong { color: #a16207; }
nav ul.sub a.it strong { color: var(--blue-2); }
nav ul.sub a::after { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 12px 24px; border-radius: 999px; font-weight: 600; border: none; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-blue { background: var(--blue-2); color: #fff; }
.btn-amber { background: var(--amber-2); color: #1f2937; }
.btn-outline { border: 2px solid #fff; color: #fff; }

/* ---------- Hero ----------
   The photos live in their own absolutely-positioned layer so the section keeps
   its normal flow height and the copy simply cross-fades over the top. */
.hero { position: relative; overflow: hidden; background: var(--blue); color: #fff; padding: 120px 0; text-align: center; }
.hero-slides { position: absolute; inset: 0; z-index: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; background-position: center; background-size: cover; background-repeat: no-repeat; transition: opacity 1.2s ease; }
.hero-slide.is-active { opacity: 1; }
/* Blue wash keeps the white heading readable over any photo. */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(rgba(15,43,70,.82), rgba(22,64,95,.82)); }
.hero > .container, .hero-dots { position: relative; z-index: 2; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 3.2rem); margin-bottom: 14px; }
.hero h1 .accent { color: var(--amber-2); }
.hero p { max-width: 640px; margin: 0 auto 28px; color: #cbd5e1; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-dots { display: flex; gap: 10px; justify-content: center; margin-top: 36px; }
.hero-dots button { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.75); background: transparent; cursor: pointer; transition: background .2s, transform .2s; }
.hero-dots button:hover { transform: scale(1.2); }
.hero-dots button.active { background: var(--amber-2); border-color: var(--amber-2); }
/* Visitors who ask for less motion get a hard cut instead of a fade. */
@media (prefers-reduced-motion: reduce) {
  .hero-slide { transition: none; }
}

/* ---------- Sections ---------- */
section { padding: 64px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); color: var(--blue); }
.section-title p { color: var(--slate); }
.section-title::after { content: ""; display: block; width: 60px; height: 4px; background: linear-gradient(90deg, var(--blue-2), var(--amber-2)); margin: 12px auto 0; border-radius: 2px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card { background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border-top: 4px solid var(--blue-2); transition: transform .2s; }
.card:hover { transform: translateY(-5px); }
.card.civil { border-top-color: var(--amber-2); }
.card .icon { font-size: 2rem; margin-bottom: 12px; }
.card h3 { margin-bottom: 8px; color: var(--blue); }
.card p { color: var(--slate); font-size: .94rem; }
.dual-cards { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.dual-card { padding: 36px; border-radius: var(--radius); color: #fff; text-align: center; }
.dual-card.civil { background: linear-gradient(135deg, #ca8a04, var(--amber-2)); }
.dual-card.it { background: linear-gradient(135deg, var(--blue), var(--blue-2)); }
.dual-card h3 { margin: 10px 0; }
.dual-img { margin: 0 auto; animation: float 3s ease-in-out infinite; transition: transform .3s; }
.dual-img:hover { animation-play-state: paused; transform: scale(1.2) rotate(-5deg); }
.it-img { animation-delay: 1.2s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ---------- Division switch ---------- */
.switch { display: flex; justify-content: center; gap: 10px; margin-bottom: 32px; flex-wrap: wrap; }
.switch button { padding: 10px 22px; border-radius: 999px; border: 2px solid var(--slate-light); background: #fff; cursor: pointer; font-weight: 600; color: var(--slate); transition: .2s; }
.switch button.active[data-div="it"] { background: var(--blue-2); color: #fff; border-color: var(--blue-2); }
.switch button.active[data-div="civil"] { background: var(--amber-2); color: #1f2937; border-color: var(--amber-2); }
.switch button.active[data-div="all"] { background: var(--slate); color: #fff; border-color: var(--slate); }
.hidden { display: none !important; }

/* ---------- Tabs (Projects) ---------- */
.tabs { display: flex; gap: 8px; justify-content: center; margin-bottom: 28px; flex-wrap: wrap; }
.tab-btn { padding: 10px 26px; border: none; background: var(--slate-light); border-radius: 999px; cursor: pointer; font-weight: 600; color: var(--slate); }
.tab-btn.active { background: linear-gradient(90deg, var(--blue-2), #1d4ed8); color: #fff; }
.tab-btn.active.civil { background: linear-gradient(90deg, #ca8a04, var(--amber-2)); color: #fff; }

/* ---------- Lists / tags ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.tag { font-size: .75rem; padding: 4px 10px; border-radius: 999px; background: var(--slate-light); color: var(--slate); }
.card.civil .tag { background: var(--amber-soft); color: #854d0e; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 18px; text-align: center; }
.stat h3 { font-size: 2rem; color: var(--amber-2); }
.stat p { color: var(--slate); }

/* ---------- Form ---------- */
form { display: grid; gap: 14px; max-width: 620px; margin: 0 auto; }
form label { font-weight: 600; font-size: .9rem; }
input, select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cbd5e1; border-radius: 10px; font: inherit; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--blue-2); border-color: transparent; }
textarea { min-height: 130px; resize: vertical; }

.contact-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.map-frame { display: block; width: 100%; aspect-ratio: 4 / 3; min-height: 260px; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--slate-light); }
.map-note { margin: 10px 0 0; font-size: .86rem; }

/* ---------- Teams page ---------- */
.page-hero { background: linear-gradient(90deg, var(--blue), var(--blue-2)); color: var(--white); padding: 70px 0; text-align: center; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 10px; }
.page-hero h1 .accent { color: var(--amber-2); }
.page-hero p { color: #cbd5e1; max-width: 640px; margin: 0 auto; }
.team-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.team-head h3 { font-size: 1.25rem; }
.member-grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.member { background: #fff; border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); border-top: 4px solid var(--blue-2); text-align: center; transition: transform .2s; }
.member:hover { transform: translateY(-5px); }
.member.civil { border-top-color: var(--amber-2); }
.avatar { width: 74px; height: 74px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 1.35rem; color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2)); letter-spacing: 1px; }
.member.civil .avatar { background: linear-gradient(135deg, #ca8a04, var(--amber-2)); color: #1f2937; }
.member h3 { margin-bottom: 4px; color: var(--blue); }
.member .role { color: var(--blue-2); font-weight: 600; font-size: .86rem; margin-bottom: 10px; }
.member.civil .role { color: #ca8a04; }
.member p { color: var(--slate); font-size: .92rem; }
.member .tags { justify-content: center; }

/* Team member photo */
.member-photo { display: block; margin: -14px -10px 16px; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(15, 43, 70, .18); }
.member-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .3s; }
.member-photo:hover img { transform: scale(1.06); }

/* Key/value details under a member photo */
.facts { list-style: none; text-align: left; margin-top: 14px; border-top: 1px solid var(--slate-light); }
.facts li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 2px; border-bottom: 1px solid var(--slate-light); font-size: .8rem; }
.facts b { color: var(--slate); font-weight: 600; }
.facts span { color: var(--text); font-weight: 600; text-align: right; }
.member.civil .facts b { color: #a16207; }

.member-link { display: inline-block; margin-top: 16px; font-weight: 600; font-size: .88rem; color: var(--blue-2); }
.member.civil .member-link { color: #a16207; }
.member-link:hover { text-decoration: underline; }

/* Squad cards with banner image */
.card.figure { padding: 0; overflow: hidden; }
.card.figure .fig-body { padding: 20px 24px 24px; }
.card.figure img { width: 100%; height: auto; aspect-ratio: 12 / 7; object-fit: cover; }
.card.figure h3 { margin-top: 14px; }

/* ---------- Member profile page ---------- */
.profile-hero { background: linear-gradient(90deg, var(--blue), var(--blue-2)); color: var(--white); padding: 52px 0 62px; }
.profile-hero .crumbs { font-size: .82rem; color: #94a3b8; margin-bottom: 18px; }
.profile-hero .crumbs a { color: #cbd5e1; }
.profile-hero .crumbs a:hover { color: var(--amber-2); }
.profile-hero .crumbs span { margin: 0 6px; }
.profile-grid { display: grid; gap: 34px; grid-template-columns: minmax(260px, 340px) 1fr; align-items: start; margin-top: -46px; }
.profile-photo { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; border-top: 4px solid var(--blue-2); }
.profile-photo.civil { border-top-color: var(--amber-2); }
.profile-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; }
.profile-body { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 30px; border-top: 4px solid var(--blue-2); }
.profile-body.civil { border-top-color: var(--amber-2); }
.profile-body h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); color: var(--blue); }
.profile-body .role { color: var(--blue-2); font-weight: 600; margin: 6px 0 18px; }
.profile-body.civil .role { color: #ca8a04; }
.badge { display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: var(--slate-light); color: var(--slate); margin-bottom: 12px; }
.badge.civil { background: var(--amber-soft); color: #854d0e; }
.badge.it { background: var(--blue); color: #fff; }
.profile-facts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 22px 0; padding: 20px; background: var(--bg); border-radius: 12px; }
.profile-facts div { font-size: .82rem; }
.profile-facts b { display: block; color: var(--slate); font-weight: 600; margin-bottom: 2px; }
.profile-body h2 { font-size: 1.2rem; color: var(--blue); margin: 26px 0 10px; }
.focus-list { list-style: none; display: grid; gap: 8px 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.focus-list li { position: relative; padding-left: 24px; color: var(--slate); font-size: .94rem; }
.focus-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 3px; background: var(--blue-2); }
.profile-body.civil .focus-list li::before { background: var(--amber-2); }
.work-list { list-style: none; display: grid; gap: 12px; }
.work-list li { padding: 14px 16px; border-left: 3px solid var(--blue-2); background: var(--bg); border-radius: 0 10px 10px 0; }
.profile-body.civil .work-list li { border-left-color: var(--amber-2); }
.work-list b { display: block; color: var(--blue); }
.work-list span { color: var(--slate); font-size: .9rem; }
.profile-contact { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.profile-nav { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.profile-nav a { font-weight: 600; color: var(--blue-2); }
.profile-nav a:hover { text-decoration: underline; }
.empty-note { text-align: center; padding: 60px 0; }
.empty-note p { color: var(--slate); margin-bottom: 18px; }

/* ---------- Footer ---------- */
footer { background: var(--blue); color: #cbd5e1; padding: 30px 0; text-align: center; margin-top: 40px; }
footer span { color: var(--amber-2); }

/* ---------- Floating WhatsApp button ----------
   The wrap holds the fixed corner position; the pill and the "+" toggle sit
   inside it, so the quick-reply menu can be positioned against the pair. */
.wa-wrap { position: fixed; right: 22px; bottom: 22px; z-index: 40; display: flex; align-items: center; gap: 10px; }
.whatsapp-fab { display: inline-flex; align-items: center; gap: 10px; padding: 13px 18px; border-radius: 999px; background: #25d366; color: #fff; box-shadow: 0 10px 25px rgba(37, 211, 102, .45); transition: transform .2s, box-shadow .2s; }
.whatsapp-fab:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(37, 211, 102, .6); }
.whatsapp-fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.whatsapp-fab svg { width: 26px; height: 26px; fill: currentColor; flex: none; }
.whatsapp-fab-label { font-size: .85rem; font-weight: 600; white-space: nowrap; }
.wa-more { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 50%; cursor: pointer; background: var(--blue); color: #fff; font-size: 1.5rem; line-height: 1; padding: 0 0 3px; box-shadow: 0 10px 25px rgba(15, 43, 70, .4); transition: transform .2s, background .2s; }
.wa-more:hover { background: var(--blue-2); }
.wa-more:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
/* Open state turns the "+" into an "x". */
.wa-more[aria-expanded="true"] { transform: rotate(45deg); }
.wa-menu { position: absolute; right: 0; bottom: calc(100% + 12px); display: grid; gap: 8px; justify-items: end; }
.wa-menu[hidden] { display: none; }
.wa-menu a { padding: 10px 16px; border-radius: 999px; border-left: 4px solid var(--amber-2); background: #fff; color: var(--blue); font-size: .85rem; font-weight: 600; white-space: nowrap; box-shadow: var(--shadow); transition: transform .2s; }
.wa-menu a:hover { transform: translateX(-4px); }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  nav ul { display: none; width: 100%; flex-direction: column; padding-top: 10px; }
  nav ul.open { display: flex; }
  .hero { padding: 60px 0; }
  nav .caret { display: none; }
  .sub-toggle { display: block; }
  nav ul.sub { position: static; width: 100%; max-width: none; box-shadow: none; padding: 6px 0 4px 14px; grid-template-columns: 1fr; }
  nav ul.sub .sub-label { padding: 10px 10px 2px; }
  .profile-grid { grid-template-columns: 1fr; margin-top: -30px; }
  .profile-grid figure { max-width: 300px; margin: 0 auto; }
  /* Icon only, so the pill never covers the footer's own links. */
  .wa-wrap { right: 16px; bottom: 16px; }
  .whatsapp-fab { padding: 14px; }
  .whatsapp-fab-label { display: none; }
}
