/* ==========================================================================
   COLÉGIO CEI - CENTRO EDUCACIONAL INTEGRADO
   Design System & Portal Institucional
   Identidade: Verde Institucional #1F784C
   ========================================================================== */

:root {
  --cei-primary: #1F784C;
  --cei-primary-dark: #145333;
  --cei-primary-deep: #0D3520;
  --cei-primary-light: #289E64;
  --cei-primary-soft: #EEF8F2;
  --cei-primary-card: #F4FAF6;
  
  --cei-accent-gold: #F59E0B;
  --cei-accent-gold-dark: #D97706;
  --cei-accent-gold-soft: #FEF3C7;
  
  --cei-text-main: #0F172A;
  --cei-text-muted: #475569;
  --cei-text-light: #94A3B8;
  
  --cei-border: #E2E8F0;
  --cei-border-green: #C6E7D4;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Base */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-body);
  color: var(--cei-text-main);
  background-color: #FFFFFF;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  letter-spacing: -0.02em;
}

/* Institutional Navigation & Dropdown */
.nav-glass {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(31, 120, 76, 0.12);
  transition: all 0.3s ease;
}

.nav-link {
  color: #334155;
  font-weight: 600;
  font-size: 0.925rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-link:hover, .nav-link.active {
  color: var(--cei-primary);
  background-color: var(--cei-primary-soft);
}

/* Dropdown Menu */
.dropdown-wrapper {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 270px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  box-shadow: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 10px 15px -8px rgba(0, 0, 0, 0.05);
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100;
}

.dropdown-wrapper:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: 0.65rem;
  font-size: 0.875rem;
  color: #1E293B;
  font-weight: 600;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background-color: var(--cei-primary-soft);
  color: var(--cei-primary);
  transform: translateX(3px);
}

.dropdown-item-desc {
  display: block;
  font-size: 0.75rem;
  color: #64748B;
  font-weight: 400;
}

/* Badges */
.badge-gold {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  color: #92400E;
  border: 1px solid #FCD34D;
}

.badge-green {
  background: var(--cei-primary-soft);
  color: var(--cei-primary-dark);
  border: 1px solid var(--cei-border-green);
}

/* Institutional Banner (Inner Pages) */
.page-banner {
  background: linear-gradient(135deg, #0A2616 0%, #145333 45%, #1F784C 100%);
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
}

.page-banner::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events-none;
}

/* Institutional Cards */
.inst-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 1.25rem;
  padding: 1.75rem;
  transition: all 0.3s ease;
}

.inst-card:hover {
  border-color: var(--cei-primary-light);
  box-shadow: 0 15px 30px -10px rgba(31, 120, 76, 0.12);
  transform: translateY(-4px);
}

/* Floating WhatsApp Action Button */
.whatsapp-floating {
  position: fixed;
  bottom: 26px;
  right: 26px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
}

.whatsapp-bubble {
  background: #25D366;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: pulse-green 2.5s infinite;
}

.whatsapp-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.65);
}

.whatsapp-tooltip {
  background: #0F172A;
  color: #FFFFFF;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Buttons */
.btn-cei {
  background-color: var(--cei-primary);
  color: #FFFFFF;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-cei:hover {
  background-color: var(--cei-primary-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(31, 120, 76, 0.3);
}

.btn-cei-outline {
  border: 2px solid var(--cei-primary);
  color: var(--cei-primary);
  background: transparent;
  padding: 0.7rem 1.4rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-cei-outline:hover {
  background-color: var(--cei-primary);
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Accordion */
.faq-item {
  transition: all 0.2s ease;
}

.faq-item.active {
  border-color: var(--cei-primary);
  background-color: #FAFDFB;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 800px;
  opacity: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--cei-primary);
}

/* Responsive */
@media (max-width: 1024px) {
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 1rem;
    display: none;
  }
  .dropdown-wrapper.open .dropdown-menu {
    display: block;
  }
}

@media (max-width: 640px) {
  .whatsapp-tooltip {
    display: none;
  }
  .whatsapp-floating {
    bottom: 18px;
    right: 18px;
  }
}
