/* ═══════════════════════════════════════════
   ESCOLARIS.PT — SHARED STYLES
   Design System: Navy + Gold + Montserrat/Lato
═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;900&family=Lato:wght@300;400;700&display=swap');

:root {
  --navy: #1A2B47;
  --navy-light: #243a5e;
  --navy-dark: #111d30;
  --gold: #D4AF37;
  --gold-light: #e8cc6a;
  --gold-dim: rgba(212,175,55,0.15);
  --cyan: #00BFFF;
  --white: #F8F8F8;
  --text-muted: rgba(248,248,248,0.55);
  --border: rgba(212,175,55,0.15);
  --border-hover: rgba(212,175,55,0.4);
  --card-bg: rgba(255,255,255,0.03);
  --nav-height: 68px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Lato', sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none; z-index: 0; opacity: 0.35;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; }
a { text-decoration: none; color: inherit; }

.section-label {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
.section-label::before { content: ''; width: 28px; height: 1px; background: var(--gold); flex-shrink: 0; }
.section-label.centered { justify-content: center; }
.section-label.centered::before { display: none; }

.section-title {
  font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.1; margin-bottom: 16px;
}
.section-body { font-size: 1rem; line-height: 1.85; color: var(--text-muted); }
.gold { color: var(--gold); }
.gold-divider { width: 48px; height: 2px; background: var(--gold); margin: 20px 0; opacity: 0.5; }

/* ── BUTTONS ── */
.btn-primary {
  background: var(--gold); color: var(--navy);
  font-family: 'Montserrat', sans-serif; font-weight: 800;
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 14px 34px; border: none; cursor: pointer;
  transition: all 0.25s; position: relative; overflow: hidden;
  display: inline-block; touch-action: manipulation;
}
.btn-primary::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,0.18); transform: translateX(-100%); transition: transform 0.3s; }
.btn-primary:hover::after { transform: translateX(0); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(212,175,55,0.35); }

