/* 1. PÁGINA: ASPECTOS LEGALES - SUPERGRAS DE NARIÑO */

/* 1.1. CONTENEDOR PRINCIPAL */
.legal-page {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #F8FAFC 0%, #FFFFFF 100%);
    min-height: 100vh;
}

/* 2. ENCABEZADO DE PÁGINA */
.legal-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.legal-header h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: #1E293B;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

/* 2.1. Línea decorativa del título */
.legal-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: #FF5C00;
    border-radius: 2px;
}

.legal-header p {
    color: #64748B;
    font-size: 1.2rem;
    margin-top: 1.5rem;
}

/* 3. ACORDEÓN */
.accordion-container {
    background: white;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #E2E8F0;
}

/* 3.1. Elemento individual del acordeón */
.accordion-item {
    margin-bottom: 0.5rem;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.accordion-item:last-child {
    margin-bottom: 0;
}

/* 3.2. Cabecera del acordeón */
.accordion-header {
    width: 100%;
    background: linear-gradient(135deg, #FF5C00 0%, #E65300 100%);
    color: white;
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border: none;
    text-align: left;
}

.accordion-header:hover {
    background: linear-gradient(135deg, #E65300 0%, #CC4A00 100%);
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.accordion-header i:first-child {
    font-size: 1.2rem;
}

/* 3.3. Ícono del acordeón */
.accordion-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.accordion-header.collapsed .accordion-icon {
    transform: rotate(0deg);
}

.accordion-header:not(.collapsed) .accordion-icon {
    transform: rotate(180deg);
}

/* 3.4. Contador de documentos */
.accordion-count {
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 20px;
}

/* 3.5. Cuerpo del acordeón */
.accordion-body {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: white;
}

.accordion-body.show {
    max-height: 2000px;
    padding: 1rem;
}

/* 4. DOCUMENTOS */
.documento-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: #F8FAFC;
    border-radius: 12px;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
}

.documento-item:last-child {
    margin-bottom: 0;
}

.documento-item:hover {
    transform: translateX(5px);
    background: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* 4.1. Información del documento */
.documento-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.documento-info i {
    font-size: 2rem;
    color: #FF5C00;
}

.documento-info span {
    color: #1E293B;
    font-weight: 500;
}

.documento-descripcion {
    display: block;
    color: #64748B;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

/* 4.2. Acciones del documento */
.documento-actions {
    display: flex;
    gap: 0.5rem;
}

/* 4.3. Botones de documento */
.btn-doc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #FF5C00;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.85rem;
}

.btn-doc:hover {
    background: #E65300;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(255, 92, 0, 0.3);
}

/* 4.4. Botón de documento (variante outline) */
.btn-doc-outline {
    background: transparent;
    border: 2px solid #FF5C00;
    color: #FF5C00;
}

.btn-doc-outline:hover {
    background: #FF5C00;
    color: white;
}

/* 5. ESTADOS DE CARGA Y MENSAJES */

/* 5.1. Contenedor de carga */
.loader-container {
    text-align: center;
    padding: 3rem;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid #E2E8F0;
    border-top: 4px solid #FF5C00;
    border-radius: 50%;
    animation: aspectosSpin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: #64748B;
}

/* 5.2. Estados vacío y error */
.empty-state,
.error-state {
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 3rem;
    color: #94A3B8;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #64748B;
}

.empty-state .small-text {
    color: #94A3B8;
    font-size: 0.9rem;
}

.error-state i {
    font-size: 3rem;
    color: #EF4444;
    margin-bottom: 1rem;
}

.error-state p {
    color: #EF4444;
}

/* 5.3. Botón de reintento */
.btn-retry {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: #FF5C00;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
}

/* 6. INFORMACIÓN DE CONTACTO */
.info-contact {
    background: linear-gradient(135deg, #317F3C 0%, #3E9A4B 100%);
    border-radius: 20px;
    padding: 2rem;
    color: white;
    margin-top: 3rem;
}

.info-contact h3 {
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
}

.info-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.info-contact p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.info-contact i {
    margin-right: 0.8rem;
    width: 24px;
}

.info-contact a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.info-contact a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* 7. BOTÓN VOLVER ARRIBA */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #FF5C00;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: #E65300;
    transform: translateY(-3px);
}

/* 8. ANIMACIONES */

/* 8.1. Animación de spinner */
@keyframes aspectosSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 9. RESPONSIVE */

/* 9.1. Tablets (768px) */
@media (max-width: 768px) {
    .legal-page {
        padding: 100px 0 40px;
    }

    .legal-header h1 {
        font-size: 2rem;
    }

    .legal-header p {
        font-size: 1rem;
    }

    .documento-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .documento-actions {
        width: 100%;
    }

    .btn-doc,
    .btn-doc-outline {
        flex: 1;
    }

    .info-contact-grid {
        grid-template-columns: 1fr;
    }
}

/* 9.2. Móviles pequeños (480px) */
@media (max-width: 480px) {
    .legal-page {
        padding: 90px 0 30px;
    }

    .accordion-header h3 {
        font-size: 1rem;
    }

    .accordion-header {
        padding: 0.8rem 1rem;
    }
}