:root {
  --bg: #f7f5f2;
  --surface: #ffffff;
  --surface-alt: #f0ece7;
  --line: #d8d2cb;
  --text: #1e1e1e;
  --muted: #57524d;
  --primary: #e47c26;
  --primary-dark: #c96312;
  --dark: #2d2b29;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

.container {
  width: min(1140px, 92%);
  margin-inline: auto;
}

.hero {
  background:
    radial-gradient(circle at 15% 15%, #ffe6cf 0%, transparent 45%),
    linear-gradient(180deg, #fff 0%, #f4eee8 100%);
}

/* --- NAV CORREGIDO (Sin duplicar y con position relative) --- */
.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
  position: relative; 
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-weight: 800;
  color: var(--dark);
  margin-right: auto;
}

.logo-slot {
  width: 55px; /* Agrandamos el ancho (antes era 36px) */
  height: 55px; /* Agrandamos el alto (antes era 36px) */
  border: none; /* Nos aseguramos de que no haya ninguna línea */
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Borramos el border-radius y el overflow: hidden para que no lo encajone */
}

.logo-img-fit {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 2px;
}

.menu {
  display: flex;
  align-items: center;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 500;
}

.menu a:hover {
  color: var(--primary-dark);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--dark);
  padding: 0.38rem 0.65rem;
  border-radius: 10px;
  cursor: pointer;
}

.btn {
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.74rem 1.08rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  transition: transform 0.2s ease, background 0.2s ease;
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--dark);
  border: 1px solid #b5aca3;
}

.btn-outline:hover {
  background: #ece6df;
}

.btn-sm {
  padding: 0.62rem 0.98rem;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3.2rem 0 4.4rem;
}

.hero-logo-card {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.6rem 0.8rem;
  margin-bottom: 1rem;
}

.hero-logo-slot {
  width: 40px;
  height: 40px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #fff;
}

.hero-logo-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #8d5a28;
}

h1, h2, h3 {
  margin-top: 0;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  max-width: 14ch;
  margin-inline: auto;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
}

.hero-slogan {
  margin: 0.1rem 0 0.35rem;
  color: var(--primary-dark);
  font-weight: 700;
}

.hero-content > p {
  color: var(--muted);
  max-width: 63ch;
  margin-inline: auto;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.25rem;
  justify-content: center;
}

.section {
  padding: 3rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  margin-bottom: 1.7rem;
}

.section-head h2 {
  margin-bottom: 0;
  max-width: 24ch;
}

#nosotros .section-head {
  text-align: center;
}

#nosotros .section-head h2 {
  margin-inline: auto;
}

.services-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.services-subnav a {
  text-decoration: none;
  color: var(--dark);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-weight: 600;
  background: var(--surface);
}

.services-subnav a:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* --- GRILLAS DE COLUMNAS ORIGINALES --- */
.services-subpages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.about-grid, .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  text-align: center;
}

.why-choose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

/* --- CARDS CON BORDE NARANJA ORIGINALES --- */
.card, .why-choose-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  border-bottom: 3px solid var(--primary);
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.card:hover, .why-choose-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1) !important;
  cursor: pointer;
}

.card p {
  margin-bottom: 0;
  color: var(--muted);
}

.why-choose-icon {
  font-size: 2.5rem;
  margin-bottom: 0.8rem;
  display: block;
}

.why-choose-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
  color: var(--dark);
}

.why-choose-card p {
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--muted);
}

/* --- OTRAS SECCIONES ORIGINALES --- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
}

.stats article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.1rem;
  text-align: center;
  background: var(--surface);
}

.stats article strong {
  display: block;
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.96rem;
}

.training-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1rem;
}

.training-grid p, .check-list li {
  color: var(--muted);
}

.check-list {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

.training-more {
  margin-top: 0.9rem;
}

.training-more summary {
  cursor: pointer;
  color: var(--primary-dark);
  font-weight: 600;
}

.training-list-full {
  margin-top: 0.7rem;
}

.quote-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  padding: 1.2rem;
  align-self: center;
}

.quote-box p {
  margin-top: 0;
}

.contact-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1.35fr 1fr;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-top: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: left;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
}

.form-group input, 
.form-group select, 
.form-group textarea {
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  background-color: #fcfcfc;
  transition: border-color 0.2s;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.btn-orange {
  background-color: var(--primary) !important;
  color: white !important;
  border: none !important;
}

.btn-orange:hover {
  background-color: var(--primary-dark) !important;
  transform: translateY(-2px);
}

/* IGUALAR ESTÉTICA DE BOTONES DE CONTACTO */
.links-box.btn-outline {
  border: 1px solid #4CAF50 !important;
  color: #333;
  transition: all 0.3s ease;
}

.links-box.btn-outline:hover, 
.links-box.btn-outline:active {
  background-color: #ece6df !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

footer {
  border-top: 1px solid var(--line);
  background: #e9e3dd;
  padding: 1.5rem 0;
  text-align: center;
}

/* --- MEDIA QUERIES --- */
@media (max-width: 930px) {
  .training-grid, .contact-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 830px) {
  .menu-toggle {
    display: inline-flex !important;
    z-index: 1100;
  }

  .menu {
    display: none !important;
    flex-direction: column;
    position: absolute;
    top: 100%; 
    right: 0;
    width: 250px;
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    z-index: 10000;
  }

  .menu.active {
    display: flex !important;
    animation: fadeIn 0.3s ease-in-out;
  }

  .btn-sm {
    display: none;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}