/* =================================================================== */
/* === ESTILOS GLOBALES Y VARIABLES === */
/* =================================================================== */
:root {
    --color-azul-principal:  white;

    --color-dorado-hover: #A98E44;
    --color-blanco: #ffffff;
    --color-texto-gris: #ccc;
    --radio-borde: 2px;
}
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}
* { box-sizing: border-box; }


.container {
    
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}
/* =================================================================== */
/* === ESTILOS EXCLUSIVOS PARA INDEX.HTML (`body.inicio`) === */
/* =================================================================== */
body.inicio { position: relative; }
#background-video {
    position: fixed; right: 0; bottom: 0;
    min-width: 100%; min-height: 100%;
    z-index: -2; object-fit: cover;
}
body.inicio::after {
    content: ''; position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(rgba(255,255,255,0.8), rgba(255,255,255,0.4));
    z-index: -1;
}
body.inicio header, body.inicio main {
    position: relative; z-index: 1;
}
body.inicio .encabezado {
    display: flex;
    justify-content: space-between; /* Empuja el logo a la izq. y el menú a la der. */
    align-items: center;
    padding: 20px 40px; /* Añade espaciado como en la otra página */
}
body.inicio .logo-container img { width: 230px; }

body.inicio .navbar {
    background-color: var(--color-azul-logo); /* El fondo azul que tenía */
    border-radius: var(--radio-borde);      /* Bordes redondeados */
    padding: 10px 20px;                     /* Espaciado interno */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* La sombra que tenía */
    margin: 0;                              /* Mantenemos el margen en 0 para que se alinee a la derecha */
}
body.inicio .nav-links a { color: var(--color-blanco); }

/* --- Hero y Contenido del Index --- */
.hero {
    text-align: center;
    padding: 8rem 1rem;
    color: var(--color-texto-oscuro);
}
.hero h1 { font-size: 3rem; font-family: 'Playfair Display', serif; }
main > .container, main > .benefits-section, main > .carousel-section {
    margin-top: 5rem; margin-bottom: 5rem;
}
.content-card {
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.9);
    border-radius: var(--radio-borde);
    padding: .5rem;
    width: 100%;
}
.justificado { text-align: justify; }
/* Forzar negrita en el título de la tarjeta de contenido */
.content-card h2
 .info-box h3{
    font-weight: 700 !important; /* '700' es el valor numérico para negrita */
}

/* =================================================================== */
/* === ESTILOS PARA PÁGINAS INTERNAS (SERVICIOS, ETC.) === */
/* =================================================================== */

.servicios-card {
    background-color: var(--color-blanco); padding: 2.5rem 3rem;
    margin: -80px auto 100px auto; position: relative; z-index: 10;
    max-width: 1200px; border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.proyectos-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2.5rem; }
.proyectos-columna { flex: 1; min-width: 280px; }
.proyectos-imagen { flex: 1.2; text-align: center; min-width: 300px; }
.proyectos-imagen img { max-width: 100%; border-radius: 8px; }


/* =================================================================== */
/* === SECCIÓN DE BENEFICIOS (NARANJA) === */
/* =================================================================== */
.benefits-section {
    width: 100%; background-color: #F05E23;
    padding: 4rem 0; color: white;
}
.benefits-section .container { max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.benefits-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.benefit-item { text-align: center; }
.benefit-icon { margin-bottom: 1.5rem; height: 80px; display: flex; align-items: center; justify-content: center;}
.benefit-icon img { max-height: 100%; max-width: 80px; }
.benefit-item h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.benefit-item p { font-size: 0.95rem; line-height: 1.6; color: #fcece5; }


/* =================================================================== */
/* === ESTILOS UNIVERSALES (NAV, CARRUSEL, FOOTER) === */
/* =================================================================== */
.navbar { position: relative; }
.nav-links { list-style: none; display: flex; gap: 1.5em; margin: 0; padding: 0;   }
.nav-links li a {
    text-decoration: none; font-weight: 600; font-size: 1em; padding: 0.5em 1em;
    border-radius: 6px; transition: all 0.3s ease-in-out;
}
.nav-links li a:hover, .nav-links li a.active { background-color: var(--color-dorado-logo); color: var(--color-blanco); text-shadow: none; }
.menu-toggle { display: none; font-size: 2.2rem; background: none; border: none; cursor: pointer; z-index: 1001; }

.carousel-section {
    margin-top: 5rem;
    margin-bottom: 5rem;
}
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: var(--radio-borde);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    /* Le damos una proporción fija para que siempre tenga la misma forma */
    aspect-ratio: 16 / 11; 
    background-color: #e0e0e0; /* Fondo gris claro mientras carga la imagen */
}
.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}
.carousel-slide {
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden; /* Ayuda a contener la imagen */
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    display: block;
    /* ESTA ES LA PROPIEDAD CLAVE para que la imagen llene el espacio */
    object-fit: cover; 
}
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}
.carousel-button:hover {
    background-color: rgba(0,0,0,0.8);
}
.carousel-button.prev {
    left: 10px;
}
.carousel-button.next {
    right: 10px;
}


