/* INGENIEROS UNI | CSS organizado y logo centrado en móviles */

/* 01. VARIABLES Y ESTILOS GENERALES */
:root {
  --navy: #1b2275;
  --navy-dark: #10143e;
  --yellow: #ffc522;
  --cyan: #36b6e7;
  --text: #252a45;
  --muted: #6c738a;
  --line: #e8eaf2;
  --font: "Poppins",system-ui,sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 105px;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: #fff;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

button,input,select {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1180px,calc(100% - 40px));
  margin-inline: auto;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}

/* 02. BARRA SUPERIOR */
.topbar {
  background: var(--navy-dark);
  color: white;
  font-size: .76rem;
}

.topbar-inner,.topbar-left,.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-inner {
  justify-content: space-between;
  min-height: 39px;
  flex-wrap: wrap;
}

.topbar a:hover {
  color: var(--yellow);
}

/* 03. CABECERA, LOGO Y NAVEGACIÓN */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 2px 14px rgba(14,17,66,.09);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 98px;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 1 auto;
  width: 350px;
  
  height: 100px;
  overflow: hidden;
  
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--navy);
  font-size: .86rem;
  font-weight: 600;
}

.nav>a,

.nav-sub-toggle {
  white-space: nowrap;
}

.nav a:hover,.nav-sub-toggle:hover {
  color: #258cc7;
}

.nav-sub-toggle {
  border: 0;
  background: transparent;
  color: inherit;
  font-weight: inherit;
  font-size: inherit;
}

.has-sub {
  position: relative;
}

.sub {
  display: none;
  position: absolute;
  top: 100%;
  left: -12px;
  min-width: 185px;
  background: #fff;
  padding: 10px;
  border: 1px solid var(--line);
  box-shadow: 0 15px 30px #10143e24;
  border-radius: 10px;
}

.has-sub:hover .sub,.has-sub:focus-within .sub,.has-sub.open .sub {
  display: block;
}

.sub a {
  display: block;
  padding: 9px 12px;
  font-size: .82rem;
  border-radius: 6px;
}

.sub a:hover {
  background: #f2f5ff;
}

.header-actions {
  flex-shrink: 0;
}

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: var(--navy);
  font-size: 1.8rem;
}

/* 04. BOTONES */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 40px;
  padding: 14px 26px;
  font-weight: 700;
  transition: transform .2s,box-shadow .2s;
  text-align: center;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-navy {
  background: var(--navy);
  color: white;
  box-shadow: 4px 4px 0 #5962ca;
}

.btn-yellow {
  background: var(--yellow);
  color: #111638;
  box-shadow: 4px 4px 0 #d89f14;
}

.btn-outline {
  border: 2px solid #fff;
  color: #fff;
  background: transparent;
}

.btn-small {
  padding: 11px 19px;
  font-size: .83rem;
}

/* 05. PORTADA */
.hero {
  position: relative;
  min-height: 580px;
  display: flex;
  align-items: center;
  color: #fff;
}

.hero-content {
  padding: 90px 0 155px;
}

.hero-copy {
  max-width: 740px;
}

.eyebrow {
  display: inline-block;
  color: var(--yellow);
  font-size: .86rem;
  font-weight: 700;
  letter-spacing: .13em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(2.3rem,4.5vw,4.1rem);
  line-height: 1.17;
  font-weight: 800;
  letter-spacing: -.03em;
}

.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}

.hero p {
  max-width: 640px;
  font-size: 1.1rem;
  margin: 23px 0 30px;
  color: #e4e9fb;
}

