:root {
   --primary-color: #E67E22;
   --secondary-color: #1F4E79;
   --background-light: #F2F2F2;
   --text-dark: #333333;
   --text-light: #FFFFFF;
}

/* ================== */
/* Fuentes (Montserrat) */
/* ================== */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-regular.woff2') format('woff2'),
         url('../fonts/montserrat-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-semibold.woff2') format('woff2'),
         url('../fonts/montserrat-semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/montserrat-bold.woff2') format('woff2'),
         url('../fonts/montserrat-bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

/* ================== */
/* Estilos Generales */
/* ================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h2, .section-title {
    font-size: 2.5em;
    font-weight: 700;
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 40px;
}

/* ================== */
/* Estilos del Botón Principal (CTA) */
/* ================== */
.btn-cta, .btn-card {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-cta:hover, .btn-card:hover {
    background-color: #d86811;
}

.btn-card {
    padding: 10px 20px;
}

/* ================== */
/* Estilos de la Barra de Navegación */
/* ================== */
.navbar {
    position: relative;
    width: 100%;
    top: 0;
    left: 0;
    padding: 10px 50px;
    z-index: 100;
    transition: all 0.5s ease;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Estilos para la barra de navegación en la página de inicio (transparente) */
.navbar-transparent {
    position: absolute;
    background-color: rgba(31, 78, 121, 0.4);
    box-shadow: none;
}

.navbar-transparent .logo {
    filter: brightness(0) invert(1);
}

.navbar-transparent .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-transparent .navbar-nav .nav-link,
.navbar-transparent .contact-link,
.navbar-transparent .social-header a {
    color: var(--text-light);
    border-bottom-color: transparent !important;
}

.navbar-transparent .navbar-nav .nav-link.active,
.navbar-transparent .navbar-nav .nav-link:hover,
.navbar-transparent .contact-link:hover,
.navbar-transparent .social-header a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color) !important;
}

.navbar-transparent.sticky .logo {
    filter: none;
}

/* Estilos cuando la barra de navegación se vuelve sticky */
.navbar.sticky {
    position: fixed;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 50px;
}

/* Estilos del logo, íconos y textos cuando el header está sticky */
.navbar.sticky .logo {
    filter: none;
}
.navbar.sticky .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2831, 78, 121, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar.sticky .navbar-nav .nav-link,
.navbar.sticky .contact-link,
.navbar.sticky .social-header a {
    color: var(--secondary-color);
}

/* Asegura que los enlaces activos/hover sean naranjas en el modo sticky */
.navbar.sticky .navbar-nav .nav-link.active,
.navbar.sticky .navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Nuevas reglas para el hover en los enlaces de contacto y redes sociales */
.navbar.sticky .contact-link:hover,
.navbar.sticky .social-header a:hover {
    color: var(--primary-color) !important;
}

.logo {
    max-width: 100px;
    height: auto;
    display: block;
    transition: max-width 0.3s ease;
}

.navbar-toggler {
    border-color: var(--secondary-color);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2831, 78, 121, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-nav .nav-link {
    color: var(--secondary-color);
    font-size: 1.1em;
    font-weight: 600;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-right: 1rem;
    padding-left: 1rem;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-header .contact-link i.fab.fa-whatsapp {
    font-size: 1.4em;
}

.social-header a {
    color: var(--secondary-color);
    font-size: 1.4em;
    margin-left: 15px;
    transition: color 0.3s ease;
}

.social-header a:hover {
    color: var(--primary-color);
}

/* ================== */
/* Sección del Hero (Home) */
/* ================== */
.hero-section {
    background: no-repeat center center/cover;
    background-color: #557999;
    color: var(--text-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 80px;
    padding-bottom: 14px;
}

.hero-content {
    text-align: center;
    margin-top: 30px;
    padding: 30px 20px;
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.hero-content h1,
.about-hero h1 {
    font-size: 3em;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-light);
}

.hero-content p,
.about-hero p {
    font-size: 1.2em;
    margin-bottom: 30px;
    color: var(--text-light);
}

/* ================== */
/* Estilos de las Tarjetas de Contacto en el Hero */
/* ================== */
.contact-cards-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 30px;
    margin-top: 40px;
    z-index: 10;
    position: relative;
    padding: 0 20px;
}

.contact-card-hero {
    background-color: rgba(255, 255, 255, 0.85);
    color: var(--text-dark);
    padding: 25px;
    border-radius: 10px;
    text-align: center;
    flex: 1 1 330px;
    max-width: 330px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.contact-card-hero:hover {
    transform: translateY(-5px);
}

.contact-card-hero i {
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.contact-card-hero h4 {
    font-size: 1.2em;
    margin-bottom: 5px;
}

.contact-card-hero p {
    font-size: 1em;
    margin-bottom: 15px;
    word-break: break-word; /* Esta es la nueva línea */
}
/* ... */

/* ================== */
/* Sección de Servicios */
/* ================== */
.services-section {
    padding: 80px 20px;
}

.services-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
}

.service-card {
    background-color: var(--text-light);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 0 0 25px 0;
    text-align: center;
    flex: 1 1 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.service-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* ================== */
/* Sección "Por Qué Elegirnos" */
/* ================== */
.why-us-section {
    background-color: #D9D9D9;
    padding: 40px 20px;
}

.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.why-us-item {
    background-color: var(--text-light);
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.why-us-icon {
    font-size: 2.5em;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.why-us-item h4 {
    font-size: 1.2em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* ================== */
/* Sección de Contacto */
/* ================== */
.contact-section {
    padding: 80px 20px;
}

.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-info, .contact-form-container {
    flex: 1 1 400px;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info a {
    color: var(--secondary-color);
    text-decoration: none;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    font-size: 1.5em;
    color: var(--secondary-color);
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
}

.btn-submit {
    width: 100%;
    background-color: var(--secondary-color);
    color: var(--text-light);
    border: none;
    padding: 15px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.btn-submit:hover {
    background-color: #153655;
}

/* ================== */
/* Pie de Página (Footer) */
/* ================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 60px 0;
    font-size: 0.95rem;
}

.footer-logo {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-top: 15px;
}

.footer-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    position: relative;
}

.footer-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin-top: 10px;
    margin-left: 0;
}

/* Ajuste para centrar el after en pantallas pequeñas */
@media (max-width: 767px) {
    .footer-heading::after {
        margin-left: auto;
        margin-right: auto;
    }
}


.footer-links {
    padding-left: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer p a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer p a:hover {
    color: var(--primary-color);
}

.footer p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer p i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.footer-social-links a {
    color: var(--text-light);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Media Queries para responsividad del footer */
@media (max-width: 767px) {
    .footer .text-md-start {
        text-align: center !important;
    }

    .footer-heading {
        margin-top: 30px;
    }

    .footer-description,
    .footer-links,
    .footer p {
        text-align: center;
        justify-content: center;
    }
    
    .footer p i {
        margin-right: 5px;
    }
}

/* ================== */
/* Media Queries (Responsive Design) */
/* ================== */
@media (max-width: 991.98px) {
    .navbar {
        flex-direction: row;
        align-items: center;
        padding: 10px 20px;
    }
    
    .navbar.sticky {
        padding: 10px 20px;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .contact-header {
        flex-direction: row;
        align-items: center;
        margin-right: 15px;
        gap: 10px;
        order: 1;
        margin-left: auto;
    }

    .social-header a {
        font-size: 1.4em;
        margin-left: 0;
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover {
        color: var(--primary-color);
        border-bottom-color: var(--primary-color);
    }

    .navbar-toggler {
        align-self: center;
        order: 2;
    }

    .navbar-collapse {
        background-color: rgba(31, 78, 121, 0.9);
        padding: 10px;
        border-radius: 5px;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
    }

    /* Estilos de los enlaces del menú colapsado */
    .navbar-collapse .navbar-nav .nav-link,
    .navbar-collapse .contact-link,
    .navbar-collapse .social-header a {
        color: var(--text-light) !important;
    }
    
    /* Cuando el menú colapsado está sticky, volvemos a los colores originales */
    .navbar.sticky .navbar-collapse .navbar-nav .nav-link,
    .navbar.sticky .navbar-collapse .contact-link,
    .navbar.sticky .navbar-collapse .social-header a {
        color: var(--secondary-color);
    }

    /* Asegura que los enlaces activos/hover sean naranjas en el modo sticky dentro del menú colapsado */
    .navbar.sticky .navbar-collapse .navbar-nav .nav-link.active,
    .navbar.sticky .navbar-collapse .navbar-nav .nav-link:hover {
        color: var(--primary-color) !important;
    }

    .navbar-nav .nav-item {
        margin: 10px 0;
    }
}

@media (max-width: 768px) {
    .hero-section,
    .about-hero {
        min-height: 80vh;
        padding-top: 100px;
        justify-content: flex-start;
    }

    .hero-content {
        padding-top: 20px;
        padding-bottom: 20px;
        margin-top: 0;
    }

    .contact-cards-container {
        margin-top: 20px;
        gap: 20px;
        align-items: center;
    }

    .hero-content h1 {
        font-size: 2em;
    }

    h2 {
        font-size: 2em;
    }

    .why-us-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        flex-direction: column;
    }

    .logo {
        max-width: 100px;
    }
}

.about-hero {
    background-size: cover;
    background-position: center center;
    color: var(--text-light);
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ================== */
/* Estilos Específicos para Páginas */
/* ================== */

/* Ajuste para la imagen en la sección "Nuestra Historia" de Nosotros */
.section-padding .col-md-6 img {
    max-height: 400px;
    object-fit: cover;
    width: 100%;
    margin: 14px auto 14px auto;
}

/* Ajuste para la imagen del mapa en la sección "Servicio y Compromiso con la IV Región" */
.section-padding.text-center img {
    max-width: 800px;
    width: 100%;
    height: auto;
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin: 10px auto 14px auto;
}

/* ================== */
/* Estilos Específicos para el CTA de Contacto */
/* ================== */
.contact-cta-section {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 80px 20px;
}

.contact-cta-section .section-title,
.contact-cta-section .lead {
    color: var(--text-light);
}

.contact-buttons-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.btn-contact-modern {
    background-color: var(--primary-color);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-contact-modern:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
}

.btn-contact-modern i {
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .contact-buttons-container {
        flex-direction: column;
        align-items: center;
    }

    .btn-contact-modern {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ================== */
/* Estilos para la nueva sección de servicios */
/* ================== */

.service-block {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 3rem;
}

.service-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.service-block-image {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.service-block-content {
    background-color: transparent;
    border-radius: 8px;
}

.service-block h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.service-block .lead {
    font-size: 1rem;
    color: var(--text-dark);
}

.service-block:hover .service-block-image {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .service-block.flex-row-reverse .service-block-content {
        padding-left: 0;
        padding-right: 2rem;
    }
}

/* ================== */
/* Estilos para la Página de Contacto */
/* ================== */
.contact-details-grid {
    justify-content: center;
}

.contact-card {
    background-color: #fff;
    padding: 2.5rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.contact-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-card h4 {
    font-size: 1.25rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 1rem;
    color: var(--text-muted);
}

.contact-card a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-form-style .form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
}

.contact-form-style .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(230, 126, 34, 0.25);
}

/* ================== */
/* Pie de Página (Footer) */
/* ================== */
.footer {
    background-color: var(--secondary-color);
    color: var(--text-light);
    padding: 60px 0;
    font-size: 0.95rem;
}

.footer-logo {
    max-width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-top: 15px;
}

.footer-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    position: relative;
}

.footer-heading::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    margin-top: 10px;
    margin-left: 0;
}

/* Ajuste para centrar el after en pantallas pequeñas */
@media (max-width: 767px) {
    .footer-heading::after {
        margin-left: auto;
        margin-right: auto;
    }
}


.footer-links {
    padding-left: 0;
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer p a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer p a:hover {
    color: var(--primary-color);
}

.footer p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer p i {
    color: var(--primary-color);
    font-size: 1.1em;
}

.footer-social-links a {
    color: var(--text-light);
    font-size: 1.5em;
    margin-right: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer-social-links a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Media Queries para responsividad del footer */
@media (max-width: 767px) {
    .footer .text-md-start {
        text-align: center !important;
    }

    .footer-heading {
        margin-top: 30px;
    }

    .footer-description,
    .footer-links,
    .footer p {
        text-align: center;
        justify-content: center;
    }
    
    .footer p i {
        margin-right: 5px;
    }
}