/* ===================================================
   COLEGIO TONATIUH — PAGES CSS v2 (light theme)
   =================================================== */

/* ── Nosotros ─────────────────────────────────────── */
.mv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.mv-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  overflow: hidden;
}

.mv-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.mv-card.mission::before { background: var(--blue); }
.mv-card.vision::before  { background: var(--gold); }

.mv-icon-box {
  width: 50px; height: 50px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}

.mv-icon-box.blue { background: var(--blue-light); }
.mv-icon-box.gold { background: var(--gold-bg); }

.mv-icon-box svg { width: 24px; height: 24px; }
.mv-icon-box.blue svg { color: var(--blue); }
.mv-icon-box.gold svg { color: var(--gold); }

.mv-card h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.mv-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* Values */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.value-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  transition: var(--transition);
}

.value-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(0,11,174,0.2);
}

.value-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
}

.value-icon-wrap svg { width: 24px; height: 24px; color: var(--blue); }

.value-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.value-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Staff */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.staff-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  transition: var(--transition);
}

.staff-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.staff-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  border: 3px solid var(--gray-100);
  overflow: hidden;
}

.staff-avatar svg { width: 32px; height: 32px; color: var(--blue); }

.staff-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.staff-card p  { font-size: 0.78rem; color: var(--text-muted); }

/* ── Niveles ──────────────────────────────────────── */
.nivel-tabs-bar {
  background: var(--white);
  border-bottom: var(--border);
  position: sticky;
  top: 68px;
  z-index: 50;
}

.nivel-tabs {
  display: flex;
  gap: 0;
}

.nivel-tab {
  padding: 16px 24px;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  background: none;
}

.nivel-tab:hover { color: var(--blue); }
.nivel-tab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

/* Nivel section card */
.nivel-overview {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
  margin-bottom: 40px;
}

.nivel-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.nivel-badge-pill.blue { background: var(--blue-light); color: var(--blue); }
.nivel-badge-pill.gold { background: var(--gold-bg); color: var(--gold); }

.nivel-overview img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: var(--border);
}

.nivel-sidebar-card {
  background: var(--off-white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.nivel-sidebar-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--black);
  padding-bottom: 10px;
  border-bottom: var(--border);
}

.nivel-info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: var(--border);
  font-size: 0.85rem;
}

.nivel-info-row:last-child { border-bottom: none; }

.nivel-info-icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nivel-info-icon svg { width: 16px; height: 16px; color: var(--blue); }

.nivel-info-row strong { display: block; font-weight: 700; color: var(--text-body); font-size: 0.8rem; }
.nivel-info-row span  { font-size: 0.77rem; color: var(--text-muted); }

/* Features checklist */
.features-check-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-md);
}

.fcheck-icon {
  width: 20px; height: 20px;
  min-width: 20px;
  border-radius: 50%;
  background: #dcfce7;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

.fcheck-icon svg { width: 10px; height: 10px; color: #16a34a; stroke-width: 3; }

.feature-check-item strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 2px;
}

.feature-check-item span {
  font-size: 0.77rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── Galería ──────────────────────────────────────── */
/* ── Galería Innovadora ──────────────────────────── */

.gallery-filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.gfilter-btn {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-full);
  padding: 7px 18px;
  cursor: pointer;
  transition: var(--transition);
}

.gfilter-btn:hover, .gfilter-btn.active {
  color: var(--blue);
  background: var(--blue-light);
  border-color: rgba(0,11,174,0.2);
}

/* Infinite Ribbon Header */
.gallery-ribbon-wrap {
  width: 100%;
  overflow: hidden;
  background: var(--off-white);
  padding: 40px 0;
  border-bottom: var(--border);
  position: relative;
}

.gallery-ribbon {
  display: flex;
  width: 100%;
}

.ribbon-track {
  display: flex;
  gap: 20px;
  animation: ribbonLoop 40s linear infinite;
  will-change: transform;
}

.ribbon-track:hover {
  animation-play-state: paused;
}

.ribbon-track img {
  height: 280px;
  width: auto;
  border-radius: var(--radius-lg);
  object-fit: cover;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s ease, filter 0.4s ease;
  cursor: pointer;
  filter: grayscale(20%);
}

.ribbon-track img:hover {
  transform: scale(1.05) rotate(2deg);
  filter: grayscale(0%);
  z-index: 10;
}

@keyframes ribbonLoop {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* 3D Perspective Wall */
.gallery-perspective-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  perspective: 1000px;
  padding: 20px 0;
}

.gallery-item-3d {
  position: relative;
  height: 380px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.6s ease;
  cursor: pointer;
}

.gallery-item-3d img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s ease;
}

.item-3d-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 30px 24px;
  background: linear-gradient(to top, rgba(0,11,174,0.9), transparent);
  color: white;
  transform: translateZ(20px);
  opacity: 0;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.gallery-item-3d:hover {
  transform: rotateX(5deg) rotateY(-5deg) translateZ(10px);
  box-shadow: 20px 20px 60px rgba(0,0,0,0.2), -10px -10px 40px rgba(255,255,255,0.1);
}

