/* ===== Variables ===== */
:root {
  --navy:      #1B2D6B;
  --navy-dark: #111e4a;
  --gold:      #c9a84c;
  --bg:        #f9f9f9;
  --white:     #ffffff;
  --text:      #2c2c2c;
  --text-light:#555;
  --max-w:     1200px;
  --font-sans: system-ui, -apple-system, sans-serif;
  --font-serif:'Merienda', cursive;
  --header-h:  90px;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--text); background: var(--bg); line-height: 1.7; }
img  { max-width: 100%; display: block; }
a    { text-decoration: none; color: inherit; }
ul   { list-style: none; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ===== HEADER ===== */
#site-header {
  background: var(--white);
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 2rem 0;
}

.site-logo {
  margin-bottom: .75rem;
}

.site-logo img {
  height: 143px;
  width: auto;
}

/* ===== NAVIGATION ===== */
#site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
}

#site-nav a {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .02em;
  color: var(--text);
  padding: .6rem 1.2rem;
  border-bottom: 3px solid transparent;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
}

#site-nav a:hover,
#site-nav a.active {
  color: var(--navy);
  border-bottom-color: var(--navy);
}

/* ===== BANNER SLIDER ===== */
#banner {
  padding-top: 1.5rem;
  background: var(--white);
}

.banner-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 720px;
  overflow: hidden;
  background: #000;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .8s ease-in-out;
}

.slide.active { opacity: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
  background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.45) 100%);
  color: var(--white);
}

.slide-content h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  font-style: italic;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  margin-bottom: .5rem;
}

.slide-content p {
  font-size: clamp(.9rem, 2vw, 1.15rem);
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  max-width: 600px;
}

/* Controles del slider */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,.25);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
  backdrop-filter: blur(4px);
}
.slider-btn:hover { background: rgba(255,255,255,.45); }
.slider-btn.prev { left: 1rem; }
.slider-btn.next { right: 1rem; }

.slider-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: .5rem;
  z-index: 10;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,.5);
  border: none;
  cursor: pointer;
  transition: background .2s;
}
.dot.active { background: var(--white); }

/* ===== INTRO / QUIENES SOMOS ===== */
#intro {
  padding: 4rem 2rem;
  background: var(--white);
}

.intro-inner {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.intro-inner p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text);
  line-height: 1.9;
  margin-bottom: 1.5rem;
}

.intro-inner p:last-child { margin-bottom: 0; }

/* ===== SECCIONES GENERALES ===== */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 3rem 2rem;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-style: italic;
  margin-bottom: .5rem;
}

.page-hero p {
  font-size: 1rem;
  opacity: .85;
  max-width: 600px;
  margin: 0 auto;
}

.page-content {
  padding: 3rem 2rem;
}

.page-content p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1.25rem;
  color: var(--text);
}

/* ===== PÁGINA INTRO ===== */
.page-intro {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 2.5rem;
  max-width: 820px;
}

/* ===== SERVICIOS (imagen + texto) ===== */
.service-item {
  display: flex;
  gap: 1.75rem;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.service-img {
  flex-shrink: 0;
  width: 200px;
}

.service-img img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
}

.service-text p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1rem;
}

.service-text p:last-child { margin-bottom: 0; }

.service-text strong {
  font-weight: 700;
}

@media (max-width: 600px) {
  .service-item {
    flex-direction: column;
  }

  .service-img {
    width: 100%;
  }

  .service-img img {
    height: 200px;
    width: 100%;
  }
}

/* ===== GRID DE CURSOS ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.course-card {
  background: var(--white);
  border: 1px solid #e2e2e2;
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s;
}

.course-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

.course-card img {
  width: 100%;
  height: 130px;
  object-fit: cover;
}

.course-body {
  padding: .75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-body h3 {
  font-family: var(--font-sans);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
  letter-spacing: .04em;
  margin-bottom: .5rem;
}

.course-body p {
  font-family: var(--font-serif);
  font-size: .78rem;
  line-height: 1.6;
  color: var(--text-light);
  flex: 1;
}

.card-link {
  display: inline-block;
  margin-top: .6rem;
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  padding: .25rem .65rem;
  border-radius: 3px;
  transition: background .2s;
}

.card-link:hover { background: var(--navy-dark); }

@media (max-width: 1024px) {
  .course-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 400px) {
  .course-grid { grid-template-columns: 1fr; }
}

/* ===== LISTA DE SERVICIOS ===== */
.service-list {
  list-style: none;
  margin: 0 0 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.service-list li {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
  padding-left: 1.6rem;
  position: relative;
}

.service-list li::before {
  content: '👤';
  position: absolute;
  left: 0;
  font-size: .85rem;
  top: .1rem;
}

/* ===== GRID DE CLIENTES ===== */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem 2.5rem;
  justify-items: center;
  padding: 1rem 0;
}

.client-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
  width: 100%;
  padding: .75rem;
  border: 1px solid #e8eaf0;
  border-radius: 6px;
  background: #fff;
}

.client-logo img {
  max-height: 110px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(15%);
  transition: filter .25s;
}

.client-logo img:hover { filter: grayscale(0%); }

@media (max-width: 600px) {
  .clients-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== CONTÁCTANOS ===== */
.contact-countries {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.contact-country {
  text-align: center;
}

.contact-country img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 260px;
  object-fit: contain;
  margin: 0 auto 1rem;
  border-radius: 4px;
}

.country-label {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: .08em;
  color: var(--text);
}

.contact-emails {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--text);
}

.contact-emails a {
  color: var(--navy);
  font-weight: 700;
  transition: opacity .2s;
}

.contact-emails a:hover { opacity: .75; }

.contact-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-top: 1.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  transition: opacity .2s;
}

.social-link:hover { opacity: .75; }

.social-icon {
  width: 28px;
  height: 28px;
  fill: var(--navy);
  flex-shrink: 0;
}

@media (max-width: 600px) {
  .contact-countries { grid-template-columns: 1fr; }
}

/* ===== SUBPÁGINA DE CURSO ===== */
.course-detail-hero {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.course-detail-hero img {
  width: 200px;
  height: 150px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.course-detail-hero h1 {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text);
}

.course-detail-body p {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1rem;
}

.course-topics,
.course-includes {
  font-family: var(--font-serif);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin: .25rem 0 1.25rem 2rem;
}

.course-topics  { list-style: decimal; }
.course-includes { list-style: disc; }

.back-link {
  display: inline-block;
  margin-top: 2rem;
  font-family: var(--font-sans);
  font-size: .9rem;
  font-weight: 700;
  color: var(--navy);
  border-bottom: 2px solid transparent;
  transition: border-color .2s;
}

.back-link:hover { border-color: var(--navy); }

@media (max-width: 600px) {
  .course-detail-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .course-detail-hero img { width: 100%; height: 200px; }
}

/* ===== FOOTER ===== */
#site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 1.5rem 2rem;
  font-size: .85rem;
}

#site-footer a {
  color: rgba(255,255,255,.85);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #site-nav a {
    font-size: .82rem;
    padding: .5rem .7rem;
  }

  #banner { aspect-ratio: 16/7; }

  .slider-btn { display: none; }
}

@media (max-width: 480px) {
  .site-logo img { height: 98px; }

  #site-nav a {
    font-size: .75rem;
    padding: .4rem .5rem;
    letter-spacing: 0;
  }
}
