/* ==========================================================================
   FUNDACIÓN CASA DEL ALMENDRO - ESTILOS HISTÓRICOS ORIGINALES
   Basado en la web histórica (Wayback Machine 2017-2024)
   Paleta: Amarillo (#FFD700) + Azul Pizarra (#5D6D9E) + Azul Marino (#002244)
   ========================================================================== */

:root {
  --color-yellow: #ffd700;
  --color-yellow-hover: #e6c200;
  --color-yellow-light: #fff8cc;
  --color-blue-hero: #5d6d9e;
  --color-blue-hero-dark: #4e5d8c;
  --color-blue-dark: #002244;
  --color-blue-title: #1a3b70;
  --color-blue-pill: #003366;
  --color-blue-link: #0056b3;
  --color-text-dark: #222222;
  --color-text-muted: #555555;
  --color-bg-light: #ffffff;
  --color-bg-alt: #f4f7fa;
  --color-border: #e0e0e0;
  --color-divider: #cccccc;
  
  --font-serif: Georgia, 'Times New Roman', Times, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  
  --container-max: 1140px;
  --container-narrow: 860px;
}

/* Reset básico */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text-dark);
  background-color: var(--color-bg-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

/* Contenedores */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   HEADER MODIFICADO (AMARILLO)
   ========================================================================== */
.site-header {
  background-color: var(--color-yellow);
  color: var(--color-text-dark);
  padding: 10px 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.08);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}

.brand-logo-link {
  display: inline-block;
}

.brand-logo {
  height: 65px;
  width: auto;
  object-fit: contain;
}

/* Navegación */
.site-nav {
  display: flex;
  align-items: center;
  position: relative;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 20px;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-item a {
  font-size: 0.95rem;
  font-weight: 700;
  color: #111111;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.nav-item a:hover,
.nav-item.active a {
  background-color: rgba(0, 0, 0, 0.06);
}

/* Hamburguesa */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  width: 36px;
  height: 36px;
  justify-content: center;
}

.hamburger-bar {
  display: block;
  width: 24px;
  height: 3px;
  background-color: #111111;
  border-radius: 2px;
  transition: all 0.2s ease;
}

/* ==========================================================================
   HERO / BANNER PRINCIPAL (AZUL PIZARRA)
   ========================================================================== */
.hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 48, 85, 0.82) 0%, rgba(93, 109, 158, 0.85) 50%, rgba(45, 65, 110, 0.88) 100%), 
              url('../images/portada-1.jpg') center center / cover no-repeat;
  color: #ffffff;
  padding: 250px 20px;
  text-align: center;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.2);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 2.7rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 14px;
  line-height: 1.25;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.hero-subtitle {
  font-family: var(--font-sans);
  font-size: 1.3rem;
  font-weight: 400;
  color: #f4f8fc;
  margin-bottom: 30px;
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-btn {
  display: inline-block;
  background-color: var(--color-yellow);
  color: #111111;
  padding: 12px 34px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1.05rem;
  text-transform: capitalize;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, transform 0.1s;
}

.hero-btn:hover {
  background-color: var(--color-yellow-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   SECCIONES GENERALES
   ========================================================================== */
.section {
  padding: 50px 0;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--color-blue-title);
  text-align: center;
  margin-bottom: 30px;
}

.section-title a {
  color: inherit;
  text-decoration: none;
}

.section-title a:hover {
  text-decoration: underline;
}

.section-divider {
  border: 0;
  height: 1px;
  background-color: var(--color-divider);
  margin: 50px auto 0 auto;
  max-width: var(--container-max);
}

/* ==========================================================================
   SECCIÓN: NUESTRA HISTORIA
   ========================================================================== */
.history-section {
  background-color: #ffffff;
}

.history-video-container {
  max-width: 760px;
  margin: 0 auto 30px auto;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #000000;
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
}

.history-video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.history-text {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #333333;
  margin-bottom: 20px;
  text-align: justify;
}

.history-text em,
.history-text strong {
  color: #111111;
}

/* ==========================================================================
   SECCIÓN: GALERÍA FOTOGRÁFICA
   ========================================================================== */
.gallery-section {
  background-color: #ffffff;
  padding-top: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 25px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  background-color: #eeeeee;
  aspect-ratio: 4 / 3;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

/* ==========================================================================
   SECCIÓN: NUESTROS SERVICIOS
   ========================================================================== */
.services-section {
  background-color: #ffffff;
}

.services-list {
  max-width: 860px;
  margin: 0 auto 40px auto;
}

.service-item {
  margin-bottom: 26px;
}

.service-title {
  font-family: var(--font-sans);
  font-size: 1.25rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 6px;
}

.service-description {
  font-size: 1rem;
  color: #444444;
  line-height: 1.7;
}

.service-description strong {
  color: #222222;
}

/* Cita de Teresa Cremonesi */
.quote-box {
  max-width: 860px;
  margin: 40px auto 0 auto;
  padding: 24px 30px;
  background-color: #fafbfc;
  border-left: 4px solid var(--color-blue-hero);
  border-radius: 0 4px 4px 0;
}

.quote-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-blue-title);
  margin-bottom: 12px;
}

.quote-text {
  font-size: 1rem;
  font-style: italic;
  color: #444444;
  line-height: 1.7;
  margin-bottom: 12px;
}

.quote-author {
  font-weight: 700;
  color: #111111;
  text-align: right;
  font-size: 0.95rem;
}

/* ==========================================================================
   SECCIÓN: DIRECCIÓN E INFORMES (CONTACTO FOOTER)
   ========================================================================== */
.contact-hero-section {
  position: relative;
  background: linear-gradient(135deg, rgba(30, 48, 85, 0.72) 0%, rgba(93, 109, 158, 0.75) 50%, rgba(45, 65, 110, 0.78) 100%), 
              url('../images/Ubicacion.jpg') center center / cover no-repeat;
  color: #ffffff;
  padding: 250px 20px;
  text-align: center;
  box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.2);
}

