/* =========================
   VARIABLES GENERALES
========================= */
:root {
  --primary: #0b3a6f;
  --primary-dark: #07284d;
  --secondary: #d9a441;
  --secondary-dark: #b7842f;
  --accent: #eef4fb;
  --text: #1f2937;
  --text-soft: #5b6472;
  --white: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 6px 20px rgba(0, 0, 0, 0.06);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --transition: 0.3s ease;
  --max-width: 1200px;
}

/* =========================
   RESET BÁSICO
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f8fafc;
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* =========================
   UTILIDADES
========================= */
.container {
  width: min(92%, var(--max-width));
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 48px;
}

.section-header h2 {
  display: inline-block;

  font-size: clamp(1.2rem, 2vw, 1.7rem);
  line-height: 1.15;

  margin-bottom: 0px;

  padding: 12px 24px;

  background: #e8f0fb;
  color: var(--primary);

  border-radius: 999px;

  font-weight: 700;
  letter-spacing: 0.3px;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-soft);
}

/* =========================
   BOTONES
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn-primary {
  background: var(--secondary);
  color: #1d1d1d;
}

.btn-primary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-2px);
}

/* =========================
   HEADER
========================= */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(11, 58, 111, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.header-container {
  width: 92%;
  max-width: none;
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 4px;
}

.school-info h1 {
  font-size: 1.1rem;
  color: var(--white);
  line-height: 1.2;
}

.school-info p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.92rem;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--white);
  font-weight: 600;
  position: relative;
  transition: var(--transition);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: var(--transition);
}

.nav a:hover::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
}

/* =========================
   HERO / CARRUSEL
========================= */
.hero {
  position: relative;
}

.carousel {
  position: relative;
  overflow: hidden;
  min-height: 88vh;
  background: #111827;
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 88vh;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.slide.active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

.slide-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slide-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(7, 24, 45, 0.8), rgba(7, 24, 45, 0.32)),
    linear-gradient(to top, rgba(0, 0, 0, 0.45), transparent);
}

.slide-content {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 760px;
  color: var(--white);
}

.slide-tag {
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 18px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  font-weight: 700;
}

.slide-content h2 {
  font-size: clamp(2.2rem, 5vw, 4.3rem);
  line-height: 1.08;
  margin-bottom: 18px;
}

.slide-content p {
  font-size: 1.08rem;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 28px;
}

.slide-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: var(--white);
  font-size: 1.3rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.28);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.carousel-indicators {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  width: 34px;
  border-radius: 999px;
  background: var(--secondary);
}

/* =========================
   ACCESOS RÁPIDOS
========================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.access-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(229, 231, 235, 0.8);
  transition: var(--transition);
  text-align: center;
}

.access-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.card-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  background: #edf4ff;
  border-radius: 16px;
  margin: 0 auto 18px;
}

.access-card h3 {
  color: var(--primary-dark);
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.access-card p {
  color: var(--text-soft);
  font-size: 0.97rem;
}

/* =========================
   NOTICIAS
========================= */
.news {
  background: linear-gradient(to bottom, #ffffff, #f6f9fc);
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.news-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.news-content {
  padding: 22px;
}

.news-date {
  display: inline-block;
  font-size: 0.88rem;
  color: var(--secondary-dark);
  font-weight: 700;
  margin-bottom: 10px;
}

.news-content h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  margin-bottom: 0px;
  color: var(--primary-dark);
}

.news-levels {
  margin-bottom: 5px;
  margin-top: 0px;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 600;
}

.news-content p {
  color: var(--text-soft);
  margin-bottom: 14px;
}

.text-link {
  color: var(--primary);
  font-weight: 700;
}

.text-link:hover {
  color: var(--secondary-dark);
}

/* =========================
   OFERTA EDUCATIVA
========================= */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.info-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  text-align: center;
}

.info-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow);
}

.info-card h3 {
  color: var(--primary-dark);
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.info-card p {
  color: var(--text-soft);
}

/* =========================
   TALLERES
========================= */
.workshops {
  background: #f3f7fb;
}

.workshops-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.workshop-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: 30px 24px;
  box-shadow: var(--shadow-soft);
  text-align: center;
  transition: var(--transition);
}

.workshop-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow);
}

.workshop-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-size: 2rem;
  border-radius: 20px;
  background: #eef4fb;
}

.workshop-card h3 {
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.workshop-card p {
  color: var(--text-soft);
}

/* =========================
   CTA
========================= */
.cta {
  padding-top: 40px;
}

.cta-container {
  background: linear-gradient(135deg, var(--primary), #174d8d);
  border-radius: 30px;
  padding: 48px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  box-shadow: var(--shadow);
}

.cta-text h2 {
  color: var(--white);
  font-size: clamp(1.9rem, 3vw, 3rem);
  margin-bottom: 12px;
}

.cta-text p {
  color: rgba(255, 255, 255, 0.86);
  max-width: 680px;
}

.cta .section-tag {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.cta-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

/* =========================
   FOOTER
========================= */
.footer {
  margin-top: 80px;
  background: #081f3b;
  color: var(--white);
}

.footer-container {
  padding: 60px 0 36px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
}

.footer-contact {
  text-align: right;
}

.footer-contact p {
  margin-bottom: 8px;
}

.footer-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  background: var(--white);
  padding: 4px;
  margin-bottom: 14px;
}

.footer h3,
.footer h4 {
  margin-bottom: 14px;
}

.footer p,
.footer li,
.footer a {
  color: rgba(255, 255, 255, 0.8);
}

.footer-links ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a:hover {
  color: var(--secondary);
}

.footer-contact p {
  margin-bottom: 8px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  padding: 18px 12px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1100px) {

  .cards-grid,
  .offer-grid,
  .workshops-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 860px) {
  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 84px;
    right: 4%;
    width: min(320px, 92vw);
    background: var(--white);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 18px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .nav.show {
    display: flex;
  }

  .nav a {
    color: var(--primary-dark);
    width: 100%;
    padding: 8px 4px;
  }

  .nav a::after {
    display: none;
  }

  .carousel,
  .carousel-track {
    min-height: 78vh;
    height: 78vh;
  }

  .slide-content {
    justify-content: center;
    padding-top: 70px;
    padding-bottom: 80px;
  }

  .slide-content h2 {
    font-size: clamp(1.9rem, 6vw, 3rem);
  }

  .slide-content p {
    font-size: 1rem;
  }

  .cta-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-contact {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 62px 0;
  }

  .header-container {
    min-height: 76px;
  }

  .logo {
    width: 50px;
    height: 50px;
  }

  .school-info h1 {
    font-size: 0.98rem;
  }

  .school-info p {
    font-size: 0.84rem;
  }

  .carousel,
  .carousel-track {
    min-height: 72vh;
    height: 72vh;
  }

  .carousel-btn {
    width: 42px;
    height: 42px;
    font-size: 1rem;
  }

  .carousel-btn.prev {
    left: 10px;
  }

  .carousel-btn.next {
    right: 10px;
  }

  .slide-content h2 {
    margin-bottom: 14px;
  }

  .slide-content p {
    margin-bottom: 20px;
  }

  .slide-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .cards-grid,
  .news-grid,
  .offer-grid,
  .workshops-grid {
    grid-template-columns: 1fr;
  }

  .news-card.featured img,
  .news-card img {
    height: 220px;
    min-height: 220px;
  }

  .cta-container {
    padding: 34px 22px;
    border-radius: 24px;
  }

  .section-header {
    margin-bottom: 34px;
  }
}