/* ============================================
   ESTILOS PARA PÁGINAS LEGALES
   ============================================ */

/* Hero pequeño para páginas legales */
.legal-hero {
    margin-top: 80px;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.95), rgba(6, 182, 212, 0.85)),
                url('https://images.unsplash.com/photo-1450101499163-c8848c66ca85?w=1920') center/cover;
    padding: 5rem 2rem;
    text-align: center;
    color: var(--white);
    position: relative;
}

.legal-hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.legal-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--secondary-color);
}

.breadcrumb span {
    opacity: 0.8;
}

/* Contenido principal del Aviso Legal */
.legal-content {
    padding: 4rem 2rem;
    background: var(--bg-light);
}

.legal-wrapper {
    max-width: 900px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* Secciones del Aviso Legal */
.legal-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.legal-section:last-of-type {
    border-bottom: none;
    margin-bottom: 2rem;
}

.legal-section h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--secondary-color);
}

.legal-section h2 i {
    color: var(--secondary-color);
    font-size: 1.4rem;
}

/* Bloques de información (contacto, datos) */
.legal-info-block {
    background: var(--bg-light);
    padding: 1.5rem 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.legal-info-block p {
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.8;
}

.legal-info-block p:last-child {
    margin-bottom: 0;
}

.legal-info-block a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.legal-info-block a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Bloques de texto largo */
.legal-text-block {
    color: var(--text-dark);
    line-height: 1.8;
}

.legal-text-block p {
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-text-block p:last-child {
    margin-bottom: 0;
}

.legal-text-block a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    word-break: break-word;
}

.legal-text-block a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Sección de última actualización */
.legal-update {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(6, 182, 212, 0.05));
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-bottom: 1px solid #e5e7eb;
}

/* Navegación entre páginas legales */
.legal-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--primary-color);
    text-align: center;
}

.legal-navigation h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.legal-nav-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.legal-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-light);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: 2px solid transparent;
}

.legal-nav-link i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    transition: var(--transition);
}

.legal-nav-link:hover {
    background: var(--white);
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.legal-nav-link:hover i {
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .legal-hero {
        padding: 3rem 1.5rem;
    }

    .legal-hero h1 {
        font-size: 2rem;
    }

    .legal-hero p {
        font-size: 1rem;
    }

    .legal-wrapper {
        padding: 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.3rem;
        flex-wrap: wrap;
    }

    .legal-info-block {
        padding: 1rem 1.25rem;
    }

    .legal-text-block p {
        text-align: left;
    }

    .legal-nav-links {
        grid-template-columns: 1fr;
    }
}

@media print {
    .legal-hero,
    nav,
    .footer,
    .legal-navigation {
        display: none;
    }

    .legal-wrapper {
        box-shadow: none;
        padding: 0;
    }

    .legal-section {
        page-break-inside: avoid;
    }
}
/* ============================================
   ESTILOS PARA TABLAS DE COOKIES
   ============================================ */

.cookies-table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.cookies-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    font-size: 0.95rem;
}

.cookies-table thead {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
}

.cookies-table thead th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookies-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: var(--transition);
}

.cookies-table tbody tr:hover {
    background: var(--bg-light);
}

.cookies-table tbody tr:last-child {
    border-bottom: none;
}

.cookies-table tbody td {
    padding: 1rem;
    color: var(--text-dark);
    vertical-align: top;
}

.cookies-table code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--primary-color);
    border: 1px solid #e5e7eb;
}

.cookies-table a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.cookies-table a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Responsive para tablas */
@media (max-width: 768px) {
    .cookies-table {
        font-size: 0.85rem;
    }

    .cookies-table thead th,
    .cookies-table tbody td {
        padding: 0.75rem 0.5rem;
    }

    .cookies-table code {
        font-size: 0.8rem;
        padding: 0.15rem 0.35rem;
    }
}

@media print {
    .cookies-table-wrapper {
        box-shadow: none;
    }

    .cookies-table {
        page-break-inside: avoid;
    }
}
/* ============================================
   BANNER DE COOKIES
   ============================================ */

/* Banner principal */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid var(--secondary-color);
}

.cookie-banner-visible {
    transform: translateY(0);
}

.cookie-banner-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-banner-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-family: 'Playfair Display', serif;
}

.cookie-banner-text p {
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-text a {
    color: var(--primary-color);
    text-decoration: underline;
    font-weight: 500;
    transition: var(--transition);
}

.cookie-banner-text a:hover {
    color: var(--secondary-color);
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.cookie-btn i {
    font-size: 1rem;
}

.cookie-btn-accept {
    background: var(--primary-color);
    color: var(--white);
}

.cookie-btn-accept:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid #e5e7eb;
}

.cookie-btn-reject:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.cookie-btn-settings {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.cookie-btn-settings:hover {
    background: var(--primary-color);
    color: var(--white);
}

.cookie-btn-save {
    background: var(--primary-color);
    color: var(--white);
    width: 100%;
    justify-content: center;
    padding: 1rem;
}

.cookie-btn-save:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Panel de configuración */
.cookie-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-settings-visible {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-container {
    background: var(--white);
    border-radius: 16px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-settings-visible .cookie-settings-container {
    transform: scale(1);
}

.cookie-settings-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-header h3 {
    font-size: 1.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
}

.cookie-settings-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.cookie-settings-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cookie-settings-content {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-intro {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.cookie-category {
    margin-bottom: 1.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.cookie-category:hover {
    border-color: var(--primary-color);
}

.cookie-category-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-light);
    transition: var(--transition);
}

.cookie-category-header:hover {
    background: rgba(30, 58, 138, 0.05);
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.cookie-category-info p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
    line-height: 1.5;
}

.cookie-category-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--white);
}

.cookie-category-details-visible {
    max-height: 500px;
}

.cookie-category-details ul {
    padding: 1rem 1.25rem;
    margin: 0;
    list-style: none;
}

.cookie-category-details li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid #f3f4f6;
}

.cookie-category-details li:last-child {
    border-bottom: none;
}

.cookie-category-details li strong {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.cookie-settings-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e5e7eb;
    background: var(--bg-light);
}

/* Toggle switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: 0.3s;
    border-radius: 28px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--primary-color);
}

.cookie-toggle input:checked + .cookie-toggle-slider:before {
    transform: translateX(24px);
}

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: var(--primary-color);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-container {
        padding: 1rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner-icon {
        font-size: 2rem;
    }

    .cookie-banner-text {
        min-width: auto;
    }

    .cookie-banner-text h3 {
        font-size: 1.1rem;
    }

    .cookie-banner-text p {
        font-size: 0.9rem;
    }

    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-settings-container {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-settings-header {
        padding: 1rem 1.5rem;
    }

    .cookie-settings-header h3 {
        font-size: 1.2rem;
    }

    .cookie-settings-content {
        padding: 1.5rem;
    }

    .cookie-category-header {
        padding: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .cookie-toggle {
        align-self: flex-end;
    }
}

/* Animación de entrada */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Botón para modificar preferencias (en footer) */
.cookie-settings-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
}

.cookie-settings-link:hover {
    color: var(--secondary-color);
}