/* =================================================================== */
/* === RESPONSIVE === */
/* =================================================================== */
@media (max-width: 768px) {
    /* --- Responsive INDEX --- */
    body.inicio .titulo { font-size: 2.8em; }
    body.inicio .navbar { background: transparent; box-shadow: none; width: 100%; padding: 0; }
    body.inicio .nav-links { display: none; }
    body.inicio .menu-toggle { display: block; position: absolute; top: 45px; right: 25px; color: #333; }
    body.inicio .nav-links.active {
        display: flex; flex-direction: column; background-color: var(--color-azul-logo);
        border-radius: var(--radio-borde); width: 90%; margin: 20px auto; padding: 1em 0;
    }
    body.inicio .nav-links.active li { width: 100%; text-align: center; }

    /* --- Responsive PÁGINAS INTERNAS --- */
    .hero-section { height: 70vh; }
    .hero-section .top-bar { padding: 15px 20px; }
    .hero-section .logo { max-width: 130px; }
    .hero-section .navbar { display: none; }
    .hero-section .menu-toggle { display: block; color: var(--color-blanco); }
    .hero-section .nav-links.active {
        display: flex; position: absolute;
        flex-direction: column; top: 80px; right: 20px;
        width: 250px; background-color: var(--color-azul-logo);
        border-radius: var(--radio-borde); padding: 1em;
        box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    }
    .hero-section .nav-links.active li { width: 100%; text-align: center; padding: 5px 0; }
    
    /* --- Responsive CONTENIDO GENERAL --- */
    main > .container, main > .benefits-section, main > .carousel-section { margin-top: 3rem; margin-bottom: 3rem; }
    .benefits-grid { grid-template-columns: 1fr; gap: 3rem; }
    .servicios-card { margin: -60px 15px 60px 15px; padding: 1.5rem; }
    .proyectos-container { flex-direction: column; }
    
    /* --- Responsive para Carrusel --- */
    .carousel-container {
      width: 95%;
      aspect-ratio: 4 / 3;
    }
    /* --- Responsive para info-box --- */
  .info-box {
    flex-direction: column; /* Apila la imagen y el texto */
    text-align: center;
    width: 95%; /* Ocupa casi todo el ancho del celular */
  }
  .info-box .info-text {
    text-align: justify; /* Mantenemos el texto justificado para leerlo mejor */
  }
  .top-bar .contact-info { display: none; } /* Ocultamos info de contacto en móvil */
    .top-bar .container { justify-content: center; } /* Centramos los iconos sociales */

    .main-nav .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-azul-principal);
        padding: 10px 0;
    }
    .main-nav .nav-links.active {
        display: flex;
    }
    .main-nav .nav-links li {
        width: 100%;
        text-align: center;
    }
    .main-nav .nav-links li a {
        padding: 15px;
        display: block;
        width: 100%;
    }
    .menu-toggle {
        display: block;
    }
}

/* =================================================================== */
/* === SECCIÓN "¿QUÉ NOS CARACTERIZA?" (info-box) === */
/* =================================================================== */
.info-box {
    display: flex;
    align-items: center;
    gap: 2.5rem; /* Espacio entre la imagen y el texto */
    
    /* --- CENTRADO Y TAMAÑO --- */
    max-width: 950px; /* Ancho máximo para que sea más angosto */
    margin-left: auto;
    margin-right: auto;
    
    /* --- ESTILOS VISUALES --- */
    background-color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    border-radius: var(--radio-borde);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}
    .navbar .brand-title {
      color: #001a66;
      font-size: 1.5rem;
    }
