/* =============================================
   COLEGIO SAN CARLOS DIÁLOGOS
   Diseño inspirado en Colegio IDRA
   Paleta: Manual de Marca San Carlos
   Tipografía: Raleway + Ubuntu (Google Fonts)
   ============================================= */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: hidden; max-width: 100%; }

:root {
  /* Paleta oficial Manual de Marca San Carlos */
  --primary:    #00476C;   /* Azul marino principal */
  --primary-dk: #003352;   /* Azul marino oscuro */
  --primary-lt: #B9CCE1;   /* Azul cielo complementario */
  --accent:     #E4051F;   /* Rojo acento */
  --accent-lt:  #ff4d5e;   /* Rojo claro (hover / highlights) */
  --gray:       #B2B2B2;   /* Gris neutro */
  --white:      #ffffff;
  --light:      #f0f5f9;   /* Fondo claro derivado del azul cielo */
  --gray-border: #dde4ea;
  --text:       #1a2e3b;
  --text-lt:    #5a6d7a;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 4px 24px rgba(0,71,108,.10);
  --shadow-lg:  0 8px 40px rgba(0,71,108,.18);
  --transition: .25s ease;
  --header-h:   84px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Ubuntu', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
  overflow-x: hidden;
}

h1,h2,h3,h4,h5,h6 {
  font-family: 'Raleway', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--primary);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { fill: currentColor; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 60px 0; }
.bg-light { background: var(--light); }

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: 'Raleway', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }

.btn--primary {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn--primary:hover { background: #b8040f; border-color: #b8040f; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(228,5,31,.35); }

.btn--outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn--outline:hover { background: var(--primary); color: var(--white); }

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.btn--outline-white:hover { background: rgba(255,255,255,.15); border-color: var(--white); }

.btn--white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}
.btn--white:hover { background: var(--light); transform: translateY(-2px); }

.btn--whatsapp {
  background: #25d366;
  color: var(--white);
  border-color: #25d366;
}
.btn--whatsapp:hover { background: #1da851; }

.btn--sm { padding: 8px 16px; font-size: 13px; }

/* --- TOPBAR --- */
.topbar {
  background: var(--primary-dk);
  color: rgba(255,255,255,.75);
  font-size: 13px;
  font-family: 'Raleway', sans-serif;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar__contact {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.topbar__contact a,
.topbar__contact span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,.75);
  transition: color var(--transition);
}
.topbar__contact a:hover { color: var(--white); }
.topbar__contact svg { width: 14px; height: 14px; flex-shrink: 0; }

.topbar__social {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__social a { color: rgba(255,255,255,.7); transition: color var(--transition); }
.topbar__social a:hover { color: var(--white); }
.topbar__social svg { width: 16px; height: 16px; display: block; }

/* --- HEADER --- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #f4f6f8;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  position: relative;
}
.header__logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.header__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.header__burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* --- NAV --- */
.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav__close { display: none; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.nav__link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}
.nav__link:hover,
.nav__link.active { color: var(--accent); }
.nav__link .chevron { width: 18px; height: 18px; }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  z-index: 100;
}
.has-dropdown:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  font-family: 'Raleway', sans-serif;
  color: var(--text);
  transition: var(--transition);
}
.dropdown li a:hover { background: var(--light); color: var(--accent); padding-left: 26px; }
.dropdown li a.active { color: var(--accent); font-weight: 600; }

.nav__cta { margin-left: 8px; }

/* --- HERO --- */
.hero {
  position: relative;
  height: 72vh;
  min-height: 520px;
  max-height: 760px;
  min-height: 560px;
  max-height: 780px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero__slider { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.hero__slide.active { opacity: 1; }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,51,82,.88) 0%,
    rgba(0,71,108,.60) 60%,
    rgba(0,71,108,.20) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 680px;
  color: var(--white);
}
.hero__eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-lt);
  margin-bottom: 16px;
}
.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.15;
}
.hero__title span { color: var(--accent-lt); }

.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.85);
  margin-bottom: 36px;
  max-width: 540px;
}
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__dots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.6);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.dot.active { background: var(--white); border-color: var(--white); }

