/* SERVICIOS.CSS - Peak Site Studio */

/* TAMAÑO DE LETRAS */
.about-hero h1 {
  font-size: 3rem;
}

/* ====================== PAQUETES EN FILA ====================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1280px;
  margin: 0 auto 90px;
}

.service-card {
  padding: 48px 35px 40px;
  border-radius: 24px;
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
  text-align: center;
  height: 100%;
  border: 1px solid transparent;
  will-change: transform;
}

/* Hover base */
.service-card:hover {
  transform: translateY(-18px) !important;
  box-shadow: 0 25px 50px rgba(0, 212, 255, 0.15);
}

.service-card.featured {
  border: 2px solid #38bdf8;
  transform: scale(1);
}
.service-card.featured:hover {
  transform: translateY(-18px);
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 22px;
}
.service-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.92rem;
  margin-bottom: 18px;
  min-height: 58px;
}
.service-desc {
  margin-bottom: 28px;
  min-height: 85px;
}
.service-card ul {
  text-align: left;
  margin-bottom: 35px;
  flex-grow: 1;
}
.service-card ul li {
  padding: 8px 0;
  position: relative;
  padding-left: 28px;
}
.service-card ul li::before {
  content: "✓";
  color: #38bdf8;
  position: absolute;
  left: 0;
  font-weight: bold;
}
.price {
  font-size: 2.15rem;
  font-weight: 700;
  margin: 15px 0 25px;
}
.price-month {
  font-size: 1.1rem;
  font-weight: 400;
}

/* ====================== MODO OSCURO ====================== */
body.dark .service-card,
body:not(.light) .service-card {
  background: #1e2937;
  border-color: #334155;
  color: #e2e8f0;
}
body:not(.light) .service-desc,
body:not(.light) .service-card ul li,
body.dark .service-desc,
body.dark .service-card ul li {
  color: #cbd5e1;
}
body:not(.light) .price,
body.dark .price {
  color: #38bdf8;
}
body:not(.light) .price-month,
body.dark .price-month {
  color: #94a3b8;
}

/* ====================== MODO CLARO (Compatible con tu sistema) ====================== */
body:not(.dark) .service-card,
body:not(.dark) .maintenance-card {
  background: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  color: #1e2937 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

body:not(.dark) .service-card:hover,
body:not(.dark) .maintenance-card:hover {
  border-color: #00d4ff !important;
  box-shadow: 0 20px 45px rgba(0, 212, 255, 0.15) !important;
}

body:not(.dark) .service-card h3,
body:not(.dark) .maintenance-card h3 {
  color: #0f172a !important;
}

body:not(.dark) .service-desc,
body:not(.dark) .service-card ul li,
body:not(.dark) .maintenance-card .service-desc,
body:not(.dark) .maintenance-card ul li {
  color: #475569 !important;
}

body:not(.dark) .price {
  color: #0f172a !important;
}

/* ====================== TÍTULO "Elige tu paquete" ====================== */
.section-title {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 14px;
  font-size: 2.2rem;
  margin: 0 auto 60px;
  text-align: center;
}

/* Contenedor centrado */
.services-section .container {
  text-align: center;
}

/* Modo oscuro */
body.dark .section-title,
body:not(.light) .section-title {
  background: #1e2937;
  color: #f8fafc;
  border: 1px solid #334155;
  box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

/* Modo claro - Texto oscuro (Adaptado para paquetes y especialidades) */
body:not(.dark) .section-title,
body:not(.dark) .services-section .section-title,
body:not(.dark) .categories-section .section-title, /* <--- Esta línea soluciona tu problema */
body:not(.dark) h2.section-title {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

/* ====================== MANTENIMIENTO ====================== */
.maintenance-section {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}
.maintenance-card {
  max-width: 520px;
  width: 100%;
  padding: 48px 40px;
  border-radius: 24px;
  border: 1px solid #334155;
}

/* ====================== RESPONSIVE + RESTO ====================== */
@media (max-width: 992px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
}

/* ====================== CTA FINAL - VARIACIONES DE MODO ====================== */

/* Adaptación del contenedor principal para el modo claro */
body:not(.dark) .cta {
  background: #ffffff !important;
  border-top: 1px solid #e2e8f0;
}

/* Encabezado principal en modo claro */
body:not(.dark) .cta h2,
body:not(.dark) .cta .fade-up h2,
body:not(.dark) h2.fade-up {
  color: #0f172a !important;
}

/* Descripción o texto secundario en modo claro */
body:not(.dark) .cta p {
  color: #475569 !important;
}

/* Botón de acción principal en modo claro */
body:not(.dark) .cta .btn,
body:not(.dark) .cta .btn-primary,
body:not(.dark) .cta a[class*="btn"] {
  color: #ffffff !important;
  background: linear-gradient(135deg, #00d4ff, #0099ff) !important;
  box-shadow: 0 10px 25px rgba(0, 212, 255, 0.25) !important;
}

/* Efecto interactivo del botón en modo claro */
body:not(.dark) .cta .btn:hover,
body:not(.dark) .cta .btn-primary:hover,
body:not(.dark) .cta a[class*="btn"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 212, 255, 0.35) !important;
}

/* ====================== MEGA MENU - VERSIÓN DEFINITIVA ====================== */
.nav-item {
  position: relative;
  display: inline-block;
}

.nav-link {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
  padding: 12px 14px !important;
  border-radius: 8px;
  transition: background 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 46px;
  line-height: 1;
}

.nav-link:hover {
  background: rgba(0, 212, 255, 0.08);
}

.chevron {
  font-size: 0.68em;
  transition: transform 0.3s ease;
  position: relative;
  top: -1px;
}

.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 15px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 10000;
  pointer-events: none;
  width: 100vw;
}

.nav-item:hover .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-menu-content {
  background: white;
  border-radius: 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.22);
  border: 1px solid #e2e8f0;
  margin: 0 auto;
  max-width: 1180px;
  width: 95%;
  padding: 50px 48px;
}

body.dark .mega-menu-content {
  background: #0f1629;
  border-color: rgba(255,255,255,0.09);
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 52px;
}

.mega-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.mega-column h4 {
  font-size: 14.8px;
  font-weight: 700;
  color: #00d4ff;
  margin-bottom: 28px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1.25;
}

.mega-column a {
  display: block;
  padding: 9.5px 6px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 15.4px;
  line-height: 1.48;
}

body.dark .mega-column a {
  color: var(--text-dark);
}

.mega-column a:hover {
  color: #00d4ff;
  padding-left: 12px;
}

@media (max-width: 991px) {
  .mega-menu {
    display: none !important;
  }
}

/* ====================== SECCIÓN CATEGORÍAS DEBAJO DE LOS PAQUETES DE PRECIOS ====================== */
.categories-section {
  padding: 60px 0 100px;
}

.categories-section .container {
  text-align: center;
}

.categories-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2x2 en escritorio */
  gap: 35px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Tarjeta base como contenedor de imagen */
.category-card-portfolio {
  position: relative;
  display: flex;
  align-items: flex-end; /* Texto abajo al estilo portafolio moderno */
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  background-color: #1e293b; /* Fondo de seguridad */
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  cursor: pointer;
}

/* Capa oscura interna para que el texto resalte sobre la imagen */
.category-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(15, 22, 41, 0.95) 10%, rgba(15, 22, 41, 0.4) 100%);
  transition: background 0.3s ease;
  z-index: 1;
}

