/* =========================================================
   ARCHIVO DIGITAL
   WEB 2.0 / ESTÉTICA AÑOS 2000
   ========================================================= */


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    font-family:
        Tahoma,
        Arial,
        Verdana,
        sans-serif;

    color: #333;

    background:
        linear-gradient(
            to bottom,
            #dce8f4 0px,
            #eef3f8 180px,
            #d5d5d5 100%
        );

    min-height: 100vh;

}


/* =========================================================
   ENLACES
   ========================================================= */

a {

    color: #174f8c;

    text-decoration: none;

}


a:hover {

    text-decoration: underline;

}


/* =========================================================
   HEADER
   ========================================================= */

.header {

    background: #e9eef3;

    border-bottom:
        1px solid #7c8d9d;

    box-shadow:
        0 2px 5px
        rgba(0, 0, 0, 0.25);

}


/* =========================================================
   HEADER SUPERIOR
   ========================================================= */

.header-top {

    width: 100%;

    max-width: 1180px;

    min-height: 82px;

    margin: auto;

    padding:
        12px 20px;

    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

}


/* =========================================================
   LOGO
   ========================================================= */

.logo-area {

    display: flex;

    align-items: center;

    gap: 12px;

}


.logo-area > a {

    display: flex;

}


.logo-image {

    width: 100px;

    height: 58px;

    object-fit: contain;

    filter:
        drop-shadow(
            0 1px 1px
            rgba(0,0,0,0.25)
        );

}


.logo-text h1 {

    margin: 0;

    font-size: 27px;

    color: #174f8c;

    text-shadow:
        1px 1px 0 #ffffff;

}


.logo-text span {

    font-size: 12px;

    color: #687887;

}


/* =========================================================
   USUARIO
   ========================================================= */

.user-area {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 12px;

}


.user-area a {

    color: #315d83;

}


.separator {

    color: #9ba8b2;

}


/* =========================================================
   MENU
   ========================================================= */

.menu {

    min-height: 45px;

    display: flex;

    justify-content:
        center;

    align-items:
        stretch;

    background:
        linear-gradient(
            to bottom,
            #6287a8 0%,
            #416b8e 48%,
            #315979 52%,
            #4a7597 100%
        );

    border-top:
        1px solid #91abc0;

    border-bottom:
        1px solid #203f59;

}


.menu a {

    min-width: 130px;

    padding:
        8px 18px;

    display: flex;

    align-items:
        center;

    justify-content:
        center;

    gap: 6px;

    color: white;

    text-align: center;

    font-size: 12px;

    font-weight: bold;

    border-left:
        1px solid
        rgba(255,255,255,0.12);

    border-right:
        1px solid
        rgba(0,0,0,0.15);

    text-shadow:
        1px 1px 1px #23435b;

    transition:
        background 0.15s;

}


.menu a:hover {

    background:
        linear-gradient(
            to bottom,
            #7ea1bd,
            #527b9e
        );

    text-decoration: none;

}


.menu a.active {

    background:
        linear-gradient(
            to bottom,
            #315a7b,
            #244966
        );

    box-shadow:
        inset 0 2px 5px
        rgba(0,0,0,0.25);

}


.menu a img {

    width: 22px;

    height: 22px;

    object-fit: contain;

}


.help-icon {

    width: 20px;

    height: 20px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid
        rgba(255,255,255,0.7);

    border-radius: 50%;

    font-size: 12px;

}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.container {

    width: 94%;

    max-width: 1180px;

    margin:
        25px auto 40px;

}


/* =========================================================
   BANNER DESTACADO
   ========================================================= */

.featured-banner {

    position: relative;

    min-height: 145px;

    display: flex;

    align-items: center;

    margin-bottom: 25px;

    overflow: hidden;

    border:
        1px solid #71879a;

    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #e9f1f7 45%,
            #cbd9e5 100%
        );

    box-shadow:
        0 2px 6px
        rgba(0,0,0,0.25),

        inset 0 1px 0 white;

}


.featured-banner::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    right: 0;

    height: 7px;

    background:
        linear-gradient(
            to right,
            #315f86,
            #79a5c5,
            #315f86
        );

}


/* =========================================================
   BANNER - ICONO
   ========================================================= */

