/* ==========================================================================
   INSTITUTO SUPERIOR POLITÉCNICO KATANGOJI (ISPK)
   Design System & Style Guidelines - Public Website
   ========================================================================== */

:root {
  --primary-red: #c1442d;
  --primary-dark: #8B2917;
  --primary-darker: #5E1A0E;
  --primary-blue: #c1442d;
  --primary-navy: #8B2917;
  --accent-gold: #D4AF37;
  --accent-amber: #E65A40;
  --text-dark: #1E293B;
  --text-muted: #64748B;
  --bg-light: #FDF7F6;
  --bg-card: #FFFFFF;
  --border-light: #F0D9D5;
  --success: #10B981;
  --danger: #EF4444;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-sm: 0 4px 6px -1px rgba(193,68,45,0.05);
  --shadow-md: 0 10px 25px -5px rgba(193,68,45,0.08);
  --shadow-lg: 0 20px 40px -10px rgba(139,41,23,0.25);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-main: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Topbar */
.topbar {
  background: var(--primary-navy);
  color: #CBD5E1;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  position: relative;
  z-index: 9999;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-info span {
  margin-right: 20px;
}
.topbar-info i {
  color: var(--accent-gold);
  margin-right: 6px;
}
.topbar-lang a {
  color: #94A3B8;
  margin-left: 12px;
  font-weight: 500;
}
.topbar-lang a.active, .topbar-lang a:hover {
  color: var(--accent-gold);
}

/* Submenu de Idiomas em Destaque Absoluto (Z-Index Máximo) */
.lang-submenu-wrapper {
  position: relative;
  display: inline-block;
  z-index: 10000;
}
.lang-submenu-trigger {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.lang-submenu-wrapper:hover .lang-submenu-trigger,
.lang-submenu-wrapper.open .lang-submenu-trigger {
  background: linear-gradient(135deg, var(--accent-gold), #B8860B) !important;
  color: var(--primary-navy) !important;
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 16px rgba(212, 175, 55, 0.9) !important;
  transform: translateY(-1px) scale(1.04);
}
.lang-submenu-wrapper:hover .lang-submenu-trigger i,
.lang-submenu-wrapper.open .lang-submenu-trigger i {
  color: var(--primary-navy) !important;
}

.lang-submenu-wrapper:hover .lang-submenu-list,
.lang-submenu-wrapper:focus-within .lang-submenu-list,
.lang-submenu-wrapper.open .lang-submenu-list,
.lang-submenu-wrapper.active .lang-submenu-list {
  display: block !important;
}
.lang-submenu-list {
  position: absolute;
  top: 100%;
  right: 0;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 15px rgba(212, 175, 55, 0.3) !important;
  border: 2px solid var(--accent-gold) !important;
  list-style: none;
  padding: 6px 0;
  margin-top: 4px;
  min-width: 170px;
  display: none;
  z-index: 99999 !important;
}
.lang-submenu-list::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}
.lang-submenu-list li a.lang-option {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 16px !important;
  color: #0F172A !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}
.lang-submenu-list li a.lang-option small {
  color: #64748B !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 2px 6px;
  border-radius: 4px;
  background: #F1F5F9;
}
.lang-submenu-list li a.lang-option:hover {
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-blue)) !important;
  color: #FFFFFF !important;
  padding-left: 20px !important;
}
.lang-submenu-list li a.lang-option:hover small {
  background: var(--accent-gold) !important;
  color: var(--primary-navy) !important;
  font-weight: 800 !important;
}
.lang-submenu-list li a.lang-option.active {
  background: #FEF3C7 !important;
  color: #92400E !important;
  font-weight: 800 !important;
}
.lang-submenu-list li a.lang-option.active small {
  background: #B45309 !important;
  color: #FFFFFF !important;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand-logo .logo-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-navy));
  color: var(--accent-gold);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(10,37,64,0.2);
}
.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-blue);
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.brand-text p {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}
.nav-link {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
  padding: 8px 0;
  position: relative;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active {
  color: var(--primary-blue);
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition);
}
.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Navigation Dropdown Styling */
.nav-dropdown {
  position: relative;
}
.nav-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 250px;
  background: #FFFFFF;
  border-radius: var(--radius-md);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
  border: 1px solid var(--border-light);
  list-style: none;
  padding: 8px 0;
  margin-top: 10px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease-in-out;
  z-index: 1000;
}
.nav-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: var(--primary-navy);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition);
  text-decoration: none;
}
.dropdown-menu li a:hover {
  background: #F1F5F9;
  color: var(--accent-gold);
  padding-left: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: linear-gradient(135deg, #0A2540, #1E3A8A);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(10,37,64,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(10,37,64,0.4);
}
.btn-gold {
  background: linear-gradient(135deg, var(--accent-gold), #B8860B);
  color: #FFFFFF;
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212,175,55,0.4);
}
.btn-outline {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  background: transparent;
}
.btn-outline:hover {
  background: var(--primary-blue);
  color: #FFFFFF;
}

/* Mobile Nav Toggle */
.mobile-toggle {
  display: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--primary-blue);
}