.info-box img {
    flex-shrink: 0; /* Evita que la imagen se encoja */
    max-width: 300px;
    border-radius: var(--radio-borde); /* Redondea también la imagen */
}

.info-box .info-text {
    text-align: left;
}
body.hero h1:hover {
  color: #cc2b2b;
  transform: scale(1.02);
  transition: all 0.3s ease;
}
body.inicio .hero {
    position: relative;
    color: white;
    max-width: 1100px;
    margin: 5rem auto;
    border-radius: 30px;
    overflow: hidden;
    min-height: 450px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;

    /* --- AJUSTES DE LA IMAGEN DE FONDO --- */
    background-image: url('../img/imageey.png');
    background-size: cover;      /* Mantenemos COVER para que siempre llene el cuadro */
   
    background-repeat: no-repeat;
    background-position: center top; /* <-- ¡PRUEBA CAMBIAR ESTA LÍNEA! */
}

/* Capa oscura para legibilidad */
body.inicio .hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 34, 68, 0.6);
    z-index: 0;
}

/* Estilos para el título y el párrafo */
body.inicio .hero h1,
body.inicio .hero p {
    position: relative;
    z-index: 1;
    color: white;
}

body.inicio .hero h1 {
    font-family: 'Playfair Display', serif;
    /* Tamaño de fuente adaptable con límites min/max */
    font-size: clamp(2.5rem, 5vw, 3.5rem); 
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0 0 0.5rem 0; /* Espacio debajo del título */
}

body.inicio .hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 600px; /* Evita que el texto sea muy largo */
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
}
/* =================================================================== */
/* === NUEVA CABECERA DE DOS NIVELES (Estilo Final) === */
/* =================================================================== */
.site-header {
    
    width: 100%;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.top-divider {
  height: 1px;
  background-color: white;
  opacity: 0.2;
}
/* --- 1. Barra Superior de Contacto --- */
.top-bar {
     background-color: white;
    color: var(--color-texto-gris);
    padding: 8px 0;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.top-bar .container {
    
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.contact-info {
     color:#001a66;
    display: flex;
    align-items: center;
}
.contact-info a {
    color: #001a66;
    text-decoration: none;
    transition: color 0.3s ease;
}
.contact-info a:hover {
    color: var(--color-blanco);
}
.contact-info i {
    margin-right: 8px;
}
.separator {
    height: 16px;
    width: 1px;
     background-color: #001a66;
    margin: 0 20px;
}
.social-icons a {
    color: var(--color-texto-gris);
    text-decoration: none;
    margin-left: 18px;
    font-size: 1rem;
    transition: color 0.3s ease;
}
.social-icons a:hover {
    color: #001a66;
}

/* --- 2. Barra Principal de Navegación --- */
.main-header {
    background-color: var(--color-azul-principal); /* Fondo azul sólido */
    padding: 10px 0;
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 15px; /* Espacio entre el logo y el texto */
    text-decoration: none; /* Para quitar el subrayado si todo es un enlace */
}
.logo-area .logo {
    max-height: 70px; /* Logo más grande */
    width: auto;
    display: block;
    
}
.brand-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
   color: #001a66;
    position: relative;
    padding-bottom: 8px; /* Espacio para las líneas */
}
/* Las 2 líneas debajo de "TOLVANERA" */
.brand-name::before, .brand-name::after {
    color: #001a66;
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #001a66;
}
.brand-name::before { bottom: 0; }
.brand-name::after { bottom: 5px; }

.main-nav {
      background-color: white;
    display: flex;
    align-items: center;
}
.nav-links {
      color: #001a66;
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 1px; /* Espacio entre elementos del menú */
}
.nav-links li a {
   font-family: 'Poppins', sans-serif;
      color: #001a66;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px; /* Bordes más redondeados */
    transition: all 0.3s ease;
}
.nav-links li a:hover,
.nav-links li a.active {
    background-color: var(--color-dorado-hover);
    color: var(--color-azul-principal) !important; /* Texto oscuro en el hover */
}
.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--color-blanco);
    background: none; border: none; cursor: pointer;
}

