/*
=================================================================
SISTEMA DE DISEÑO - APLICADO A "EL RINCÓN DE LOS ABUELOS"
=================================================================
*/

/* 
-----------------------------------------------------------------
 VARIABLES GLOBALES (RAÍZ)
-----------------------------------------------------------------
*/
:root {
  /* Paleta de Colores */
  --color-primary-dark-blue: #005998; /* Azul oscuro para fondos, cabecera y pie de página */
  --color-primary-light-gray: #f8f9fa; /* Gris muy clarohero-section para fondos de sección */
  --color-accent-mint: #68d3b3;       /* Verde menta para botones principales y elementos destacados */
  --color-secondary-blue-gray: #8c9cb0; /* Azul grisáceo para botones secundarios */
  
  --color-text-dark: #343a40;         /* Color principal para el cuerpo del texto */
  --color-text-light: #ffffff;       /* Color para texto sobre fondos oscuros */
  --color-text-muted: #6c757d;        /* Gris para texto menos importante o subtítulos */

  /* Tipografía */
  --font-family-headings: 'Libre Baskerville', serif;
  --font-family-body: 'Montserrat', sans-serif;
  
  /* Otros */
  --border-radius-normal: 8px; 
  --section-padding-vertical: 100px;
  --color-error-red: #e74c3c; /* Rojo para mensajes de error */

}

/* 
-----------------------------------------------------------------
 RESET BÁSICO Y ESTILOS DEL BODY
-----------------------------------------------------------------
*/
html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text-dark);
  background-color: var(--color-text-light);
}

/* 
-----------------------------------------------------------------
 ESTRUCTURA Y LAYOUT
-----------------------------------------------------------------
*/
.section {
  padding-top: var(--section-padding-vertical);
  padding-bottom: var(--section-padding-vertical);
}

.section-bg-dark {
  background-color: var(--color-primary-dark-blue);
  color: var(--color-text-light);
}

.section-bg-light {
  background-color: var(--color-primary-light-gray);
}

/* 
-----------------------------------------------------------------
 TIPOGRAFÍA Y JERARQUÍA
-----------------------------------------------------------------
*/
h1, h2, h3, h4, .navbar-brand {
  font-family: var(--font-family-headings);
  font-weight: 700; 
  line-height: 1.2;
  margin-bottom: 20px;
}
.navbar-brand {
  margin-bottom: 0;
  font-family: var(--font-family-body);
}
h1, .display-3 { font-size: 4rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

a {
  color: var(--color-accent-mint);
  text-decoration: none;
  transition: opacity 0.3s ease;
}

a:hover {
  opacity: 0.8;
  color: var(--color-accent-mint);
}

.section-subtitle {
  color: var(--color-accent-mint);
  font-family: var(--font-family-body);
  font-weight: 600;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 10px;
}
.text-serif{
  font-family: var(--font-family-headings);
}

.text-sans-serif{
  font-family: var(--font-family-body);
}

/* 
-----------------------------------------------------------------
 COMPONENTES DE UI Y ADAPTACIONES BOOTSTRAP
-----------------------------------------------------------------
*/

/* --- Navbar --- */
#mainNav {
  background-color: transparent;
  padding-top: 20px;
  padding-bottom: 20px;
  transition: all 0.3s ease;
}
#mainNav.scrolled {
  background-color: var(--color-primary-dark-blue);
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  padding-top: 10px;
  padding-bottom: 10px;
}
.navbar-brand {
    font-size: 1.2rem;
    font-weight: 600;
    text-transform: none;
}
.nav-link {
    font-weight: 400;
    font-family: var(--font-family-body);
    font-size: 14px;
}
.nav-link.active, .nav-link:hover {
    color: var(--color-accent-mint) !important;
}


/* --- Botones --- */
.btn {
  padding: 12px 28px;
  font-family: var(--font-family-body);
  font-weight: 600;
  text-transform: uppercase;
  border-radius: var(--border-radius-normal);
  transition: all 0.3s ease;
}
.btn-primary {
  background-color: var(--color-primary-dark-blue);
  border-color: var(--color-primary-dark-blue);
  color: #fff;
}
.btn-primary:hover {
  background-color: #0067af;
  border-color: #0067af;
  transform: translateY(-2px);
  color: #fff;
}
.btn-secondary {
  background-color: var(--color-secondary-blue-gray);
  border-color: var(--color-secondary-blue-gray);
  color: var(--color-text-light);
}
.btn-secondary:hover {
  background-color: #7a8aa0;
  border-color: #7a8aa0;
  transform: translateY(-2px);
  color: var(--color-text-light);
}


/* --- Hero Section --- */
.hero-section {
  position: relative; /* Clave para posicionar las diapositivas y el contenido */
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* Oculta cualquier desborde de las imágenes */
}

/* Capa de color oscuro sobre las imágenes */
.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.35);
  z-index: 2; /* Se asegura que esté sobre las imágenes pero debajo del texto */
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* Detrás de la capa oscura y el contenido */
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  opacity: 0; /* Todas las diapositivas están ocultas por defecto */
  transition: opacity 1.5s ease-in-out; /* La magia del fundido suave */
}

.hero-slide.active {
  opacity: 1; /* La diapositiva activa se hace visible */
}

.hero-content {
  position: relative;
  z-index: 3; /* El contenido de texto siempre al frente */
}

/* --- Formularios --- */
.form-control {
  padding: 15px;
  border: none;
  border-radius: var(--border-radius-normal);
  background-color: rgba(255, 255, 255, 0.9);
  font-family: var(--font-family-body);
  font-size: 1rem;
}
.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(104, 211, 179, 0.5);
  background-color: #fff;
}
.form-control::placeholder {
  color: var(--color-text-muted);
}
.section-bg-dark textarea.form-control, 
.section-bg-dark input.form-control {
  background-color: rgba(255,255,255,0.1);
  color: var(--color-text-light);
  border: 1px solid rgba(255,255,255,0.2);
}
.section-bg-dark .form-control::placeholder {
  color: rgba(255,255,255,0.6);
}

/* --- Tarjetas de Servicios --- */
.card {
  border: none;
  border-radius: var(--border-radius-normal);
  box-shadow: 0 4px 25px rgba(0,0,0,0.07);
  transition: all 0.3s ease;
  text-align: center;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}
.card-body {
    padding: 30px;
}
.card-title {
  font-size: 1.25rem;
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--color-accent-mint);
}

/* --- Tarjetas de Testimonios --- */
.testimonial-card {
  background-color: var(--color-text-light);
  border: 1px solid #e9ecef; /* Borde sutil */
  display: flex;
  flex-direction: column; /* Para asegurar que el footer se quede abajo */
}
.testimonial-card .card-body {
  flex-grow: 1; /* Permite que el cuerpo de la tarjeta crezca */
}
.testimonial-quote-icon {
  font-size: 2.5rem;
  color: var(--color-accent-mint);
  margin-bottom: 1rem;
  display: block;
}
.testimonial-card .card-footer {
  background-color: transparent;
  border-top: none;
  padding: 0 30px 30px 30px;
  display: flex;
  align-items: center;
}
.testimonial-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 15px;
  object-fit: cover;
}

/* --- Estilos para la Galería --- */
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--border-radius-normal);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item .gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(44, 62, 80, 0.7); /* Usamos el azul oscuro primario con transparencia */
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item .gallery-overlay i {
  color: var(--color-text-light);
  font-size: 2.5rem;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* --- Estilos para el Slider de la sección "Nosotros" --- */
.image-slider-container {
  position: relative;
  width: 100%;
  /* Usamos padding-top para mantener un aspect-ratio (ej: 3:2). 2/3 * 100 = 66.66% */
  /* Esto asegura que el contenedor tenga altura y no colapse. */
  padding-top: 66.66%; 
  overflow: hidden;
}

.image-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease-in-out; /* Transición de fundido */
}

.image-slide.active {
  opacity: 1; /* Hace visible la diapositiva activa */
}
.bg-mint{
  background-color: var(--color-accent-mint);
}

/* --- Estilos para el Modal de Contacto --- */
.modal-content {
  border: none;
  border-radius: var(--border-radius-normal);
}

.modal-header {
  border-bottom: 1px solid #dee2e6;
}

.modal-title {
  font-family: var(--font-family-headings);
  font-weight: 600; /* Un poco menos pesado que los h2 */
  text-transform: uppercase;
}

.modal-icon-success {
  font-size: 4rem; /* 64px */
  color: var(--color-accent-mint);
}

.modal-icon-error {
  font-size: 4rem; /* 64px */
  color: var(--color-error-red);
}

@media (max-width: 768px) {
  h1, .display-3 {
    font-size: 2rem;
  }  
}
