/* ==========================================================================
   AUTO RINO SERVITECA — LEGAL & COMPLIANCE STYLESHEET
   Estilos optimizados para páginas legales, PQRS y Cookie Consent Banner
   ========================================================================== */

/* Variables de contexto y tipografía */
.autorino-legal-wrapper,
.autorino-pqrs-wrapper,
.autorino-contacto-wrapper,
.autorino-cookie-banner,
.autorino-cookie-modal {
    --brand-yellow: #ffd200;
    --brand-yellow-dark: #e5bd00;
    --brand-red: #e11620;
    --brand-dark: #141414;
    --brand-dark-card: #1c1c1c;
    --brand-dark-surface: #222222;
    --brand-border: rgba(255, 255, 255, 0.1);
    --brand-border-yellow: rgba(255, 210, 0, 0.4);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

/* ==========================================================================
   1. PÁGINAS LEGALES (LAYOUT & NAVEGACIÓN)
   ========================================================================== */
.autorino-legal-wrapper {
    padding: 30px 0 60px;
    color: #333333;
    font-family: var(--font-body);
}

.legal-header-banner {
    background: linear-gradient(135deg, #141414 0%, #1e1e1e 100%);
    border-radius: 16px;
    padding: 35px 30px;
    margin-bottom: 35px;
    border-left: 6px solid var(--brand-yellow);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.legal-header-content h1 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legal-header-content p {
    font-size: 14px;
    color: #cccccc;
    margin: 0;
}

.legal-badge-corporate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 210, 0, 0.15);
    border: 1px solid var(--brand-yellow);
    color: var(--brand-yellow);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.legal-header-actions {
    display: flex;
    gap: 12px;
}

.btn-legal-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none !important;
}

.btn-legal-action:hover {
    background: var(--brand-yellow);
    color: var(--brand-dark);
    border-color: var(--brand-yellow);
    transform: translateY(-2px);
}

/* Grid Legal */
.legal-main-grid {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 35px;
    align-items: start;
}

/* Sidebar de Navegación */
.legal-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid #eaeaea;
    position: sticky;
    top: 90px;
}

.legal-sidebar-title {
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #141414;
    padding-bottom: 12px;
    margin-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.legal-sidebar-title i {
    color: var(--brand-red);
}

.legal-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.legal-nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #555555;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.legal-nav-item a:hover {
    background: #fff9db;
    color: #141414;
    border-left-color: var(--brand-yellow);
}

.legal-nav-item.active a {
    background: #141414;
    color: #ffffff;
    border-left-color: var(--brand-yellow);
    font-weight: 600;
}

.legal-nav-item.active a i {
    color: var(--brand-yellow);
}

.legal-sic-box {
    margin-top: 25px;
    background: #f8f9fa;
    border: 1px dashed #ced4da;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.legal-sic-box p {
    font-size: 11.5px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.4;
}

.legal-sic-box a {
    display: inline-block;
    color: #0056b3;
    font-weight: 700;
    font-size: 12px;
    text-decoration: underline;
}

/* Área de Contenido Principal */
.legal-content-area {
    background: #ffffff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.06);
    border: 1px solid #eaeaea;
    line-height: 1.75;
}

.legal-section {
    display: none;
}

.legal-section.active {
    display: block;
    animation: legalFadeIn 0.35s ease forwards;
}

@keyframes legalFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.legal-section h2 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 800;
    color: #141414;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #eaeaea;
    display: flex;
    align-items: center;
    gap: 12px;
}

.legal-section h2 i {
    color: var(--brand-yellow-dark);
}

.legal-section h3 {
    font-family: var(--font-heading);
    font-size: 17px;
    font-weight: 700;
    color: #141414;
    margin-top: 28px;
    margin-bottom: 12px;
}

.legal-section p,
.legal-section li {
    font-size: 14px;
    color: #4a4a4a;
}

.legal-section ul,
.legal-section ol {
    padding-left: 20px;
    margin-bottom: 18px;
}

.legal-section li {
    margin-bottom: 8px;
}

.legal-highlight-box {
    background: #fffdf0;
    border-left: 4px solid var(--brand-yellow-dark);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 22px 0;
    font-size: 13.5px;
    color: #444;
}

.legal-highlight-box strong {
    color: #141414;
}

.legal-warning-box {
    background: #fff5f5;
    border-left: 4px solid var(--brand-red);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin: 22px 0;
    font-size: 13.5px;
    color: #551111;
}

.legal-company-meta {
    background: #fdfdfd;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    font-size: 13px;
}

.legal-company-meta-item strong {
    display: block;
    color: #141414;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 3px;
}

/* ==========================================================================
   2. SISTEMA DE RADICACIÓN DE PQRS (FORMULARIO Y ESTADOS)
   ========================================================================== */
.autorino-pqrs-wrapper {
    padding: 30px 0 60px;
    font-family: var(--font-body);
}

.pqrs-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 35px;
    align-items: start;
}

.pqrs-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 6px 30px rgba(0,0,0,0.06);
    border: 1px solid #e9ecef;
}

.pqrs-card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #141414;
    margin-bottom: 8px;
}

.pqrs-card-subtitle {
    font-size: 13.5px;
    color: #666666;
    margin-bottom: 25px;
}

.pqrs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.pqrs-field-group {
    margin-bottom: 20px;
}

.pqrs-field-group label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: #222222;
    margin-bottom: 6px;
}

.pqrs-field-group label span.req {
    color: var(--brand-red);
}