/* --- STATS --- */
.stats {
  background: var(--primary);
  padding: 36px 0;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.stat {
  text-align: center;
  color: var(--white);
  padding: 8px;
}
.stat__number {
  display: block;
  font-family: 'Raleway', sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 6px;
}
.stat__label {
  font-size: 15px;
  color: rgba(255,255,255,.8);
  line-height: 1.4;
}

/* --- SECTION HEADERS --- */
.section__header { text-align: center; margin-bottom: 40px; }
.section__eyebrow {
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.section__title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}
.section__desc {
  font-size: 1.05rem;
  color: var(--text-lt);
  max-width: 580px;
  margin: 0 auto;
}

/* --- NOSOTROS --- */
.nosotros__inner { max-width: 740px; margin: 0 auto; text-align: center; }
.arbol-wrapper { margin-top: 40px; }
.arbol-valores-img { width: 100%; max-width: 1000px; height: auto; display: block; margin: 0 auto; }
.nosotros__inner p { color: var(--text-lt); margin-bottom: 14px; line-height: 1.8; }
.nosotros__inner .section__title { margin-bottom: 16px; }

.diferenciadores-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.dif-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 28px 22px;
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow);
  text-align: left;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  transition: transform .25s ease, box-shadow .25s ease;
}
.dif-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.dif-card__icon {
  width: 46px; height: 46px; min-width: 46px;
  background: var(--light);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.dif-card__icon svg { width: 22px; height: 22px; stroke: var(--primary); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.dif-card h4 { font-family: 'Raleway', sans-serif; font-size: .95rem; font-weight: 700; color: var(--primary); margin-bottom: 4px; }
.dif-card p { font-size: 13px; color: var(--text-lt); line-height: 1.6; margin: 0; }
@media(max-width: 860px) { .diferenciadores-grid { grid-template-columns: 1fr 1fr; } }
@media(max-width: 540px) { .diferenciadores-grid { grid-template-columns: 1fr; } }

.check-list { margin: 24px 0 32px; display: flex; flex-direction: column; gap: 10px; }
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: var(--text);
}
.check-list li::before {
  content: '';
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.7 6.3l-8 8-3.4-3.4 1.4-1.4 2 2 6.6-6.6 1.4 1.4z'/%3E%3C/svg%3E");
  background-size: 14px;
  background-repeat: no-repeat;
  background-position: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.nosotros__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3;
}
.nosotros__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.nosotros__image:hover img { transform: scale(1.04); }

/* --- NIVELES --- */
.niveles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
/* GRILLA FOTOS INICIO */
.inicio-grilla {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 10px;
}
.ig-item {
  overflow: hidden;
  border-radius: var(--radius-sm);
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .55s ease, transform .55s ease;
}
.ig-item.visible {
  opacity: 1;
  transform: translateY(0);
}
.ig-item:nth-child(2) { transition-delay: .08s; }
.ig-item:nth-child(3) { transition-delay: .16s; }
.ig-item:nth-child(4) { transition-delay: .24s; }
.ig-item:nth-child(5) { transition-delay: .10s; }
.ig-item:nth-child(6) { transition-delay: .18s; }
.ig-item:nth-child(7) { transition-delay: .26s; }
.ig-item:nth-child(8) { transition-delay: .34s; }
.ig-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.ig-item:hover img { transform: scale(1.05); }
@media(max-width: 860px) {
  .inicio-grilla { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 160px; }
}
@media(max-width: 600px) {
  .inicio-grilla { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
}

/* NOSOTROS + COLLAGE ARBOL */
.arbol-collage {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  height: 520px;
}
/* Árbol central */
.ac-arbol {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  z-index: 2;
  width: 300px;
}
.ac-arbol img { width: 100%; height: auto; display: block; }
/* Fotos */
.ac-foto {
  position: absolute;
  width: 198px;
  height: 148px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
  z-index: 1;
  transition: transform .4s ease, box-shadow .4s ease;
}
.ac-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-foto:hover { transform: scale(1.04) rotate(0deg) !important; box-shadow: 0 16px 40px rgba(0,0,0,.3); z-index: 4; }
/* Fotos izquierda */
.ac-l1 { top: 18px;  left: 22px;  transform: rotate(-4deg); }
.ac-l2 { top: 182px; left: 48px;  transform: rotate(2.5deg); }
.ac-l3 { top: 342px; left: 28px;  transform: rotate(-3deg); }
/* Fotos derecha */
.ac-r1 { top: 18px;  right: 22px; transform: rotate(4deg); }
.ac-r2 { top: 182px; right: 48px; transform: rotate(-2.5deg); }
.ac-r3 { top: 342px; right: 28px; transform: rotate(3deg); }

@media(max-width: 860px) {
  .arbol-collage { height: auto; display: flex; flex-direction: column; align-items: center; gap: 20px; }
  .ac-arbol, .ac-foto { position: static; transform: none !important; width: auto; height: auto; box-shadow: none; }
  .ac-arbol { order: -1; width: 260px; }
  .ac-arbol img { width: 100%; }
  .arbol-collage { display: grid; grid-template-columns: 1fr 1fr 1fr; grid-template-rows: auto auto auto; gap: 10px; }
  .ac-arbol { grid-column: 2; grid-row: 1 / 4; align-self: center; }
  .ac-l1 { grid-column: 1; grid-row: 1; }
  .ac-l2 { grid-column: 1; grid-row: 2; }
  .ac-l3 { grid-column: 1; grid-row: 3; }
  .ac-r1 { grid-column: 3; grid-row: 1; }
  .ac-r2 { grid-column: 3; grid-row: 2; }
  .ac-r3 { grid-column: 3; grid-row: 3; }
  .ac-foto { height: 110px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
  .ac-foto img { width: 100%; height: 100%; object-fit: cover; }
}
@media(max-width: 540px) {
  .arbol-collage { grid-template-columns: 1fr 120px 1fr; gap: 8px; }
  .ac-foto { height: 88px; }
  .ac-arbol { width: 100%; }
}

/* GALERÍA */
.galeria__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 10px;
}
.galeria__item { overflow: hidden; border-radius: var(--radius-sm); background: var(--light); }
.galeria__item--tall { grid-row: span 2; }
.galeria__item--wide { grid-column: span 2; }
.galeria__item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.galeria__item:hover img { transform: scale(1.06); }
@media(max-width:900px) {
  .galeria__grid { grid-template-columns: repeat(2,1fr); grid-auto-rows:180px; }
  .galeria__item--tall { grid-row: span 1; }
  .galeria__item--wide { grid-column: span 2; }
}
@media(max-width:520px) {
  .galeria__grid { grid-template-columns: 1fr 1fr; grid-auto-rows:140px; }
  .galeria__item--wide { grid-column: span 2; }
}

.nivel-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 2px solid transparent;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.nivel-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: var(--primary); }
.nivel-card--accent:hover { border-color: var(--accent); }

.nivel-card__img {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}
.nivel-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
  display: block;
}
.nivel-card:hover .nivel-card__img img { transform: scale(1.05); }

