/* --- Importación de Fuente y Variables Globales --- */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    /* -- CAMBIO: Paleta de colores actualizada a Rojo -- */
    --primary-red: #C00000;      /* Rojo corporativo, en lugar de azul */
    --light-red: #f9e7e7;        /* Un rojo muy claro para fondos suaves */
    --dark-text: #212529;
    --body-text: #5a5a5a;
    --bg-gray: #f8f9fa;
    --white: #ffffff;
    --border-color: #dee2e6;

    /* ALTURA DEL HEADER para centrar el hero a pantalla completa */
    --header-h: 80px;
}

/* --- ESTILOS BASE --- */
body {
    font-family: 'Roboto', sans-serif;
    color: var(--body-text);
    background-color: var(--white);
    margin: 0;
    font-size: 16px;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    color: var(--dark-text);
    font-weight: 700;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

/* --- Header y Navegación --- */
header {
    background: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav ul li a {
    text-decoration: none;
    color: var(--body-text);
    font-weight: 500;
    padding: 10px 15px;
    transition: color 0.3s;
}

.main-nav ul li a:hover {
    color: var(--primary-red); /* -- CAMBIO: Hover ahora es rojo -- */
}

/* Botón de Menú Hamburguesa */
.menu-toggle { display: none; }
.menu-toggle .bar { background-color: var(--primary-red); }

/* --- Footer --- */
.site-footer {
    background-color: var(--dark-text);
    color: #a0a0a0;
    text-align: center;
    padding: 40px 0;
    font-size: 0.9rem;
}
.site-footer p { margin: 5px 0; }

/* --- ESTILOS DE PÁGINA: INICIO --- */
/* HERO centrado a pantalla completa */
.hero{
  background: linear-gradient(rgba(0,0,0,.65), rgba(0,0,0,.65)), url('img/img1.jpg');
  background-size: cover;
  background-position: center;
  color: var(--white);
  min-height: calc(100dvh - var(--header-h)); /* altura visible menos header */
  padding: 0;
  display: flex;
  align-items: center;   /* centra vertical */
  justify-content: center; /* centra horizontal */
  text-align: center;
}

/* Título del hero centrado y con aire */
.hero .hero-title{
  text-align: center !important;
  display: block;
  margin: 0 auto 28px !important; /* aire debajo del H1 */
  max-width: 980px;               /* ancho cómodo para multlínea */
  line-height: 1.1;
  letter-spacing: .3px;
  color: var(--white);
  font-size: 3.5rem;
}

/* Ritmo vertical del hero (espaciados) */
.hero .hero-subtitle{
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1.35;
  margin: 10px 0 14px;
}

.hero .hero-credencial{
  color: var(--white);
  font-size: 1.4rem;
  line-height: 1.35;
  margin: 6px 0 18px;
}

.hero .hero-claim{
  font-size: 1rem;
  font-style: italic;
  opacity: .9;
  margin: 14px 0 18px;
}

.hero .hero-contacto{
  font-size: 1rem;
  margin: 6px 0 22px;
}

.hero .button-primary{
  display: inline-block;
  margin-top: 10px;
}

/* Botón primario (sin cambios en estilo base) */
.button-primary {
  background-color: var(--primary-red);
  color: var(--white);
  padding: 15px 30px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s;
  border: none;
  cursor: pointer;
  width: auto;
  font-size: 1rem;
}
.button-primary:hover { background-color: #a00000; transform: translateY(-2px); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.services-section, .stats-section, .cta-section { padding: 80px 0; }
.service-card { background: var(--white); padding: 30px; border: 1px solid var(--border-color); border-radius: 5px; text-align: center; }
.service-card .icon { font-size: 3rem; color: var(--primary-red); margin-bottom: 15px; }
.service-card h3 { font-size: 1.5rem; margin-bottom: 15px; }

.stats-section { background-color: var(--dark-text); color: var(--white); }
.stats-section .section-title, .stat-item { color: var(--white); text-align: center; }
.stat-number { display: block; font-size: 4rem; font-weight: 700; }
.stat-label { display: block; font-size: 1.1rem; font-weight: 300; }

.cta-section { background-color: var(--bg-gray); text-align: center; }
.cta-section h2 { font-size: 2.2rem; }
.cta-section p { max-width: 600px; margin: 0 auto 30px; }

.button-secondary {
  background: none; border: 2px solid var(--primary-red); color: var(--primary-red);
  padding: 15px 30px; border-radius: 5px; text-decoration: none; font-weight: 700;
  transition: all 0.3s; margin-top: 20px;
}
.button-secondary:hover { background-color: var(--primary-red); color: var(--white); }

/* --- ESTILOS DE PÁGINAS: INTERNAS --- */
.hero-secondary {
    padding: 100px 0;
    text-align: center;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('img/img2.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-secondary h1 { font-size: 3rem; color: var(--white); }

.content-section-page { padding: 80px 0; }
.about-us-content { max-width: 800px; margin: 0 auto; line-height: 1.8; }
.about-us-content h2 { font-size: 2rem; margin-bottom: 20px; }
.values-section { background-color: var(--bg-gray); padding: 80px 0; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.value-card { background: var(--white); padding: 30px; border-left: 5px solid var(--primary-red); }
.value-card h3 { margin-top: 0; font-size: 1.5rem; }

.service-detail-section { padding: 80px 0; }
.service-detail-section.alt-bg { background-color: var(--bg-gray); }
.service-content { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.service-content.reverse { grid-template-areas: "image text"; }
.service-content.reverse .service-text { grid-area: text; }
.service-content.reverse .service-image { grid-area: image; }
.service-text h2 { font-size: 2.2rem; margin-top: 0; margin-bottom: 20px; }
.service-text p { line-height: 1.8; margin-bottom: 15px; }
.service-image img { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

.contact-section { padding: 80px 0; }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 80px; }
.contact-info h3, .contact-form h3 { font-size: 2rem; margin-top: 0; margin-bottom: 20px; }
.info-item { display: flex; align-items: flex-start; margin-bottom: 25px; }
.info-item .icon { font-size: 1.5rem; margin-right: 20px; color: var(--primary-red); margin-top: 5px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 5px; font-size: 1rem; font-family: 'Roboto', sans-serif; }
.map-container { border: 1px solid var(--border-color); border-radius: 8px; overflow: hidden; }

/* ###################################################### */
/* ### DISEÑO RESPONSIVO (PARA CELULARES Y TABLETS) ### */
/* ###################################################### */
@media (max-width: 768px) {
    .menu-toggle { display: flex; }
    .main-nav { position: absolute; top: 80px; left: 0; width: 100%; background-color: var(--white); box-shadow: 0 4px 6px rgba(0,0,0,0.1); transform: translateY(-150%); transition: transform 0.3s ease-in-out; }
    .main-nav.nav-open { transform: translateY(0); }
    .main-nav ul { flex-direction: column; width: 100%; text-align: center; }
    .main-nav ul li { padding: 15px 0; border-bottom: 1px solid var(--border-color); }
    .main-nav ul li:last-child { border-bottom: none; }

    .grid-2, .grid-3, .contact-layout, .service-content, .service-content.reverse { grid-template-columns: 1fr; gap: 30px; }
    .service-content.reverse { grid-template-areas: unset; }

    /* Tamaños en móvil */
    .section-title, .hero-secondary h1 { font-size: 2rem; }
    .hero { padding: 60px 0; }
    .hero .hero-title { font-size: 2rem; margin-bottom: 24px; }
    .hero .hero-subtitle { font-size: 1.1rem; }
    .hero .hero-credencial { font-size: 1.05rem; }
    .stat-number { font-size: 3rem; }
}

/* ===== IMPORTANTE: Se eliminó la regla genérica que causaba conflicto =====
   (antes tenías .hero h1 {...} con márgenes y max-width que desplazaban el título)
*/