.btn-outline {
  background: transparent; color: var(--white);
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 0.82rem; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 13px 34px; border: 1px solid rgba(248,248,248,0.3); cursor: pointer;
  transition: all 0.25s; display: inline-block; touch-action: manipulation;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

.btn-gold-outline {
  background: transparent; color: var(--gold);
  font-family: 'Montserrat', sans-serif; font-weight: 700;
  font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 10px 24px; border: 1px solid var(--gold); cursor: pointer;
  transition: all 0.25s; display: inline-block; touch-action: manipulation;
}
.btn-gold-outline:hover { background: var(--gold); color: var(--navy); }

.btn-sm { padding: 9px 20px; font-size: 0.74rem; }

/* ── NAV ── */
nav.main-nav {
  position: fixed; top: 0; width: 100%; z-index: 200;
  padding: 0 60px; height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(26,43,71,0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: border-color 0.3s;
}
nav.main-nav.scrolled { border-bottom-color: rgba(212,175,55,0.28); }

.nav-logo {
  font-family: 'Montserrat', sans-serif; font-weight: 900;
  font-size: 1.35rem; color: var(--gold); letter-spacing: 0.05em; flex-shrink: 0;
}
.nav-logo span { color: var(--white); font-weight: 300; }

.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
  font-family: 'Lato', sans-serif; font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(248,248,248,0.65); transition: color 0.2s; white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active { color: var(--gold); }

.nav-user { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }

/* Hamburger */
.nav-hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px; z-index: 201;
}
.nav-hamburger span {
  display: block; width: 24px; height: 2px; background: var(--gold);
  transition: transform 0.3s, opacity 0.3s; transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none; position: fixed;
  top: 60px; left: 0; right: 0; bottom: 0;
  background: rgba(26,43,71,0.98); backdrop-filter: blur(20px);
  z-index: 199; flex-direction: column; align-items: center; justify-content: center;
  gap: 28px; padding: 40px 24px; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.mobile-menu.open { opacity: 1; pointer-events: all; }
.mobile-menu a {
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 1.4rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--white); transition: color 0.2s;
}
.mobile-menu a:hover { color: var(--gold); }
.mobile-menu-divider { width: 40px; height: 1px; background: rgba(212,175,55,0.3); }
.mobile-cta {
  background: var(--gold); color: var(--navy);
  font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 0.9rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 16px 48px; border: none; cursor: pointer; margin-top: 8px;
}

/* ── DIVIDERS ── */
.hr-gold { border: none; height: 1px; background: linear-gradient(90deg, transparent, rgba(212,175,55,0.25), transparent); }

/* ── BADGE CHIP ── */
.badge {
  display: inline-block; padding: 4px 12px;
  font-family: 'Montserrat', sans-serif; font-size: 0.65rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
}
.badge-public { background: rgba(0,191,255,0.12); color: var(--cyan); border: 1px solid rgba(0,191,255,0.3); }
.badge-private { background: rgba(212,175,55,0.12); color: var(--gold); border: 1px solid rgba(212,175,55,0.3); }
.badge-international { background: rgba(180,100,255,0.12); color: #c084fc; border: 1px solid rgba(180,100,255,0.3); }

/* ── STARS ── */
.stars { color: var(--gold); letter-spacing: 2px; font-size: 0.75rem; }

/* ── SCORE BAR ── */
.score-bar { height: 4px; background: rgba(255,255,255,0.08); border-radius: 2px; overflow: hidden; margin-top: 6px; }
.score-bar-fill { height: 100%; background: var(--gold); border-radius: 2px; transition: width 0.8s ease; }

/* ── CARD ── */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  transition: border-color 0.3s, background 0.3s;
}
.card:hover { border-color: var(--border-hover); background: rgba(212,175,55,0.03); }

/* ── FORM ELEMENTS ── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; font-family: 'Montserrat', sans-serif; font-size: 0.72rem;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: rgba(248,248,248,0.6); margin-bottom: 8px;
}
.form-input {
  width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border);
  color: var(--white); font-family: 'Lato', sans-serif; font-size: 0.95rem;
  padding: 13px 16px; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212,175,55,0.1); }
.form-input::placeholder { color: rgba(248,248,248,0.25); }

select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D4AF37' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ── SCROLL REVEAL ── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── PAGE WRAPPER ── */
.page-content { padding-top: var(--nav-height); position: relative; z-index: 1; }

/* ── FOOTER ── */
footer.main-footer {
  padding: 44px 60px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 24px;
  position: relative; z-index: 1;
}
.footer-logo { font-family: 'Montserrat', sans-serif; font-weight: 900; color: var(--gold); font-size: 1.15rem; }
.footer-logo span { color: rgba(248,248,248,0.35); font-weight: 300; font-size: 0.78rem; margin-left: 6px; }
.footer-slogan { font-size: 0.7rem; color: rgba(248,248,248,0.28); letter-spacing: 0.12em; text-transform: uppercase; font-family: 'Montserrat', sans-serif; margin-top: 4px; }
.footer-links { display: flex; gap: 20px; list-style: none; flex-wrap: wrap; }
.footer-links a { font-size: 0.72rem; color: rgba(248,248,248,0.28); text-transform: uppercase; letter-spacing: 0.08em; transition: color 0.2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: 0.7rem; color: rgba(248,248,248,0.18); letter-spacing: 0.06em; }

/* ── MODAL OVERLAY ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--navy-dark); border: 1px solid var(--border);
  max-width: 520px; width: 100%; padding: 48px;
  position: relative; transform: translateY(20px); transition: transform 0.3s;
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: none; color: var(--text-muted); font-size: 1.4rem; cursor: pointer;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--gold); }

/* ── TOAST ── */
.toast {
  position: fixed; bottom: 32px; right: 32px; z-index: 600;
  background: var(--navy-dark); border: 1px solid var(--gold); padding: 16px 24px;
  font-family: 'Montserrat', sans-serif; font-size: 0.82rem; font-weight: 600;
  max-width: 320px; transform: translateY(20px); opacity: 0; transition: all 0.3s;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: #4ade80; color: #4ade80; }
.toast.error { border-color: #f87171; color: #f87171; }

/* ── RESPONSIVE — TABLET ── */
@media (max-width: 1024px) {
  nav.main-nav { padding: 0 32px; }
  footer.main-footer { padding: 40px 32px; }
}

/* ── RESPONSIVE — MOBILE ── */
@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  nav.main-nav { padding: 0 20px; }
  .nav-links, .nav-user .btn-primary { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-menu { display: flex; }

  footer.main-footer { padding: 32px 20px; flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-copy { display: none; }

  .modal { padding: 32px 24px; }
}