/* Hero Carousel Slider */
.hero-slider {
  position: relative;
  height: 580px;
  background: var(--primary-navy);
  overflow: hidden;
}
.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
}
.slide.active {
  opacity: 1;
  z-index: 10;
}
.slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(6,23,39,0.92) 0%, rgba(6,23,39,0.65) 60%, rgba(6,23,39,0.3) 100%);
}
.slide-content {
  position: relative;
  z-index: 20;
  max-width: 680px;
  color: #FFFFFF;
}
.badge-hero {
  display: inline-block;
  background: rgba(212, 175, 55, 0.2);
  border: 1px solid var(--accent-gold);
  color: var(--accent-gold);
  padding: 6px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 16px;
  text-transform: uppercase;
}
.slide-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: #FFFFFF;
}
.slide-subtitle {
  font-size: 1.15rem;
  color: #E2E8F0;
  margin-bottom: 28px;
}
.slider-arrows {
  position: absolute;
  bottom: 30px;
  right: 40px;
  z-index: 30;
  display: flex;
  gap: 12px;
}
.slider-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(5px);
  color: #FFF;
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.slider-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-navy);
}

/* Media Gallery Carousel Styling */
.media-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-navy);
  color: var(--accent-gold);
  border: 2px solid var(--accent-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 20;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
}
.media-carousel-btn:hover {
  background: var(--accent-gold);
  color: var(--primary-navy);
  transform: translateY(-50%) scale(1.1);
}
.media-carousel-btn.media-prev {
  left: 0;
}
.media-carousel-btn.media-next {
  right: 0;
}
.media-carousel-track::-webkit-scrollbar {
  display: none;
}

/* Fast Stats Bar */
.stats-bar {
  margin-top: -50px;
  position: relative;
  z-index: 50;
  margin-bottom: 60px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  background: var(--bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 30px;
  border: 1px solid var(--border-light);
}
.stat-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 15px;
  border-right: 1px solid var(--border-light);
}
.stat-item:last-child {
  border-right: none;
}
.stat-icon {
  width: 56px;
  height: 56px;
  background: #F1F5F9;
  border-radius: var(--radius-sm);
  color: var(--primary-blue);
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Sections */
.section {
  padding: 70px 0;
}
.section-header {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 50px auto;
}
.section-tag {
  color: var(--accent-gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary-blue);
  line-height: 1.25;
}
.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 10px;
}

