/* Import Google Font */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700&display=swap');

:root{
  --primary: #001f3f;    /* azul marino */
  --secondary: #0074d9;  /* azul claro */
  --accent-red: #ff4136; /* rojo */
  --accent-orange: #ff851b; /* naranja */
  --bg: #f7f9fb;
  --card: #ffffff;
  --text: #122029;
  --muted: #6b7a86;
  --max-width: 1200px;
  --radius: 12px;
  --transition: 280ms ease;
}

/* Reset / Base */
* { box-sizing: border-box; }
html,body { height:100%; margin:0; padding:0; }
body{
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:var(--bg);
  color:var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  line-height:1.5;
  overflow-x: hidden;
}

/* Layout container */
.section{
  max-width:var(--max-width);
  margin: 0 auto;
  padding: 64px 20px;
  text-align:center;
}

/* Headings */
h1{ font-weight:700; font-size:1.125rem; margin:0; letter-spacing:0.02em;}
h2{ font-weight:700; font-size:1.75rem; margin-bottom:0.6rem; color:var(--primary);}
h3{ font-weight:600; font-size:1.125rem; margin:0 0 0.4rem 0;}
p{ color:var(--muted); margin:0 0 1rem 0; font-size:1rem; }

/* ---------- HEADER ---------- */
.main-header {
  width: 100%;
  height: 100px;
  background: linear-gradient(90deg, var(--primary, #001f3f), rgba(0,31,63,0.9));
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1200;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
}

/* Logo y texto */
.logo {
  display: flex;
  align-items: center;
  gap: 18px;
}
.logo-img {
  width: 80px;
  height: 80px;
  object-fit: fill;
  border-radius: 50px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.logo h1 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  white-space: nowrap;
}

/* Navegación */
nav {
  position: relative;
}

/* Enlaces nav desktop */
.nav-links {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  transition: background 280ms ease, transform 280ms ease;
}
.nav-links a:hover,
.nav-links a:focus {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  outline: none;
}

/* Botón hamburguesa (oculto desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 24px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  z-index: 1300;
}
.hamburger span {
  display: block;
  height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: all 260ms ease;
}
.hamburger.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}
.hamburger.open span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Estilos responsive para móvil */
@media (max-width: 860px) {
  .logo h1 {
    display: none; /* solo logo imagen */
  }
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: fixed;
    top: 60px; /* justo abajo del header */
    right: 0;
    width: 100%;
    max-width: 320px;
    background: var(--primary, #001f3f);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    transform: translateX(100%);
    transition: transform 280ms ease;
    border-radius: 0 0 0 12px;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
    height: calc(100vh - 60px);
    overflow-y: auto;
    z-index: 1250;
  }
  .nav-links.open {
    transform: translateX(0);
  }
}

/* ---------- MAIN CONTENT ---------- */
main{
  padding-top:18px;
}

/* ABOUT */
#about p{
  max-width:900px;
  margin: 0 auto;
  font-size:1rem;
  color: #334447;
}

/* ---------- CAROUSEL ---------- */
.carousel{
  position:relative;
  margin-top:20px;
  max-width:var(--max-width);
  height:420px;
  margin-left:auto;
  margin-right:auto;
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow: 0 18px 40px rgba(5,15,30,0.12);
  user-select:none;
  touch-action: pan-y;
}

/* slides absolute, we'll animate left/right */
.carousel-slide{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  background-size:cover;
  background-position:center;
  color:#fff;
  cursor:pointer;
  opacity:0;
  transform: scale(1.03) translateX(10%);
  transition: transform 700ms cubic-bezier(.2,.9,.2,1), opacity 500ms ease;
  pointer-events: none;
  z-index: 1;
}
.carousel-slide.active{
  opacity:1;
  transform: scale(1) translateX(0);
  z-index: 2;
  pointer-events: auto;
}
/* overlay + blur to make text readable */
.carousel-slide::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.5) 70%);
  backdrop-filter: blur(4px);
  transition: backdrop-filter 280ms ease;
  border-radius: var(--radius);
  z-index: 0;
}
.carousel-slide span{
  position:relative;
  z-index:3;
  font-size:2rem;
  font-weight:700;
  text-align:center;
  padding: 0 18px;
  text-shadow: 0 6px 22px rgba(0,0,0,0.8);
  user-select:none;
}

/* controls */
.carousel-controls{
  position:absolute;
  inset:0;
  pointer-events:none;
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:0 12px;
  z-index: 5;
}
.carousel-controls button{
  pointer-events:auto;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.22));
  border:none;
  color:#fff;
  width:48px;
  height:48px;
  border-radius:10px;
  cursor:pointer;
  display:grid;
  place-items:center;
  font-size:1.5rem;
  transition: transform 180ms ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.28);
  user-select:none;
}
.carousel-controls button:hover{
  transform:translateY(-3px);
}

/* small indicators (dots) */
.carousel-indicators{
  position:absolute;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:8px;
  z-index:5;
}
.carousel-indicators button{
  width:10px;
  height:10px;
  border-radius:50%;
  border:none;
  background:rgba(255,255,255,0.28);
  cursor:pointer;
  transition: background 180ms ease;
  user-select:none;
}
.carousel-indicators button.active{
  background:var(--accent-orange);
  transform:scale(1.15);
}

/* ---------- MISSION & VISION ---------- */
.mission-vision .mv-container{
  display:flex;
  gap:24px;
  justify-content:center;
  align-items:stretch;
  margin-top:18px;
  flex-wrap:wrap;
}
.mission-vision .mv-container > div{
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  padding:22px;
  border-radius:12px;
  width:420px;
  box-shadow: 0 8px 24px rgba(10,20,30,0.06);
  text-align:left;
  color: var(--text);
}
.mission-vision p{
  color:#2e3b40;
}

/* ---------- MODALS ---------- */
.modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1400;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), rgba(0,0,0,0.65));
  padding:20px;
  overflow-y: auto;
}
.modal[aria-hidden="false"]{
  display:flex;
}
.modal-content{
  width:100%;
  max-width:900px;
  background:var(--card);
  border-radius:12px;
  padding:28px 32px;
  position:relative;
  box-shadow: 0 24px 60px rgba(5,15,30,0.28);
  animation: modalIn 240ms cubic-bezier(.2,.9,.2,1);
  max-height: 90vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}
@keyframes modalIn {
  from{
    transform:translateY(16px) scale(.99);
    opacity:0
  }
  to {
    transform:none;
    opacity:1
  }
}

.modal-close{
  position:absolute;
  top:12px;
  right:12px;
  font-size:1.6rem;
  background:none;
  border:none;
  cursor:pointer;
  color:var(--accent-red);
  font-weight: 700;
  line-height: 1;
  padding: 0 6px 4px 6px;
  user-select:none;
  transition: color 160ms ease;
}
.modal-close:hover,
.modal-close:focus{
  color: var(--accent-orange);
  outline:none;
}
.modal h3{
  margin-top:6px;
  color:var(--primary);
}
.modal p{
  color:var(--muted);
  font-size:1rem;
}

/* modal gallery layout */
.modal-gallery{
  margin-top:24px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:center;
}
.modal-gallery img{
  width:calc(50% - 12px);
  height:160px;
  object-fit:cover;
  border-radius:8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  transition: transform 280ms ease;
  cursor: pointer;
}
.modal-gallery img:hover,
.modal-gallery img:focus{
  transform: scale(1.05);
  outline: none;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

/* Footer */
.main-footer {
  margin: 36px auto;
  background: linear-gradient(90deg, var(--primary, #001f3f), var(--secondary, #0074d9));
  color: #fff;
  padding: 24px 20px;
  max-width: var(--max-width, 1200px);
  border-radius: 12px;
  user-select: none;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 18px;
  align-items: center;
}

.footer-contact p {
  margin: 6px 0;
  font-weight: 600;
  font-size: 1rem;
  color: #fff;
}

.footer-contact a {
  color: #fff;
  text-decoration: underline;
  transition: color 0.3s ease;
}
.footer-contact a:hover,
.footer-contact a:focus {
  color: var(--accent-orange, #ff851b);
  outline: none;
}

.footer-social {
  display: flex;
  gap: 24px;
  justify-content: center;
}

.footer-social a {
  color: #fff;
  font-size: 1.8rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social a:hover,
.footer-social a:focus {
  color: var(--accent-orange, #ff851b);
  transform: scale(1.2);
  outline: none;
}

.footer-copy {
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
  user-select: none;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width:1000px){
  .carousel{
    height:360px;
  }
  .modal-gallery img{
    width: calc(50% - 12px);
    height:140px;
  }
}
@media (max-width:720px){
  .nav-links{
    width: 100%;
    max-width: none;
    padding-left: 16px;
    padding-right: 16px;
  }
  .carousel{
    height:260px;
    border-radius:10px;
  }
  .carousel-slide span{
    font-size:1.4rem;
    padding: 0 12px;
  }
  .mission-vision .mv-container > div{
    width:100%;
  }
  .modal-gallery img{
    width:100%;
    height:170px;
  }
  .logo h1{
    display:none; /* keep only the icon on smaller screens */
  }
}
@media (max-width:420px){
  .carousel{
    height:220px;
  }
  .modal-content{
    padding:16px;
  }
  .modal-gallery img{
    height:140px;
  }
}
