/* ===================================
   Toptransfer — Custom Styles
====================================== */

/* ===================================
   Global — Imágenes responsivas
====================================== */

img {
    max-width: 100%;
    height: auto;
}

/* Evita scroll horizontal por desbordes en pantallas chicas */
html,
body {
    overflow-x: hidden;
}

/* ===================================
   Footer — padding compacto
====================================== */

footer {
    padding: 40px 0 !important;
}

/* ===================================
   Learn More Section
====================================== */

.learn-more-section h5 {
    color: #ffffff !important;
    font-weight: 400;
    line-height: 1.7;
}

/* ===================================
   Hero Section
====================================== */

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 500px;
    background-image: url('../img/slide-1.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Oscurecido neutro (negro) solo a la izquierda para legibilidad del texto.
       Se evita el tinte azul para que la van conserve su color plata natural. */
    background: linear-gradient(to right, rgba(0, 0, 0, 0.50) 0%, rgba(0, 0, 0, 0.20) 45%, rgba(0, 0, 0, 0) 72%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 80px;
    animation: heroFadeIn 1s ease forwards;
}

.hero-subtitle {
    display: block;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    margin-bottom: 18px;
}

.hero-title {
    font-size: clamp(32px, 5.5vw, 62px);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    margin-bottom: 24px;
    text-align: left;
}

.hero-desc {
    font-size: clamp(15px, 1.8vw, 18px);
    color: rgba(255, 255, 255, 0.90);
    text-align: left;
    max-width: 580px;
    line-height: 1.7;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 992px) {
    .hero-section {
        height: 85vh;
        background-position: center top;
    }
    .hero-overlay {
        background: rgba(0, 0, 0, 0.38);
    }
    .hero-title {
        text-align: center;
    }
    .hero-desc {
        text-align: center;
        max-width: 100%;
    }
    .hero-subtitle {
        text-align: center;
    }
}

/* En celulares la foto (16:9) se recorta fea con cover.
   La mostramos completa como banner abajo, con el texto sobre panel azul. */
@media (max-width: 767px) {
    .hero-section {
        height: auto;
        min-height: 0;
        display: block;
        padding-top: 110px;
        padding-bottom: 58vw;            /* reserva el alto de la van (16:9 = 56.25vw) */
        background-color: #032a58;
        background-size: contain;        /* van completa, sin recorte */
        background-position: center bottom;
    }
    .hero-overlay {
        display: none;                   /* texto ya va sobre azul sólido */
    }
    .hero-content {
        padding-top: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-content {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ===================================
   Navbar — spacing compacto
====================================== */

.navbar-light .navbar-nav .nav-link {
    padding: 28px 14px !important;
    position: relative;
    /* quitamos la línea de borde completa (quedaba al fondo de la caja, suelta) */
    border-bottom: none !important;
    margin-right: 0 !important;
}

/* Subrayado fino y prolijo, justo debajo del texto */
.navbar-light .navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 20px;
    height: 2px;
    background: #006e91;
    transform: scaleX(0);
    transform-origin: center;
    transition: transform .3s ease;
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after,
.navbar-light .navbar-nav .active > .nav-link::after {
    transform: scaleX(1);
}

/* ===================================
   Navegación Responsiva
====================================== */

/* En escritorio solo el menú horizontal: ocultamos el hamburguesa
   (la plantilla original lo dejaba visible y competían ambos). */
@media (min-width: 993px) {
    .sidemenu_btn {
        display: none !important;
    }
}

@media (max-width: 992px) {
    /* Mostrar botón hamburguesa en tablet y móvil */
    .sidemenu_btn {
        width: 36px;
        padding: 6px;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 999;
        cursor: pointer;
        position: absolute;
        display: inline-block !important;
        transition: all .3s linear;
    }

    .sidemenu_btn span {
        height: 2px;
        width: 100%;
        background: #006e91;
        display: block;
        margin: auto;
        transition: .5s ease;
    }

    .sidemenu_btn span:nth-child(2) {
        margin: 5px 0;
    }

    /* Ocultar menú horizontal expandido, usar solo el menú lateral.
       Especificidad alta para ganarle a Bootstrap (.navbar-expand-md
       .navbar-collapse{display:flex!important}). */
    .navbar.navbar-expand-md .navbar-collapse,
    .navbar.navbar-expand-md .navbar-collapse.collapse {
        display: none !important;
    }

    /* Reducir logo en tablet */
    .navbar img {
        max-width: 120px !important;
        height: auto !important;
    }
}

@media (max-width: 576px) {
    /* Reducir logo en móvil */
    .navbar img {
        max-width: 100px !important;
        height: auto !important;
    }
}

/* ===================================
   Sección Nosotros — Imágenes
====================================== */

.blog-section img {
    display: block;
    width: 90%;
    margin: 0 auto;
    border-radius: 8px;
    object-fit: cover;
}

.blog-section .right-text img {
    margin: 0 auto;
}

/* Google Maps iframe */
.contact-section iframe {
    width: 100%;
    height: 250px;
    border-radius: 8px;
    margin-top: 16px;
}

/* Separación entre el reCAPTCHA y el botón Enviar */
.contact-form .g-recaptcha {
    margin-bottom: 24px;
}

/* ===================================
   Quiénes somos — Tarjetas estáticas de igual altura
====================================== */

/* "Valores" tiene mucho más texto que Visión/Misión, por lo que el efecto
   flip (que exige altura fija) lo recortaba o lo desbordaba. Las dejamos
   estáticas (solo la cara frontal), con altura automática e IGUAL altura
   por fila usando flexbox. Nunca se corta el contenido. */

.services-section .flip-boxes {
    display: flex;            /* la tarjeta llena la altura de la columna */
    padding: 0 10px;         /* separación entre tarjetas (la fila es no-gutters) */
}

.flip-box {
    display: flex;
    width: 100%;
    height: auto !important;
    perspective: none;
    margin-bottom: 0;
}

.flip-box-inner {
    display: flex;
    flex: 1;
    transform: none !important;
    transition: none !important;
    height: auto !important;
}

/* anula el volteo en hover */
.flip-box:hover .flip-box-inner {
    transform: none !important;
}

.flip-box-back {
    display: none !important;
}

/* el frente vuelve al flujo y llena la tarjeta (fondo blanco completo) */
.flip-box-front {
    position: relative !important;
    flex: 1;
    height: auto !important;
    backface-visibility: visible !important;
    padding: 36px 24px !important;
}

/* En tablet/móvil: una tarjeta por fila */
@media (max-width: 991px) {
    .services-section .flip-boxes {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }
}

/* ===================================
   Botón WhatsApp Flotante
====================================== */

.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 30px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.45);
    animation: whatsappPulse 2.5s infinite;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    color: #ffffff;
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.65);
    animation: none;
}

@keyframes whatsappPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
    }
    70% {
        box-shadow: 0 0 0 14px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 576px) {
    .whatsapp-float {
        width: 52px;
        height: 52px;
        font-size: 26px;
        bottom: 16px;
        right: 16px;
    }
}