.featured-image {

    width: 150px;

    height: 145px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border-right:
        1px solid #b2bec8;

    background:
        linear-gradient(
            to bottom,
            rgba(255,255,255,0.7),
            rgba(210,222,232,0.5)
        );

}


.featured-image img {

    width: 82px;

    height: 82px;

    object-fit: contain;

    filter:
        drop-shadow(
            2px 3px 2px
            rgba(0,0,0,0.2)
        );

}


/* =========================================================
   BANNER - CONTENIDO
   ========================================================= */

.featured-content {

    flex: 1;

    padding:
        20px 25px;

}


.featured-label {

    display: inline-block;

    margin-bottom: 5px;

    font-size: 10px;

    font-weight: bold;

    color: #5c7890;

    letter-spacing: 0.5px;

}


.featured-content h2 {

    margin:
        0 0 7px;

    font-size: 21px;

    color: #315f86;

    text-shadow:
        1px 1px white;

}


.featured-content p {

    margin:
        0 0 13px;

    font-size: 12px;

    color: #66747f;

    line-height: 1.5;

}


/* =========================================================
   BANNER - BOTON
   ========================================================= */

.featured-button {

    display: inline-block;

    padding:
        7px 15px;

    border:
        1px solid #416883;

    border-radius: 4px;

    background:
        linear-gradient(
            to bottom,
            #78a0bd,
            #416f94
        );

    color: white;

    font-size: 11px;

    font-weight: bold;

    text-shadow:
        1px 1px 1px #294a62;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,0.5);

}


.featured-button:hover {

    text-decoration: none;

    background:
        linear-gradient(
            to bottom,
            #8aadc5,
            #4b7b9e
        );

}


/* =========================================================
   BANNER - FECHA
   ========================================================= */

.featured-date {

    width: 100px;

    height: 100px;

    margin-right: 20px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    border:
        1px solid #a4b3bf;

    border-radius: 6px;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #dce5ec
        );

    box-shadow:
        inset 0 1px 0 white,

        0 1px 2px
        rgba(0,0,0,0.15);

    text-align: center;

}


.featured-date span {

    font-size: 9px;

    font-weight: bold;

    color: #70818f;

}


.featured-date strong {

    margin-top: 5px;

    font-size: 27px;

    color: #315f86;

    text-shadow:
        1px 1px white;

}


/* =========================================================
   WELCOME
   ========================================================= */

.welcome {

    overflow: hidden;

    border:
        1px solid #899aaa;

    border-radius: 8px;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #e7edf3
        );

    box-shadow:
        0 2px 7px
        rgba(0,0,0,0.2);

}


.welcome-content {

    padding:
        35px 20px 40px;

    text-align: center;

}


.welcome h2 {

    margin:
        0 0 10px;

    font-size: 29px;

    color: #315f87;

    text-shadow:
        1px 1px 0 white;

}


.welcome p {

    max-width: 650px;

    margin:
        0 auto 25px;

    color: #66727c;

    font-size: 14px;

    line-height: 1.6;

}


/* =========================================================
   BUSCADOR
   ========================================================= */

.search-box {

    width: 80%;

    max-width: 700px;

    margin: auto;

    padding: 5px;

    display: flex;

    background: #d1dbe4;

    border:
        1px solid #8294a5;

    border-radius: 7px;

    box-shadow:
        inset 0 1px 3px
        rgba(0,0,0,0.2),

        0 1px 0 white;

}


.search-box input {

    flex: 1;

    height: 43px;

    padding:
        0 15px;

    border:
        1px solid #9caab6;

    border-radius:
        4px 0 0 4px;

    outline: none;

    background: white;

    font-family:
        Tahoma,
        Arial,
        sans-serif;

    font-size: 14px;

    color: #333;

}


.search-box input:focus {

    border-color:
        #4d82ac;

    box-shadow:
        inset 0 1px 3px
        rgba(0,0,0,0.15);

}


.search-box button {

    width: 115px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 5px;

    border:
        1px solid #315979;

    border-radius:
        0 4px 4px 0;

    background:
        linear-gradient(
            to bottom,
            #78a1c2,
            #416f96
        );

    color: white;

    font-size: 11px;

    font-weight: bold;

    text-shadow:
        1px 1px 1px #23435b;

    cursor: pointer;

    box-shadow:
        inset 0 1px 0
        rgba(255,255,255,0.4);

}


