:root {
    --bg-navbar: #111827;
    --bg-footer: #111827;
    --accent-color: #facc15;
}

html {
    overflow-x: hidden;
    overflow-y: scroll;
}

body {
    font-family: 'Montserrat', sans-serif;
    padding-top: 80px;

    /* Empujar footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh;

    position: relative;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: visible;
}

main {
    flex: 1;
}

footer {
    background-color: var(--bg-footer);
}

footer ul li a:hover {
    color: var(--accent-color) !important;
    transition: 0.3s;
}

footer h6 {
    letter-spacing: 1px;
}

.navbar {
    /* Siempre arriba */
    position: fixed;
    top: 0;
    width: 100vw;
    max-width: 100%;
    z-index: 1030;

    background-color: var(--bg-navbar);
    padding: 1.2rem 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: 1.5px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.75) !important;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #fff !important;
}

#heroCarousel {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow: hidden;
}

.hero-slide {
    height: calc(100vh - 80px);
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    /* Crucial para centrar */
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
    /* Asegura el centrado del texto */
}

.hero-content {
    z-index: 2;
    width: 100%;
}

section {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}

@media (min-width: 768px) {
    section {
        padding-top: 100px !important;
        padding-bottom: 100px !important;
    }
}

@media (max-width: 576px) {
    .hero-slide {
        background-attachment: scroll;
        height: calc(100svh - 80px);
        padding: 0 15px;
    }

    #heroCarousel h1 {
        font-size: 2.2rem !important;
    }

    #heroCarousel p {
        font-size: 1rem !important;
    }

    /* Achicamos el contenedor de la marca para que no empuje el botón */
    .navbar-brand {
        max-width: 75%;
    }

    /* Reducimos el logo solo en celular */
    .navbar-brand img {
        width: 35px !important;
    }

    /* Reducimos el texto solo en celular */
    .navbar-brand span {
        font-size: 0.85rem !important;
        /* Ajusta este valor si lo quieres más grande o pequeño */
        white-space: nowrap;
        /* Evita que el nombre se parta en dos líneas */
        overflow: hidden;
        text-overflow: ellipsis;
        /* Si el nombre es muy largo, añade "..." al final */
    }
}

/* --- SERVICIOS ---*/

.section-title {
    font-weight: 700;
    color: var(--bg-navbar);
    margin-bottom: 1rem;
}

.service-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--bg-navbar);

    /* Icono al lado del texto (PC) */
    display: flex;
    gap: 2rem;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

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