.gallery-item-3d:hover .item-3d-info {
  opacity: 1;
  transform: translateZ(50px);
}

.item-3d-info h4 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  font-weight: 700;
  color: white;
}

.item-3d-info span {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  color: white;
}

/* Lightbox Enhancements */
.lightbox {
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(11, 11, 24, 0.96);
  backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.lightbox.open { opacity: 1; pointer-events: all; }

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: var(--radius-lg);
  object-fit: contain;
  transform: scale(0.94);
  transition: transform 0.3s ease;
}

.lightbox.open img { transform: scale(1); }

.lb-close {
  position: absolute; top: 20px; right: 20px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lb-close:hover { background: rgba(255,255,255,0.22); }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  color: white; font-size: 1.2rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}

.lb-nav:hover { background: rgba(255,255,255,0.2); }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

/* ── Eventos ──────────────────────────────────────── */
.events-main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  align-items: start;
}

.event-card-full {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 76px 1fr;
  overflow: hidden;
  transition: var(--transition);
}

.event-card-full:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
}

.ecf-date {
  background: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 8px;
  flex-shrink: 0;
}

.ecf-day {
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  font-weight: 700;
  color: white;
  line-height: 1;
}

.ecf-month {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

.ecf-body {
  padding: 20px 22px;
}

.ecf-body h3 { font-size: 1rem; margin-bottom: 6px; }

.ecf-body p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.ecf-meta {
  display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap;
}

.ecf-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  color: var(--text-light);
}

.ecf-meta-item svg { width: 13px; height: 13px; flex-shrink: 0; }

/* Calendar widget */
.cal-widget {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: sticky;
  top: 100px;
}

.cal-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.cal-widget-head h4 { font-size: 0.9rem; font-weight: 700; }

.cal-nav {
  width: 28px; height: 28px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  border: var(--border);
  color: var(--gray-600);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: var(--transition);
}

.cal-nav:hover { background: var(--blue-light); color: var(--blue); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-dh {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  text-align: center;
  padding: 4px 0 8px;
}

.cal-d {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.77rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: default;
  position: relative;
  transition: var(--transition);
}

.cal-d:hover { background: var(--gray-50); }
.cal-d.today { background: var(--blue); color: white; font-weight: 700; }

.cal-d.has-event::after {
  content: '';
  position: absolute;
  bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.cal-d.today.has-event::after { background: white; }
.cal-d.other-month { opacity: 0.3; }

/* ── Contacto ────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 36px;
  align-items: start;
}

.contact-form-box {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
}

.contact-form-box h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.contact-form-box > p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}

.form-ctrl {
  width: 100%;
  background: var(--off-white);
  border: var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 0.875rem;
  color: var(--text-body);
  font-family: 'Source Sans 3', sans-serif;
  transition: var(--transition);
  outline: none;
  resize: none;
}

.form-ctrl::placeholder { color: var(--text-light); }

.form-ctrl:focus {
  border-color: var(--blue);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(0,11,174,0.08);
}

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.form-submit {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  align-items: center;
}

.form-submit .btn { flex: 1; justify-content: center; padding: 13px; }

.form-disclaimer {
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 12px;
  line-height: 1.5;
}

/* Contact sidebar cards */
.contact-sidebar { display: flex; flex-direction: column; gap: 16px; }

.cinfo-card {
  background: var(--white);
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.cinfo-card h4 {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: var(--border);
  color: var(--black);
}

.cinfo-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.cinfo-item:last-child { margin-bottom: 0; }

.cinfo-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.cinfo-icon svg { width: 16px; height: 16px; color: var(--blue); }

.cinfo-item strong {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-body);
  margin-bottom: 2px;
}

.cinfo-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.cinfo-item a { color: var(--text-muted); transition: var(--transition); }
.cinfo-item a:hover { color: var(--blue); }

.wa-card {
  background: #075e54;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  color: white;
}

.wa-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: white; }
.wa-card p { font-size: 0.82rem; opacity: 0.8; margin-bottom: 16px; }

.btn-wa {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.875rem;
  color: #075e54;
  background: white;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  transition: var(--transition);
}

.btn-wa:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.map-frame {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  border: var(--border);
  display: block;
  overflow: hidden;
}

.map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(15%);
}

/* ── Responsive Pages ────────────────────────────── */
@media (max-width: 1024px) {
  .events-main-layout { grid-template-columns: 1fr; }
  .cal-widget { position: static; }
  .contact-layout { grid-template-columns: 1fr; }
  .nivel-overview { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .mv-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr 1fr; }
  .features-check-grid { grid-template-columns: 1fr; }
  .gallery-perspective-wall { grid-template-columns: 1fr 1fr; }
  .gallery-item-3d { height: 300px; }
  .ribbon-track img { height: 180px; }
}

@media (max-width: 480px) {
  .values-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: 1fr; }
  .gallery-perspective-wall { grid-template-columns: 1fr; }
  .gallery-item-3d { height: 260px; }
}
