/* ==========================================================================
   HOJA DE ESTILOS: FOOTER CORPORATIVO Y COTIZADOR FLOTANTE (RESPONSIVO)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ESTRUCTURA Y CONTENEDOR GENERAL
   -------------------------------------------------------------------------- */
.main-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

.main-footer *,
.main-footer *::before,
.main-footer *::after {
    box-sizing: border-box;
}

.footer-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* --------------------------------------------------------------------------
   2. FRANJA 1: REDES SOCIALES (#700E1C)
   -------------------------------------------------------------------------- */
.footer-social-bar {
    background-color: #700E1C; 
    padding: 28px 0;
}

.social-links-grid {
    display: flex;
    justify-content: space-around; 
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.social-link-item {
    display: block;
    text-decoration: none; 
    transition: transform 0.3s ease, opacity 0.3s ease;
    padding: 5px;
}

.social-link-item i {
    font-size: 24px; 
    color: #ffffff;  
    display: block;
    line-height: 1;
}

.social-link-item:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}

/* --------------------------------------------------------------------------
   3. FRANJA 2: CONTENIDO PRINCIPAL Y CERTIFICACIONES (#821224)
   -------------------------------------------------------------------------- */
.footer-main-content {
    background-color: #821224; 
    padding: 50px 0;
}

.footer-main-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

/* Columna 1: Logo y Datos de Contacto */
.footer-col-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-brand-block {
    margin-bottom: 25px;
}

.footer-brand-logo {
    max-width: 200px;
    width: 100%;
    height: auto;
    display: block;
}

.footer-info-block {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.footer-address {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.footer-contact-details {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0;
}

.footer-contact-details a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact-details a:hover {
    color: #cccccc;
}

/* Separadores Verticales */
.footer-divider-line {
    width: 1px;
    height: 180px;
    background-color: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}

/* Columna 2: Certificaciones y Reconocimientos */
.footer-col-center {
    flex: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 45px;
    padding: 0 15px;
}

.certifications-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    width: 100%;
}

.cert-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.75rem;
    color: #ffffff;
    letter-spacing: 1px;
    text-transform: uppercase;
    width: 170px;
    flex-shrink: 0;
    line-height: 1.3;
    text-align: left;
}

.cert-logos {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-grow: 1;
    flex-wrap: nowrap;
    gap: 10px;
}

.cert-logo-img {
    max-height: 48px;
    max-width: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Columna 3: Libro de Reclamaciones */
.footer-col-right {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-left: 20px;
}

.reclamaciones-link {
    display: block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.reclamaciones-link:hover {
    opacity: 0.85;
    transform: scale(1.03);
}

.icon-libro-reclamaciones {
    max-width: 150px;
    width: 100%;
    height: auto;
    display: block;
}

/* --------------------------------------------------------------------------
   4. FRANJA 3: ENLACES LEGALES (#221F1D)
   -------------------------------------------------------------------------- */
.footer-legal-bar {
    background-color: #221F1D; 
    padding: 22px 0;
}

.legal-links-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 15px;
}

.legal-links-flex a {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.82rem;
    font-weight: 300;
    color: #b2b2b2;
    text-decoration: none;
    transition: color 0.2s ease;
}

.legal-links-flex a:hover {
    color: #ffffff;
}

.legal-separator {
    color: #555555;
    font-size: 0.82rem;
    user-select: none;
}

/* --------------------------------------------------------------------------
   5. BOTÓN FLOTANTE FIJO (STICKY CTA)
   -------------------------------------------------------------------------- */
.sticky-cotizar-btn {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 105px;
    height: 105px;
    background-color: #8C1527; 
    color: #ffffff;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    cursor: pointer;
    z-index: 99990; 
    box-shadow: 0 4px 20px rgba(140, 21, 39, 0.4);
    transition: background-color 0.3s ease;
    transform-origin: bottom right;
}

.btn-titilante {
    animation: pulsacion-suave-amplia 2.5s infinite ease-in-out !important;
}

@keyframes pulsacion-suave-amplia {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(140, 21, 39, 0.4);
    }
    50% {
        transform: scale(1.18);
        box-shadow: 0 12px 35px rgba(140, 21, 39, 0.85);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 4px 20px rgba(140, 21, 39, 0.4);
    }
}

.sticky-cotizar-btn:hover {
    background-color: #72101F;
}

.sticky-cotizar-btn img {
    width: 22px;
    height: auto;
    display: block;
}

.sticky-cotizar-btn span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.80rem;
    line-height: 1.2;
    letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   6. PANEL DESPLEGABLE OFF-CANVAS
   -------------------------------------------------------------------------- */
.cotizar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cotizar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cotizar-offcanvas-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    background-color: #8C1527;
    z-index: 99999;
    padding: 30px 35px 25px 35px;
    overflow-y: auto !important; /* Desplazamiento seguro en pantallas cortas */
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
    font-family: 'Montserrat', sans-serif;
}

