/* ------------------------------------------------------------------ Tokens */
:root {
  --navy-900: #0a1b3f;
  --navy-800: #102a5c;
  --navy-700: #1b3a7a;
  --blue: #2350c8;
  --blue-soft: #eaf1fb;
  --gold: #e9b739;
  --gold-dark: #cf9d1f;
  --white: #ffffff;
  --ink: #1b2433;
  --muted: #5e6b80;
  --border: #dbe4f0;
  --pt-green: #046a38;
  --pt-red: #da291c;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(10, 27, 63, 0.08);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 84px;
}

/* -------------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--white); line-height: 1.6; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy-800); }
p { margin: 0 0 1em; }
a { color: inherit; }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ----------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .6em;
  font: 600 1rem var(--font); padding: .8em 1.5em; border-radius: 8px;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { border-color: var(--white); color: var(--white); background: rgba(10, 27, 63, .25); }
.btn-outline:hover { background: var(--white); color: var(--navy-900); }

.link-more {
  display: inline-flex; align-items: center; gap: .5em; margin-top: auto;
  color: var(--blue); font-weight: 600; font-size: .95rem; text-decoration: none;
}
.link-more:hover .ic { transform: translateX(3px); }
.link-more .ic { transition: transform .2s; }

/* -------------------------------------------------------------------- Logo */
.logo { display: inline-flex; flex-direction: column; align-items: center; text-decoration: none; line-height: 1; }
.logo-word { font-weight: 700; font-size: 2rem; letter-spacing: -.02em; color: var(--navy-800); }
.logo-sub {
  margin-top: 4px; padding-bottom: 3px; font-size: .58rem; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--pt-green);
  border-bottom: 3px solid; border-image: linear-gradient(90deg, var(--pt-green) 40%, var(--pt-red) 40%) 1;
}
.logo-light .logo-word { color: var(--white); }
.logo-light .logo-sub { color: var(--white); }

/* ------------------------------------------------------------------ Header */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--white); transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: 0 2px 16px rgba(10, 27, 63, .1); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  color: var(--navy-800); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover, .site-nav a.active { color: var(--blue); border-bottom-color: var(--gold); }
.nav-cta-mobile { display: none; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy-800); margin: 5px 0; }

/* -------------------------------------------------------------------- Hero */
.hero {
  position: relative; min-height: clamp(460px, 68vh, 660px); display: flex; align-items: center;
  color: var(--white); background: url("../assets/images/hero-madeira.jpg") center / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10, 27, 63, .85) 0%, rgba(10, 27, 63, .55) 38%, rgba(10, 27, 63, 0) 62%);
}
.hero-content { position: relative; padding-top: 48px; padding-bottom: 48px; }
.hero-eyebrow {
  display: inline-block; font-weight: 600; font-size: clamp(1rem, 1.7vw, 1.4rem); line-height: 1.4;
  padding-bottom: .6em; margin-bottom: 1.1em; border-bottom: 3px solid var(--gold);
}
.hero-title { color: var(--gold); font-weight: 700; font-size: clamp(2rem, 4.4vw, 3.4rem); margin-bottom: 1.1em; }