/* ===================================
   Footer — Redes sociales inactivas
====================================== */

.social-inactive {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}

/* ===================================
   Banner de consentimiento de cookies
====================================== */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #ffffff;
    border-top: 3px solid #00b5e2;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.18);
    padding: 18px 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-banner p {
    margin: 0;
    flex: 1 1 420px;
    font-size: 14px;
    line-height: 1.6;
    color: #333333;
}

.cookie-banner a {
    color: #00b5e2;
    text-decoration: underline;
}

.cookie-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Aceptar y Rechazar comparten exactamente el mismo peso visual: el
   consentimiento debe ser libre, sin inducir una opción por sobre la otra. */

.cookie-btn {
    border: 1px solid #00b5e2;
    border-radius: 30px;
    padding: 9px 26px;
    min-width: 130px;
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    color: #00b5e2;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.cookie-btn:hover {
    background: #00b5e2;
    color: #ffffff;
}

@media (max-width: 576px) {
    .cookie-banner {
        padding: 16px;
    }

    .cookie-banner-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}

/* ===================================
   Marcador de Google Maps (carga bajo clic)
====================================== */

.map-consent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    min-height: 200px;
    padding: 20px;
    background: #f2f5f7;
    border: 1px dashed #b9c4cb;
    cursor: pointer;
    font-size: 14px;
    color: #4a5860;
}

.map-consent i {
    font-size: 28px;
    margin-bottom: 10px;
    color: #00b5e2;
}

/* ===================================
   Aviso de privacidad en el formulario
====================================== */

.form-privacy {
    font-size: 13px;
    line-height: 1.6;
    color: #6b6b6b;
    margin-bottom: 14px;
}

.form-privacy a {
    color: #00b5e2;
    text-decoration: underline;
}

.form-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #6b6b6b;
    margin-bottom: 18px;
    font-weight: normal;
}

.form-consent input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ===================================
   Páginas legales
====================================== */

.legal-section {
    padding: 160px 0 80px;
}

.legal-section h1 {
    font-size: 30px;
    margin-bottom: 8px;
}

.legal-section h2 {
    font-size: 20px;
    margin: 34px 0 12px;
}

.legal-section p,
.legal-section li {
    font-size: 15px;
    line-height: 1.8;
    color: #4a4a4a;
}

.legal-section ul {
    padding-left: 20px;
    list-style: disc;
}

.legal-meta {
    color: #8a8a8a;
    font-style: italic;
}

.legal-table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 14px;
}

.legal-table th,
.legal-table td {
    border: 1px solid #dfe4e8;
    padding: 10px 12px;
    vertical-align: top;
    text-align: left;
}

.legal-table th {
    background: #f2f5f7;
}

@media (max-width: 768px) {
    .legal-table,
    .legal-table thead,
    .legal-table tbody,
    .legal-table tr,
    .legal-table th,
    .legal-table td {
        display: block;
        width: 100%;
    }

    .legal-table thead {
        display: none;
    }

    .legal-table tr {
        margin-bottom: 16px;
        border: 1px solid #dfe4e8;
    }

    .legal-table td {
        border: 0;
        border-bottom: 1px solid #eef1f3;
    }
}

/* ===================================
   Enlaces legales del pie de página
====================================== */

.footer-legal-links {
    font-size: 13px;
}

.footer-legal-links a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.85;
}

.contact-form label .optional {
    font-weight: normal;
    color: #9a9a9a;
    font-size: 12px;
}