.contact-hero-title {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 20px;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.45);
}

.contact-hero-info {
  font-size: 1.15rem;
  line-height: 2;
  color: #f2f5f9;
  max-width: 680px;
  margin: 0 auto 30px auto;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.contact-hero-info strong {
  color: #ffffff;
  font-weight: 700;
}

.contact-hero-info a {
  color: #ffffff;
  text-decoration: underline;
}

.contact-hero-btn {
  display: inline-block;
  background-color: var(--color-yellow);
  color: #111111;
  padding: 10px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
  transition: background-color 0.2s, transform 0.1s;
}

.contact-hero-btn:hover {
  background-color: var(--color-yellow-hover);
  transform: translateY(-2px);
}

/* ==========================================================================
   PIE DE PÁGINA HISTÓRICO (BARRA AMARILLA + AZUL MARINO)
   ========================================================================== */
.footer-nav-bar {
  background-color: var(--color-yellow);
  padding: 16px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.footer-nav-list {
  display: flex;
  list-style: none;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.footer-nav-list a {
  font-weight: 700;
  font-size: 0.95rem;
  color: #111111;
  transition: color 0.2s;
}

.footer-nav-list a:hover {
  text-decoration: underline;
}

.sub-footer {
  background-color: var(--color-blue-dark);
  color: #ffffff;
  padding: 14px 0;
  text-align: center;
  font-size: 0.88rem;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   ESTILOS DE PÁGINAS INTERNAS
   ========================================================================== */
.page-header {
  background-color: #f7f9fa;
  border-bottom: 1px solid var(--color-border);
  padding: 30px 0;
  text-align: center;
}

.page-title {
  font-family: var(--font-serif);
  font-size: 2.3rem;
  color: var(--color-blue-title);
  margin-bottom: 8px;
}

.page-breadcrumbs {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.page-breadcrumbs a {
  color: var(--color-blue-link);
  text-decoration: none;
}

.page-breadcrumbs a:hover {
  text-decoration: underline;
}

.page-content {
  padding: 40px 0 60px 0;
}

.article-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: #333333;
}

.article-body p {
  margin-bottom: 20px;
  text-align: justify;
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-blue-title);
  margin: 35px 0 15px 0;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-divider);
}

.article-body h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: #222222;
  margin: 25px 0 10px 0;
}

.article-body ul {
  margin: 0 0 20px 25px;
}

.article-body li {
  margin-bottom: 8px;
}

.content-badge-recovered {
  display: inline-block;
  background-color: #e8f4f8;
  color: #0d5d7e;
  border: 1px solid #b8e2f2;
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 3px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

/* Tarjetas de Actividades */
.activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-top: 30px;
}

.activity-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.activity-card-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background-color: #eaeaea;
}

.activity-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-card-date {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.activity-card-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--color-blue-title);
  margin-bottom: 12px;
  line-height: 1.35;
}

.activity-card-text {
  font-size: 0.95rem;
  color: #555555;
  line-height: 1.6;
  margin-bottom: 15px;
  flex: 1;
}

/* Formulario de Contacto */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 30px;
}

.contact-info-panel {
  background-color: #f9fbfd;
  border: 1px solid var(--color-border);
  padding: 30px;
  border-radius: 4px;
}

.contact-info-panel h3 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--color-blue-title);
  margin-bottom: 20px;
}

.contact-info-list {
  list-style: none;
}

.contact-info-list li {
  margin-bottom: 18px;
  line-height: 1.6;
  font-size: 1rem;
}

.contact-info-list strong {
  color: #111111;
  display: block;
  margin-bottom: 2px;
}

.contact-form-panel {
  background: #ffffff;
  border: 1px solid var(--color-border);
  padding: 30px;
  border-radius: 4px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: #333333;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-blue-hero);
  box-shadow: 0 0 0 3px rgba(93, 109, 158, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  background-color: var(--color-yellow);
  color: #111111;
  border: none;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.2s;
}

.btn-submit:hover {
  background-color: var(--color-yellow-hover);
}

/* Modal Lightbox de Fotos */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.88);
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #ffffff;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

.lightbox-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: #ffffff;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.95rem;
  text-align: center;
  max-width: 80%;
}

/* ==========================================================================
   RESPONSIVE (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact-layout {
    grid-template-columns: 1fr;
  }
  
  .hero-title {
    font-size: 2.1rem;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background-color: var(--color-yellow);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    flex-direction: column;
    width: 220px;
    padding: 12px;
    z-index: 1000;
    align-items: stretch;
    gap: 8px;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-item a {
    display: block;
    padding: 10px 14px;
  }
}

@media (max-width: 680px) {
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-section,
  .contact-hero-section {
    padding: 100px 15px;
  }
  
  .hero-title,
  .contact-hero-title {
    font-size: 1.75rem;
  }
  
  .hero-subtitle {
    font-size: 1.05rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  .footer-nav-list {
    flex-direction: column;
    gap: 12px;
  }
}
