/* --- VARIABLES CSS (Fácil mantenimiento) --- */
:root {
 --guinda: #880020;/* Color Institucional */
 --guinda-light: #431538;   /* Hover */
 --texto: #333333;
 --texto-suave: #666666;
 --fondo: #f4f7f6;
 --blanco: #ffffff;
 --shadow: 0 4px 6px rgba(0,0,0,0.05);
 --radius: 8px;
}

/* --- RESET & BASICS --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--fondo);
  color: var(--texto);
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }

/* --- LAYOUT --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- HEADER --- */
header {
  background-color: var(--blanco);
  border-bottom: 3px solid var(--guinda); /* Detalle minimalista */
  padding: 1rem 0;
  box-shadow: var(--shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--guinda);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  margin-left: 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--texto);
  transition: color 0.3s;
}

.nav-links a:hover { color: var(--guinda); }

/* --- HERO SECTION (Modificado para galería) --- */
.hero {
    /* Mantener el fondo guinda para el contenedor principal */
    background: linear-gradient(135deg, var(--guinda) 0%, #4a0012 100%);
    color: var(--blanco);
    padding: 4rem 0; /* Ajusta si es necesario */
    margin-bottom: 3rem;
}

.hero-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px; /* Espacio entre el texto y la galería */
    flex-wrap: wrap; /* Para que se apilen en móvil */
}

.hero-text {
    flex: 1; /* Permite que el texto ocupe el espacio disponible */
    min-width: 300px; /* Para que no se encoja demasiado */
    text-align: left; /* Alineación del texto del hero a la izquierda */
}

.hero-text h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero-text p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 1.5rem; }

/* --- GALLERY STYLES --- */
.hero-gallery {
    flex-shrink: 0; /* Evita que la galería se encoja */
    width: 600px; /* Ancho fijo para las imágenes, ajusta si es necesario */
    height: 400px; /* Altura fija */
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    background-color: #333; /* Fondo de carga */
}

.gallery-inner {
    display: flex;
    transition: transform 0.8s ease-in-out; /* Transición suave entre imágenes */
    height: 100%;
}

.gallery-image {
    width: 100%;
    height: 100%;
    /*object-fit: cover;*/ /* Asegura que la imagen cubra el espacio sin distorsionarse */
    /*flex-shrink: 0;*/ /* Evita que las imágenes se encojan */
    display: block; /* Asegura que no haya espacios debajo de la imagen */
}

.gallery-nav {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dot.active {
    background-color: var(--blanco);
    transform: scale(1.2);
}

/* --- RESPONSIVE GALLERY --- */
@media (max-width: 1000px) {
    .hero-content-wrapper {
        flex-direction: column; /* Apila el texto y la galería en pantallas más pequeñas */
        text-align: center;
    }
    .hero-text {
        text-align: center; /* Centra el texto en pantallas pequeñas */
        margin-bottom: 2rem;
    }
    .hero-gallery {
        width: 100%; /* La galería ocupa todo el ancho disponible */
        height: 300px; /* Ajusta la altura para pantallas más pequeñas */
    }
}

@media (max-width: 768px) {
    .hero-text h1 { font-size: 2rem; }
    .search-box input { width: 200px; }
}

/* --- GRID DE DOCUMENTOS --- */
.grid-docs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

/* --- CARDS (Minimalistas) --- */
.card {
  background: var(--blanco);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
  border-left: 4px solid transparent; /* Preparado para hover */
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0,0,0,0.1);
  border-left: 4px solid var(--guinda);
}

.card-icon {
  font-size: 2rem;
  color: var(--guinda);
  margin-bottom: 1rem;
  opacity: 0.8;
}

.card h3 { margin-bottom: 0.5rem; color: var(--texto); }
.card p { font-size: 0.9rem; color: var(--texto-suave); margin-bottom: 1.5rem; }

.btn-link {
  color: var(--guinda);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
}

.btn-link::after {
  content: "→";
  margin-left: 5px;
  transition: margin-left 0.3s;
}

.card:hover .btn-link::after { margin-left: 10px; }

/* --- FOOTER --- */
footer {
  background-color: #222;
  color: #ccc;
  padding: 2rem 0;
  text-align: center;
  font-size: 0.85rem;
  border-top: 4px solid var(--guinda);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .hero h1 { font-size: 2rem; }
  .search-box input { width: 200px; }
  .header-content { flex-direction: column; gap: 1rem; }
  .nav-links a { margin: 0 10px; }
}