.nivel-card__body { padding: 28px 28px 32px; flex: 1; display: flex; flex-direction: column; }
.nivel-card__tag {
  display: inline-block;
  background: var(--light);
  color: var(--primary);
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.nivel-card--accent .nivel-card__tag { background: #fde8ea; color: var(--accent); }

.nivel-card__body h3 {
  font-size: 1.4rem;
  margin-bottom: 14px;
}
.nivel-card__body p {
  color: var(--text-lt);
  font-size: 15px;
  margin-bottom: 18px;
}
.nivel-card__body ul {
  list-style: none;
  margin-bottom: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nivel-card__body ul li {
  font-size: 14px;
  color: var(--text-lt);
  padding-left: 18px;
  position: relative;
}
.nivel-card__body ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* --- PROYECTOS --- */
.proyectos__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.proyecto-card {
  background: var(--white);
  border-radius: 20px;
  padding: 36px 24px 30px;
  text-align: center;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .04);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.proyecto-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 14px 40px rgba(0, 71, 108, .10);
}

/* Ícono */
.proyecto-card__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- CSS Sprite íconos proyectos --- */
.icono-sprite {
  display: block;
  width: 80px;
  height: 80px;
  background-image: url('img/iconos/ChatGPT Image 25 may 2026, 17_31_01.png');
  background-size: 400% 200%;
  background-repeat: no-repeat;
}
/* Fila 1 */
.icono-sprite--1 { background-position: 0%      0%; }
.icono-sprite--2 { background-position: 33.33%  0%; }
.icono-sprite--3 { background-position: 66.67%  0%; }
.icono-sprite--4 { background-position: 100%    0%; }
/* Fila 2 */
.icono-sprite--5 { background-position: 0%      100%; }
.icono-sprite--6 { background-position: 33.33%  100%; }
.icono-sprite--7 { background-position: 66.67%  100%; }
.icono-sprite--8 { background-position: 100%    100%; }

/* Título con línea roja institucional en hover */
.proyecto-card h4 {
  font-family: 'Raleway', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0;
  padding-bottom: 14px;
  position: relative;
}

.proyecto-card h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2.5px;
  background: var(--accent);
  border-radius: 2px;
  transition: width .35s ease;
}

.proyecto-card:hover h4::after {
  width: 44px;
}

.proyecto-card p {
  font-size: 13.5px;
  color: var(--text-lt);
  line-height: 1.65;
  margin-top: 14px;
}

/* --- TALLERES CAROUSEL --- */
.niveles .section__eyebrow { color: rgba(255,255,255,.65); }
.niveles .section__title { color: #fff; }
.niveles .section__desc { color: rgba(255,255,255,.82); }
#experiencias .section__eyebrow { color: #fff; }
#experiencias .section__title { color: var(--accent); }
#experiencias .section__desc { color: #fff; }
.talleres .section__eyebrow { color: rgba(255,255,255,.65); }
.talleres .section__title { color: #fff; }
.talleres .section__desc { color: rgba(255,255,255,.82); }
.talleres .link-arrow { color: rgba(255,255,255,.85); }
.talleres-wrapper {
  position: relative;
}
.talleres-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,.92);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  color: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, box-shadow .2s, transform .2s;
}
.talleres-btn svg { width: 20px; height: 20px; }
.talleres-btn:hover { background: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.2); transform: translateY(-50%) scale(1.08); }
.talleres-btn--prev { left: 12px; }
.talleres-btn--next { right: 12px; }
.talleres-carousel {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}
.talleres-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: talleresScroll 40s linear infinite;
}
.talleres-track:hover { animation-play-state: paused; }
@keyframes talleresScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.taller-slide {
  width: 256px;
  flex-shrink: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-border);
  transition: transform .3s ease, box-shadow .3s ease;
}
.taller-slide:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.taller-slide__img {
  width: 100%; aspect-ratio: 4/3; overflow: hidden;
}
.taller-slide__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s ease;
}
.taller-slide:hover .taller-slide__img img { transform: scale(1.05); }
.taller-slide__info { padding: 14px 16px 18px; }
.taller-slide__info h4 { font-size: .95rem; color: var(--primary); margin-bottom: 6px; font-family: 'Raleway', sans-serif; font-weight: 700; }
.taller-slide__badge {
  font-family: 'Raleway', sans-serif; font-size: 10px; font-weight: 700;
  letter-spacing: .8px; text-transform: uppercase; color: var(--accent);
}

