@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600;700&family=Montserrat:wght@500;700&display=swap');

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body { 
  font-family: 'Source Sans Pro', sans-serif; 
  background: #fdfdfd; 
  color: #333; 
  line-height: 1.6; 
  scroll-behavior: smooth; /* Suaviza el desplazamiento */
}

/* =================== HEADER FIJO =================== */
.header-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #600d18;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.header-top {
  background: #4a0a13;
  color: white;
  text-align: center;
  padding: 12px;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 2px;
}

.main-nav {
  background: #b8911f;
  padding: 0 20px;
}

/* Menú principal */
.nav-list {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
}

.nav-list > li > a {
  color: white;
  text-decoration: none;
  padding: 18px 22px;
  display: block;
  font-weight: 600;
  transition: all 0.3s;
}

.nav-list > li:hover > a,
.nav-list > li > a:active {
  background:#600d18 ;
  color: #b8911f;
}

.nav-list .has-submenu > a i {
  margin-left: 8px;
  font-size: 0.9em;
  transition: transform 0.3s;
}

.nav-list .has-submenu:hover > a i {
  transform: rotate(180deg);
}

/* Submenús - Desktop */
@media (min-width: 993px) {
  .has-submenu {
    position: relative;
  }
  .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #600d18;
    min-width: 220px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.4s ease;
    border-radius: 0 0 8px 8px;
    z-index: 999;
  }
  .has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

/* Submenús - Mobile */
.submenu {
  background: #4a0a13;
}

.submenu li a {
  color: white;
  padding: 14px 20px;
  display: block;
  transition: all 0.3s;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.submenu li a:hover,
.submenu li a:active {
  background: #b8911f;
  color: #600d18;
  padding-left: 28px;
}

/* Botón menú móvil */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.8rem;
  padding: 15px;
  cursor: pointer;
  width: 100%;
  text-align: right;
}

