/* ===================================================
   BRILHO DO SABER — v3
   =================================================== */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:wght@300;400;600&family=Inter:wght@300;400;500;600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy:       #1B2B5E;
  --navy-light: #243570;
  --gold:       #C8962A;
  --gold-light: #DEB054;
  --white:      #FFFFFF;
  --off-white:  #F5F5F3;
  --gray-100:   #EEEDE9;
  --gray-300:   #CACAC8;
  --gray-600:   #6B6B6A;
  --gray-900:   #1E1E1E;
  --serif-display: 'Playfair Display', Georgia, serif;
  --serif-body:    'Source Serif 4', Georgia, serif;
  --sans:          'Inter', system-ui, sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--serif-body); font-size: 17px; line-height: 1.75; color: var(--gray-900); background: var(--white); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* JUSTIFY EVERYTHING */
p, li, td, .section-lead, .hero-lead, .card p, .contact-block p, .footer-brand p, .page-hero p, .staff-info p {
  text-align: justify;
}
h1,h2,h3,h4,h5,.section-label,.section-title,.hero-eyebrow,.stat-label,.staff-name,.staff-role,.card h3 {
  text-align: left;
}

/* ─── Top Bar ─── */
.top-bar { background: var(--gold); font-family: var(--sans); font-size: 12.5px; font-weight: 500; letter-spacing: 0.04em; padding: 7px 0; }
.top-bar .container { display: flex; justify-content: flex-end; gap: 2rem; align-items: center; }
.top-bar a { color: var(--white); opacity: 0.92; transition: opacity 0.2s; }
.top-bar a:hover { opacity: 1; }

/* ─── Header ─── */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 1000; box-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 80px; padding: 10px 0; }

.site-logo { display: flex; align-items: center; gap: 14px; min-width: 0; }
.site-logo img { height: 68px; width: auto; flex-shrink: 0; filter: none !important; -webkit-filter: none !important; opacity: 1 !important; }
.site-logo-text { display: flex; flex-direction: column; justify-content: center; line-height: 1.25; min-width: 0; }
.site-logo-name { font-family: var(--serif-display); font-size: 15px; font-weight: 700; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.site-logo-sub { font-family: var(--sans); font-size: 10.5px; color: var(--gold-light); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.site-logo-slogan { font-family: var(--serif-body); font-style: italic; font-size: 10.5px; color: rgba(255,255,255,0.45); letter-spacing: 0.01em; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* ─── NAV ─── */
.site-nav { display: flex; align-items: center; height: 100%; }

/* All top-level nav links */
.site-nav > a,
.site-nav > .dropdown > .nav-link {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.82);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0 13px;
  height: 80px;
  display: flex;
  align-items: center;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  cursor: pointer;
}
.site-nav > a:hover,
.site-nav > a.active,
.site-nav > .dropdown:hover > .nav-link,
.site-nav > .dropdown > .nav-link.active {
  color: var(--white);
  border-bottom-color: var(--gold);
}

/* ─── DROPDOWN ─── */
.dropdown { position: relative; height: 80px; display: flex; align-items: center; }

/* Hide by default */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 80px;
  left: 0;
  background: #1a2a5a;
  min-width: 200px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.28);
  border-top: 3px solid var(--gold);
  z-index: 9999;
}

/* Show on hover */
.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.03em;
  padding: 13px 20px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-transform: none;
}
.dropdown-menu a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.07);
  border-left-color: var(--gold);
}

/* ─── LOGIN BUTTON ─── */
.nav-login {
  display: flex !important;
  align-items: center;
  gap: 7px;
  font-family: var(--sans) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.07em !important;
  text-transform: uppercase !important;
  color: var(--white) !important;
  background: var(--gold);
  padding: 9px 16px !important;
  height: auto !important;
  border-bottom: none !important;
  margin-left: 12px;
  transition: background 0.2s;
}
.nav-login:hover { background: var(--gold-light) !important; }
.nav-login svg { width: 14px; height: 14px; flex-shrink: 0; stroke: white; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ─── Container ─── */
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }

/* ─── Hero ─── */
.hero { background: var(--navy); color: var(--white); padding: 90px 0 80px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg,transparent,transparent 59px,rgba(255,255,255,0.02) 59px,rgba(255,255,255,0.02) 60px); pointer-events: none; }
.hero-eyebrow { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; text-align: left; }
.hero h1 { font-family: var(--serif-display); font-size: clamp(34px,5vw,58px); font-weight: 700; line-height: 1.15; max-width: 720px; margin-bottom: 24px; text-align: left; }
.hero h1 em { font-style: italic; color: var(--gold-light); }
.hero-lead { font-size: 18px; font-weight: 300; color: rgba(255,255,255,0.78); max-width: 560px; margin-bottom: 38px; line-height: 1.7; }
.hero-divider { width: 56px; height: 3px; background: var(--gold); margin-bottom: 38px; }

/* Hero animated word */
.hero-word-wrap { display: inline; white-space: nowrap; }
.hero-animated-word { color: var(--gold-light); font-style: italic; }
.hero-cursor { display: inline-block; color: var(--gold); font-style: normal; font-weight: 300; margin-left: 2px; animation: blink 0.75s step-end infinite; font-size: 0.85em; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── Buttons ─── */
.btn { display: inline-block; font-family: var(--sans); font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 13px 30px; border: 2px solid transparent; transition: all 0.22s; cursor: pointer; }
.btn-gold { background: var(--gold); color: var(--white); border-color: var(--gold); }
.btn-gold:hover { background: var(--gold-light); border-color: var(--gold-light); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); margin-left: 14px; }
.btn-outline:hover { border-color: var(--white); }

/* ─── Sections ─── */
.section { padding: 72px 0; }
.section-alt { background: var(--off-white); }
.section-navy { background: var(--navy); color: var(--white); }
.section-label { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); margin-bottom: 12px; }
.section-title { font-family: var(--serif-display); font-size: clamp(26px,3.5vw,38px); font-weight: 700; line-height: 1.2; color: var(--navy); margin-bottom: 16px; }
.section-navy .section-title { color: var(--white); }
.section-rule { width: 44px; height: 3px; background: var(--gold); margin-bottom: 28px; }
.section-lead { font-size: 17px; color: var(--gray-600); max-width: 680px; line-height: 1.8; margin-bottom: 40px; }
.section-navy .section-lead { color: rgba(255,255,255,0.72); }

/* ─── Stats ─── */
.stats-bar { background: var(--gold); padding: 36px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); }
.stat-item { text-align: center; padding: 12px 20px; border-right: 1px solid rgba(255,255,255,0.3); }
.stat-item:last-child { border-right: none; }
.stat-number { font-family: var(--serif-display); font-size: 42px; font-weight: 700; color: var(--white); line-height: 1; }
.stat-label { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.82); margin-top: 6px; }

/* ─── Cards ─── */
.cards-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 28px; margin-top: 40px; }
.card { background: var(--white); border-top: 4px solid var(--gold); padding: 32px 28px; box-shadow: 0 2px 16px rgba(0,0,0,0.06); transition: box-shadow 0.22s, transform 0.22s; }
.card:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.1); transform: translateY(-2px); }
.card-icon { width: 44px; height: 44px; background: var(--navy); margin-bottom: 20px; display: flex; align-items: center; justify-content: center; }
.card-icon svg { width: 22px; height: 22px; fill: var(--gold); }
.card h3 { font-family: var(--serif-display); font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 10px; }
.card p { font-size: 15.5px; color: var(--gray-600); line-height: 1.7; }

