/* =============================
   ESTILOS GENERALES
============================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  background-color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Clase para lectores de pantalla */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =============================
   HEADER Y MENÚ
============================= */
.header {
  background: linear-gradient(135deg, #003366 0%, #004080 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 5px;
}

.logo h1 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
}

.nav {
  display: flex;
  gap: 25px;
}

.nav a {
  color: white;
  font-weight: 500;
  position: relative;
  padding: 5px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: #FFD700;
  left: 0;
  bottom: 0;
  transition: width 0.3s ease;
}

.nav a:hover::after,
.nav a:focus::after {
  width: 100%;
}

.menu-btn {
  background: none;
  border: none;
  display: none;
  cursor: pointer;
  padding: 5px;
}

.menu-btn:hover {
  opacity: 0.8;
}

/* =============================
   MENÚ MÓVIL
============================= */
.mobile-menu {
  background: #002244;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

.mobile-menu.active {
  max-height: 500px;
  padding: 20px;
  gap: 12px;
}

.mobile-menu a {
  color: white;
  padding: 12px;
  background: #003366;
  border-radius: 5px;
  text-align: center;
  transition: all 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a:focus {
  background: #FFD700;
  color: #003366;
  transform: translateX(5px);
}

/* =============================
   BANNER PRINCIPAL
============================= */
.banner {
  background: linear-gradient(rgba(0, 51, 102, 0.7), rgba(0, 51, 102, 0.7)), 
              url('src/istockphoto-1357352061-612x612.jpg') no-repeat center center/cover;
  color: white;
  text-align: center;
  padding: 120px 20px;
  position: relative;
}

.banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: inherit;
  z-index: -1;
}

.banner-content {
  max-width: 800px;
  margin: 0 auto;
}

.banner-content h2 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.banner-content p {
  margin: 15px 0;
  font-size: clamp(16px, 3vw, 20px);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.banner-buttons {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 30px;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.btn-yellow {
  background: #FFD700;
  color: #003366;
}

.btn-yellow:hover {
  background: #FFC700;
}

.btn-white {
  background: white;
  color: #003366;
}

.btn-white:hover {
  background: #f5f5f5;
}

/* =============================
   SECCIONES GENERALES
============================= */
.section {
  padding: 60px 20px;
  opacity: 1;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.section.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section-title {
  font-size: clamp(24px, 4vw, 32px);
  margin-bottom: 40px;
  color: #003366;
  text-align: center;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: #FFD700;
  border-radius: 2px;
}

.bg-light {
  background: #f9f9f9;
}

/* =============================
   TARJETAS Y NOTICIAS
============================= */
.cards-grid,
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 20px;
}

.card {
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  opacity: 1;
  transform: translateY(20px);
}

.card.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 51, 102, 0.15);
  border-color: #FFD700;
}

.card h4 {
  color: #003366;
  margin-bottom: 15px;
  font-size: 22px;
  font-weight: 600;
}

.card .date {
  display: block;
  font-size: 13px;
  color: #777;
  margin-bottom: 10px;
  font-style: italic;
}

.card p {
  color: #555;
  line-height: 1.6;
  margin-bottom: 15px;
}

.card .read-more {
  color: #003366;
  font-weight: 600;
  display: inline-block;
  margin-top: 10px;
  transition: color 0.3s ease;
}

.card .read-more:hover {
  color: #FFD700;
}

.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #777;
}

/* =============================
   GALERÍA
============================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.gallery-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* =============================
   FORMULARIO DE CONTACTO
============================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 600px;
  margin: 0 auto;
}

.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
  transition: border-color 0.3s ease;
  font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #003366;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  background: #003366;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.contact-form button:hover:not(:disabled) {
  background: #FFD700;
  color: #003366;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.contact-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-message {
  margin-top: 15px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
}

.form-message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.form-message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* =============================
   FOOTER
============================= */
.footer {
  background: linear-gradient(135deg, #002244 0%, #003366 100%);
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

.footer p {
  margin-bottom: 15px;
  font-size: 14px;
}

.footer .social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.footer .social-links a {
  transition: transform 0.3s ease;
}

.footer .social-links a:hover {
  transform: translateY(-3px);
}

/* =============================
   RESPONSIVE DESIGN
============================= */
@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .menu-btn {
    display: block;
  }

  .logo h1 {
    font-size: 14px;
  }

  .banner {
    padding: 80px 20px;
  }

  .section {
    padding: 40px 15px;
  }

  .cards-grid,
  .news-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }
}

@media (max-width: 480px) {
  .logo img {
    width: 40px;
    height: 40px;
  }

  .logo h1 {
    font-size: 12px;
  }

  .banner-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 250px;
  }
}


.social-sidebar {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 2000;
}

.social-sidebar a {
    width: 55px;
    height: 55px;
    background: #0a4fff; /* Azul */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    text-decoration: none;
    transition: 0.3s;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Hover */
.social-sidebar a:hover {
    transform: translateX(8px);
    background: #ffffff;
}

.social-sidebar a:hover box-icon {
    filter: invert(35%) sepia(90%) saturate(500%) hue-rotate(180deg);
}

/* 📱 RESPONSIVE – Celulares */
@media (max-width: 600px) {
    .social-sidebar {
        left: 10px;
        top: 55%;
        gap: 10px;
    }

    .social-sidebar a {
        width: 45px;
        height: 45px;
        border-radius: 12px;
    }

    .social-sidebar a box-icon {
        width: 22px !important;
        height: 22px !important;
    }
}

/* 📱📱 Muy pequeños (320px) */
@media (max-width: 360px) {
    .social-sidebar {
        left: 6px;
        gap: 8px;
    }

    .social-sidebar a {
        width: 40px;
        height: 40px;
    }
}

/* 🖥 Pantallas medianas/tablets */
@media (min-width: 600px) and (max-width: 1024px) {
    .social-sidebar {
        left: 15px;
    }
}