/* Responsive móvil */
@media (max-width: 992px) {
  .menu-toggle {
    display: block;
  }
  
  .nav-list {
    display: none;
    flex-direction: column;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    background: #600d18;
  }
  
  .nav-list.show {
    display: flex;
  }
  
  .nav-list > li > a {
    padding: 16px 20px;
    border-bottom: 1px solid #7a1120;
  }
  
  .has-submenu .submenu {
    position: static;
    display: none;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  
  .has-submenu.open .submenu {
    display: block;
  }
  
  .has-submenu > a i {
    float: right;
    margin-top: 6px;
  }
}

/* Este es el truco clave: padding + margin negativo + JS = perfecto */
.anchor-section {
  padding-top: 180px !important;   /* Más espacio arriba */
  margin-top: -160px !important;   /* Compensa el header fijo */
  scroll-margin-top: 160px;        /* Para navegadores modernos */
}

/* =================== BANNER BLANCO CREMA =================== */
.hero-banner {
  background: #fffff8;
  padding: 10px 20px 80px;
  text-align: center;
  margin-top: 120px;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-content h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 2.6rem;
  color: #600d18;
  margin-bottom: 10px;
}

.titulo-largo {
  font-size: 2.2rem;
  font-weight: 700;
  color: #333;
  margin: 15px 0;
  line-height: 1.3;
}

.slogan {
  font-size: 1.6rem;
  font-weight: 600;
  color: #b8911f;
}

.hero-sep-logo{
  height: 80px;
  margin-top: 60px;
  margin-bottom: 30px;
}

.hero-cbtis-logo {
  height: 130px;
  margin-top: 60px;
  }

/* =================== CARRUSEL PRINCIPAL =================== */
.slider {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  cursor: pointer;
}

.slider:hover .slide-overlay,
.slide-overlay.active {
  opacity: 1;
}

.overlay-text {
  text-align: center;
  color: white;
  padding: 30px;
}

.overlay-text .phrase {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s;
}

.overlay-text .phrase.active {
  opacity: 1;
  transform: translateY(0);
}

.overlay-text .footer-text {
  font-size: 1.3rem;
  color: #b8911f;
  margin-top: 30px;
}

/* =================== CARRUSEL HORIZONTAL ESPECIALIDADES =================== */
.slider-wrapper-h {
  overflow: hidden;
  max-width: 1200px;
  margin: 60px auto 20px;
  background: #f8f8f8;
  border-radius: 12px;
  padding: 20px 0;
}

.slider-track-h {
  display: flex;
  transition: transform 1s ease;
}

.slide-horizontal {
  min-width: 100%;
  height: auto;
}

/* =================== SECCIONES GENERALES =================== */
.seccion {
  padding: 60px 20px;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.seccion-titulo {
  font-size: 2.4rem;
  color: #600d18;
  margin-bottom: 20px;
}

.seccion-texto {
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto;
}

.mision-vision .mv-content {
  background: #f8f8f8;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* =================== ESPECIALIDADES =================== */
.especialidades {
  padding: 60px 20px 100px;
  background: #f8f8f8;
}

.especialidades .seccion-titulo {
  text-align: center;
  font-size: 2.6rem;
  margin-bottom: 50px;
}

.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s;
  text-decoration: none;
}

.card:hover {
  transform: translateY(-10px);
}

.card img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  background: #f9f9f9;
  padding: 15px;
}

.card-title {
  background: #600d18;
  color: white;
  padding: 16px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0;
}

/* =================== FOOTER =================== */
.footer-new {
  background: #600d18;
  color: white;
  padding: 80px 40px 40px;
  margin-top: 100px;
}

.footer-grid-new {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

.footer-col h4 {
  color: #b8911f;
  margin-bottom: 20px;
  font-size: 1.3rem;
}

.footer-col a {
  color: white;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  margin: 12px 0;
  transition: color 0.3s;
}

.footer-col a:hover {
  color: #b8911f;
}

.footer-col a i {
  margin-right: 10px;
  font-size: 1.5rem;
}

.footer-barra {
  height: 28px;
  background: url('https://www.gob.mx/cms/uploads/image/file/688209/barra_mexico_72ppp.png') repeat-x center;
  margin: 60px auto 20px;
  max-width: 1200px;
}

.footer-copy-new {
  text-align: center;
  font-size: 1rem;
  padding: 20px 0;
  opacity: 0.9;
}

@media (max-width: 992px) {
  .footer-grid-new { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .footer-grid-new { grid-template-columns: 1fr; text-align: center; }
}

/* =================== BOTÓN VOLVER ARRIBA =================== */
#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #b8911f;
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  font-size: 28px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.4);
  z-index: 999;
  display: none;
  transition: all 0.3s;
}

#scrollTopBtn:hover {
  background: #997a14;
  transform: scale(1.1);
}

/* =================== RESPONSIVE GENERAL =================== */
@media (max-width: 768px) {
  .hero-content h2 { font-size: 2.2rem; }
  .titulo-largo { font-size: 1.6rem; }
  .slogan { font-size: 1.4rem; }
  .overlay-text .phrase { font-size: 1.8rem;  margin-bottom:  -30px ;}
  .seccion-titulo { font-size: 2rem; }
  .anchor-section { padding-top: 200px !important; margin-top: -180px !important; scroll-margin-top: 200px; }
}

/* AJUSTE EXTRA PARA MÓVIL EN ANCLAS */
@media (max-width: 768px) {
  .anchor-section {
    scroll-margin-top: 180px !important;
  }
}

/* Flechas más visibles en móvil */
.has-submenu > a i {
  font-size: 1rem;
  margin-left: 8px;
}

/* Ajuste para "CBTis88.edu.mx" en móvil (reducir tamaño para que se vea bien) */
@media (max-width: 768px) {
  .header-top h1 {
    font-size: 1.4rem;
    letter-spacing: 1px;
  }
  .overlay-text .footer-text {
    color : transparent
  }
}

.examen-info {
  max-width: 800px;
  margin: 0 auto;
  text-align: left;
}

.examen-info h3 {
  margin-top: 20px;
  color: #600d18;
}

.examen-info ul {
  list-style-type: disc;
  padding-left: 40px;
  margin: 10px auto;
}

.examen-info ul li {
  margin-bottom: 10px;
}



.footer-copy-new a {
  color: inherit; /* Mismo color que el texto padre */
  text-decoration: none; /* Sin subrayado */
  transition: color 0.3s;
}

.footer-copy-new a:hover {
  color: #b8911f; /* Color dorado al hover, para que se note que es clickeable */
}