.hero-buttons {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* 06. TARJETAS DE SERVICIOS */
.features {
  position: relative;
  z-index: 2;
  margin-top: -88px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 22px;
}

.feature {
  display: block;
  padding: 30px 22px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 12px 35px #0e11421c;
  text-align: center;
  transition: transform .2s;
}

.feature:hover {
  transform: translateY(-6px);
}

.feature-icon {
  display: block;
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.feature h3 {
  color: var(--navy);
  font-size: 1.06rem;
  line-height: 1.4;
  margin-bottom: 12px;
}

.feature p {
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: 14px;
}

.feature-link {
  font-size: .84rem;
  font-weight: 700;
  color: var(--navy);
}

/* 07. SECCIONES Y CONTENIDO */
.section {
  padding: 95px 0;
}

.section-kicker {
  display: inline-block;
  color: #277bb8;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .12em;
  margin-bottom: 10px;
}

.section h2,.free-banner h2 {
  font-size: clamp(1.9rem,3vw,2.8rem);
  line-height: 1.22;
  color: var(--navy);
  margin-bottom: 18px;
}

.section-heading {
  text-align: center;
  max-width: 740px;
  margin: 0 auto 42px;
}

.section-heading p,.about-copy p,.enroll-copy p {
  color: var(--muted);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 65px;
}

.about-visual {
  min-height: 370px;
  position: relative;
  border-radius: 20px;
  background: linear-gradient(135deg,#d8e7ff,#7185c7);
  overflow: hidden;
}

.about-visual img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
}

.about-stamp {
  position: absolute;
  bottom: 22px;
  right: 22px;
  background: var(--yellow);
  color: var(--navy-dark);
  padding: 12px 23px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.about-stamp strong {
  font-size: 2.6rem;
  line-height: 1;
}

.about-copy p {
  margin-bottom: 18px;
}

.about-copy .btn {
  margin-top: 10px;
}

.benefits {
  background: #f5f7fc;
}

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

.benefit-grid>div {
  background: #fff;
  padding: 32px 26px;
  text-align: center;
  border-radius: 14px;
}

.benefit-grid span {
  font-size: 2.5rem;
}

.benefit-grid h3 {
  color: var(--navy);
  margin: 12px 0;
}

.benefit-grid p {
  font-size: .9rem;
  color: var(--muted);
}

.course-grid {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 24px;
}

.course-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px #0e11420d;
  display: flex;
  flex-direction: column;
}

.course-photo {
  height: 170px;
  position: relative;
  background: linear-gradient(135deg,#4056a5,#121747);
}

.photo-excel {
  background: linear-gradient(135deg,#279f76,#0b4c39);
}

.photo-autocad {
  background: linear-gradient(135deg,#eb835a,#8d2948);
}

.photo-programacion {
  background: linear-gradient(135deg,#4889d1,#353478);
}

.course-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.course-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--yellow);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .72rem;
  font-weight: 700;
}

.course-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.course-info h3 {
  color: var(--navy);
  font-size: 1.03rem;
  line-height: 1.4;
  margin-bottom: 10px;
}

.course-info p {
  font-size: .86rem;
  color: var(--muted);
  margin-bottom: 15px;
}

.course-meta {
  font-size: .76rem;
  color: var(--muted);
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.course-action {
  color: var(--navy);
  font-size: .82rem;
  font-weight: 800;
  margin-top: 17px;
}

.announcements {
  background: #f7f8fd;
}

.announcement-panel,.schedule-box {
  display: flex;
  align-items: center;
  gap: 24px;
  background: #fff;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 24px #0e11420d;
}

.announcement-panel>span,.schedule-box>span {
  font-size: 2.6rem;
}

.announcement-panel>div,.schedule-box>div {
  flex: 1;
}

.announcement-panel h3,.schedule-box h3 {
  color: var(--navy);
}

.announcement-panel p,.schedule-box p {
  color: var(--muted);
  font-size: .9rem;
}

.schedule-box {
  background: #f4f6fd;
}

.free-banner {
  background: linear-gradient(115deg,#161c61,#0c103a);
  padding: 62px 0;
  color: #fff;
}

.free-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.free-banner h2 {
  color: #fff;
}

.free-banner p {
  color: #d4dcf4;
}

.enroll {
  background: #f4f6fb;
}

.enroll-grid {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  gap: 60px;
  align-items: start;
}

.enroll-contact {
  color: var(--navy);
  font-weight: 700;
  margin-top: 25px;
}

.form {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 18px;
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 10px 30px #10143e12;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
}

.field input:not([type=checkbox]),.field select {
  border: 1.5px solid #dfe3ef;
  border-radius: 9px;
  padding: 12px;
  width: 100%;
  background: white;
}

.field input:focus,.field select:focus {
  outline: 2px solid #93a5e6;
  outline-offset: 0;
}

.full {
  grid-column: 1/-1;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  line-height: 1.5;
}

.consent input {
  margin-top: 4px;
}

.form-status {
  font-size: .84rem;
  color: var(--muted);
}

/* 08. PIE DE PÁGINA */
.footer {
  background: #10143e;
  color: #d0d4ed;
  padding: 65px 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 55px;
}

.footer h3,.footer h4 {
  color: #fff;
  margin-bottom: 18px;
}

.footer p,

.footer a {
  font-size: .88rem;
  display: block;
  margin-bottom: 10px;
}

.footer a:hover {
  color: var(--yellow);
}

.footer-bottom {
  border-top: 1px solid #ffffff2a;
  margin-top: 45px;
  padding-top: 20px;
  text-align: center;
  font-size: .78rem;
}

/* 09. WHATSAPP Y BOTÓN VOLVER ARRIBA */
.whatsapp {
  position: fixed;
  right: 22px;
  bottom: 25px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(0,0,0,0.25);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.whatsapp img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  display: block;
}

.whatsapp:hover {
  transform: scale(1.12);
}

.back-to-top {
  position: fixed;
  z-index: 60;
  right: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: 0 6px 20px #0003;
  font-weight: 800;
}

.back-to-top {
  bottom: 91px;
  width: 38px;
  height: 38px;
  background: var(--navy);
  color: #fff;
}

@media (max-width:1100px) {
  .nav {
    gap: 12px;
    font-size: .78rem;
  }

  .header-inner {
    gap: 12px;
  }

  .logo {
    flex-basis: 190px;
    width: 190px;
    height: 75px;
  }

  .course-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }
}

@media (max-width:900px) {
  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .header-actions {
    display: none;
  }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 14px 20px #10143e25;
    padding: 18px 24px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .nav.open {
    display: flex;
  }

  .nav>a,.nav-sub-toggle {
    display: block;
    width: 100%;
    padding: 12px 0;
    text-align: left;
  }

  .sub {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 14px;
    display: none;
  }

  .has-sub:hover .sub {
    display: none;
  }

  .has-sub.open .sub {
    display: block;
  }

  .features-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
  }

  .about-grid,.enroll-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-visual {
    min-height: 300px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-left span {
    display: none;
  }
}

@media (max-width:650px) {
  .container {
    width: min(100% - 30px,1180px);
  }

  .topbar-inner {
    padding: 7px 0;
  }

  .topbar-right {
    gap: 10px;
  }

  .topbar-left {
    font-size: .7rem;
  }

  .header-inner {
    min-height: 75px;
  }

  .logo {
    flex-basis: 240px;
    width: 240px;
    height: 85px;
  }

  .hero {
    min-height: 540px;
  }

  .hero-content {
    padding: 70px 0 130px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .hero p {
    font-size: .96rem;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-dots {
    bottom: 95px;
  }

  .features-grid {
    gap: 12px;
  }

  .feature {
    padding: 20px 12px;
  }

  .feature h3 {
    font-size: .9rem;
  }

  .feature p {
    font-size: .76rem;
  }

  .section {
    padding: 65px 0;
  }

  .benefit-grid,.course-grid {
    grid-template-columns: 1fr;
  }

  .announcement-panel,.schedule-box,

.free-inner {
    flex-direction: column;
    text-align: center;
  }

  .free-inner {
    align-items: stretch;
  }

  .form {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

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

  .topbar-right a:first-of-type {
    display: none;
  }
}

@media (prefers-reduced-motion:reduce) {
  html {
    scroll-behavior: auto;
  }

  *,*::before,*::after {
    transition: none !important;
  }
}

/* 10. UBICACIÓN Y MAPA */
.location-section {
  background: #f5f7fc;
}

.location-grid {
  display: grid;
  grid-template-columns: minmax(280px,.8fr) minmax(0,1.2fr);
  gap: 28px;
  align-items: stretch;
}

.location-info,.location-map {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(14,17,66,.09);
}

.location-info {
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.location-info h3 {
  color: var(--navy);
  font-size: 1.45rem;
}

.location-info p {
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.location-info a:not(.btn) {
  color: var(--navy);
  text-decoration: underline;
}

.location-info .btn {
  margin-top: auto;
}

.location-map {
  min-height: 390px;
}

.location-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 390px;
  border: 0;
}

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

  .location-info {
    padding: 24px;
  }

  .location-map,.location-map iframe {
    min-height: 320px;
  }
}

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #10143e;
  min-height: 620px;
}

/* 11. CARRUSEL DE IMÁGENES */
.hero-backgrounds {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s ease;
  background-size: cover;
  background-position: center;
}

.hero-bg.active {
  opacity: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg,rgba(8,12,43,.96) 0%,rgba(8,12,43,.86) 46%,rgba(8,12,43,.35) 100%);
}

.hero-bg--one {
  background-image: url("img/portada1.jpg"),linear-gradient(120deg,#172560,#10143e);
}

.hero-bg--two {
  background-image: url("img/portada2.jpg"),linear-gradient(120deg,#14466c,#10143e);
}

.hero-bg--three {
  background-image: url("img/portada3.jpg"),linear-gradient(120deg,#3b295f,#10143e);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px,100% - 48px);
  padding: 88px 0 155px;
}

.hero-slider {
  position: relative;
  min-height: 340px;
}

.hero-slide {
  display: none;
  animation: heroFade .65s ease both;
}

.hero-slide.active {
  display: block;
}

.hero-copy {
  max-width: 760px;
}

@keyframes heroFade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-controls {
  position: absolute;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 3;
}

.hero-dots {
  position: static;
  transform: none;
  display: flex;
  gap: 9px;
  align-items: center;
}

.hero-dot {
  border: 0;
  width: 10px;
  height: 10px;
  background: #ffffff8c;
  border-radius: 20px;
  cursor: pointer;
  transition: width .25s,background .25s;
}

.hero-dot.active {
  width: 26px;
  background: var(--yellow);
}

.hero-arrow {
  border: 1px solid #ffffff80;
  color: white;
  background: #10143e88;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  font-size: 25px;
  line-height: 1;
  cursor: pointer;
}

.hero-arrow:hover,.hero-arrow:focus-visible {
  background: var(--navy);
}

@media (max-width:650px) {
  .hero {
    min-height: 600px;
  }

  .hero-content {
    width: min(100% - 30px,1180px);
    padding: 75px 0 135px;
  }

  .hero-slider {
    min-height: 390px;
  }

  .hero-controls {
    bottom: 88px;
  }

  .hero-bg::after {
    background: linear-gradient(90deg,rgba(8,12,43,.95),rgba(8,12,43,.70));
  }
}

@media (prefers-reduced-motion:reduce) {
  .hero-bg,.hero-slide {
    transition: none;
    animation: none;
  }
}


/* 12. AJUSTE FINAL: LOGO CENTRADO EN CELULARES
   El menú permanece a la derecha y el logo se centra
   respecto al ancho completo de la cabecera. */
@media (max-width: 900px) {
  .header-inner {
    position: relative;
    justify-content: center;
  }

  .logo {
    flex: 0 1 auto;
    width: 240px;
    max-width: calc(100% - 85px);
    height: 76px;
    margin-inline: auto;
    justify-content: center;
  }

  .menu-toggle {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
    z-index: 10;
  }
}

@media (max-width: 650px) {
  .header-inner {
    min-height: 85px;
  }

  .logo {
    width: 320px;
    height: auto;
  }
}

@media (max-width: 380px) {
  .logo {
    width: 205px;
    max-width: calc(100% - 70px);
    height: 65px;
  }
}
