/* ================================
   LEGAL PAGES STYLES
   ================================ */

.legal-content {
    padding: var(--spacing-xl) 0;
    background: white;
}

.legal-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 4rem;
}

/* Sidebar Navigation */
.legal-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.legal-nav {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.legal-nav h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.legal-nav ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legal-nav ul li a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-medium);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-size: 0.95rem;
}

.legal-nav ul li a:hover {
    background: white;
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Main Content */
.legal-main {
    max-width: 900px;
}

.legal-update {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: var(--radius-md);
    margin-bottom: 3rem;
    font-size: 0.95rem;
    color: var(--text-medium);
}

.legal-update i {
    color: var(--primary-color);
}

.legal-main section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.legal-main h2 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
}

.legal-main h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.legal-main h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
}

.legal-main p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 1.5rem;
}

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

.legal-main ul li,
.legal-main ol li {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-medium);
    margin-bottom: 0.75rem;
}

.legal-main ul li {
    list-style-type: disc;
}

.legal-main strong {
    color: var(--text-dark);
    font-weight: 600;
}

/* Info Boxes */
.info-box,
.warning-box,
.contact-box {
    padding: 1.5rem 2rem;
    border-radius: var(--radius-lg);
    margin: 2rem 0;
}

.info-box {
    background: #e8f4fd;
    border-left: 4px solid #2563eb;
}

.warning-box {
    background: #fff4ed;
    border-left: 4px solid #f59e0b;
}

.warning-box i {
    color: #f59e0b;
    margin-right: 0.5rem;
}

.contact-box {
    background: var(--bg-light);
    border: 2px solid var(--primary-color);
}

.contact-box h4,
.info-box h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.contact-box p,
.info-box p,
.warning-box p {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.contact-box a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Purpose Grid */
.purpose-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.purpose-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-normal);
}

.purpose-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.purpose-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.purpose-item h4 {
    margin: 0 0 0.75rem 0;
}

.purpose-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Legal Basis List */
.legal-basis-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
}

.legal-basis-list li {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

/* Retention Table */
.retention-table {
    margin: 2rem 0;
    overflow-x: auto;
}

.retention-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.retention-table thead {
    background: var(--primary-color);
    color: white;
}

.retention-table th,
.retention-table td {
    padding: 1rem 1.5rem;
    text-align: left;
}

.retention-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.retention-table tbody tr:last-child {
    border-bottom: none;
}

.retention-table tbody tr:hover {
    background: var(--bg-light);
}

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.security-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}

.security-item i {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.security-item h4 {
    margin: 0 0 0.5rem 0;
}

.security-item p {
    margin: 0;
    font-size: 0.9rem;
}

/* Rights List */
.rights-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.right-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    transition: var(--transition-normal);
}

.right-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.right-item i {
    font-size: 1.75rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.right-item h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
}

.right-item p {
    margin: 0;
    font-size: 0.95rem;
}

/* Definition List */
.definition-list {
    margin: 2rem 0;
}

.definition-list dt {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-top: 1.5rem;
}

.definition-list dd {
    margin: 0.5rem 0 0 1.5rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary-light);
    color: var(--text-medium);
    line-height: 1.8;
}

/* Services and Obligations Grid */
.services-list,
.obligations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.service-item,
.obligation-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.service-item i {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.service-item h4 {
    margin: 0 0 0.5rem 0;
}

.service-item p {
    margin: 0;
    font-size: 0.95rem;
}

.obligations-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.obligation-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
}

.obligation-item i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.obligation-item p {
    margin: 0;
}

/* Legal Footer */
.legal-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.legal-footer p {
    font-style: italic;
    color: var(--text-medium);
}

/* ================================
   COOKIE BANNER
   ================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-text h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-text h3 i {
    color: #f59e0b;
    font-size: 1.5rem;
}

.cookie-text p {
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-cookie {
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-normal);
    white-space: nowrap;
}

.btn-cookie.btn-settings {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-cookie.btn-settings:hover {
    background: var(--bg-light);
    border-color: var(--text-medium);
}

.btn-cookie.btn-accept {
    background: var(--primary-color);
    color: white;
}

.btn-cookie.btn-accept:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ================================
   COOKIE MODAL
   ================================ */

.cookie-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-modal-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-medium);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition-fast);
}

.cookie-modal-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.cookie-modal-body {
    padding: 2rem;
}

.cookie-modal-body > p {
    color: var(--text-medium);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cookie-option {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.cookie-option-header {
    margin-bottom: 0.75rem;
}

.cookie-option-header label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.cookie-option-header input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cookie-option-header input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.cookie-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
}

.cookie-description {
    font-size: 0.95rem;
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
    padding-left: 2rem;
}

.cookie-modal-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */

@media (max-width: 1024px) {
    .legal-wrapper {
        grid-template-columns: 1fr;
    }
    
    .legal-sidebar {
        position: static;
        margin-bottom: 2rem;
    }
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    
    .cookie-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn-cookie {
        width: 100%;
    }
    
    .purpose-grid,
    .security-grid,
    .rights-list,
    .obligations-grid {
        grid-template-columns: 1fr;
    }
    
    .legal-main h2 {
        font-size: 1.75rem;
    }
    
    .legal-main h3 {
        font-size: 1.25rem;
    }
    
    .cookie-modal-content {
        max-height: 95vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body {
        padding: 1.5rem;
    }
    
    .cookie-modal-footer {
        padding: 0.75rem 1.5rem 1.5rem;
        flex-direction: column;
    }
    
    .cookie-modal-footer .btn-cookie {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .retention-table {
        font-size: 0.875rem;
    }
    
    .retention-table th,
    .retention-table td {
        padding: 0.75rem 1rem;
    }
}