/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --primary: #2B3990;
  --accent: #E8470A;
  --light: #f5f0ed;
  --dark: #1a1f4e;
  --text: #333;
  --white: #fff;
  --radius: 6px;
  --shadow: 0 2px 12px rgba(0,0,0,0.1);
}
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; color: var(--text); background: var(--white); overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== TOP BAR ===== */
.top-bar { background: var(--dark); color: #ccc; font-size: 0.8rem; padding: 6px 0; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.top-bar a { color: #ccc; margin-left: 12px; }
.top-bar a:hover { color: var(--accent); }

/* ===== CONTAINER ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== HEADER / NAV ===== */
header { background: var(--white); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 1000; }
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon { width: 70px; height: 70px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.logo-icon img { width: 70px; height: 70px; object-fit: contain; }
.footer-brand .logo-icon img { mix-blend-mode: normal; filter: brightness(0) invert(1); }
.logo-text h1 { font-size: 1rem; color: var(--primary); font-weight: 800; line-height: 1.2; }
.logo-text span { font-size: 0.68rem; color: #666; }

nav { flex: 1; display: flex; justify-content: flex-end; }
nav ul { display: flex; gap: 2px; align-items: center; flex-wrap: nowrap; }
nav ul li { position: relative; }
nav ul li a { display: block; padding: 7px 11px; font-size: 0.82rem; font-weight: 600; color: var(--dark); border-radius: var(--radius); transition: background 0.2s, color 0.2s; white-space: nowrap; }
nav ul li a:hover, nav ul li a.active { background: var(--primary); color: var(--white); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: var(--white); box-shadow: var(--shadow); border-top: 3px solid var(--accent); min-width: 200px; border-radius: 0 0 var(--radius) var(--radius); z-index: 999; }
.dropdown-menu li a { padding: 10px 16px; font-size: 0.83rem; font-weight: 500; border-radius: 0; }
.dropdown:hover .dropdown-menu { display: block; }

.btn-apply { background: var(--accent) !important; color: var(--white) !important; padding: 8px 16px !important; border-radius: 20px !important; font-weight: 700 !important; font-size: 0.82rem !important; }
.btn-apply:hover { background: #c83a08 !important; }
.btn-portal { background: var(--accent) !important; color: var(--white) !important; padding: 8px 16px !important; border-radius: 20px !important; font-weight: 700 !important; font-size: 0.82rem !important; margin-left: 6px !important; }
.btn-portal:hover { background: #c83a08 !important; }

/* Always-visible portal button next to hamburger on mobile */
.mobile-portal {
  display: none;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .mobile-portal { display: flex; }
  /* hide the one inside the nav on mobile since mobile-portal covers it */
  nav ul li a.btn-portal { display: none; }
}

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 6px; flex-shrink: 0; }
.hamburger span { width: 26px; height: 3px; background: var(--primary); border-radius: 2px; transition: 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== HERO SLIDER ===== */
.hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; color: var(--white); }
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.2s ease-in-out; transform: scale(1.04); transition: opacity 1.2s ease-in-out, transform 7s ease; }
.slide.active { opacity: 1; transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(43,57,144,0.85) 0%, rgba(232,71,10,0.5) 100%); z-index: 1; }
.hero-inner { position: relative; z-index: 2; padding: 100px 20px 80px; width: 100%; }
.hero-content { max-width: 680px; }
.hero::after { display: none; }

.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.4); color: var(--white); width: 44px; height: 44px; border-radius: 50%; font-size: 0.95rem; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.slider-arrow:hover { background: rgba(255,255,255,0.3); }
.slider-arrow.prev { left: 16px; }
.slider-arrow.next { right: 16px; }
.slider-dots { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 10px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.45); cursor: pointer; transition: background 0.3s, transform 0.3s; }
.dot.active { background: var(--accent); transform: scale(1.3); }