.cotizar-offcanvas-panel.active {
    transform: translateX(0);
}

.offcanvas-content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    justify-content: space-between;
}

.offcanvas-header {
    text-align: left;
    margin-bottom: 20px;
}

.offcanvas-main-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 15px 0;
}

.offcanvas-main-title span {
    font-weight: 300;
}

.offcanvas-sub-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.82rem;
    color: #ffffff;
    letter-spacing: 4px;
    margin: 0;
    text-transform: uppercase;
    text-align: left;
}

.offcanvas-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    border: none;
    background-color: #ffffff;
    color: #2C2825;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    outline: none;
    border-radius: 2px;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%232C2825%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 11px auto;
}

.form-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.78rem;
    color: #ffffff;
    line-height: 1.25;
}

.checkbox-container input {
    accent-color: #2C2825;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    flex-shrink: 0;
}

.checkbox-container a {
    color: #ffffff;
    text-decoration: underline;
}

.form-submit-wrapper {
    margin-top: 5px;
}

.btn-cotizar-submit {
    width: 100%;
    height: 46px;
    background-color: #262423;
    color: #ffffff;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-cotizar-submit:hover {
    background-color: #111010;
}

.offcanvas-footer-close {
    text-align: center;
    margin-top: 15px;
}

.btn-cerrar-offcanvas {
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.90rem;
    letter-spacing: 2px;
    cursor: pointer;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.btn-cerrar-offcanvas:hover {
    opacity: 1;
}

.close-x {
    font-weight: 400;
    margin-right: 4px;
}

/* ==========================================================================
   7. MEDIA QUERIES (ADAPTACIONES RESPONSIVAS FINAS)
   ========================================================================== */

/* Tablets Horizontales / Desktops Pequeños */
@media (max-width: 1024px) {
    .footer-main-grid {
        flex-direction: column;
        text-align: center;
        gap: 35px;
    }

    .footer-divider-line {
        display: none;
    }

    .footer-col-left {
        align-items: center;
        text-align: center;
    }

    .footer-brand-block {
        margin-bottom: 20px;
    }

    .footer-col-center {
        gap: 30px;
        padding: 0;
        width: 100%;
    }

    .certifications-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .cert-label {
        width: 100%;
        text-align: center;
    }

    .cert-logos {
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px 25px;
    }

    .footer-col-right {
        padding-left: 0;
    }
}

/* Tablets Verticales y Smartphones */
@media (max-width: 768px) {
    .footer-social-bar {
        padding: 20px 0;
    }

    .social-links-grid {
        gap: 15px 25px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .social-link-item i {
        font-size: 22px;
    }

    .footer-main-content {
        padding: 40px 0;
    }

    .footer-legal-bar {
        padding: 18px 0;
    }

    .legal-links-flex {
        flex-direction: column;
        gap: 8px;
    }

    .legal-separator {
        display: none;
    }

    /* Offcanvas Móvil Fullscreen */
    .cotizar-offcanvas-panel {
        width: 100vw;
        padding: 25px 20px 20px 20px;
    }

    .offcanvas-main-title {
        font-size: 1.5rem;
    }

    .form-row-double {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

/* Smartphones Pequeños (Móviles de pantalla reducida) */
@media (max-width: 480px) {
    .footer-brand-logo {
        max-width: 160px;
    }

    .footer-address,
    .footer-contact-details {
        font-size: 0.85rem;
    }

    .cert-logo-img {
        max-height: 40px;
        max-width: 70px;
    }

    .icon-libro-reclamaciones {
        max-width: 130px;
    }

    /* Ajuste fino del botón flotante para no obstruir pantalla */
    .sticky-cotizar-btn {
        width: 85px;
        height: 85px;
        gap: 4px;
    }

    .sticky-cotizar-btn img {
        width: 18px;
    }

    .sticky-cotizar-btn span {
        font-size: 0.72rem;
        letter-spacing: 0.5px;
    }
}