/* Legal Pages Styles (Terms, Privacy, etc.) */

/* Legal Wrapper */
.legal-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

/* Legal Intro */
.legal-intro {
    padding: 2rem;
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.legal-intro .lead {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-color);
    margin: 0;
}

/* Sidebar */
.legal-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.toc-widget {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.toc-widget h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.toc-widget h3 i {
    color: var(--secondary-color);
}

.toc-list {
    list-style: none;
    padding: 0;
}

.toc-list li {
    margin-bottom: 0.5rem;
}

.toc-list a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.toc-list a:hover,
.toc-list a.active {
    background: var(--bg-light);
    border-left-color: var(--secondary-color);
    color: var(--primary-color);
    transform: translateX(5px);
}

.legal-cta-box {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    color: white;
}

.legal-cta-box i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.95;
}

.legal-cta-box h4 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: white;
}

.legal-cta-box p {
    opacity: 0.95;
    margin-bottom: 1.5rem;
}

/* Main Content */
.legal-main-content {
    background: var(--bg-color);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
}

.last-updated {
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
}

/* Legal Sections */
.legal-section {
    margin-bottom: 4rem;
    scroll-margin-top: 120px;
}

.legal-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.25rem;
}

.legal-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin: 2rem 0 1rem;
}

.legal-section p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.legal-section ul,
.legal-section ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.legal-section li {
    margin-bottom: 0.875rem;
    line-height: 1.7;
    font-size: 1.05rem;
}

.legal-section strong {
    color: var(--primary-color);
    font-weight: 600;
}

.legal-section a {
    color: var(--secondary-color);
    text-decoration: underline;
    transition: var(--transition);
}

.legal-section a:hover {
    color: var(--primary-color);
}

/* Info Boxes */
.info-box {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    border-left: 4px solid;
}

.info-box i {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-box-primary {
    background: rgba(123, 63, 159, 0.1);
    border-left-color: var(--primary-color);
}

.info-box-primary i {
    color: var(--primary-color);
}

.info-box-warning {
    background: rgba(255, 140, 0, 0.1);
    border-left-color: var(--secondary-color);
}

.info-box-warning i {
    color: var(--secondary-color);
}

.info-box strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.info-box p {
    margin: 0;
}

/* Data Grid */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.data-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.data-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.data-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.data-item strong {
    display: block;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.data-item p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Cookie Types */
.cookie-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.cookie-type {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.cookie-type:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.cookie-type h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.cookie-type i {
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.cookie-type p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-light);
}

/* Security Measures */
.security-measures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.security-item {
    text-align: center;
    background: var(--bg-light);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.security-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.security-item i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.security-item h4 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.security-item p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* Rights Grid */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.right-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    text-align: center;
    transition: var(--transition);
}

.right-item:hover {
    border-color: var(--secondary-color);
    transform: translateY(-5px);
}

.right-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.right-item h4 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.right-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Contact Info Box */
.contact-info-box {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 2px solid var(--border-color);
    margin: 2rem 0;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.contact-method:last-child {
    border-bottom: none;
}

.contact-method i {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.contact-method strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.contact-method p {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.contact-method a {
    color: var(--secondary-color);
    text-decoration: none;
}

.contact-method a:hover {
    text-decoration: underline;
}

/* Agreement Notice */
.agreement-notice {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(123, 63, 159, 0.1), rgba(255, 140, 0, 0.1));
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-top: 4rem;
}

.agreement-notice i {
    font-size: 3rem;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.agreement-notice p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 70px;
    height: 70px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 9999;
    text-decoration: none;
    animation: float 3s ease-in-out infinite, pulse 2s infinite;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.15);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.7);
    color: white;
}

.whatsapp-float i {
    animation: shake 1s ease-in-out infinite;
}

.whatsapp-tooltip {
    position: absolute;
    right: 0;
    bottom: 100%;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 1.5rem;
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    margin-bottom: 1rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 6px 30px rgba(37, 211, 102, 0.8), 0 0 0 15px rgba(37, 211, 102, 0.2);
    }
}

@keyframes shake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-10deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(10deg);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .legal-wrapper {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: static;
        order: 2;
    }

    .legal-main-content {
        order: 1;
    }

    .toc-widget {
        display: none;
    }
}

@media (max-width: 768px) {
    .legal-main-content {
        padding: 2rem 1.5rem;
    }

    .legal-section h2 {
        font-size: 1.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .legal-section h3 {
        font-size: 1.35rem;
    }

    .legal-section p,
    .legal-section li {
        font-size: 1rem;
    }

    .data-grid,
    .cookie-types,
    .security-measures,
    .rights-grid {
        grid-template-columns: 1fr;
    }

    .contact-info-box {
        padding: 1.5rem;
    }

    .whatsapp-float {
        width: 60px;
        height: 60px;
        bottom: 1.5rem;
        right: 1.5rem;
        font-size: 2rem;
    }

    .whatsapp-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .legal-main-content {
        padding: 1.5rem 1rem;
    }

    .legal-intro {
        padding: 1.5rem;
    }

    .legal-intro .lead {
        font-size: 1.05rem;
    }

    .legal-section {
        margin-bottom: 3rem;
    }

    .section-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .info-box {
        flex-direction: column;
        padding: 1.25rem;
    }

    .agreement-notice {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.75rem;
        bottom: 1rem;
        right: 1rem;
    }
}