/* Contenido de la tarjeta */
.category-content-portfolio {
  position: relative;
  z-index: 2;
  padding: 40px;
  text-align: left;
  width: 100%;
}

.category-icon-portfolio {
  font-size: 2.2rem;
  display: block;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.category-card-portfolio h3 {
  font-family: 'Inter', sans-serif;
  color: #ffffff !important; /* Siempre blanco para contrastar con la foto */
  font-size: 1.6rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

.category-btn-portfolio {
  color: #00d4ff;
  font-size: 1rem;
  font-weight: 500;
  display: inline-block;
  transition: padding 0.3s ease;
}

/* ====================== EFECTOS HOVER (PREMIUM) ====================== */
.category-card-portfolio:hover {
  transform: translateY(-10px);
  box-shadow: 0 22px 45px rgba(0, 212, 255, 0.15);
}

/* El fondo oscurece un pelín más al pasar el ratón */
.category-card-portfolio:hover .category-overlay {
  background: linear-gradient(to top, rgba(15, 22, 41, 0.98) 20%, rgba(15, 22, 41, 0.5) 100%);
}

.category-card-portfolio:hover .category-icon-portfolio {
  transform: scale(1.15) rotate(-5deg);
}

.category-card-portfolio:hover .category-btn-portfolio {
  padding-left: 8px;
}

/* ====================== ADAPTACIÓN MODO CLARO DEFINITIVA ====================== */

/* 1. Fondo blanco para las tarjetas, borde gris claro y sombra suave */
body:not(.dark) .category-card-portfolio {
  background-color: #ffffff !important;
  border: 2px solid #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06) !important;
}

/* 2. Cambiamos la capa oscura por un degradado sutil de blanco a transparente */
body:not(.dark) .category-card-portfolio .category-overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 20%, rgba(255, 255, 255, 0.1) 100%) !important;
}

/* 3. Textos en gris oscuro para que contrasten perfectamente sobre el blanco */
body:not(.dark) .category-card-portfolio h3 {
  color: #0f172a !important;
}

/* 4. Comportamiento en Hover (Modo Claro) */
body:not(.dark) .category-card-portfolio:hover {
  border-color: #00d4ff !important;
  box-shadow: 0 20px 45px rgba(0, 212, 255, 0.15) !important;
}

/* Al hacer hover, la capa blanca se vuelve ligeramente más sólida */
body:not(.dark) .category-card-portfolio:hover .category-overlay {
  background: linear-gradient(to top, rgba(255, 255, 255, 0.98) 30%, rgba(255, 255, 255, 0.3) 100%) !important;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 992px) {
  .categories-portfolio-grid {
    grid-template-columns: 1fr; /* Una columna en móvil */
    gap: 25px;
  }
  .category-card-portfolio {
    min-height: 260px;
  }
  .category-content-portfolio {
    padding: 30px;
  }
}