/* ─── Staff ─── */
.staff-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; margin-top: 40px; }
.staff-card { background: var(--white); box-shadow: 0 2px 16px rgba(0,0,0,0.07); overflow: hidden; transition: transform 0.22s, box-shadow 0.22s; }
.staff-card:hover { transform: translateY(-3px); box-shadow: 0 10px 32px rgba(0,0,0,0.12); }
.staff-photo { width: 100%; aspect-ratio: 1/1; overflow: hidden; }
.staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.staff-photo-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-light)); }
.staff-photo-placeholder svg { width: 64px; height: 64px; opacity: 0.2; fill: var(--white); }
.staff-info { padding: 22px 20px 26px; border-top: 4px solid var(--gold); }
.staff-name { font-family: var(--serif-display); font-size: 17px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.staff-role { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }

/* ─── Two-col ─── */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }
.col-image { aspect-ratio: 4/3; overflow: hidden; background: var(--gray-100); }
.col-image img { width: 100%; height: 100%; object-fit: cover; }
.col-image-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--navy), var(--navy-light)); }
.col-image-placeholder svg { width: 80px; height: 80px; opacity: 0.3; fill: var(--white); }

/* ─── Page Hero ─── */
.page-hero { background: var(--navy); padding: 56px 0 48px; color: var(--white); border-bottom: 4px solid var(--gold); }
.page-hero .section-label { color: var(--gold-light); }
.page-hero h1 { font-family: var(--serif-display); font-size: clamp(28px,4vw,46px); font-weight: 700; line-height: 1.2; margin-bottom: 14px; text-align: left; }
.page-hero p { font-size: 17px; color: rgba(255,255,255,0.72); max-width: 600px; line-height: 1.7; }

/* ─── Breadcrumb ─── */
.breadcrumb { font-family: var(--sans); font-size: 12.5px; color: rgba(255,255,255,0.55); margin-bottom: 20px; letter-spacing: 0.04em; text-align: left; }
.breadcrumb a { color: var(--gold-light); }
.breadcrumb span { margin: 0 7px; opacity: 0.5; }

/* ─── Contact ─── */
.contact-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 40px; }
.contact-info-grid-3 { grid-template-columns: repeat(3,1fr); }
.contact-block { background: var(--off-white); padding: 28px 24px; border-left: 4px solid var(--gold); }
.contact-block h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.contact-block p { font-size: 15.5px; color: var(--gray-600); line-height: 1.65; }

/* ─── Form ─── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-bottom: 22px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1/-1; }
.form-group label { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy); text-align: left; }
.form-group input, .form-group textarea, .form-group select { font-family: var(--serif-body); font-size: 15px; padding: 11px 14px; border: 1px solid var(--gray-300); color: var(--gray-900); background: var(--white); transition: border-color 0.2s; outline: none; -webkit-appearance: none; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--navy); }
.form-group textarea { resize: vertical; min-height: 130px; }

/* ─── Lists ─── */
.list-clean { list-style: none; }
.list-clean li { padding: 8px 0; border-bottom: 1px solid var(--gray-100); font-size: 15.5px; color: var(--gray-600); display: flex; align-items: flex-start; gap: 10px; }
.list-clean li::before { content: ''; width: 6px; height: 6px; background: var(--gold); border-radius: 50%; margin-top: 9px; flex-shrink: 0; }

/* ─── Table ─── */
.table-wrap { overflow-x: auto; margin-top: 36px; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
thead tr { background: var(--navy); color: var(--white); }
thead th { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; padding: 14px 20px; text-align: left; }
tbody td { padding: 14px 20px; border-bottom: 1px solid var(--gray-100); color: var(--gray-900); vertical-align: top; }
tbody tr:nth-child(even) { background: var(--off-white); }
.td-label { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--navy); }

/* ─── Footer ─── */
.site-footer { background: #111929; color: rgba(255,255,255,0.65); padding: 56px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-brand img { height: 70px; width: auto; filter: none !important; -webkit-filter: none !important; opacity: 1 !important; margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; line-height: 1.7; color: rgba(255,255,255,0.5); max-width: 300px; }
.footer-col h4 { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 14px; color: rgba(255,255,255,0.55); transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom { padding: 20px 0; display: flex; justify-content: space-between; align-items: center; font-family: var(--sans); font-size: 12.5px; color: rgba(255,255,255,0.35); }

/* ─── Mobile ─── */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); margin: 5px 0; transition: opacity 0.2s; }
.nav-toggle:hover span { opacity: 0.75; }