/* === RESPONSIVIDAD DE LA NUEVA CABECERA === */
@media (max-width: 992px) {
    .brand-name { display: none; }
}
@media (max-width: 768px) {
    .top-bar .contact-info, .top-bar .separator { display: none; }
    .top-bar .container { justify-content: center; }
    .main-nav .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-azul-principal);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }
    .main-nav .nav-links.active { display: flex; }
    .main-nav .nav-links li { width: 100%; }
    .main-nav .nav-links li a {
        padding: 15px 20px;
        width: 100%;
        border-radius: 0;
        text-align: left;
    }
    .menu-toggle { display: block; }
}
/* === CORREGIR: Línea divisoria entre top bar y navbar === */
.top-divider {
  height: 1px;
 background-color: #001a66;
  opacity: 0.2;
}

/* === MEJORAR ESPACIADO ENTRE LINKS DEL NAVBAR === */
.navbar-nav .nav-link {
  margin: 0 0.35rem; /* separa un poco más los links */
}

/* === HACER LA NAVBAR RESPONSIVA Y CONSISTENTE EN MÓVIL === */
@media (max-width: 768px) {
  .navbar-collapse {
    
    padding: 1rem;
    border-radius: 0 0 10px 10px;
  }

  .navbar .navbar-brand {
   
    flex-direction: row;
    justify-content: center;
    width: 100%;
  }

  .navbar .navbar-brand img {
    height: 50px;
    margin: auto;
  }

  .top-bar .contact-info {
  
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;
    margin: 0 auto;
    gap: 4px;
    padding-top: 5px;
  }

  .top-bar .separator {
     background-color: #001a66;
    display: none;
  }

  .social-icons {
      color: #001a66;
    justify-content: center;
    margin-top: 0.5rem;
  }

  .top-bar .container {
    flex-direction: column;
    text-align: center;
  }
}
/* === Asegura fondo azul en navbar móvil === */
.navbar {
    background-color: white;
}


/* =================================================================== */
/* === HERO PARA PÁGINAS INTERNAS (SERVICIOS, ETC.) === */
/* =================================================================== */
.page-hero {
    position: relative;
    height: 80vh; /* Altura de la sección de video, puedes ajustarla */
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
}

.page-hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    z-index: 1;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    z-index: 2;
}

.page-hero-content {
    position: relative;
    z-index: 3;
}

.page-hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 7vw, 4.5rem);
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
}

.servicios-card {
 
    padding: 2.5rem 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.top-bar .contact-info a {
      color: #001a66;
      margin-right: 10px;
      text-decoration: none;
}
    .top-bar .separator {
      margin: 0 10px;
      border-left: 3px solid  #001a66;;
      height: 16px;
    }
    .social-icons a {
      color: #001a66;
      margin-left: 10px;
      font-size: 1rem;
    }

    /* Barra superior */

    .top-bar {
        color: #001a66;
      padding: 0.3rem 0;
      font-size: 0.9rem;
    }

    .top-bar .container {
        color: #001a66;
        
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
    }

    .top-bar .contact-info a {
      color: #001a66;
      margin-right: 10px;
      text-decoration: none;
    }

    .top-bar .separator {
         color: #001a66;
      margin: 0 10px;
      border-left: 1px solid #001a66;
      height: 16px;
    }

    .social-icons a {
      color: #001a66;
      margin-left: 10px;
      font-size: 1rem;
    }


    .navbar .navbar-brand {
        color: #001a66;
      display: flex;
      align-items: center;
    }



    .navbar .brand-text .brand-name{
      color: #001a66;
      font-family: 'Playfair Display', serif;
      font-weight: bold;
      position: relative;
    }

    .navbar .brand-title .brand-name{
         color: #001a66;
      font-size: 7rem;
    }

    .navbar .brand-lines::after {
    color: #001a66;
      content: "";
      display: block;
      width: 100%;
      border-top: 9px solid  #001a66;;
      border-bottom: 2px solid   #001a66;;
      margin-top: 30px;
      height: 5px;
    }

    .navbar-nav .nav-link {
       color: #001a66;
      font-weight: 600;
      padding: 0.5rem 1rem;
      transition: background-color 0.3s ease;
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover {
      background-color: #ccaa33;
      color: #001a66 !important;
      border-radius: 15px;
    }

    .navbar-toggler {
         background-color: #001a66 !important;
      border: none;
    }

    .navbar-toggler-icon {
       background-color: #001a66 !important;
        background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 30 30' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }


