/* ===============================
   COLORES PRINCIPALES
=============================== */
:root {
  --dark-blue: #1B3A4B;
  --medium-blue: #2A8FB2;
  --light-blue: #5AC8D9;
  --text-dark: #1F2933;
  --background: #F8FAFC;
  --white: #FFFFFF;
}

/* ===============================
   BODY Y CONTENIDO FLEXIBLE
=============================== */
html, body {
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text-dark);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding-top: 0;
}

.content {
  flex: 1;
  max-width: 1000px;
  margin: 1rem auto;
  padding: 0 1rem;
}

main, section {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem;
}

/* ===============================
   HEADER
=============================== */
header {
  position: relative;
  top: 0;
  width: 100%;
  background: var(--dark-blue);
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
  padding: 0.35rem 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.menu-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 1rem;
}

/* separación justa bajo el header */
header + main {
  margin-top: 1rem;
}

/* BOTÓN HAMBURGUESA */
.hamburger {
  font-size: 1.8rem;
  color: var(--light-blue);
  cursor: pointer;
  user-select: none;
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1100;
}

/* MENÚ DESPLEGABLE */
#nav-menu {
  position: absolute;
  top: 100%;
  left: 1rem;
  width: 200px;
  background: var(--dark-blue);
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  gap: 1rem;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
  opacity: 0;
  transform: translateY(-20px);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 1000;
}

#nav-menu.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

#nav-menu a {
  color: var(--white);
  font-weight: 600;
  padding-left: 1rem;
}

#nav-menu a:hover {
  color: var(--light-blue);
}

/* ===============================
   HERO
=============================== */
.hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--medium-blue);
  color: var(--white);
  padding: 2.5rem 1.5rem;
  border-radius: 14px;
  margin: 1.5rem auto 2rem auto;
  max-width: 1000px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
}

.hero h2 {
  font-size: 2.3rem;
  margin-bottom: 1.5rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin-bottom: 2rem;
}

/* BOTÓN CTA */
.cta-button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background: var(--light-blue);
  color: var(--white);
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(34,211,238,0.3);
  text-decoration: none;
}

.cta-button:hover {
  background: var(--medium-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(34,211,238,0.4);
}

/* ===============================
   SERVICIOS
=============================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
  margin-top: 2.5rem;
}

.service-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.8rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-top: 3px solid var(--light-blue);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-card h3 {
  margin-bottom: 0.8rem;
  color: var(--dark-blue);
}

.service-card p {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: #475569;
}

/* ===============================
   FOOTER
=============================== */
footer {
  text-align: center;
  padding: 1.5rem;
  background: var(--dark-blue);
  color: var(--white);
  font-size: 0.95rem;
}

/* ===============================
   LOGO
=============================== */
.logo-text {
  font-family: 'Permanent Marker', cursive;
  font-size: 2.8rem;
  color: var(--light-blue);
  text-align: center;
}

.logo-text .highlight {
  color: var(--white);
  text-shadow: 2px 2px 0 var(--light-blue);
}

/* ===============================
   NOTICIAS
=============================== */
.news-section {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1rem;
}

.news-section h2 {
  font-size: 2rem;
  color: var(--dark-blue);
  margin-bottom: 1.5rem;
  text-align: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.8rem;
}

.news-card {
  background: var(--white);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-top: 3px solid var(--light-blue);
}

.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.news-card h3 {
  margin-bottom: 0.8rem;
  color: var(--dark-blue);
  font-size: 1.2rem;
}

.news-card p {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: #475569;
  font-size: 0.95rem;
}

.news-card .date {
  font-size: 0.85rem;
  color: var(--medium-blue);
  font-weight: 600;
  text-align: right;
}

/* ===============================
   IMÁGENES PEQUEÑAS EN NOTICIAS
=============================== */
.news-card {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
}

.news-card img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.news-card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ===============================
   MEDIA QUERIES
=============================== */
@media (max-width: 900px) {
  /* Hero */
  .hero {
    padding: 2rem 1rem;
  }
  .hero h2 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
    max-width: 90%;
  }

  /* Servicios */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-card {
    padding: 1.5rem;
  }

  /* Noticias */
  .news-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .news-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .news-card img {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
  }
  .news-card .date {
    text-align: center;
  }

  /* Botones */
  .cta-button {
    width: 100%;
    text-align: center;
    padding: 0.8rem 1rem;
  }
}

@media (max-width: 500px) {
  /* Hero */
  .hero h2 {
    font-size: 1.6rem;
  }
  .hero p {
    font-size: 0.95rem;
  }

  /* Servicios */
  .service-card h3 {
    font-size: 1rem;
  }
  .service-card p {
    font-size: 0.9rem;
  }

  /* Noticias */
  .news-card h3 {
    font-size: 1rem;
  }
  .news-card p {
    font-size: 0.85rem;
  }

  /* Logo tamaño más pequeño */
  .logo-text {
    font-size: 2.2rem;
  }
}