.hero-badge { display: inline-block; background: var(--accent); color: var(--white); font-size: 0.72rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 1px; }
.hero h2 { font-size: 2.6rem; line-height: 1.2; margin-bottom: 16px; font-weight: 800; }
.hero h2 span { color: var(--accent); }
.hero p { font-size: 1rem; opacity: 0.9; margin-bottom: 28px; line-height: 1.7; max-width: 580px; }
.hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary { background: var(--accent); color: var(--white); padding: 13px 28px; border-radius: 30px; font-weight: 700; font-size: 0.95rem; transition: background 0.2s, transform 0.2s; display: inline-block; }
.btn-primary:hover { background: #c83a08; transform: translateY(-2px); }
.btn-outline { border: 2px solid rgba(255,255,255,0.7); color: var(--white); padding: 11px 28px; border-radius: 30px; font-weight: 600; font-size: 0.95rem; transition: 0.2s; display: inline-block; }
.btn-outline:hover { background: rgba(255,255,255,0.15); }
.hero-stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.stat h3 { font-size: 2rem; font-weight: 800; color: var(--accent); }
.stat p { font-size: 0.8rem; opacity: 0.8; margin-top: 2px; }

/* ===== QUICK LINKS ===== */
.quick-links { background: var(--accent); padding: 0; overflow-x: auto; }
.quick-links .container { display: flex; min-width: max-content; }
.quick-link-item { flex: 1; min-width: 120px; text-align: center; padding: 14px 10px; color: var(--white); font-size: 0.78rem; font-weight: 600; border-right: 1px solid rgba(255,255,255,0.3); transition: background 0.2s; cursor: pointer; }
.quick-link-item:last-child { border-right: none; }
.quick-link-item:hover { background: rgba(0,0,0,0.15); }
.quick-link-item i { font-size: 1.1rem; display: block; margin-bottom: 5px; }

/* ===== SECTION COMMON ===== */
section { padding: 70px 0; }
.section-header { text-align: center; margin-bottom: 44px; }
.section-tag { display: inline-block; background: rgba(43,57,144,0.08); color: var(--primary); font-size: 0.72rem; font-weight: 700; padding: 4px 14px; border-radius: 20px; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.section-header h2 { font-size: 1.9rem; color: var(--dark); font-weight: 800; margin-bottom: 12px; }
.section-header p { color: #666; max-width: 560px; margin: 0 auto; line-height: 1.7; }

/* ===== PROGRAMS ===== */
.programs { background: var(--light); }
.programs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.program-card { background: var(--white); border-radius: 10px; padding: 26px 22px; box-shadow: var(--shadow); border-top: 4px solid var(--primary); transition: transform 0.2s, box-shadow 0.2s; }
.program-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.program-icon { width: 50px; height: 50px; background: rgba(43,57,144,0.08); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--primary); margin-bottom: 14px; }
.program-card h3 { font-size: 0.98rem; color: var(--dark); font-weight: 700; margin-bottom: 8px; }
.program-card p { font-size: 0.84rem; color: #666; line-height: 1.6; margin-bottom: 14px; }
.program-card a { color: var(--primary); font-size: 0.84rem; font-weight: 600; }
.program-card a:hover { color: var(--accent); }

/* ===== ANNOUNCEMENTS ===== */
.announcements-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 28px; }
.news-list { display: flex; flex-direction: column; gap: 18px; }
.news-item { display: flex; gap: 14px; padding: 18px; background: var(--white); border-radius: 10px; box-shadow: var(--shadow); transition: transform 0.2s; }
.news-item:hover { transform: translateX(4px); }
.news-date { min-width: 50px; text-align: center; background: var(--primary); color: var(--white); border-radius: var(--radius); padding: 8px 6px; font-size: 0.72rem; font-weight: 700; line-height: 1.3; flex-shrink: 0; }
.news-date span { font-size: 1.3rem; display: block; }
.news-body h4 { font-size: 0.92rem; color: var(--dark); font-weight: 700; margin-bottom: 5px; }
.news-body p { font-size: 0.8rem; color: #666; line-height: 1.6; }
.portals-card { background: var(--primary); border-radius: 10px; padding: 26px 22px; color: var(--white); }
.portals-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; }
.portal-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; background: rgba(255,255,255,0.1); border-radius: var(--radius); margin-bottom: 9px; font-size: 0.85rem; font-weight: 600; transition: background 0.2s; }
.portal-link:hover { background: rgba(255,255,255,0.2); }
.portal-link i { font-size: 0.95rem; width: 16px; text-align: center; }

/* ===== WHY US ===== */
.why-us { background: var(--light); }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.why-card { text-align: center; padding: 28px 18px; background: var(--white); border-radius: 10px; box-shadow: var(--shadow); }
.why-icon { font-size: 1.7rem; margin-bottom: 12px; color: var(--accent); }
.why-icon i { display: block; }
.why-card h3 { font-size: 0.95rem; color: var(--dark); font-weight: 700; margin-bottom: 7px; }
.why-card p { font-size: 0.82rem; color: #666; line-height: 1.6; }

/* ===== PARTNERS ===== */
.partners { padding: 50px 0; }
.partners-logos { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; align-items: center; }
.partner-logo {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px 24px;
  border: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.partner-logo:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.partner-logo img { height: 40px; width: auto; max-width: 110px; object-fit: contain; filter: grayscale(40%); transition: filter 0.2s; }
.partner-logo:hover img { filter: grayscale(0%); }
.partner-logo span { font-size: 0.72rem; font-weight: 700; color: #555; text-align: center; }

/* ===== FOOTER ===== */
footer { background: var(--dark); color: #aaa; padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-brand p { font-size: 0.84rem; line-height: 1.7; margin: 12px 0 18px; }
.footer-brand .logo-icon img { filter: brightness(0) invert(1); }
.footer-col h4 { color: var(--white); font-size: 0.92rem; font-weight: 700; margin-bottom: 14px; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.82rem; color: #aaa; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--accent); }
.footer-contact p { font-size: 0.82rem; margin-bottom: 8px; line-height: 1.6; }
.footer-contact a { color: var(--accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: #aaa; margin-left: 14px; }
.footer-bottom a:hover { color: var(--accent); }

/* ===== RESPONSIVE ===== */

/* Tablet landscape */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero h2 { font-size: 2.2rem; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .announcements-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: 2rem; }
  .hero-stats { gap: 24px; }
  .programs-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 768px) {
  /* Top bar */
  .top-bar .container { justify-content: center; text-align: center; }
  .top-bar .container > div { display: none; }

  /* Nav - Professional Slide-in from Left */
  .hamburger { display: flex; z-index: 1001; }
  nav { position: fixed; top: 0; left: 0; height: 100vh; width: 100%; z-index: 1000; pointer-events: none; }
  
  nav.menu-active { pointer-events: auto; }
  
  /* Mobile Menu Overlay */
  nav::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: -1;
  }
  
  nav.menu-active::before {
    opacity: 1;
    visibility: visible;
  }
  
  /* Slide-in Menu */
  nav ul {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--white);
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    padding: 0;
    padding-bottom: 20px;
    gap: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-overflow-scrolling: touch;
  }
  
  nav ul.open {
    left: 0;
  }
  
  /* Menu Header with Logo */
  nav ul::before {
    content: 'MENU';
    display: block;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: var(--primary);
    color: var(--white);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 3px solid var(--accent);
    z-index: 10;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 2px;
  }
  
  /* Close Button */
  nav ul::after {
    content: '✕';
    position: fixed;
    top: 15px;
    left: 250px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
  }
  
  nav ul.open::after {
    opacity: 1;
    pointer-events: auto;
  }
  
  nav ul::after:hover {
    background: var(--accent);
    transform: rotate(90deg);
  }
  
  nav ul li {
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
  }
  
  nav ul li:first-child {
    margin-top: 0;
  }
  
  nav ul li a {
    padding: 16px 24px;
    font-size: 0.95rem;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
    width: 100%;
    position: relative;
  }
  
  nav ul li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--accent);
    transition: width 0.2s;
  }
  
  nav ul li a:hover {
    background: var(--light);
    padding-left: 32px;
  }
  
  nav ul li a:hover::before {
    width: 4px;
  }
  
  nav ul li a.active {
    background: rgba(43,57,144,0.08);
    color: var(--primary);
    font-weight: 700;
  }
  
  nav ul li a.active::before {
    width: 4px;
    background: var(--primary);
  }
  
  /* Show dropdown items as flat list in mobile */
  .dropdown-menu {
    position: static !important;
    box-shadow: none !important;
    border: none !important;
    min-width: unset !important;
    border-radius: 0 !important;
    background: #f8f9fa !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  .dropdown-menu li {
    border-bottom: 1px solid #e9ecef;
  }
  
  .dropdown-menu li a {
    padding: 12px 20px 12px 40px !important;
    font-size: 0.88rem !important;
    background: #f8f9fa !important;
  }
  
  .dropdown-menu li a:hover {
    background: #e9ecef !important;
    padding-left: 48px !important;
  }
  
  .dropdown-menu li a::before {
    display: none;
  }
  
  /* Hide dropdown arrow in mobile */
  .dropdown > a::after {
    content: '';
    display: none;
  }
  
  /* Remove the ▾ symbol from dropdown links in mobile */
  nav ul li.dropdown > a {
    font-size: 0.95rem;
  }
  
  /* Buttons in Mobile Menu */
  .btn-apply {
    display: block !important;
    text-align: center;
    margin: 16px 20px 8px 20px !important;
    border-radius: 25px !important;
    padding: 14px 24px !important;
  }
  
  .btn-portal {
    display: block !important;
    text-align: center;
    margin: 8px 20px 20px 20px !important;
    border-radius: 25px !important;
    padding: 14px 24px !important;
  }
  
  .nav-wrapper { position: relative; }

  /* Logo */
  .logo-icon { width: 52px; height: 52px; }
  .logo-icon img { width: 52px; height: 52px; }
  .logo-text h1 { font-size: 0.88rem; }
  .logo-text span { font-size: 0.62rem; }

  /* Hero */
  .hero { min-height: 100svh; }
  .hero-inner { padding: 80px 20px 60px; }
  .hero h2 { font-size: 1.7rem; }
  .hero p { font-size: 0.92rem; }
  .hero-stats { gap: 18px; margin-top: 28px; }
  .stat h3 { font-size: 1.6rem; }
  .slider-arrow { width: 36px; height: 36px; font-size: 0.8rem; }
  .slider-arrow.prev { left: 10px; }
  .slider-arrow.next { right: 10px; }

  /* Sections */
  section { padding: 50px 0; }
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: 1.5rem; }

  /* Programs */
  .programs-grid { grid-template-columns: 1fr; }

  /* Why grid */
  .why-grid { grid-template-columns: 1fr 1fr; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-bottom a { margin-left: 8px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .hero h2 { font-size: 1.4rem; }
  .hero p { font-size: 0.88rem; }
  .hero-btns { flex-direction: column; }
  .btn-primary, .btn-outline { text-align: center; padding: 12px 20px; }
  .hero-stats { grid-template-columns: 1fr 1fr; display: grid; gap: 14px; }
  .why-grid { grid-template-columns: 1fr; }
  .programs-grid { grid-template-columns: 1fr; }
  .news-item { flex-direction: column; }
  .news-date { width: 100%; display: flex; gap: 8px; align-items: center; border-radius: var(--radius); }
  .news-date span { font-size: 1rem; }
  .quick-links .container { min-width: unset; flex-wrap: wrap; }
  .quick-link-item { min-width: calc(33.33% - 1px); flex: none; border-bottom: 1px solid rgba(255,255,255,0.2); }
  .partners-logos { gap: 10px; }
  .partner-logo { padding: 10px 14px; font-size: 0.78rem; }
  .section-header h2 { font-size: 1.3rem; }
  .logo-text { display: none; }
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
#whatsapp-float {
  position: fixed !important;
  bottom: 24px !important;
  right: 24px !important;
  background: #25D366 !important;
  color: #fff !important;
  width: 60px !important;
  height: 60px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4) !important;
  z-index: 9999 !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  opacity: 0;
  transform: scale(0);
  cursor: pointer !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  line-height: 1 !important;
}

#whatsapp-float.visible {
  opacity: 1 !important;
  transform: scale(1) !important;
  animation: hoverFloat 3s ease-in-out infinite !important;
}

#whatsapp-float:hover {
  background: #20BA5A !important;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5) !important;
  animation: none !important;
  transform: scale(1.1) translateY(0) !important;
}

#whatsapp-float svg {
  width: 32px !important;
  height: 32px !important;
  fill: currentColor !important;
  display: block !important;
  flex-shrink: 0 !important;
}

#whatsapp-float .whatsapp-text {
  display: none !important;
  position: absolute !important;
  right: 70px !important;
  background: #fff !important;
  color: #333 !important;
  padding: 8px 16px !important;
  border-radius: 20px !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  white-space: nowrap !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
}

#whatsapp-float:hover .whatsapp-text {
  display: block !important;
  animation: slideIn 0.3s ease !important;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes hoverFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  #whatsapp-float {
    width: 56px !important;
    height: 56px !important;
    bottom: 20px !important;
    right: 20px !important;
  }
  
  #whatsapp-float svg {
    width: 28px !important;
    height: 28px !important;
  }
  
  #whatsapp-float .whatsapp-text {
    display: none !important;
  }
}
