:root {
  --navy: #F8F8F6;
  --navy2: #FFFFFF;
  --teal: #B1040E;
  --teal2: #8C1515;
  --gold: #FEDD5C;
  --white: #2E2D29;
  --gray: #53565A;
  --light: #979694;
  --card: #FFFFFF;
  --err: #ef4444;
  --radius: 12px;
  --teal-rgb: 177, 4, 14;
  --teal2-rgb: 140, 21, 21;
  --black-rgb: 0, 0, 0;
  --white-rgb: 255, 255, 255;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; background: #F8F8F6; }
body {
  font-family: "Inter", sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(177, 4, 14, 0.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 108, 184, 0.03) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

/* ── NAVIGATION ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 1rem 3rem;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(177, 4, 14, 0.1);
}
.nav-brand {
  position: absolute;
  left: 3rem;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Playfair Display", serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--white);
  text-decoration: none;
}
.nav-brand .badge {
  background: linear-gradient(135deg, var(--teal), #820000);
  color: white;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  font-family: "Inter", sans-serif;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
  font-weight: 500;
}
.nav-links a:hover { color: var(--teal); }
.nav-links a.active { color: var(--teal); }
.nav-cta {
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal);
  padding: 8px 20px;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
}
.nav-cta:hover { background: rgba(177, 4, 14, 0.08); }

.nav-toggle {
  display: none;
  align-self: center;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  margin-left: auto;
  z-index: 1001;
}
.nav-toggle:hover { color: var(--teal); }

/* ── DROPDOWN SUBMENU ── */
.nav-dropdown { position: relative; }
.nav-dropdown .dropdown-toggle {
  display: flex; align-items: center; gap: 2px;
}
.nav-dropdown .dropdown-btn {
  display: none;
  background: none; border: none; cursor: pointer;
  font-size: 0.65rem; color: var(--gray); padding: 0 2px;
  transition: color 0.2s, transform 0.2s; line-height: 1;
}
.nav-dropdown:hover .dropdown-btn,
.nav-dropdown .dropdown-btn:hover { color: var(--teal); }
.nav-dropdown:hover .dropdown-btn { transform: rotate(180deg); }
.nav-dropdown .dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  padding: 6px 0;
  min-width: 140px;
  list-style: none;
  z-index: 100;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu { display: block; }
.nav-dropdown .dropdown-menu a {
  display: block; padding: 8px 16px; white-space: nowrap;
  color: var(--gray); font-size: 0.85rem; text-align: left;
}
.nav-dropdown .dropdown-menu a:hover { color: var(--teal); background: rgba(0,0,0,0.03); }

/* ── PAGE HEADER (shared by candidature, contact) ── */
.page-header {
  min-height: 32vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 3rem 2rem;
  position: relative;
  z-index: 1;
  text-align: center;
}
.hero-chip {
  display: inline-block;
  border: 1px solid rgba(177, 4, 14, 0.3);
  color: var(--teal);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 1.2rem;
  font-weight: 600;
}
.page-header h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.page-header h1 span { color: var(--teal); }
.page-header p {
  color: var(--gray);
  font-size: 1.05rem;
  font-weight: 300;
  max-width: 560px;
  line-height: 1.7;
  margin: 0 auto;
}

/* ── TYPOGRAPHY ── */
.section-tag {
  color: var(--teal);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  font-weight: 600;
}
h2 {
  font-family: "Playfair Display", serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}
.section-sub {
  color: var(--gray);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.7;
  margin-bottom: 3rem;
}
.section-center { text-align: center; }
.section-center .section-sub { margin: 0 auto 3rem; }

.divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 0 3rem;
}

/* ── FOOTER ── */
footer {
  background: rgba(0, 0, 0, 0.03);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 3rem;
  text-align: center;
  position: relative;
  z-index: 1;
}
footer .footer-brand {
  font-family: "Playfair Display", serif;
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
footer p {
  color: var(--gray);
  font-size: 0.85rem;
  line-height: 1.7;
}

/* ── CHAT FLOATING BUTTON ── */
.floating-chat-btn {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 9999;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #820000);
  border: none; cursor: pointer;
  box-shadow: 0 8px 32px rgba(177,4,14,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem; transition: all 0.3s;
  animation: floatPulse 2s infinite;
}
.floating-chat-btn:hover { transform: scale(1.1); box-shadow: 0 12px 40px rgba(177,4,14,0.6); }
@keyframes floatPulse {
  0%,100% { box-shadow: 0 8px 32px rgba(177,4,14,0.4); }
  50% { box-shadow: 0 8px 48px rgba(177,4,14,0.7); }
}
.floating-chat-badge {
  position: absolute; top: -4px; right: -4px;
  width: 20px; height: 20px; background: #008566; border-radius: 50%;
  border: 2px solid var(--navy); animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ── CHAT OVERLAY ── */
.chat-widget-overlay {
  position: fixed; inset: 0; z-index: 9998;
  display: none; background: transparent;
}
.chat-widget-overlay.show { display: block; }
.chat-widget-overlay .ai-panel {
  position: fixed;
  bottom: 6rem; right: 1.5rem;
  width: 380px; max-width: calc(100vw - 2rem);
  max-height: 70vh;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.chat-widget-close { background: none; border: none; color: var(--gray); font-size: 1.2rem; cursor: pointer; padding: 0 4px; margin-left: 4px; }
.chat-widget-close:hover { color: var(--white); }
.chat-more-container { position: relative; display: flex; align-items: center; }
.chat-more-btn {
  background: none; border: none; color: var(--gray);
  font-size: 1.2rem; cursor: pointer; padding: 0 4px;
  transition: color 0.2s;
  font-family: "Inter", sans-serif;
  letter-spacing: 2px; line-height: 1;
}
.chat-more-btn:hover { color: var(--white); }
.chat-more-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 8px;
  padding: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  z-index: 100;
  min-width: 210px;
  margin-top: 4px;
}
.chat-more-menu.show { display: block; }
.chat-more-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: none;
  border: none;
  color: var(--gray);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  text-align: left;
  transition: background 0.15s;
  white-space: nowrap;
}
.chat-more-menu button:hover {
  background: rgba(0,0,0,0.04);
  color: var(--white);
}

/* ── AI CHAT PANEL ── */
.ai-panel { background: var(--card); border: 1px solid rgba(177,4,14,0.15); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.ai-panel-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(0,0,0,0.06); display: flex; align-items: center; gap: 12px; }
.ai-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,var(--teal),#006CB8); display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; color: white; flex-shrink: 0; font-family: "Inter",sans-serif; }
.ai-panel-header h3 { font-family: "Playfair Display",serif; font-weight: 700; font-size: 0.95rem; }
.ai-panel-header p { color: var(--gray); font-size: 0.78rem; }
.ai-status { width: 8px; height: 8px; border-radius: 50%; background: #008566; margin-left: auto; animation: pulse 2s infinite; flex-shrink: 0; }
.ai-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; min-height: 260px; max-height: 320px; }
.ai-messages::-webkit-scrollbar { width: 4px; }
.ai-messages::-webkit-scrollbar-track { background: transparent; }
.ai-messages::-webkit-scrollbar-thumb { background: rgba(177,4,14,0.3); border-radius: 100px; }
.ai-suggestions { padding: 0.75rem 1.25rem; display: flex; flex-wrap: wrap; gap: 6px; border-top: 1px solid rgba(0,0,0,0.04); }
.ai-input-row { padding: 1rem 1.25rem; border-top: 1px solid rgba(0,0,0,0.06); display: flex; gap: 8px; }
.ai-input { flex: 1; background: rgba(0,0,0,0.03); border: 1px solid rgba(0,0,0,0.1); border-radius: 8px; padding: 10px 14px; color: var(--white); font-family: "Inter",sans-serif; font-size: 16px; outline: none; transition: border-color 0.2s; }
.ai-input:focus { border-color: rgba(177,4,14,0.4); }
.ai-input::placeholder { color: var(--gray); }
.ai-send { background: var(--teal); color: white; border: none; width: 40px; height: 40px; border-radius: 8px; cursor: pointer; font-size: 1.1rem; font-weight: 700; transition: background 0.2s; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ai-send:hover { background: var(--teal2); }

.ai-panel-glow { animation: panelGlow 2s ease-out; }
@keyframes panelGlow { 0% { box-shadow: 0 0 0 0 rgba(177,4,14,0); } 15% { box-shadow: 0 0 30px 8px rgba(177,4,14,0.35); } 100% { box-shadow: 0 0 0 0 rgba(177,4,14,0); } }

/* ── CHAT MESSAGES ── */
.msg { display: flex; gap: 8px; }
.msg.user { flex-direction: row-reverse; }
.msg-bubble { max-width: 80%; padding: 10px 14px; border-radius: 12px; font-size: 0.88rem; line-height: 1.6; }
.msg.bot .msg-bubble { background: rgba(177,4,14,0.06); border: 1px solid rgba(177,4,14,0.12); border-radius: 4px 12px 12px 12px; color: var(--white); }
.msg.user .msg-bubble { background: rgba(177,4,14,0.12); border: 1px solid rgba(177,4,14,0.2); border-radius: 12px 4px 12px 12px; color: var(--white); }
.msg-ava { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; font-weight: 700; flex-shrink: 0; margin-top: 2px; font-family: "Inter",sans-serif; }
.msg.bot .msg-ava { background: linear-gradient(135deg,var(--teal),#006CB8); color: white; }
.msg.user .msg-ava { background: rgba(0,0,0,0.08); color: var(--gray); }
.sugg-btn { background: rgba(177,4,14,0.06); border: 1px solid rgba(177,4,14,0.2); color: var(--teal); font-size: 0.75rem; padding: 5px 12px; border-radius: 100px; cursor: pointer; transition: all 0.18s; font-family: "Inter",sans-serif; }
.sugg-btn:hover { background: rgba(177,4,14,0.12); }
.typing-indicator { display: none; }
.typing-indicator.show { display: flex; align-items: center; padding: 8px 14px; }
.typing-indicator.show .msg-bubble { min-height: 1.5em; }
.typing-dots { display: inline-flex; gap: 3px; align-items: center; font-size: 1.4rem; line-height: 1; letter-spacing: 1px; color: var(--teal); }
.typing-dots span { animation: dotPulse 1.4s infinite; opacity: 0; }
.typing-dots span:nth-child(1) { animation-delay: 0s; }
.typing-dots span:nth-child(2) { animation-delay: 0.3s; }
.typing-dots span:nth-child(3) { animation-delay: 0.6s; }
@keyframes dotPulse { 0%,20% { opacity: 0; } 50% { opacity: 1; } 80%,100% { opacity: 0; } }

/* ── RESPONSIVE (common) ── */
@media (max-width: 768px) {
  nav { padding: 1rem 1.5rem; }
  .nav-brand { left: 1.5rem; }
  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(177,4,14,0.15);
    padding: 0.5rem 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    display: block;
    padding: 0.85rem 1.5rem;
    font-size: 1rem;
    text-align: right;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-links li:last-child a { border-bottom: none; }
  .nav-toggle { display: block; }
  .nav-dropdown .dropdown-toggle {
    justify-content: flex-end;
    padding: 0;
    border-bottom: 1px solid rgba(0,0,0,0.06);
  }
  .nav-dropdown .dropdown-toggle a {
    flex: 1;
    border-bottom: none;
    padding: 0.85rem 0 0.85rem 1.5rem;
  }
  .nav-dropdown .dropdown-menu {
    position: static;
    transform: none;
    box-shadow: none;
    padding: 0;
    background: transparent;
    border-radius: 0;
  }
  .nav-dropdown:hover .dropdown-menu { display: none; }
  .nav-dropdown.open .dropdown-menu { display: block; }
  .nav-dropdown .dropdown-menu a {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    text-align: right;
  }
  .nav-dropdown.open .dropdown-btn { transform: rotate(180deg); }
  .nav-dropdown .dropdown-btn { display: inline-block; font-size: 1rem; padding: 0.85rem 1.5rem 0.85rem 0.5rem; }
  .page-header { padding: 6.5rem 1.5rem 2rem; }
  .divider { margin: 0; }
  .chat-widget-overlay .ai-panel { right: 0.5rem; bottom: 5.5rem; width: calc(100vw - 1rem); max-height: 60vh; }
  footer { padding: 2rem 1.5rem; }
  .floating-chat-btn { bottom: 1.5rem; right: 1.5rem; width: 50px; height: 50px; font-size: 1.5rem; }
}