/* legacy talleres grid (used in talleres.html) */
.talleres__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.taller-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}
.taller-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.taller-card__img {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.taller-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.taller-card:hover .taller-card__img img { transform: scale(1.06); }

.taller-card__body { padding: 24px; }
.taller-card__body h3 { font-size: 1.2rem; margin-bottom: 10px; }
.taller-card__body p { font-size: 14px; color: var(--text-lt); margin-bottom: 16px; }
.taller-card__badge {
  display: inline-block;
  background: #fde8ea;
  color: var(--accent);
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}

/* --- NOVEDADES --- */
.novedades__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.novedad-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #E5E7EB;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.novedad-card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,71,108,.10); }

.novedad-card__img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  display: block;
}
.novedad-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.novedad-card:hover .novedad-card__img img { transform: scale(1.06); }

.novedad-card__cat {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--accent);
  color: var(--white);
  font-family: 'Raleway', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
}
.novedad-card__body { padding: 22px; }
.novedad-card__body time {
  font-family: 'Raleway', sans-serif;
  font-size: 12px;
  color: var(--text-lt);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.novedad-card__body h4 { font-size: 1.05rem; margin: 8px 0 10px; color: var(--primary); }
.novedad-card__body p { font-size: 14px; color: var(--text-lt); margin-bottom: 16px; }

.link-arrow {
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: var(--transition);
}
.link-arrow:hover { color: var(--primary); letter-spacing: .5px; }

/* --- CTA BAND --- */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  padding: 64px 0;
}
.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.cta-band__inner h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  margin-bottom: 8px;
}
.cta-band__inner p { color: rgba(255,255,255,.8); }
.cta-band__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* --- CONTACTO --- */
.contacto__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}
.contacto__info { display: flex; flex-direction: column; gap: 28px; }

.info-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.info-item__icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  background: var(--primary);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.info-item__icon svg { width: 20px; height: 20px; }

.info-item h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.info-item p { font-size: 15px; color: var(--text-lt); line-height: 1.6; }
.info-item a { color: var(--text-lt); transition: color var(--transition); }
.info-item a:hover { color: var(--accent); }

.contacto__social {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: var(--white);
  font-family: 'Raleway', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
}
.social-btn svg { width: 16px; height: 16px; }
.social-btn:hover { background: var(--primary-dk); transform: translateY(-2px); }
.social-btn--wa { background: #25d366; }
.social-btn--wa:hover { background: #1da851; }

.contacto__map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.contacto__map iframe { display: block; }

/* --- FOOTER --- */
.footer {
  background: var(--primary-dk);
  color: rgba(255,255,255,.75);
  padding-top: 64px;
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__logo {
  height: 200px;
  width: auto;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
}
.footer__brand p { font-size: 14px; line-height: 1.7; margin-bottom: 20px; }

.footer__social {
  display: flex;
  gap: 12px;
}
.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  transition: var(--transition);
}
.footer__social a:hover { background: var(--accent); color: var(--white); }
.footer__social svg { width: 16px; height: 16px; }

.footer__col h5 {
  color: var(--white);
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.footer__col ul li, .footer__col ul li a {
  font-size: 14px;
  color: rgba(255,255,255,.65);
  transition: color var(--transition);
}
.footer__col ul li a:hover { color: var(--accent-lt); }

.footer__bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.4);
}

/* --- WA FLOAT --- */
.wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 58px;
  height: 58px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 20px rgba(37,211,102,.45);
  z-index: 999;
  transition: var(--transition);
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:hover { background: #1da851; transform: scale(1.1); }

/* --- SCROLL ANIMATION --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

.slide-left {
  opacity: 0;
  transform: translateX(-52px);
  transition: opacity .7s ease, transform .7s ease;
}
.slide-left.visible { opacity: 1; transform: translateX(0); }

.slide-right {
  opacity: 0;
  transform: translateX(52px);
  transition: opacity .7s ease, transform .7s ease;
}
.slide-right.visible { opacity: 1; transform: translateX(0); }

.slide-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .65s ease, transform .65s ease;
}
.slide-up.visible { opacity: 1; transform: translateY(0); }

/* Delay helpers */
.anim-delay-1 { transition-delay: .1s; }
.anim-delay-2 { transition-delay: .2s; }
.anim-delay-3 { transition-delay: .3s; }
.anim-delay-4 { transition-delay: .4s; }
.anim-delay-5 { transition-delay: .5s; }

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 1024px) {
  .proyectos__grid { grid-template-columns: repeat(3, 1fr); }
  .novedades__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .niveles__grid { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .contacto__inner { grid-template-columns: 1fr; }
  .talleres__grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .novedades__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  .arbol-wrapper { width:100vw; margin-left:calc(-50vw + 50%); overflow:hidden; }
  .arbol-valores-img { width:100%; max-width:480px; margin-left:auto; margin-right:auto; }

  .topbar__contact span { display: none; }

  /* Mobile Nav */
  .header__burger { display: flex; }

  .nav {
    position: fixed;
    inset: 0;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    background: var(--white);
    padding: 80px 32px 40px;
    transform: translateX(100%);
    transition: transform .35s ease;
    z-index: 999;
    overflow-y: auto;
    gap: 0;
  }
  .nav.open { transform: translateX(0); }

  .nav__close {
    display: block;
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text);
  }

  .nav__list { flex-direction: column; align-items: flex-start; gap: 0; width: 100%; position: static; transform: none; }
  .nav__link { font-size: 16px; padding: 14px 0; border-bottom: 1px solid var(--gray); width: 100%; }

  .has-dropdown .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding-left: 16px;
    display: none;
  }
  .has-dropdown.open .dropdown { display: block; }

  .nav__cta { margin: 24px 0 0; }

  .section { padding: 48px 0; }
  .proyectos__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .cta-band__inner { flex-direction: column; text-align: center; }
  .cta-band__actions { justify-content: center; }

  .hero { max-height: 640px; }
  .hero__title { font-size: 2rem; }
}

