/* ============================================================
   COMPONENTS.CSS — Header, Footer, Modal, WhatsApp Float
   ============================================================ */

/* ===== HEADER / NAVBAR ===== */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: var(--transition);
  background: transparent;
}

.header.scrolled,
.header.solid {
  background: rgba(0, 61, 125, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0,0,0,0.15);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo img {
  height: 50px;
  width: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
}

.header-logo-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--white);
  line-height: 1.2;
}

.header-logo-credential {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 0.9rem;
  transition: var(--transition);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--green);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.nav-active {
  color: var(--white);
}
.nav-links a:hover::after,
.nav-links a.nav-active::after {
  width: 100%;
}

.nav-links a.nav-active {
  color: var(--green);
}

.header-cta {
  padding: 10px 24px;
  font-size: 0.85rem;
}

.nav-mobile-cta {
  display: none;
}

/* Mobile menu button */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  z-index: 1001;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: var(--transition);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Nav overlay (mobile) */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.nav-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--gray-900);
  color: rgba(255,255,255,0.7);
  padding: 80px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.footer-logo-name {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--white);
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
}

.footer-credential {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(115, 189, 40, 0.1);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(115, 189, 40, 0.2);
}

.footer-credential svg {
  width: 20px;
  height: 20px;
  fill: var(--green);
  flex-shrink: 0;
}

.footer-credential span {
  font-size: 0.78rem;
  color: var(--green-light);
  font-weight: 500;
  line-height: 1.4;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-size: 0.88rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.footer-col ul a svg {
  width: 16px;
  height: 16px;
  fill: var(--green);
  flex-shrink: 0;
}

.footer-col ul a:hover {
  color: var(--green);
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  font-size: 0.8rem;
}

.footer-rif {
  color: rgba(255,255,255,0.4);
}

/* ===== SERVICE MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  max-width: 560px;
  width: 100%;
  position: relative;
  transform: scale(0.92);
  transition: var(--transition);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-200);
  transform: rotate(90deg);
}

.modal-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.modal-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  display: block;
}

.modal h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 12px;
}

.modal-purpose {
  color: var(--gray-700);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-benefits-title {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

.modal-benefits {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}

.modal-benefit {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.modal-benefit-icon {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  background: rgba(115, 189, 40, 0.12);
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.modal-benefit p {
  font-size: 0.88rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.modal-cta {
  width: 100%;
  justify-content: center;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  padding: 100px 0;
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue) 60%, var(--blue-light) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(115,189,40,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.04) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner-inner {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--white);
  margin-bottom: 16px;
}

.cta-banner h2 span {
  color: var(--green);
}

.cta-banner p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cta-banner-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta-features {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.1);
  flex-wrap: wrap;
}

.cta-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

.cta-feature-icon {
  display: flex;
  align-items: center;
}

.cta-feature-icon svg {
  width: 19.2px;
  height: 19.2px;
  fill: var(--green);
  flex-shrink: 0;
}

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
  fill: var(--white);
}

/* ===== RESPONSIVE COMPONENTS ===== */
@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0; right: 0; bottom: 0;
    width: 280px;
    background: var(--blue-dark);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 24px;
    transform: translateX(100%);
    transition: var(--transition);
    box-shadow: -4px 0 20px rgba(0,0,0,0.2);
    z-index: 999;
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
  }

  .header-cta {
    display: none;
  }

  .nav-links .btn-primary {
    display: inline-flex;
    margin-top: 8px;
    justify-content: center;
    color: var(--white);
  }

  .nav-links .btn-primary::after {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
    padding-bottom: 96px;
  }

  .modal {
    padding: 32px 24px;
    margin: 16px;
  }

  .cta-features {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }
}