/* -------------------------------------------------------- Entities banner */
.entities { border-bottom: 1px solid var(--border); background: var(--white); }
.entities-inner { display: grid; grid-template-columns: repeat(5, 1fr); }
.entity { display: flex; align-items: flex-start; gap: 12px; padding: 24px 18px; border-left: 1px solid var(--border); }
.entity:first-child { border-left: 0; padding-left: 0; }
.entity strong { display: block; color: var(--blue); font-size: 1rem; }
.entity span { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.entity-flag { width: 36px; height: 24px; flex: none; margin-top: 2px; }
.entity-ic { font-size: 28px; color: var(--blue); }
.entity-badge {
  flex: none; background: var(--navy-700); color: var(--white); font-weight: 700; font-size: .85rem;
  padding: 6px 8px; border-radius: 4px;
}

/* ------------------------------------------------------------ Trust strip */
.trust { position: relative; padding-bottom: 32px; }
.trust-band { height: 280px; background: url("../assets/images/aerial-containers.jpg") center / cover no-repeat; }
.trust-panel {
  position: relative; margin-top: -140px; padding: 16px; border-radius: 16px;
  background: #f4f7fc; display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.trust-card { background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.accent-bar { display: block; width: 36px; height: 4px; border-radius: 2px; background: var(--gold); margin-bottom: 14px; }
.trust-card h2 { text-transform: uppercase; font-size: clamp(1.3rem, 2.2vw, 1.75rem); margin-bottom: .3em; }
.trust-sub { color: var(--muted); margin-bottom: 1.2em; }
.icon-list li { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; font-size: .95rem; }
.icon-list > li > .ic { font-size: 20px; color: var(--blue); margin-top: 1px; }
.sub-list { margin-top: 6px; }
.sub-list li { padding: 3px 0 3px 18px; position: relative; font-size: .9rem; color: var(--muted); }
.sub-list li::before { content: ""; position: absolute; left: 4px; top: .75em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------------------------------------------------------------- Sections */
.section { padding: 72px 0; }
.section-tight { padding: 32px 0 64px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1em; }
.section-title.center { text-align: center; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 1.6em; }
.section-head .section-title { margin: 0; }
.section-head .link-more { margin-top: 0; }

.divider { display: flex; align-items: center; gap: 20px; color: var(--blue); margin-bottom: 32px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 3px; background: #f0d58a; border-radius: 2px; }
.divider svg { width: 48px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }

/* Info cards (About, Our Services) */
.info-card {
  display: flex; flex-direction: column; background: var(--blue-soft);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow);
}
.card-ic { font-size: 30px; color: var(--blue); margin-bottom: 18px; stroke-width: 1.6; }
.info-card h3 { font-size: 1.1rem; }
.info-card p { color: var(--muted); font-size: .92rem; }
.dot-list { margin-bottom: 1em; }
.dot-list li { position: relative; padding: 0 0 8px 16px; color: var(--muted); font-size: .9rem; }
.dot-list li::before { content: ""; position: absolute; left: 0; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.dot-list strong { color: var(--navy-800); }

/* Photo cards (Registration services, Resources) */
.photo-card {
  display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s;
}
.photo-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(10, 27, 63, .14); }
.photo-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.photo-card-body { display: flex; flex-direction: column; flex: 1; padding: 20px; }
.photo-card h3 { font-size: 1.05rem; }
.photo-card p { color: var(--muted); font-size: .9rem; }
.photo-card.small h3 { font-size: .98rem; }
.photo-card.small p { font-size: .85rem; }

/* Process steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.step { position: relative; }
.step-num {
  position: relative; z-index: 1; display: inline-grid; place-items: center; width: 44px; height: 44px;
  border-radius: 50%; background: var(--navy-800); color: var(--white); font-weight: 700; margin-bottom: 18px;
}
/* Arrow connecting each step to the next */
.step:not(:last-child)::after {
  content: ""; position: absolute; top: 21px; left: 56px; right: -12px; height: 2px; background: var(--blue);
}
.step:not(:last-child)::before {
  content: ""; position: absolute; top: 16px; right: -14px; border: 6px solid transparent; border-left: 9px solid var(--blue);
}
.step h3 { font-size: 1rem; }
.step p { color: var(--muted); font-size: .9rem; margin: 0; }

/* Contact */
.contact {
  position: relative; padding: 64px 0;
  background: linear-gradient(rgba(10, 27, 63, .72), rgba(10, 27, 63, .72)),
              url("../assets/images/aerial-containers.jpg") center / cover no-repeat;
}
.contact-inner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 32px; align-items: center; }
.contact-form {
  display: flex; flex-direction: column; gap: 14px;
  background: var(--white); border-radius: var(--radius); padding: 32px; box-shadow: 0 16px 40px rgba(0, 0, 0, .2);
}
.contact-form h2 { color: var(--blue); font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin: 0; }
.form-intro { color: var(--muted); font-size: .92rem; margin: 0 0 4px; }
.form-row { display: grid; gap: 14px; }
.form-row-3 { grid-template-columns: .8fr 1fr 1fr; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 600; color: var(--blue); }
.contact-form input, .contact-form select, .contact-form textarea {
  font: 400 .92rem var(--font); padding: .65em .8em; border-radius: 6px;
  border: 1px solid #c9d6ea; background: var(--white); color: var(--ink);
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.contact-form .btn { align-self: flex-start; border: 0; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-embed { width: 100%; height: 1100px; max-height: 85vh; border: 0; border-radius: 6px; background: var(--white); }
.form-status { margin: 0; min-height: 1.4em; font-size: .9rem; }
.form-status.error { color: #c0392b; }
.form-status.success { color: var(--pt-green); }

.contact-points {
  background: rgba(10, 27, 63, .65); backdrop-filter: blur(4px); border-radius: var(--radius);
  padding: 32px; display: flex; flex-direction: column; gap: 28px; color: var(--white);
}
.contact-point { display: flex; gap: 18px; align-items: flex-start; }
.cp-ic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--white); color: var(--blue); font-size: 26px; }
.contact-point h3 { color: var(--white); font-size: 1.15rem; margin-bottom: .25em; }
.contact-point p { margin: 0; color: #d8e1f0; font-size: .95rem; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
.faq { background: var(--blue-soft); border-radius: 10px; margin-bottom: 12px; padding: 0 20px; }
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600; font-size: .95rem; color: var(--navy-800);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--blue); font-size: 1.3rem; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { color: var(--muted); padding-bottom: 18px; margin: 0; font-size: .92rem; }

/* CTA band */
.cta-band {
  padding: 40px 0; color: var(--white);
  background: linear-gradient(90deg, rgba(10, 27, 63, .9) 0%, rgba(10, 27, 63, .45) 70%),
              url("../assets/images/hero-madeira.jpg") center 70% / cover no-repeat;
}
.cta-band h2 { color: var(--white); font-size: clamp(1.4rem, 2.6vw, 2rem); margin-bottom: .6em; }

/* ------------------------------------------------------------------ Footer */
.site-footer { background: var(--navy-900); color: #c3cde0; padding: 56px 0 0; font-size: .9rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr 1.2fr auto; gap: 32px; }
.footer-grid .logo { align-self: start; }
.footer-grid h3 { color: var(--white); font-size: 1rem; margin-bottom: 1em; }
.footer-grid div > a { display: block; text-decoration: none; padding: 3px 0; }
.footer-grid div > a:hover { color: var(--gold); }
.socials { display: flex; gap: 12px; }
.socials a {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px;
  background: var(--white); color: var(--navy-900); font-size: 20px; transition: background .2s;
}
.socials a:hover { background: var(--gold); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 40px; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .15);
}
.footer-bottom p { margin: 0; }
.footer-bottom nav { display: flex; gap: 0; }
.footer-bottom nav a { text-decoration: none; padding: 0 16px; border-left: 1px solid rgba(255, 255, 255, .3); }
.footer-bottom nav a:first-child { border-left: 0; }
.footer-bottom nav a:hover { color: var(--gold); }

/* -------------------------------------------------------------- Responsive */
@media (max-width: 1180px) {
  .site-nav { gap: 18px; }
  .site-nav a:not(.btn) { font-size: .88rem; }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1024px) {
  .header-cta { display: none; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: var(--header-h); left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); padding: 8px 32px 24px; box-shadow: 0 12px 20px rgba(10, 27, 63, .12);
  }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 1rem; }
  .nav-cta-mobile { display: inline-flex; justify-content: center; margin-top: 16px; }

  .entities-inner { grid-template-columns: repeat(3, 1fr); }
  .entity:nth-child(4) { border-left: 0; padding-left: 0; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .step { display: grid; grid-template-columns: 44px 1fr; column-gap: 18px; padding-bottom: 24px; }
  .step-num { grid-row: span 2; margin: 0; }
  .step:not(:last-child)::after { top: 48px; bottom: 4px; left: 21px; right: auto; width: 2px; height: auto; }
  .step:not(:last-child)::before { display: none; }
  .contact-inner { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .container { padding: 0 16px; }
  .site-nav { padding: 8px 16px 20px; }
  .logo-word { font-size: 1.6rem; }
  .hero { background-position: 70% center; }
  .hero::before { background: linear-gradient(180deg, rgba(10, 27, 63, .85) 0%, rgba(10, 27, 63, .5) 100%); }
  .hero-title br { display: none; }
  .entities-inner { grid-template-columns: 1fr 1fr; column-gap: 16px; }
  .form-row-3, .form-row-2 { grid-template-columns: 1fr; }
  .entity, .entity:first-child, .entity:nth-child(4) { border-left: 0; padding: 14px 0; }
  .trust-band { height: 180px; }
  .trust-panel { grid-template-columns: 1fr; margin-top: -80px; padding: 10px; }
  .trust-card { padding: 24px; }
  .grid-4, .grid-5, .faq-grid { grid-template-columns: 1fr; }
  .faq-grid { gap: 0; }
  .contact-form, .contact-points { padding: 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom nav a { padding: 0 10px; }
}
