/* ==========================================================================
   Sección: Footer (3 Niveles)
   ========================================================================== */

.main-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Contenedor centralizado común */
.footer-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
    box-sizing: border-box;
}

/* --- FRANJA 1: Redes Sociales (INVERTIDO: #700E1C) --- */
.footer-social-bar {
    background-color: #700E1C; 
    padding: 30px 0;
}

.social-links-grid {
    display: flex;
    justify-content: space-around; 
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
}

.social-link-item {
    display: block;
    text-decoration: none; 
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-link-item i {
    font-size: 24px; 
    color: #ffffff;  
    display: block;
    line-height: 1;
}

.social-link-item:hover {
    transform: translateY(-3px);
    opacity: 0.85;
}

/* --- FRANJA 2: Contenido Principal (INVERTIDO: #821224) --- */
.footer-main-content {
    background-color: #821224; 
    padding: 60px 0;
}

/* Grid de 3 columnas de igual tamaño e items centrados */
.footer-main-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas exactamente iguales (33.33%) */
    gap: 30px;
    align-items: center;
    justify-items: center; /* Centra horizontalmente cada contenedor en su columna */
}

/* Wrapper común para que cada bloque sea autoajustable y centrado */
.footer-col-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-sizing: border-box;
}

/* Columna 1: Logo */
.footer-brand-logo {
    max-width: 210px;
    height: auto;
    display: block;
}

/* Columna 2: Información de contacto */
.footer-col-info {
    font-family: 'Exo', sans-serif;
    color: #ffffff;
}

.footer-address {
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.footer-contact-details {
    font-size: 0.95rem;
    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;
}

/* Columna 3: Libro de Reclamaciones */
.reclamaciones-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    gap: 12px;
    transition: opacity 0.3s ease;
}

.reclamaciones-link:hover {
    opacity: 0.85;
}

.icon-libro-reclamaciones {
    height: 90px;
    width: auto;
    display: block;
}

.reclamaciones-text {
    font-family: 'Exo', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: #ffffff;
    letter-spacing: 2px;
    line-height: 1.4;
}

/* --- FRANJA 3: Zócalo Legal --- */
.footer-legal-bar {
    background-color: #221F1D; 
    padding: 25px 0;
}

.legal-links-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.legal-links-flex a {
    font-family: 'Exo', sans-serif;
    font-size: 0.85rem;
    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.85rem;
    user-select: none;
}

/* ==========================================================================
   RESPONSIVE (MEDIA QUERIES)
   ========================================================================== */

@media (max-width: 991px) {
    .footer-main-grid {
        grid-template-columns: 1fr; /* Pasa a 1 columna apilada en pantallas medianas */
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .footer-container {
        padding: 0 20px;
    }

    .social-links-grid {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .legal-links-flex {
        flex-direction: column;
        gap: 10px;
    }

    .legal-separator {
        display: none;
    }
}

/* ==========================================================================
   BOTÓN FLOTANTE FIJO (STICKY CTA) EN LA ESQUINA INFERIOR DERECHA
   ========================================================================== */
.sticky-cotizar-btn {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 110px;
    height: 110px;
    background-color: #8C1527; 
    color: #ffffff;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    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 0.2s ease, box-shadow 0.3s ease;
}

.sticky-cotizar-btn:hover {
    background-color: #72101F;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(140, 21, 39, 0.5);
}

.sticky-cotizar-btn img {
    width: 24px;
    height: auto;
    display: block;
}

.sticky-cotizar-btn span {
    font-family: 'Exo', sans-serif;
    font-weight: 500;
    font-size: 0.85rem;
    line-height: 1.2;
    letter-spacing: 1px;
}

/* ==========================================================================
   ESTILOS DEL PANEL OFF-CANVAS COMPACTO (FIT SCREEN HEIGHT / NO SCROLL)
   ========================================================================== */

/* Capa oscura de fondo */
.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;
}

/* Panel Desplegable Guinda (Ajuste estricto a la pantalla sin scroll) */
.cotizar-offcanvas-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 100%;
    height: 100vh;
    height: 100dvh; /* dynamic viewport height */
    background-color: #8C1527;
    z-index: 99999;
    box-sizing: border-box;
    padding: 30px 35px 25px 35px; /* Paddings reducidos para comprimir espacio vertical */
    overflow: hidden !important; /* Desactiva el scroll vertical */
    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);
}

.cotizar-offcanvas-panel.active {
    transform: translateX(0);
}

.offcanvas-content-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Encabezados ajustados al diseño exacto */
.offcanvas-header {
    text-align: left; /* Alineado a la izquierda según la imagen */
    margin-bottom: 25px;
}

.offcanvas-main-title {
    font-family: 'Exo', sans-serif;
    font-weight: 700;
    font-size: 1.85rem;
    color: #ffffff;
    line-height: 1.15;
    margin: 0 0 20px 0; /* Espacio cómodo debajo del título principal */
}

.offcanvas-main-title span {
    font-weight: 300;
}

.offcanvas-sub-title {
    font-family: 'Exo', sans-serif;
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    letter-spacing: 5px; /* Espaciado entre letras exacto del diseño */
    margin: 0;
    text-transform: uppercase;
    text-align: left;
}

/* Formulario optimizado */
.offcanvas-form {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reducción de espacio entre campos de 15px a 10px */
}

.form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.form-group input,
.form-group select {
    width: 100%;
    height: 42px; /* Altura compacta de inputs (de 48px a 42px) */
    padding: 0 12px;
    border: none;
    background-color: #ffffff;
    color: #2C2825;
    font-family: 'Exo', sans-serif;
    font-size: 0.88rem;
    box-sizing: border-box;
    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;
}

/* Checkboxes */
.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: 'Exo', sans-serif;
    font-size: 0.8rem;
    color: #ffffff;
    line-height: 1.25;
}

.checkbox-container input {
    accent-color: #2C2825;
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

.checkbox-container a {
    color: #ffffff;
    text-decoration: underline;
}

/* Botón Enviar */
.form-submit-wrapper {
    margin-top: 5px;
}

.btn-cotizar-submit {
    width: 100%;
    height: 46px; /* Botón ligeramente más estilizado */
    background-color: #262423;
    color: #ffffff;
    border: none;
    font-family: 'Exo', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-cotizar-submit:hover {
    background-color: #111010;
}

/* Botón Cerrar abajo */
.offcanvas-footer-close {
    text-align: center;
    margin-top: 10px;
}

.btn-cerrar-offcanvas {
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'Exo', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    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;
}

/* Adaptación táctil para celulares */
@media screen and (max-width: 768px) {
    .cotizar-offcanvas-panel {
        width: 100vw;
        padding: 25px 20px 20px 20px;
    }
    .form-row-double {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}


/* Asegura que el botón permita posicionar el aura por detrás */
.btn-titilante {
  overflow: visible !important; /* Permite que la onda salga de los bordes */
}

/* Crear la capa del aura suave */
.btn-titilante::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: inherit; /* Copia la forma (redonda o recta) del botón */
  box-shadow: 0 0 0 0 rgba(140, 21, 39, 0.6); /* Color guinda suave */
  z-index: -1;
  animation: aura-expansiva 2.5s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

/* Animación de la onda que sale del botón y se desvanece */
@keyframes aura-expansiva {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(140, 21, 39, 0.6);
  }
  70% {
    transform: scale(1.18); /* Expansión suave */
    box-shadow: 0 0 15px 10px rgba(140, 21, 39, 0); /* Se difumina */
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(140, 21, 39, 0);
  }
}