@media (max-width: 540px) {
  .topbar { display: none; }
  .proyectos__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* ── FLIP CARDS — Experiencias ── */
.flip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.flip-grid__last-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 18px;
  justify-content: center;
}
.flip-grid__last-row .flip-card {
  flex: 0 0 calc((100% - 54px) / 4);
}
.flip-card {
  height: 210px;
  perspective: 1000px;
  cursor: pointer;
}
.flip-card__inner {
  position: relative; width: 100%; height: 100%;
  transition: transform .55s cubic-bezier(.4,0,.2,1);
  transform-style: preserve-3d;
}
.flip-card:hover .flip-card__inner,
.flip-card.flipped .flip-card__inner { transform: rotateY(180deg); }
.flip-card__front,
.flip-card__back {
  position: absolute; inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 20px 18px;
  text-align: center;
}
.flip-card__front {
  background: var(--primary);
  box-shadow: var(--shadow);
}
.flip-card__front .fc-icon {
  width: 40px; height: 40px; margin-bottom: 12px;
  stroke: rgba(255,255,255,.9); fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
  flex-shrink: 0;
}
.flip-card__front h3 {
  font-family: 'Raleway', sans-serif;
  font-size: .9rem; font-weight: 700;
  color: #fff; line-height: 1.3;
}
#experiencias .flip-card__front {
  background: #B9CCE1;
}
#experiencias .flip-card__front .fc-icon { stroke: var(--primary-dk); }
#experiencias .flip-card__front h3 {
  font-size: 1.05rem; color: var(--primary-dk);
}
#experiencias .flip-card__back {
  background: var(--primary-dk);
  border-color: var(--primary);
}
#experiencias .flip-card__back p { color: #fff; font-size: 14px; }
.flip-card__back {
  transform: rotateY(180deg);
  background: var(--white);
  border: 2px solid var(--light);
  box-shadow: var(--shadow-lg);
  transform: rotateY(180deg);
}
.flip-card__back p {
  font-size: 13px; color: var(--text-lt); line-height: 1.65;
  margin: 0;
}
@media (max-width: 900px) { .flip-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .flip-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .flip-card { height: auto; perspective: none; cursor: default; }
  .flip-card__inner { height: auto; transform-style: flat; transition: none; display: flex; flex-direction: column; }
  .flip-card:hover .flip-card__inner, .flip-card.flipped .flip-card__inner { transform: none; }
  .flip-card__front, .flip-card__back {
    position: static; transform: none !important;
    backface-visibility: visible; -webkit-backface-visibility: visible;
    padding: 14px 10px;
  }
  .flip-card__back { display: flex; border-radius: 0 0 var(--radius) var(--radius); }
  .flip-card__front { border-radius: var(--radius) var(--radius) 0 0; padding-bottom: 8px; }
}