/* Courses Grid */
.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
}
.course-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.course-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-gold);
}
.course-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.course-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary-blue);
  color: #FFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.course-body {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.course-icon {
  font-size: 1.8rem;
  color: var(--accent-amber);
  margin-bottom: 12px;
}
.course-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 8px;
}
.course-dept {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.course-desc {
  font-size: 0.92rem;
  color: #475569;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.course-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.course-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* News Cards */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.news-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.news-img {
  height: 210px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #f8fafc;
  transition: transform 0.5s ease;
}
.news-card:hover .news-img {
  transform: scale(1.1);
}
.news-body {
  padding: 24px;
}
.news-date {
  font-size: 0.8rem;
  color: var(--accent-amber);
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.news-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary-blue);
  margin-bottom: 12px;
  line-height: 1.35;
}
.news-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* Footer (Compact & Organized Layout) */
.footer {
  background: var(--primary-navy);
  color: #CBD5E1;
  padding: 40px 0 15px 0;
  margin-top: 50px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1.2fr 1fr;
  gap: 30px;
  margin-bottom: 25px;
}
.footer-col h3 {
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 14px;
  position: relative;
  padding-bottom: 6px;
}
.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 28px;
  height: 2px;
  background: var(--accent-gold);
}
.footer-col p {
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}
.footer-links {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 15px;
  padding: 0;
  margin: 0;
}
.footer-links li {
  margin-bottom: 4px;
}
.footer-links a {
  color: #94A3B8;
  font-size: 0.85rem;
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--accent-gold);
  padding-left: 3px;
}
.social-icons {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.social-icon {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 0.85rem;
}
.social-icon:hover {
  background: var(--accent-gold);
  color: var(--primary-navy);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
  text-align: center;
  font-size: 0.82rem;
  color: #64748B;
}

/* Flash Messages */
.flash-alert {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flash-success {
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}
.flash-danger {
  background: #FEE2E2;
  color: #991B1B;
  border: 1px solid #FCA5A5;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .stat-item {
    border-right: none;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }
  .nav-menu {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: #FFFFFF;
    flex-direction: column;
    padding: 30px;
    transition: var(--transition);
  }
  .nav-menu.open {
    left: 0;
  }
  .slide-title {
    font-size: 2rem;
  }
  .hero-slider {
    height: 480px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   INSTITUTO SUPERIOR POLITÉCNICO KATANGOJI (ISPK)
   Modal & Admissions Form UI Enhancement
   ========================================================================== */

/* Modal Overlay & Backdrop */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 23, 39, 0.85);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Dialog Window */
.modal-dialog {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 780px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(212, 175, 55, 0.3);
  position: relative;
  transform: scale(0.92) translateY(20px);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-overlay.active .modal-dialog {
  transform: scale(1) translateY(0);
}

/* Modal Header */
.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-navy), var(--primary-blue));
  color: #FFFFFF;
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}
.modal-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 2px;
}
.modal-header p {
  font-size: 0.85rem;
  color: #CBD5E1;
}
.modal-close-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}
.modal-close-btn:hover {
  background: #EF4444;
  border-color: #EF4444;
  transform: rotate(90deg);
}

/* Modal Body */
.modal-body {
  padding: 32px;
}