.search-box button:hover {

    background:
        linear-gradient(
            to bottom,
            #88aecb,
            #4c7fa5
        );

}


.search-box button:active {

    box-shadow:
        inset 0 2px 4px
        rgba(0,0,0,0.3);

}


.search-box button img {

    width: 18px;

    height: 18px;

    object-fit: contain;

}


.search-message {

    min-height: 18px;

    margin-top: 10px;

    font-size: 12px;

    color: #55718a;

}


/* =========================================================
   SECCIONES
   ========================================================= */

.section {

    margin-top: 25px;

    border:
        1px solid #9aa9b6;

    background: #f4f6f8;

    box-shadow:
        0 2px 5px
        rgba(0,0,0,0.15);

}


/* =========================================================
   TITULOS DE SECCION
   ========================================================= */

.section-title {

    min-height: 42px;

    padding:
        0 15px;

    display: flex;

    align-items: center;

    justify-content:
        space-between;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #d9e1e8
        );

    border-bottom:
        1px solid #a3b0bb;

}


.section-title h2 {

    margin: 0;

    color: #3c5e79;

    font-size: 15px;

    text-shadow:
        1px 1px white;

}


.view-all {

    font-size: 12px;

    font-weight: bold;

}


/* =========================================================
   CATEGORIAS
   ========================================================= */

.categories {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    padding: 15px;

}


.category-card {

    min-height: 90px;

    display: flex;

    align-items: center;

    padding: 12px;

    border:
        1px solid #a8b5c0;

    border-radius: 6px;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #e7edf2
        );

    box-shadow:
        inset 0 1px 0 white,

        0 1px 2px
        rgba(0,0,0,0.12);

    transition:
        transform 0.15s,
        box-shadow 0.15s;

}


.category-card:hover {

    transform:
        translateY(-2px);

    text-decoration: none;

    box-shadow:
        0 3px 7px
        rgba(0,0,0,0.25);

}


.category-icon {

    width: 58px;

    height: 58px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

    margin-right: 13px;

    border:
        1px solid #a1adb8;

    border-radius: 8px;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #d4dde5
        );

    box-shadow:
        inset 0 1px 0 white;

}


.category-icon img {

    width: 43px;

    height: 43px;

    object-fit: contain;

    filter:
        drop-shadow(
            1px 2px 1px
            rgba(0,0,0,0.18)
        );

}


.category-info h3 {

    margin:
        0 0 5px;

    font-size: 15px;

    color: #315c82;

}


.category-info span {

    color: #777;

    font-size: 11px;

}


/* =========================================================
   LISTA DE ARCHIVOS
   ========================================================= */

.file-list {

    padding:
        5px 15px 15px;

}


.file-row {

    min-height: 67px;

    display: grid;

    grid-template-columns:
        50px
        minmax(200px, 1fr)
        70px
        90px
        100px;

    align-items: center;

    gap: 10px;

    padding:
        7px 8px;

    border-bottom:
        1px solid #d0d6db;

}


.file-row:last-child {

    border-bottom: none;

}


.file-row:hover {

    background: #e7f0f7;

}


/* =========================================================
   ICONOS DE ARCHIVOS
   ========================================================= */

.file-type {

    width: 40px;

    height: 40px;

    display: flex;

    align-items: center;

    justify-content: center;

    border:
        1px solid #b2bcc5;

    border-radius: 5px;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #dce3e9
        );

}


.file-type img {

    width: 30px;

    height: 30px;

    object-fit: contain;

}


/* =========================================================
   INFORMACION DEL ARCHIVO
   ========================================================= */

.file-main {

    display: flex;

    flex-direction: column;

    min-width: 0;

}


