/* =====================================================
   ESTILOS COMPARTIDOS PARA TODAS LAS PÁGINAS
   Header scroll, Footer moderno, Modales legales
   ===================================================== */

/* --- HEADER SCROLL STATES --- */
.encabezado.header-hidden {
    transform: translateX(-50%) translateY(-150%);
}

.encabezado.header-scrolled {
    background: rgba(26, 76, 37, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.encabezado:not(.header-scrolled):hover {
    background: rgba(233, 233, 233, 0.15);
}

/* --- NUEVO FOOTER MODERNO --- */
.pie-pagina {
    background: linear-gradient(180deg, var(--color-primario, #1a4c25) 0%, #0f2d17 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.pie-pagina::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 10% 20%, rgba(255, 203, 134, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 203, 134, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

.footer-top-decoration {
    height: 4px;
    background: linear-gradient(90deg, var(--color-secundario, #ffcb86), #d4a86a, var(--color-secundario, #ffcb86));
}

.pie-pagina .contenedor {
    position: relative;
    z-index: 2;
    padding-top: 4rem;
    padding-bottom: 2rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.logo-imagen-footer img {
    height: 45px;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.logo-imagen-footer:hover img {
    filter: brightness(1.3);
    transform: scale(1.02);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer-social-icons {
    display: flex;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.footer-social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social-icons a:hover {
    background: var(--color-secundario, #ffcb86);
    border-color: var(--color-secundario, #ffcb86);
    color: var(--color-primario, #1a4c25);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 203, 134, 0.3);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-secundario, #ffcb86);
    border-radius: 2px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li {
    margin-bottom: 0.6rem;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.footer-column ul li a::before {
    content: '';
    width: 0;
    height: 1px;
    background: var(--color-secundario, #ffcb86);
    transition: width 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--color-secundario, #ffcb86);
    transform: translateX(5px);
}

.footer-column ul li a:hover::before {
    width: 10px;
}

/* Footer Contact Items */
.footer-contact .contact-item {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.footer-contact .contact-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 203, 134, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.footer-contact .contact-icon i {
    color: var(--color-secundario, #ffcb86);
    font-size: 0.8rem;
}

.footer-contact .contact-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-contact .contact-label {
    font-size: 0.7rem;
    color: var(--color-secundario, #ffcb86);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-contact .contact-text span,
.footer-contact .contact-text a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    line-height: 1.4;
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer-contact .contact-text a:hover {
    color: var(--color-secundario, #ffcb86);
}

/* Footer Bottom */
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    transition: color 0.3s ease;
    text-decoration: none;
}

.footer-bottom-links a:hover {
    color: var(--color-secundario, #ffcb86);
}

.footer-bottom-links .separator {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
}

/* =====================================================
   MODALES LEGALES (Privacidad y Términos)
   ===================================================== */
.legal-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.legal-modal.active {
    opacity: 1;
    visibility: visible;
}

.legal-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.legal-modal-container {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    transform: translateY(30px) scale(0.95);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.legal-modal.active .legal-modal-container {
    transform: translateY(0) scale(1);
}

.legal-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, var(--color-primario, #1a4c25) 0%, #2d6b3a 100%);
    position: relative;
}

.legal-modal-header .modal-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    flex-shrink: 0;
}

.legal-modal-header .modal-icon i {
    font-size: 1.4rem;
    color: var(--color-secundario, #ffcb86);
}

.legal-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1;
}

.legal-modal-header .modal-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.legal-modal-header .modal-close i {
    font-size: 1.1rem;
    color: #fff;
}

.legal-modal-header .modal-close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.legal-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    scroll-behavior: smooth;
}

.legal-modal-content::-webkit-scrollbar {
    width: 8px;
}

.legal-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.legal-modal-content::-webkit-scrollbar-thumb {
    background: var(--color-primario, #1a4c25);
    border-radius: 4px;
}

.legal-modal-content::-webkit-scrollbar-thumb:hover {
    background: #2d6b3a;
}

.legal-update {
    display: inline-block;
    background: rgba(26, 76, 37, 0.1);
    color: var(--color-primario, #1a4c25);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.legal-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(26, 76, 37, 0.1);
}

.legal-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.legal-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primario, #1a4c25);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legal-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--color-secundario, #ffcb86);
    border-radius: 2px;
}

.legal-section p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-section ul li,
.legal-section ol li {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.6rem;
    position: relative;
}

.legal-section ul li::marker {
    color: var(--color-primario, #1a4c25);
}

.legal-section ol li::marker {
    color: var(--color-primario, #1a4c25);
    font-weight: 600;
}

.legal-section strong {
    color: #333;
}

.legal-contact-info {
    background: #f8faf9;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--color-secundario, #ffcb86);
    margin-top: 1rem;
}

.legal-contact-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.legal-contact-info p:last-child {
    margin-bottom: 0;
}

.legal-contact-info i {
    color: var(--color-primario, #1a4c25);
    width: 18px;
    text-align: center;
}

.legal-modal-footer {
    padding: 1.2rem 2rem;
    background: #f8faf9;
    border-top: 1px solid rgba(26, 76, 37, 0.1);
    display: flex;
    justify-content: flex-end;
}

.btn-modal-close {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, var(--color-primario, #1a4c25) 0%, #2d6b3a 100%);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-modal-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 76, 37, 0.3);
}

/* Responsive Footer */
@media screen and (max-width: 992px) {
    .footer-main {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-brand {
        text-align: center;
        align-items: center;
    }
    
    .footer-tagline {
        max-width: 100%;
        text-align: center;
    }
    
    .footer-social-icons {
        justify-content: center;
    }
}

@media screen and (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-column ul li a {
        justify-content: center;
    }
    
    .footer-contact .contact-item {
        justify-content: center;
        text-align: left;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    /* Modal responsive */
    .legal-modal {
        padding: 1rem;
    }
    
    .legal-modal-container {
        max-height: 95vh;
        border-radius: 16px;
    }
    
    .legal-modal-header {
        padding: 1.2rem 1.5rem;
    }
    
    .legal-modal-header h2 {
        font-size: 1.2rem;
    }
    
    .legal-modal-content {
        padding: 1.5rem;
    }
}