.pqrs-input,
.pqrs-select,
.pqrs-textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background-color: #fff;
    color: #333;
}

.pqrs-input:focus,
.pqrs-select:focus,
.pqrs-textarea:focus {
    outline: none;
    border-color: #ffd200;
    box-shadow: 0 0 0 3px rgba(255, 210, 0, 0.25);
}

.pqrs-textarea {
    resize: vertical;
    min-height: 120px;
}

.pqrs-checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 20px 0;
    background: #fbfbfb;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.pqrs-checkbox-wrap input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.pqrs-checkbox-wrap label {
    font-size: 12.5px;
    color: #555555;
    margin: 0;
    line-height: 1.45;
    cursor: pointer;
}

.pqrs-checkbox-wrap a {
    color: #141414;
    font-weight: 600;
    text-decoration: underline;
}

.btn-pqrs-submit {
    background: #ffd200;
    color: #141414;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    width: 100%;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(255, 210, 0, 0.35);
}

.btn-pqrs-submit:hover {
    background: #e5bd00;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(255, 210, 0, 0.45);
}

/* Sidebar de información de PQRS */
.pqrs-info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.pqrs-info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eaeaea;
}

.pqrs-info-card h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: #141414;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pqrs-info-card h4 i {
    color: var(--brand-yellow-dark);
}

.pqrs-timeline-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 13px;
    color: #555;
}

.pqrs-timeline-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    line-height: 1.4;
}

.pqrs-timeline-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-red);
}

/* Banner de éxito de radicado */
.pqrs-success-box {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    text-align: center;
}

.pqrs-success-box .radicado-code {
    display: inline-block;
    background: #155724;
    color: #ffffff;
    font-family: monospace;
    font-size: 18px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 6px;
    margin: 12px 0;
    letter-spacing: 1px;
}

/* ==========================================================================
   3. BANNER DE CONSENTIMIENTO DE COOKIES & MODAL
   ========================================================================== */
.autorino-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    right: 24px;
    max-width: 1140px;
    margin: 0 auto;
    background: rgba(20, 20, 20, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 210, 0, 0.4);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border-radius: 16px;
    padding: 22px 28px;
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.autorino-cookie-banner.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-banner-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    flex: 1;
}

.cookie-banner-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(255, 210, 0, 0.15);
    border: 1px solid var(--brand-yellow);
    color: var(--brand-yellow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.cookie-banner-text h4 {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}

.cookie-banner-text p {
    font-size: 12.5px;
    color: #cccccc;
    margin: 0;
    line-height: 1.45;
}

.cookie-banner-text a {
    color: var(--brand-yellow);
    text-decoration: underline;
    font-weight: 600;
}

.cookie-banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-cookie {
    padding: 10px 18px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    border: none;
}

.btn-cookie-accept {
    background: var(--brand-yellow);
    color: #141414;
}

.btn-cookie-accept:hover {
    background: #e5bd00;
    transform: translateY(-1px);
}

.btn-cookie-reject {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cookie-reject:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.btn-cookie-config {
    background: transparent;
    color: #cccccc;
    border: 1px solid transparent;
    text-decoration: underline;
}

.btn-cookie-config:hover {
    color: var(--brand-yellow);
}

/* Modal de Personalización de Cookies */
.autorino-cookie-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.autorino-cookie-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.autorino-cookie-modal {
    background: #1c1c1c;
    border: 1px solid rgba(255, 210, 0, 0.35);
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    color: #ffffff;
    box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    padding: 28px;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.autorino-cookie-modal-backdrop.show .autorino-cookie-modal {
    transform: scale(1);
}

.cookie-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.cookie-modal-header h3 {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-modal-header h3 i {
    color: var(--brand-yellow);
}

.btn-cookie-modal-close {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    transition: color 0.2s;
}

.btn-cookie-modal-close:hover {
    color: #fff;
}

.cookie-category-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.cookie-category-title {
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.cookie-category-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.badge-always-active {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.4);
}

/* Custom Switch Toggle */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
    background-color: var(--brand-yellow);
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(20px);
    background-color: #141414;
}

.cookie-category-desc {
    font-size: 12px;
    color: #aaaaaa;
    line-height: 1.45;
    margin: 0;
}

.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   4. CHECKBOX LEGAL EN FORMULARIO DE CONTACTO & CHECKOUT
   ========================================================================== */
.autorino-habeas-data-group {
    background: #fdfdfd;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.autorino-habeas-data-group input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.autorino-habeas-data-group label {
    font-size: 12px;
    color: #444444;
    margin: 0;
    line-height: 1.45;
    font-weight: 500;
}

.autorino-habeas-data-group a {
    color: #0056b3;
    font-weight: 600;
    text-decoration: underline;
}

/* Responsive Breakpoints */
@media (max-width: 991px) {
    .legal-main-grid {
        grid-template-columns: 1fr;
    }

    .legal-sidebar {
        position: relative;
        top: 0;
    }

    .pqrs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .legal-header-banner {
        padding: 24px 20px;
    }
    
    .legal-header-content h1 {
        font-size: 22px;
    }

    .legal-content-area {
        padding: 24px 18px;
    }

    .pqrs-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .autorino-cookie-banner {
        flex-direction: column;
        align-items: stretch;
        bottom: 15px;
        left: 15px;
        right: 15px;
        padding: 18px;
        gap: 15px;
    }

    .cookie-banner-actions {
        flex-direction: column;
        width: 100%;
    }

    .btn-cookie {
        width: 100%;
        text-align: center;
    }
}
