* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', sans-serif; background: #fdfdfd; color: #222; }

/* ================== HEADER ================== */
header {
  background-image: url('img/img6portada-01.png');
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  height: 50vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.header-texto {
  background-color: rgba(255, 255, 255, 0.85);
  padding: 1.5rem 2.5rem;
  border-radius: 12px;
  text-align: center;
  display: inline-block;
  max-width: 90%;
}

.header-texto h1 {
  font-size: 3rem;
  font-weight: 900;
  color: #cc0000;      /* rojo corporativo */
  margin: 0.5rem 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.header-texto .subtitulo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #444;
  margin: 0.3rem 0;
}

.header-texto .slogan {
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 500;
  color: #333;
  margin: 0.5rem 0 0;
}

/* ================== TABS / NAV ================== */
.tabs {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: #fff;   /* franja blanca */
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 0.25rem 0.5rem;
}

.tabs .logo-franja {
  max-height: 50px;
  margin-right: 0.5rem;
}

.tab-button {
  background: transparent;
  color: #cc0000;     /* texto rojo */
  padding: 1rem 1.25rem;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: bold;  /* negrilla */
  transition: background 0.25s, transform 0.15s;
  border-radius: 8px;
}

.tab-button:hover,
.tab-button.active {
  background: #f5f5f5;
  color: #990000;
  transform: scale(1.03);
}

/* Dropdown (Contacto) */
.dropdown { position: relative; display: inline-block; }
.dropdown:focus-within .dropdown-content { display: block; }
.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 240px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  border-radius: 10px;
  overflow: hidden;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
}
.dropdown-content.show { display: block; } /* para click en móvil */

.dropdown-content .sub-tab {
  width: 100%;
  background: none;
  border: none;
  color: #cc0000;
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
}
.dropdown-content .sub-tab:hover {
  background: #f5f5f5;
  color: #990000;
}

/* ================== SECCIONES ================== */
.tab-content {
  display: none;
  padding: 2rem;
  max-width: 1100px;
  margin: 1rem auto 2rem;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  animation: fadeIn 0.6s ease-in-out;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================== INICIO / NEWS ================== */
.news {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1.25rem;
  background: #fff;
}
.news h3 { margin-bottom: 0.35rem; color: #222; }
.news-date { display: inline-block; margin-bottom: 0.75rem; color: #666; font-size: 0.95rem; }

.news-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}
.news-images img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}

.news .contenido {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.news.expanded .contenido { max-height: 1000px; } /* suficiente para expandir */

.toggle-btn {
  margin-top: 0.5rem;
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.toggle-btn:hover { background: #990000; }

/* ================== NOSOTROS ================== */
.info-box {
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #fafafa;
}
.info-box h3 { color: #cc0000; margin-bottom: 0.4rem; }

/* ================== CONTACTO (LÍNEAS) ================== */
.contact-info p,
.social-links p,
.mapa p { margin: 0.35rem 0; }

.social-links { margin-top: 0.75rem; }
.social-links a {
  display: inline-block;
  margin-right: 0.75rem;
  text-decoration: none;
  color: #cc0000;
  font-weight: bold;
}
.social-links a:hover { color: #990000; }

.mapa iframe {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 12px;
  margin-top: 0.75rem;
}

/* ================== PQRE ================== */
.pqre-form {
  display: grid;
  gap: 0.75rem;
  max-width: 720px;
}
.pqre-form input,
.pqre-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 1rem;
}
.pqre-form button {
  background: #cc0000;
  color: #fff;
  border: none;
  padding: 0.8rem 1rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}
.pqre-form button:hover { background: #990000; }

/* ================== GALERÍA ================== */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.galeria-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  cursor: zoom-in;
}

/* ================== MODAL / LIGHTBOX ================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 2000;
}
.modal img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 12px;
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 2rem;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* ================== DOCUMENTOS ================== */
.pdf-list a {
  display: block;
  padding: 0.75rem 1rem;
  margin: 0.4rem 0;
  border: 1px solid #eee;
  border-radius: 10px;
  text-decoration: none;
  color: #333;
  transition: background 0.25s, color 0.25s;
}
.pdf-list a:hover {
  background: #fff5f5;
  color: #990000;
}

/* ================== FOOTER ================== */
footer {
  text-align: center;
  background: #1a1a1a;
  color: white;
  padding: 1rem;
}

/* ================== WHATSAPP FLOAT ================== */
.whatsapp-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 54px;
  height: 54px;
  background: #25D366;
  color: #fff;
  display: grid;
  place-items: center;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.4rem;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
  z-index: 1100;
}

/* ================== RESPONSIVE ================== */
@media (max-width: 768px) {
  header { height: 45vh; }
  .header-texto h1 { font-size: 2.2rem; }
  .header-texto .subtitulo { font-size: 1.3rem; }
  .header-texto .slogan { font-size: 1.05rem; }
  .tabs { flex-wrap: wrap; padding: 0.4rem; }
  .tabs .logo-franja { max-height: 42px; }
  .tab-button { padding: 0.75rem 0.9rem; }
}


/* Menú desplegable */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: #fff;
  min-width: 240px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  z-index: 1000;
  border-radius: 10px;
  overflow: hidden;
  top: 100%;
  left: 0;
  margin-top: 0.25rem;
}

/* 🔥 Mostrar al pasar el mouse */
.dropdown:hover .dropdown-content {
  display: block;
}

/* Estilo de subopciones */
.dropdown-content .sub-tab {
  width: 100%;
  background: none;
  border: none;
  color: #cc0000;
  padding: 0.9rem 1rem;
  text-align: left;
  cursor: pointer;
  font-weight: bold;
  font-size: 0.95rem;
}

.dropdown-content .sub-tab:hover {
  background: #f5f5f5;
  color: #990000;
}

.pqre-message {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #e6ffe6;
  border: 1px solid #00b300;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #006600;
  text-align: center;
}