.service-icon {
    min-width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.icon-truck {
    background-color: rgba(250, 204, 21, 0.15);
    color: #d97706;
}

.icon-plane {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.service-content h2 {
    color: var(--bg-navbar);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.service-details {
    /* Quitamos el fondo y el padding grueso */
    background-color: transparent;
    padding: 0;

    /* Añadimos una línea sutil arriba para separar */
    border-top: 1px solid #eee;

    /* Damos espacio con la línea */
    padding-top: 1.5rem;
    margin-top: 1.5rem;
}

.service-details p {
    margin-bottom: 0.8rem;
}

.service-details strong {
    color: var(--bg-navbar);
}

.detail-list li span {
    background-color: var(--bg-navbar);
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-right: 5px;
    font-weight: 600;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 5px;
}

.city-tag {
    border: 1px solid #dee2e6;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 1rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .service-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .service-details {
        text-align: left;
        width: 100%;
    }
}

.page-header {
    /* Altura controlada, no tan alta como la portada */
    height: 50vh;
    min-height: 300px;

    /* Imagen de fondo y superposición oscura */
    background-image: linear-gradient(rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.7)), url('../img/carretera_rural.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Efecto Parallax sutil */

    /* Centrado */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;

    /* Ajuste para que empiece detrás del navbar (igual que el home) */
    margin-top: -82px;
    padding-top: 80px;
}

.page-header-nosotros {
    height: 50vh;
    min-height: 300px;

    background-image: linear-gradient(rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.7)), url('../img/camion_transporte_rojo.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    /* Centrado */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;

    /* Ajuste para que empiece detrás del navbar (igual que el home) */
    margin-top: -82px;
    padding-top: 80px;
}

.page-header-contacto {
    /* Altura controlada, no tan alta como la portada */
    height: 50vh;
    min-height: 300px;

    /* Imagen de fondo y superposición oscura */
    background-image: linear-gradient(rgba(17, 24, 39, 0.7), rgba(17, 24, 39, 0.7)), url('../img/contacto.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Efecto Parallax sutil */

    /* Centrado */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;

    margin-top: -82px;
    padding-top: 80px;
}

@media (max-width: 768px) {
    .page-header {
        height: 40vh;
        background-attachment: scroll;
    }

    .page-header-nosotros {
        height: 40vh;
        background-attachment: scroll;
    }
}

.value-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid transparent;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.col-md-4:nth-child(1) .value-card {
    border-color: var(--accent-color);
}

.col-md-4:nth-child(2) .value-card {
    border-color: #0d6efd;
}

.col-md-4:nth-child(2) .value-card i {
    color: #0d6efd;
}

.col-md-4:nth-child(3) .value-card {
    border-color: #198754;
}

.col-md-4:nth-child(3) .value-card i {
    color: #198754;
}

.icon-wrapper {
    background-color: rgba(0, 0, 0, 0.03);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.service-card.card-truck {
    border-left-color: var(--accent-color);
}

.service-card.card-plane {
    border-left-color: #0d6efd;
}

/* 
=========================================
   PÁGINA DE CONTACTO
========================================= 
*/

.contact-section {
    padding: 5rem 0;
    background-color: #f4f6f9;
}

.contact-text h2 {
    color: var(--bg-navbar);
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-text p {
    color: #6c757d;
    margin-bottom: 2rem;
}

.contact-info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    border-left: 5px solid transparent;
    transition: transform 0.2s ease;
}

.contact-info-card:hover {
    transform: translateX(5px);
}

.border-whatsapp {
    border-left-color: #198754;
}

.border-schedule {
    border-left-color: var(--accent-color);
}

.border-email {
    border-left-color: #0d6efd;
}

.icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

.bg-whatsapp { background-color: rgba(25, 135, 84, 0.1); color: #198754; }
.bg-schedule { background-color: rgba(250, 204, 21, 0.15); color: #d97706; }
.bg-email { background-color: rgba(13, 110, 253, 0.1); color: #0d6efd; }

.info-details h5 {
    font-weight: 700;
    margin-bottom: 0.2rem;
    color: var(--bg-navbar);
}

.info-details a,
.info-details span {
    color: #6c757d;
    text-decoration: none;
    font-size: 0.95rem;
}

.info-details a:hover {
    color: var(--accent-color);
}

.contact-form-wrapper {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.contact-form-wrapper h2 {
    color: var(--bg-navbar);
    font-weight: 700;
    margin-bottom: 2rem;
}

.custom-form label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.custom-form input,
.custom-form select,
.custom-form textarea {
    width: 100%;
    padding: 1rem;
    background-color: #f8f9fa;
    border: 2px solid transparent;
    border-radius: 10px;
    color: #333;
    font-family: inherit;
    transition: all 0.3s ease;
}

.custom-form input:focus,
.custom-form select:focus,
.custom-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: white;
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background-color: var(--accent-color);
    color: var(--bg-navbar);
    border: none;
    border-radius: 15px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

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

@media (max-width: 768px) {
    .contact-form-wrapper {
        padding: 2rem;
    }
}

/* =========================================
   PERSONALIZACIÓN DE POP-UPS (SWEETALERT2)
   ========================================= */

.custom-swal-popup {
    border-radius: 20px !important;
    font-family: 'Montserrat', sans-serif !important;
}

.custom-swal-btn-success {
    color: var(--bg-navbar) !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    padding: 12px 30px !important;
}

.custom-swal-btn-error {
    color: #000 !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    padding: 12px 30px !important;
}

/* =========================================
   LAYERED UI: GLOBAL BG + IMAGE BLOCKS + GLASS
   ========================================= */

/* 1. Fondo Global de la página completa */
.global-bg-servicios {
    background-image: linear-gradient(rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.90)), url('../img/rural.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

/* 2. Header transparente para integrarse al fondo global */
.global-bg-servicios .page-header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-top: 140px; 
    padding-bottom: 60px;
}

/* 3. Bloques Contenedores de cada Servicio */
.service-block {
    position: relative;
    background-size: cover;
    background-position: center;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 500px;
}

.service-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.55); 
    z-index: 1;
}

.service-block .row {
    position: relative;
    z-index: 2;
}

.bg-truck { background-image: url('../img/camino_transporte.jpg'); }
.bg-plane { background-image: url('../img/cielo.jpg'); }

/* 4. Tarjeta de Vidrio (Glassmorphism) */
.glass-card {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.glass-card h2, .glass-card p, .glass-card strong, .glass-card li {
    color: #ffffff !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.glass-card .glass-list {
    list-style: none;
    padding-left: 0;
}

.glass-badge {
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 500;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    color: #ffffff !important;
}

/* =========================================
   NOSOTROS - GLOBAL BG & AJUSTES
   ========================================= */

.global-bg-nosotros {
    background-image: linear-gradient(rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.90)), url('../img/santiago.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.global-bg-nosotros .page-header-nosotros {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding-top: 140px;
    padding-bottom: 60px;
}

.glass-card .icon-wrapper i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

/* =========================================
   INDEX - HERO ESTÁTICO INMERSIVO
   ========================================= */

.hero-static {
    position: relative;
    background-image: url('../img/camion_transporte_grande.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.hero-static::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(17, 24, 39, 0.65);
    z-index: 1;
}

.hero-static .container {
    position: relative;
    z-index: 2;
}

.glass-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transition: all 0.3s ease;
}

.glass-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-3px);
}

/* =========================================
   INDEX - MEJORAS DE ESTRUCTURA
   ========================================= */

.dark-card:hover {
    transform: translateY(-5px);
    border-color: var(--bs-warning);
}

/* =========================================
   INDEX - FONDO GLOBAL INMERSIVO
   ========================================= */
.global-bg-index {
    background-image: linear-gradient(rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.90)), url('../img/camion_transporte_grande.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.hero-transparent {
    padding-top: 180px;
    padding-bottom: 80px;
}

/* =========================================
   CONTACTO - GLOBAL BG & GLASS FORM
   ========================================= */

.global-bg-contacto {
    background-image: linear-gradient(rgba(17, 24, 39, 0.6), rgba(17, 24, 39, 0.90)), url('../img/contacto.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.hero-transparent-contacto {
    padding-top: 140px;
    padding-bottom: 40px;
}

.glass-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.glass-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--bs-warning);
    color: #ffffff;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
    outline: none;
}

.glass-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.glass-input option {
    background-color: #1f2937;
    color: #ffffff;
}