/* =====================================================
   AVIAL Maritime Consultancy Services — Cadetship Exam
   Body design: avialmcs-main · Header: crewtraining.avialmcs.com
   Brand: navy #2E5E9E · sky #50ADE6 (sampled from logo)
   ===================================================== */

:root {
  --navy: #2E5E9E;
  --navy-dark: #1E4373;
  --navy-deep: #142E52;
  --sky: #50ADE6;
  --sky-soft: #EAF4FC;
  --bg: #FFFFFF;
  --bg-alt: #F5F8FC;
  --text: #22334C;
  --text-muted: #5B6B84;
  --border: #E3EAF3;
  --shadow-sm: 0 2px 8px rgba(20, 46, 82, 0.06);
  --shadow-md: 0 8px 30px rgba(20, 46, 82, 0.10);
  --shadow-lg: 0 20px 50px rgba(20, 46, 82, 0.16);
  --radius: 16px;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --nav-h: 94px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 600;
  color: var(--navy-deep);
  line-height: 1.2;
}

.section-sub {
  color: var(--text-muted);
  margin-top: 0.75rem;
  font-size: 1.05rem;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.muted { color: var(--text-muted); font-weight: 500; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 130%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(46, 94, 158, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(46, 94, 158, 0.45);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--navy);
}

.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
  transform: translateY(-2px);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 4rem 0 5rem;
  background: linear-gradient(180deg, #FBFDFF 0%, var(--sky-soft) 100%);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; pointer-events: none; }

.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
}

.hero-glow-1 {
  width: 480px; height: 480px;
  background: var(--sky);
  top: -140px; right: -120px;
}

.hero-glow-2 {
  width: 420px; height: 420px;
  background: var(--navy);
  bottom: -180px; left: -140px;
  opacity: 0.18;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3rem;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--navy-deep);
  margin-bottom: 1.25rem;
}

.hero-title em {
  font-style: italic;
  color: var(--sky);
}

.hero-text {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }

.hero-visual { display: flex; justify-content: center; }

.hero-logo-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 28px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}

.hero-logo-card img {
  margin-inline: auto;
  width: min(320px, 60vw);
  height: auto;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 1.6rem;
  transform: translateX(-50%);
  color: var(--navy);
  opacity: 0.55;
  animation: bob 2s ease-in-out infinite;
  transition: opacity 0.25s ease;
}

.scroll-hint:hover { opacity: 1; }

@keyframes bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 8px); }
}

/* ---------- Sections ---------- */
.section { padding: 6rem 0; }

/* ---------- About ---------- */
.about { background: var(--bg); }

.about-lead {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  color: var(--text);
  text-align: center;
  max-width: 780px;
  margin: -1.5rem auto 3.5rem;
  line-height: 1.7;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pillar {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pillar:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 1.1rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--sky));
  color: #fff;
}

.pillar-icon svg { width: 26px; height: 26px; }

.pillar h3 {
  font-size: 1.1rem;
  color: var(--navy-deep);
  margin-bottom: 0.4rem;
}

.pillar p { font-size: 0.93rem; color: var(--text-muted); }

/* ---------- Services ---------- */
.services { background: var(--bg-alt); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.9rem 1.75rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sky), var(--navy));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(80, 173, 230, 0.5);
}

.service-card:hover::before { transform: scaleY(1); }

.service-icon {
  width: 50px;
  height: 50px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--sky-soft);
  color: var(--navy);
  margin-bottom: 1.1rem;
  transition: background 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-icon {
  background: linear-gradient(135deg, var(--navy), var(--sky));
  color: #fff;
}

.service-icon svg { width: 24px; height: 24px; }

.service-card h3 {
  font-size: 1.08rem;
  color: var(--navy-deep);
  margin-bottom: 0.45rem;
  line-height: 1.35;
}

.service-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-grow: 1;
}

.service-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--sky);
  transition: gap 0.25s ease, color 0.25s ease;
}

.service-card:hover .service-more { gap: 0.7rem; color: var(--navy); }

/* ---------- Contact ---------- */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.contact-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(80, 173, 230, 0.5);
}

.contact-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--navy), var(--sky));
  color: #fff;
  transition: transform 0.3s ease;
}

.contact-card:hover .contact-icon { transform: scale(1.08); }

.contact-icon svg { width: 25px; height: 25px; }

.contact-card h3 {
  font-size: 1.05rem;
  color: var(--navy-deep);
  margin-bottom: 0.3rem;
}

.contact-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  word-break: break-word;
}

.contact-email { font-size: 0.85rem; }

.contact-hint {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sky);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.contact-card:hover .contact-hint { opacity: 1; transform: translateY(0); }

/* ---------- Footer (matched to crewtraining.avialmcs.com) ---------- */
.site-footer {
  background-color: #1F4373;
  color: #fff;
  text-align: center;
  padding: 2rem 1.5rem;
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
  line-height: 1.7;
}

.site-footer .footer-brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 0.3rem;
}

.site-footer p {
  font-size: 0.88rem;
  opacity: 0.85;
}

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 1.6rem;
  bottom: 1.6rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, background 0.25s ease;
  z-index: 90;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--sky); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.delay-1 { transition-delay: 0.12s; }
.delay-2 { transition-delay: 0.24s; }
.delay-3 { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-logo-card, .scroll-hint { animation: none; }
  * { transition-duration: 0.01ms !important; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }

  .hero-text { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-logo-card { padding: 1.4rem; }
  .hero-logo-card img { width: min(220px, 50vw); }

  .pillars { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; max-width: 420px; }
}

@media (max-width: 768px) {
  .section { padding: 4.5rem 0; }
  .section-head { margin-bottom: 2.5rem; }
}

/* =====================================================
   Header (matched to crewtraining.avialmcs.com)
   ===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: #fff;
  border-bottom: 3px solid var(--navy);
  box-shadow: 0 2px 10px rgba(44, 93, 160, 0.08);
  font-family: 'Open Sans', 'Segoe UI', Arial, sans-serif;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand img {
  height: 64px;
  width: auto;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-name .brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #2C5DA0;
}

.brand-name .brand-subtitle {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--sky);
  font-weight: 600;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.main-nav a {
  display: block;
  padding: 0.55rem 1.1rem;
  color: #2C5DA0;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 4px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.main-nav a:hover,
.main-nav a:focus {
  background-color: var(--sky);
  color: #fff;
}

@media (max-width: 768px) {
  :root { --nav-h: 150px; }

  .header-inner {
    flex-direction: column;
    padding-bottom: 0.6rem;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .main-nav a { padding: 0.45rem 0.8rem; }

  .brand img { height: 52px; }

  .hero { min-height: auto; padding: 3rem 0 4.5rem; }
}

/* =====================================================
   Exam page additions
   ===================================================== */

/* ---------- Hero badge ---------- */
.hero-badge {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.hero-badge strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--navy-deep);
}

.hero-badge span { font-size: 0.85rem; color: var(--text-muted); }

/* ---------- Eligibility ---------- */
.eligibility { background: var(--bg); }

.pillar { position: relative; }

.pillar-num {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  font-family: var(--font-serif);
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1;
  color: var(--sky);
  opacity: 0.18;
}

/* ---------- Requirements ---------- */
.requirements { background: var(--bg-alt); }

.req-note {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  max-width: 1000px;
  margin: 0 auto 2rem;
  padding: 1.1rem 1.4rem;
  background: var(--sky-soft);
  border: 1px solid rgba(80, 173, 230, 0.35);
  border-left: 4px solid var(--sky);
  border-radius: 12px;
  font-size: 0.95rem;
  color: var(--text);
}

.req-note svg { flex-shrink: 0; width: 22px; height: 22px; color: var(--navy); margin-top: 1px; }

.req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  list-style: none;
}

.req-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.05rem 1.25rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.req-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--sky), var(--navy));
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.35s ease;
}

.req-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(80, 173, 230, 0.5);
}

.req-item:hover::before { transform: scaleY(1); }

.req-letter {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--sky-soft);
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}

.req-item:hover .req-letter {
  background: linear-gradient(135deg, var(--navy), var(--sky));
  color: #fff;
}

.req-text strong {
  display: block;
  font-size: 0.98rem;
  color: var(--navy-deep);
  line-height: 1.35;
}

.req-text small {
  display: block;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.req-item-wide { grid-column: 1 / -1; }

/* ---------- Take the exam ---------- */
.exam { background: var(--bg); }

.exam-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 860px;
  margin: 0 auto;
}

.exam-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.4rem 1.75rem 2rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.exam-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(80, 173, 230, 0.5);
}

.exam-card .pillar-icon { width: 60px; height: 60px; border-radius: 16px; }
.exam-card .pillar-icon svg { width: 30px; height: 30px; }

.exam-card h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy-deep);
  margin-bottom: 0.4rem;
}

.exam-card p {
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.exam-card .btn svg { width: 16px; height: 16px; }

.exam-note {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 1.8rem;
}

@media (max-width: 768px) {
  .exam-grid { grid-template-columns: 1fr; max-width: 460px; }
}

@media (max-width: 400px) {
  .req-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
