/* --- PALETA DE COLORES PREMIUM DARK --- */
:root {
  --bg-main: #0a0a0c;       
  --bg-card: #131316;       
  --bg-nav: rgba(13, 13, 16, 0.90); 
  --border-subtle: #222227;  
  --text-main: #f3f4f6;     
  --text-muted: #9ca3af;    
  --accent: #38bdf8;        
  --accent-glow: rgba(56, 189, 248, 0.15);
  --font-base: 'Inter', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-base);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* --- NAVBAR DINÁMICA --- */
.navbar {
  background-color: var(--bg-nav);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
}

.brand-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: 3px;
}

.nav-actions-container {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 28px;
  order: 1;
}

.nav-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.nav-menu a:hover {
  color: var(--accent);
}

/* Redes fijas a la izquierda del botón burger */
.nav-socials-fixed {
  display: flex;
  align-items: center;
  gap: 16px;
  order: 2;
}

.social-icon {
  font-size: 1.3rem; 
  color: var(--text-muted);
  text-decoration: none; /* Quita definitivamente la línea o renglón de abajo */
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-icon:hover {
  transform: scale(1.15);
}

.social-icon.whatsapp:hover { color: #25d366; }
.social-icon.instagram:hover { color: #e1306c; }

.menu-checkbox, .hamburger-button {
  display: none;
}

/* --- HERO SECTION --- */
.hero-section {
  padding: 130px 24px 40px 24px; 
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-tagline {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero-section h1 {
  font-size: 2.3rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.5px;
}

/* --- COMPONENTES PRINCIPALES --- */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-container {
  padding: 40px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 35px;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1rem;
}

/* --- GRILLA Y REESTRUCTURACIÓN DE TARJETAS (ESTILO REFERENCIA) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px; 
}

.service-card {
  height: 380px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

/* Capa de degradado oscuro integrada por encima de la foto */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 12, 0.808) 45%, rgba(10, 10, 12, 0.70) 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.service-card h3 {
  font-size: 1.25rem;
  color: #fff;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.3px;
  line-height: 1.3;
}

/* Justificación exacta de textos y margen de 5px */
.card-article p {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: left; /* Cambiado de justify a left */
  margin: 5px; 
}

/* Elementos detallados en ítems */
.card-items {
  list-style: none;
  margin: 14px 5px 5px 5px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-items li {
  font-size: 0.85rem;
  color: #fff;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-items li i {
  color: var(--accent);
  font-size: 0.85rem;
}

/* 10) Tarjeta Especialidades completa la grilla horizontalmente abajo */
.full-width-card-new {
  grid-column: span 3;
  height: 260px;
  background-size: cover;
  background-position: center;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.full-width-card-new .card-overlay {
  background: linear-gradient(90deg, rgba(10, 10, 12, 0.98) 50%, rgba(10, 10, 12, 0.75) 100%);
  justify-content: center;
}

.full-width-card-new h3 {
  font-size: 1.4rem;
}

.items-horizontal {
  flex-direction: row;
  gap: 24px;
  margin-top: 12px;
}

/* --- NOSOTROS --- */
.nosotros-fullwidth {
  padding: 30px 0;
}

.section-header.align-left {
  text-align: left;
  margin-bottom: 16px;
}

.nosotros-lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.6;
  text-align: left;
  margin-bottom: 24px;
}

.inti-card-new {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 24px;
}

.inti-card-new h4 {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 8px;
}

.inti-card-new p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

strong {
  font-weight: 600;
  color: #fff;
}

/* --- FOOTER DE DOS COLUMNAS CON APARTADO DE POSTULACIÓN --- */
.main-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-card);
  padding: 40px 24px;
  margin-top: 60px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-brand h3 {
  font-size: 1.3rem;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-emails {
  display: flex;
  gap: 48px;
}

.email-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.email-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 1px;
}

.footer-mail-link {
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mail-link:hover {
  color: var(--accent);
}

.email-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* --- RESPONSIVIDAD OPTIMIZADA POR FUERA DEL BURGER --- */
@media (max-width: 968px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .full-width-card-new { grid-column: span 2; height: auto; }
  .items-horizontal { flex-direction: column; gap: 8px; }
}

@media (max-width: 768px) {
  .services-grid { grid-template-columns: 1fr; }
  .full-width-card-new { grid-column: span 1; }
  .footer-grid { flex-direction: column; gap: 32px; }
  .footer-emails { flex-direction: column; gap: 24px; }

  /* Mostrar botón hamburguesa en celulares */
  .hamburger-button {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 22px;
    height: 16px;
    cursor: pointer;
    z-index: 1010;
  }

  .hamburger-button span {
    width: 100%;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  /* Menú desplegable móvil exclusivamente para links internos */
  .nav-menu {
    position: fixed;
    top: 55px; 
    right: -100%; 
    width: 70%;
    height: calc(100vh - 55px);
    background-color: #131316;
    border-left: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: flex-start;
    padding: 40px 24px;
    gap: 28px;
    transition: right 0.3s ease;
  }

  .nav-menu a {
    font-size: 1.1rem;
    width: 100%;
    display: block;
  }

  .nav-socials-fixed {
    order: 0; /* En celular se posicionan antes que el botón burger de la derecha */
  }

  /* Despliegue con checkbox */
  .menu-checkbox:checked ~ .nav-menu {
    right: 0;
  }

  /* Animación X */
  .menu-checkbox:checked ~ .hamburger-button span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-checkbox:checked ~ .hamburger-button span:nth-child(2) {
    opacity: 0;
  }
  .menu-checkbox:checked ~ .hamburger-button span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

.service-card {
    height: 480px; /* Le damos una buena altura fija para que no se aplaste */
    display: flex;
    flex-direction: column; 
  }

  /* El bloque de texto ocupa la mitad de arriba de la tarjeta */
  .card-info-side {
    padding: 16px;
    flex: 1;
    background-color: var(--bg-card); /* Fondo oscuro sólido para lectura perfecta */
  }

  .service-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
  }

  .card-article p {
    font-size: 0.82rem;
    margin: 4px;
    line-height: 1.4;
  }

  .card-items {
    margin-top: 8px;
    gap: 4px;
  }

  .card-items li {
    font-size: 0.78rem;
  }

  /* La imagen ocupa la mitad de abajo de forma 100% limpia sin textos encima */
  .card-image-side {
    width: 100%;
    height: 180px; /* Espacio fijo dedicado exclusivamente a lucir la foto */
    display: block;
    border-top: 1px solid var(--border-subtle);
  }
}