/* Step Wizard Navigation */
.step-wizard {
  display: flex;
  justify-content: space-around;
  margin-bottom: 32px;
  position: relative;
}
.step-wizard::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 60px;
  right: 60px;
  height: 3px;
  background: var(--border-light);
  z-index: 1;
}
.step-item {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.step-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #E2E8F0;
  color: var(--text-muted);
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #FFFFFF;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.step-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}
.step-item.active .step-circle {
  background: var(--accent-gold);
  color: var(--primary-navy);
  box-shadow: 0 0 0 4px rgba(212,175,55,0.25);
}
.step-item.active .step-label {
  color: var(--primary-blue);
}
.step-item.completed .step-circle {
  background: var(--success);
  color: #FFFFFF;
}

/* Form Steps */
.form-step {
  display: none;
  animation: fadeIn 0.4s ease;
}
.form-step.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Course Visual Selection Cards */
.course-radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
  max-height: 240px;
  overflow-y: auto;
  padding: 4px;
}
.course-radio-card {
  position: relative;
}
.course-radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.course-radio-content {
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #FAFAFA;
}
.course-radio-card input[type="radio"]:checked + .course-radio-content {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.08);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}
.course-radio-icon {
  font-size: 1.4rem;
  color: var(--primary-blue);
}
.course-radio-title {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--primary-blue);
  line-height: 1.2;
}
.course-radio-degree {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Dropzone Upload */
.dropzone-box {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  text-align: center;
  background: #F8FAFC;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.dropzone-box:hover, .dropzone-box.dragover {
  border-color: var(--accent-gold);
  background: rgba(212, 175, 55, 0.05);
}
.dropzone-icon {
  font-size: 2rem;
  color: var(--accent-gold);
  margin-bottom: 8px;
}
.dropzone-text {
  font-weight: 700;
  color: var(--primary-blue);
  font-size: 0.92rem;
}
.dropzone-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Modal Footer Buttons */
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   INPUT ICON GROUPS & PERSONALIZED FEEDBACK CARDS
   ========================================================================== */

.input-icon-group {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon-group i.input-icon {
  position: absolute;
  left: 16px;
  color: var(--accent-gold);
  font-size: 1.1rem;
  pointer-events: none;
  transition: var(--transition);
}
.input-icon-group .form-control {
  padding-left: 48px;
}
.input-icon-group .form-control:focus + i.input-icon,
.input-icon-group:focus-within i.input-icon {
  color: var(--primary-blue);
  transform: scale(1.1);
}

.form-control {
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  width: 100%;
  background: #FFFFFF;
}
.form-control:focus {
  outline: none;
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.2);
}
.form-control.is-invalid {
  border-color: var(--danger) !important;
  background-color: #FFF5F5;
}
.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

/* Personalized Success Confirmation Card */
.confirmation-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 2px solid #A7F3D0;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.12);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.confirmation-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, #10B981, #059669);
}
.confirmation-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.confirmation-icon {
  width: 56px;
  height: 56px;
  background: #D1FAE5;
  color: #059669;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
}
.code-box {
  background: #061727;
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  border: 1px solid var(--accent-gold);
}
.code-badge-text {
  font-family: monospace;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent-gold);
  letter-spacing: 2px;
}
.copy-btn {
  background: rgba(212, 175, 55, 0.2);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.copy-btn:hover {
  background: var(--accent-gold);
  color: #061727;
}

/* ==========================================================================
   SISTEMA DE MODOS DE VISUALIZAÇÃO (DARK MODE, AZUL NOTURNO & ALTO CONTRASTE)
   ========================================================================== */

/* Botões do Seletor de Tema no Topbar */
.theme-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 8px;
  border-radius: 20px;
}
.theme-btn {
  background: transparent;
  border: none;
  color: #CBD5E1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}
.theme-btn:hover, .theme-btn.active {
  background: #FFFFFF;
  color: #0F172A;
  transform: scale(1.1);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* 1. MODO ESCURO (DARK MODE ELEGANTE) */
body.theme-dark {
  --bg-light: #0B131F;
  --bg-card: #152032;
  --text-dark: #F8FAFC;
  --text-muted: #94A3B8;
  --border-light: #2A3B53;
  --primary-blue: #E2E8F0;
  --primary-navy: #1E293B;
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.6);
  background-color: #0B131F !important;
  color: #F8FAFC !important;
}
body.theme-dark .navbar {
  background-color: #0F172A !important;
  border-bottom: 1px solid #1E293B !important;
}
body.theme-dark .topbar {
  background-color: #060B12 !important;
}
body.theme-dark .nav-link {
  color: #CBD5E1 !important;
}
body.theme-dark .nav-link:hover {
  color: var(--accent-gold) !important;
}
body.theme-dark .section-title,
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, body.theme-dark h4 {
  color: #F8FAFC !important;
}
body.theme-dark .section-desc, body.theme-dark p, body.theme-dark span, body.theme-dark li {
  color: #CBD5E1;
}
body.theme-dark .course-card, 
body.theme-dark .news-card, 
body.theme-dark .stat-card,
body.theme-dark .table-card,
body.theme-dark .card,
body.theme-dark div[style*="background: #FFFFFF"],
body.theme-dark div[style*="background:#FFF"] {
  background-color: #152032 !important;
  border-color: #2A3B53 !important;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3) !important;
}
body.theme-dark input, 
body.theme-dark select, 
body.theme-dark textarea {
  background-color: #0F172A !important;
  color: #F8FAFC !important;
  border-color: #334155 !important;
}

/* 2. MODO AZUL NOTURNO (MIDNIGHT BLUE) */
body.theme-midnight {
  --bg-light: #030B14;
  --bg-card: #09192C;
  --text-dark: #F0F9FF;
  --text-muted: #93C5FD;
  --border-light: #1E3A8A;
  --primary-blue: #38BDF8;
  --primary-navy: #0F172A;
  --accent-gold: #FBBF24;
  --shadow-sm: 0 4px 15px rgba(3, 11, 20, 0.4);
  --shadow-md: 0 10px 30px rgba(3, 11, 20, 0.6);
  --shadow-lg: 0 20px 45px rgba(3, 11, 20, 0.8);
  background-color: #030B14 !important;
  color: #F0F9FF !important;
}
body.theme-midnight .navbar {
  background-color: #051424 !important;
  border-bottom: 1px solid #1E3A8A !important;
}
body.theme-midnight .topbar {
  background-color: #02070E !important;
}
body.theme-midnight .nav-link {
  color: #BAE6FD !important;
}
body.theme-midnight .nav-link:hover {
  color: #38BDF8 !important;
}
body.theme-midnight .section-title,
body.theme-midnight h1, body.theme-midnight h2, body.theme-midnight h3, body.theme-midnight h4 {
  color: #F0F9FF !important;
}
body.theme-midnight .section-desc, body.theme-midnight p, body.theme-midnight span, body.theme-midnight li {
  color: #93C5FD;
}
body.theme-midnight .course-card, 
body.theme-midnight .news-card, 
body.theme-midnight .stat-card,
body.theme-midnight .table-card,
body.theme-midnight .card,
body.theme-midnight div[style*="background: #FFFFFF"],
body.theme-midnight div[style*="background:#FFF"] {
  background-color: #09192C !important;
  border-color: #1E3A8A !important;
  box-shadow: 0 10px 25px rgba(3, 11, 20, 0.5) !important;
}
body.theme-midnight input, 
body.theme-midnight select, 
body.theme-midnight textarea {
  background-color: #051424 !important;
  color: #F0F9FF !important;
  border-color: #1D4ED8 !important;
}

/* 3. MODO ALTO CONTRASTE (WCAG 2.1 AAA COMPLIANT) */
body.theme-contrast {
  --bg-light: #000000;
  --bg-card: #000000;
  --text-dark: #FFFFFF;
  --text-muted: #FFFF00;
  --border-light: #FFD700;
  --primary-blue: #FFD700;
  --primary-navy: #000000;
  --accent-gold: #FFD700;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  background-color: #000000 !important;
  color: #FFFFFF !important;
}
body.theme-contrast .navbar {
  background-color: #000000 !important;
  border-bottom: 2px solid #FFD700 !important;
}
body.theme-contrast .topbar {
  background-color: #000000 !important;
  border-bottom: 1px solid #FFD700 !important;
}
body.theme-contrast .nav-link {
  color: #FFFFFF !important;
  font-weight: 800 !important;
}
body.theme-contrast .nav-link:hover {
  color: #FFD700 !important;
  text-decoration: underline !important;
}
body.theme-contrast .section-title,
body.theme-contrast h1, body.theme-contrast h2, body.theme-contrast h3, body.theme-contrast h4 {
  color: #FFFFFF !important;
}
body.theme-contrast .section-desc, body.theme-contrast p, body.theme-contrast span, body.theme-contrast li {
  color: #FFFF00 !important;
}
body.theme-contrast .course-card, 
body.theme-contrast .news-card, 
body.theme-contrast .stat-card,
body.theme-contrast .table-card,
body.theme-contrast .card,
body.theme-contrast div[style*="background: #FFFFFF"],
body.theme-contrast div[style*="background:#FFF"] {
  background-color: #000000 !important;
  border: 2px solid #FFD700 !important;
}
body.theme-contrast input, 
body.theme-contrast select, 
body.theme-contrast textarea {
  background-color: #000000 !important;
  color: #FFFFFF !important;
  border: 2px solid #FFD700 !important;
}

/* ==========================================================================
   GLOBAL RESPONSIVE OVERRIDES FOR INLINE STYLES
   ========================================================================== */
@media (max-width: 992px) {
  div[style*="grid-template-columns: 2.5fr 1fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"],
  div[style*="grid-template-columns: 1fr 1.5fr"],
  div[style*="grid-template-columns: 1fr 1.3fr"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(3, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  div[style*="grid-template-columns"],
  div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns: repeat(3, 1fr)"],
  div[style*="grid-template-columns: repeat(4, 1fr)"],
  div[style*="grid-template-columns: repeat(2, 1fr)"] {
    grid-template-columns: 1fr !important;
  }
  
  .course-img {
    height: 180px;
  }
  .news-img {
    height: 180px;
  }
  .section {
    padding: 40px 0;
  }
  .hero-slider {
    height: 400px;
  }
  .slide-title {
    font-size: 1.8rem;
  }
  
  /* Ensure images in articles max width 100% */
  img {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Make sure container doesn't overflow */
  .container {
    padding: 0 15px;
    overflow-x: hidden;
  }
}




/* --- Global Responsive Fixes (Added Automatically) --- */
@media (max-width: 768px) {
  /* Prevent horizontal scroll from tables */
  table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
  }
  
  /* Ensure preformatted text wraps or scrolls */
  pre, code {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
  }
  
  /* Force flex containers to wrap on mobile if they have inline styles preventing it */
  div[style*="display: flex"] {
    flex-wrap: wrap !important;
  }
  
  /* Reset fixed widths on mobile */
  [style*="width:"] {
    max-width: 100% !important;
  }
  
  /* Better typography scaling */
  h1 { font-size: 1.8rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.3rem !important; }
}
