/* 1. PÁGINA: CREG 080 - SUPERGAS DE NARIÑO */

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

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

.creg-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 */
.creg-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: #FF5C00;
    border-radius: 2px;
}

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

/* 3. CONTENEDOR DE DOCUMENTOS */
.documentos-container {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 1px solid #E2E8F0;
}

/* 4. LOADER (ESTADO 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: cregSpin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

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

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

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

/* 5.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 div {
    flex: 1;
}

.documento-info span {
    color: #1E293B;
    font-weight: 600;
    font-size: 1rem;
}

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

.documento-fecha {
    color: #94A3B8;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

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

/* 5.3. Botones de documento */
.btn-doc {
    display: inline-flex;
    align-items: 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);
}

/* 5.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;
    transform: translateY(-2px);
}

/* 6. MENSAJES (ESTADOS VACÍO Y ERROR) */
.empty-message {
    text-align: center;
    padding: 3rem;
    background: #F8FAFC;
    border-radius: 16px;
}

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

.empty-message p {
    color: #64748B;
    margin-bottom: 0.5rem;
}

.empty-message .small-text {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* 6.1. Botón de recarga */
.btn-reload {
    margin-top: 1rem;
    padding: 0.8rem 1.5rem;
    background: #FF5C00;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-reload:hover {
    background: #E65300;
    transform: translateY(-2px);
}

/* 7. 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;
    line-height: 1.5;
}

.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;
}

/* 8. 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);
}

/* 9. ANIMACIONES */

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

/* 10. RESPONSIVE */

/* 10.1. Tablets y móviles (768px) */
@media (max-width: 768px) {
    .creg-page {
        padding: 100px 0 40px;
    }

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

    .creg-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;
        justify-content: center;
    }

    .info-contact {
        padding: 1.4rem;
        border-radius: 18px;
        overflow: hidden;
    }

    .info-contact h3 {
        font-size: 1.2rem;
        line-height: 1.4;
    }

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

    .info-contact p {
        display: block;
        font-size: 0.95rem;
        line-height: 1.7;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .info-contact i {
        display: inline-block;
        width: auto;
        margin-right: 0.4rem;
    }

    .info-contact a {
        display: inline-block;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

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

    .documentos-container {
        padding: 1rem;
    }

    .documento-info {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .info-contact {
        padding: 1.2rem;
        margin-top: 2rem;
    }

    .info-contact h3 {
        font-size: 1.05rem;
    }

    .info-contact p {
        font-size: 0.9rem;
        line-height: 1.65;
    }

    .info-contact-grid {
        gap: 1rem;
    }
}