@media (max-width: 1060px) {
  .site-nav > a, .site-nav > .dropdown > .nav-link { padding: 0 9px; font-size: 11px; }
  .nav-login { padding: 8px 12px !important; }
}
@media (max-width: 900px) {
  .cards-grid, .staff-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 36px; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1/-1; }
}

/* ─── Mobile nav (≤ 768px): readable, full-width, tap-friendly menu ─── */
@media (max-width: 768px) {
  .header-inner { min-height: 64px; padding: 8px 0; }
  .site-logo { gap: 10px; }
  .site-logo img { height: 42px; }
  .site-logo-name { font-size: 14px; }
  .site-logo-sub { font-size: 9px; }
  .site-logo-slogan { font-size: 9px; }

  .nav-toggle { display: block; }

  /* Full nav panel, anchored to the bottom of the header (not a fixed px value,
     so it always lines up even if the header grows to fit the logo text) */
  .site-nav {
    display: none;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: auto;
    max-height: 85vh;
    overflow-y: auto;
    background: var(--navy-light);
    padding: 6px 0 14px;
    box-shadow: 0 12px 24px rgba(0,0,0,0.35);
    z-index: 9999;
  }
  .site-nav.open { display: flex; }

  /* Top-level links: full width, legible size, clear tap targets, separators */
  .site-nav > a,
  .site-nav > .dropdown > .nav-link {
    height: auto;
    width: 100%;
    padding: 16px 24px;
    font-size: 14.5px;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.88);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    border-left: 3px solid transparent;
  }
  .site-nav > a.active,
  .site-nav > a:active,
  .site-nav > .dropdown > .nav-link.active {
    color: var(--white);
    background: rgba(0,0,0,0.12);
    border-left-color: var(--gold);
  }

  .dropdown { height: auto; width: 100%; flex-direction: column; align-items: stretch; }
  .dropdown > .nav-link { display: flex; align-items: center; justify-content: space-between; }
  .dropdown > .nav-link::after { content: '\25BE'; font-size: 11px; opacity: 0.7; transition: transform 0.2s; }
  .dropdown.open > .nav-link { background: rgba(0,0,0,0.12); color: var(--white); }
  .dropdown.open > .nav-link::after { transform: rotate(180deg); }

  /* Submenu: same width, indented, clearly readable */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-top: none;
    display: none;
    background: rgba(0,0,0,0.18);
    width: 100%;
  }
  .dropdown.open .dropdown-menu { display: block; }
  .dropdown:hover .dropdown-menu { display: none; }
  .dropdown.open:hover .dropdown-menu { display: block; }
  .dropdown-menu a {
    padding: 14px 24px 14px 40px;
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .dropdown-menu a:hover { background: rgba(255,255,255,0.06); }

  .nav-login {
    width: calc(100% - 48px);
    justify-content: center;
    margin: 14px 24px 4px;
    padding: 13px 16px !important;
    font-size: 13px !important;
  }

  .cards-grid, .staff-grid { grid-template-columns: 1fr; }
  .contact-info-grid, .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .top-bar { padding: 9px 0; }
  .top-bar .container { justify-content: center; flex-wrap: wrap; gap: 0.6rem 1rem; padding: 0 20px; }
  .top-bar a { font-size: 11.5px; }
  .two-col.reverse { direction: ltr; }
  .btn-outline { margin-left: 0; margin-top: 12px; display: block; text-align: center; }
  .btn-gold { display: inline-block; }
}

/* ─── Extra-small phones: trim non-essential header text so nothing crowds the menu button ─── */
@media (max-width: 420px) {
  .site-logo-sub, .site-logo-slogan { display: none; }
  .site-logo img { height: 38px; }
  .site-logo-name { font-size: 13.5px; }
  .hero h1 { font-size: 26px; }
}


/* ---------- Social icons (footer) ---------- */
.social-icons { display: flex; gap: 10px; margin-top: 16px; }
.social-icons a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.08); display: flex; align-items: center; justify-content: center; transition: background .2s; }
.social-icons a:hover { background: var(--gold); }
.social-icons svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