.file-name {

    font-size: 13px;

    font-weight: bold;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.file-description {

    margin-top: 4px;

    font-size: 11px;

    color: #777;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

}


.file-format,
.file-size,
.file-date {

    font-size: 11px;

    color: #68757f;

}


.file-format {

    font-weight: bold;

    color: #456b88;

}


/* =========================================================
   PANELES INFORMATIVOS
   ========================================================= */

.info-panels {

    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 15px;

    margin-top: 25px;

}


.info-panel {

    display: flex;

    gap: 15px;

    padding: 18px;

    border:
        1px solid #9caab5;

    background:
        linear-gradient(
            to bottom,
            #ffffff,
            #e5ebf0
        );

    box-shadow:
        0 2px 4px
        rgba(0,0,0,0.15);

}


.info-panel-icon {

    width: 50px;

    height: 50px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

}


.info-panel-icon img {

    width: 42px;

    height: 42px;

    object-fit: contain;

}


.info-panel h3 {

    margin:
        0 0 8px;

    color: #416987;

    font-size: 14px;

}


.info-panel p {

    margin:
        4px 0;

    color: #68747d;

    font-size: 12px;

}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {

    border-top:
        1px solid #718391;

    background:
        linear-gradient(
            to bottom,
            #e0e6eb,
            #c2ccd4
        );

    color: #66737d;

    font-size: 11px;

}


.footer-main {

    width: 94%;

    max-width: 1180px;

    min-height: 55px;

    margin: auto;

    display: flex;

    justify-content:
        space-between;

    align-items: center;

}


.footer-main strong {

    color: #496a83;

    margin-right: 10px;

}


.footer-links {

    display: flex;

    gap: 15px;

}


.footer-links a {

    color: #496a83;

}


.footer-bottom {

    min-height: 32px;

    padding: 8px;

    display: flex;

    justify-content: center;

    gap: 30px;

    border-top:
        1px solid #b2bdc6;

    background:
        rgba(255,255,255,0.3);

}


.footer-bottom strong {

    color: #456a84;

}


/* =========================================================
   RESPONSIVE - TABLETS
   ========================================================= */

@media (max-width: 850px) {


    .header-top {

        flex-direction: column;

        gap: 12px;

        text-align: center;

    }


    .user-area {

        margin-bottom: 5px;

    }


    .menu {

        flex-wrap: wrap;

    }


    .menu a {

        min-width: auto;

        flex: 1;

        padding:
            10px 7px;

    }


    .categories {

        grid-template-columns:
            repeat(2, 1fr);

    }


    .file-row {

        grid-template-columns:
            45px
            1fr
            60px;

    }


    .file-size,
    .file-date {

        display: none;

    }


    .info-panels {

        grid-template-columns: 1fr;

    }


    .footer-main {

        flex-direction: column;

        gap: 12px;

        padding: 15px;

    }

}


/* =========================================================
   RESPONSIVE - CELULARES
   ========================================================= */

@media (max-width: 650px) {


    .container {

        width: 96%;

    }


    .logo-area {

        gap: 8px;

    }


    .logo-image {

        width: 48px;

        height: 48px;

    }


    .logo-text h1 {

        font-size: 22px;

    }


    .logo-text span {

        font-size: 10px;

    }


    .featured-banner {

        min-height: auto;

        flex-direction: column;

        text-align: center;

    }


    .featured-image {

        width: 100%;

        height: 100px;

        border-right: none;

        border-bottom:
            1px solid #b2bec8;

    }


    .featured-image img {

        width: 60px;

        height: 60px;

    }


    .featured-content {

        padding: 18px;

    }


    .featured-content h2 {

        font-size: 18px;

    }


    .featured-date {

        width: 90px;

        height: 70px;

        margin:
            0 0 18px;

    }


    .featured-date strong {

        font-size: 21px;

    }


    .welcome h2 {

        font-size: 23px;

    }


    .search-box {

        width: 100%;

    }


    .search-box button {

        width: 90px;

    }


    .categories {

        grid-template-columns: 1fr;

    }


    .menu a {

        flex-basis: 50%;

    }


    .file-row {

        grid-template-columns:
            45px
            1fr;

    }


    .file-format {

        display: none;

    }


    .footer-links {

        flex-wrap: wrap;

        justify-content: center;

    }


    .footer-bottom {

        flex-direction: column;

        gap: 5px;

        align-items: center;

    }

}


/* =========================================================
   CELULARES MUY PEQUEÑOS
   ========================================================= */

@media (max-width: 400px) {


    .menu a {

        font-size: 10px;

    }


    .menu a img {

        width: 18px;

        height: 18px;

    }


    .welcome-content {

        padding:
            25px 12px 30px;

    }


    .search-box button span {

        display: none;

    }


    .search-box button {

        width: 48px;

    }

}
/* =========================================================
   VENTANA MODAL Y FORMULARIO (ESTÉTICA WEB 2.0)
   ========================================================= */

/* Fondo flotante */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(18, 32, 48, 0.65);
    backdrop-filter: blur(1px);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

/* Caja principal del modal */
.modal-container {
    width: 90%;
    max-width: 580px;
    max-height: 90vh;
    border: 1px solid #71879a;
    border-radius: 8px;
    background: #f4f6f8;
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.45), 
        inset 0 1px 0 #ffffff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

/* Cabecera Web 2.0 */
.modal-header {
    min-height: 40px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(
        to bottom,
        #6287a8 0%,
        #416b8e 48%,
        #315979 52%,
        #4a7597 100%
    );
    border-bottom: 1px solid #203f59;
}

.modal-header h2 {
    margin: 0;
    font-size: 14px;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 1px 1px 1px #23435b;
}

/* Botón cerrar */
.modal-close {
    background: linear-gradient(to bottom, #ffffff, #dce5ec);
    border: 1px solid #718391;
    border-radius: 3px;
    color: #315f86;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 1px 0 #ffffff;
}

.modal-close:hover {
    background: #ffffff;
    color: #c0392b;
    border-color: #c0392b;
}

/* Cuerpo interno */
.modal-body {
    padding: 20px 25px;
    overflow-y: auto;
}

.modal-subtitle {
    margin: 0 0 16px 0;
    font-size: 12px;
    color: #556677;
    line-height: 1.4;
    border-bottom: 1px solid #d8e1e8;
    padding-bottom: 10px;
}

/* Estructura vertical limpia para cada campo */
.modal-form .form-group {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
}

.modal-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 11px;
    font-weight: bold;
    color: #315f86;
}

.modal-form input[type="text"],
.modal-form select,
.modal-form textarea {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #8294a5;
    border-radius: 4px;
    background: #ffffff;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    color: #333;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.modal-form select {
    height: 32px;
    cursor: pointer;
}

.modal-form textarea {
    min-height: 65px;
    resize: vertical;
}

.modal-form input[type="text"]:focus,
.modal-form select:focus,
.modal-form textarea:focus {
    border-color: #4d82ac;
    outline: none;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.form-help-text {
    font-size: 10px;
    color: #778899;
    margin-top: 4px;
}

/* Pie del modal con el botón de envío */
.modal-footer-upload {
    margin: 20px -25px -20px -25px;
    padding: 12px 20px;
    background: #e2e9f0;
    border-top: 1px solid #b8c5d0;
    text-align: left;
}

.modal-btn-submit {
    padding: 7px 20px;
    border: 1px solid #315979;
    border-radius: 4px;
    background: linear-gradient(
        to bottom,
        #78a1c2,
        #416f96
    );
    color: white;
    font-family: Tahoma, Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 1px 1px 1px #23435b;
    cursor: pointer;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.modal-btn-submit:hover {
    background: linear-gradient(
        to bottom,
        #88aecb,
        #4c7fa5
    );
}

.modal-btn-submit:active {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Tarjeta Flotante de Vista Previa (Hover Popover) */
.file-popover {
    position: fixed;
    display: none;
    z-index: 9999;
    background: #ffffff;
    border: 1px solid #758a99;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    padding: 12px;
    border-radius: 6px;
    pointer-events: none; /* Evita que el cursor se trabe con la tarjeta */
    width: 260px;
    font-size: 12px;
    color: #333;
    transition: opacity 0.15s ease-in-out;
}

.file-popover-header {
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 6px;
    margin-bottom: 8px;
}

.file-popover-header img {
    width: 28px;
    height: 28px;
}

.file-popover-header strong {
    font-size: 13px;
    color: #2b5177;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-popover-body {
    line-height: 1.4;
}

.file-popover-meta {
    margin-top: 8px;
    padding-top: 6px;
    border-top: 1px dashed #ddd;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #666;
}