:root {
  --color-primario: #ff6f00;
  --color-secundario: #004c99;
  --color-fondo: #f9f9f9;
  --color-texto: #333;
}

/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", sans-serif;
  background: var(--color-fondo);
  color: var(--color-texto);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===== HEADER ===== */
.header {
  background: var(--color-secundario);
  padding: 18px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: white;
  font-size: 28px;
  font-weight: bold;
}

.menu {
  list-style: none;
  display: flex;
  gap: 20px;
}

.menu a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

.menu a:hover,
.menu a.active {
  color: var(--color-primario);
}

/* ===== HERO ===== */
.hero {
  padding: 110px 20px;
  text-align: center;
  color: white;
  background: linear-gradient(to right, #004c99cc, #ff6f00cc),
    url("../img/banner.jpg") center/cover no-repeat;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 10px;
}

.hero-content h2 {
  font-size: 44px;
  margin-bottom: 18px;
}

.hero p {
  font-size: 20px;
  max-width: 750px;
  margin: 0 auto;
  opacity: 0.95;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 22px;
}

/* ===== BOTONES ===== */
.btn-primary,
.btn-white,
.btn-whatsapp {
  padding: 12px 25px;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: 0.3s;
}

/* primario */
.btn-primary {
  background: var(--color-primario);
  color: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.btn-primary:hover {
  background: #e66500;
}

/* blanco */
.btn-white {
  background: white;
  color: var(--color-primario);
}
.btn-white:hover {
  background: #ffe0b2;
}

/* whatsapp */
.btn-whatsapp {
  background: #25D366 !important;
  color: white !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.btn-whatsapp:hover {
  background: #1ebe5d !important;
  transform: translateY(-2px);
}

/* BTN HERO */
.btn-hero {
  padding: 16px 42px !important;
  font-size: 20px !important;
  font-weight: 700;
  border-radius: 50px;
  background: linear-gradient(135deg, #ff6f00, #ff8f33);
  box-shadow: 0 8px 25px rgba(0,0,0,0.35);
  letter-spacing: 0.5px;
  transition: all 0.35s ease !important;
}
.btn-hero:hover {
  background: linear-gradient(135deg, #e66500, #ff7a1a);
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

/* ===== SECTIONS ===== */
.section {
  padding: 70px 0;
}

.section-title {
  text-align: center;
  font-size: 36px;
  color: var(--color-secundario);
  margin-bottom: 40px;
}

.section-subtitle {
  text-align: center;
  font-size: 18px;
  color: #555;
  margin-bottom: 30px;
}

/* ===== CARDS BASE PARA OTROS USOS ===== */
.cards {
  display: flex;               /* Flex para tarjetas generales */
  justify-content: center;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}

.card {
  background: white;
  padding: 28px;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
  text-align: center;
  transition: 0.3s;
  max-width: 330px;
  width: 100%;
}

.card:hover {
  transform: translateY(-5px);
}

.card i {
  font-size: 48px;
  color: var(--color-primario);
  margin-bottom: 15px;
}

.card h3 {
  color: var(--color-secundario);
  margin-bottom: 12px;
}

.card p {
  color: #555;
}

.card-link {
  margin-top: 15px;
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-primario);
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: 0.3s;
}
.card-link:hover {
  background: #e76500;
}

/* ===================================================================== */
/*           🎯 LAYOUT CRUZADO (SERVICES) — 100% FUNCIONAL               */
/* ===================================================================== */

.services-section #services-cards {
  display: grid !important; /* IMPORTANTE para sobreescribir flex */
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 150px 220px 150px; /* 3 filas para formar la cruz */
  gap: 30px;
  justify-items: center;
  align-items: center;
}

.services-section #services-cards {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto auto; /* filas con altura automática para ajustar contenido */
  gap: 30px 20px; /* separación vertical y horizontal */
  justify-items: center;
  align-items: start;
}

.services-section #services-cards article:nth-child(1) {
  grid-column: 1;
  grid-row: 2;
}

.services-section #services-cards article:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.services-section #services-cards article:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
  /* elimina margin-top */
}

.services-section #services-cards article:nth-child(4) {
  grid-column: 3;
  grid-row: 2;
}

.services-section #services-cards article:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
}


/* RESPONSIVE */
@media (max-width: 768px) {
  .services-section #services-cards {
    display: flex !important;
    flex-direction: column;
    gap: 20px;
  }

  .services-section #services-cards article {
    grid-column: auto !important;
    grid-row: auto !important;
    margin-top: 0 !important;
  }
}

/* ===== ANIMACIONES ===== */
.fade-in {
  animation: fade .8s ease-in-out;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== CTA ===== */
.cta {
  background: var(--color-secundario);
  color: white;
  text-align: center;
  padding: 60px 20px;
  margin-top: 40px;
}

.cta h2 {
  font-size: 32px;
  margin-bottom: 18px;
}

.cta .btn-white {
  font-size: 18px;
  padding: 14px 28px;
  border-radius: 8px;
}

/* ===== FOOTER ===== */
footer {
  background: #003766;
  color: white;
  text-align: center;
  padding: 20px 10px;
  margin-top: 0;
  font-size: 15px;
}

/* LOGO HEADER */
.logo-img {
  background: white;
  padding: 10px 14px;
  border-radius: 10px;
  height: 70px;
  width: auto;
  display: block;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Estilos para el accordion en About */

.accordion {
  background-color: var(--color-secundario);
  color: white;
  cursor: pointer;
  padding: 15px 20px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  border-radius: 6px;
  margin-top: 20px;
  transition: background-color 0.3s ease;
}

.accordion:hover,
.accordion.active {
  background-color: var(--color-primario);
}

.panel {
  padding: 0 20px;
  background-color: white;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

.panel p, .panel ul {
  padding: 15px 0;
  color: var(--color-texto);
}

.panel ul {
  list-style-type: disc;
  padding-left: 30px;
}


/* ACORDEONES */
.accordion {
  background-color: var(--color-secundario);
  color: white;
  cursor: pointer;
  padding: 14px 20px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 18px;
  transition: background-color 0.3s;
  margin-top: 10px;
  border-radius: 6px;
}

.accordion:hover {
  background-color: var(--color-primario);
}

.accordion.active {
  background-color: var(--color-primario);
}

.panel {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
  background-color: #f1f1f1;
  border-radius: 0 0 6px 6px;
  margin-bottom: 10px;
}

.accordion::after {
  content: '\f078'; /* FontAwesome flecha hacia abajo */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  float: right;
  transition: transform 0.3s;
}

.accordion.active::after {
  transform: rotate(180deg); /* Flecha hacia arriba cuando está activo */
}
