
.militar {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f4f4f4;
    color: #222222;
    padding: 20px;
    display: flex;
    justify-content: center;
}

.expediente {
    background: #ffffff;
    max-width: 1000px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 30px 35px 40px;
    border: 1px solid #d0d0d0;
}

.header-militar {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid #d0d0d0;
    padding-bottom: 20px;
    margin-bottom: 25px;
}

.header-militar-info {
    flex: 2;
}

    .header-militar-info h1 {
        font-size: 1.8rem;
        color: #2c3e50;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        margin-bottom: 8px;
    }

    .header-militar-info h2 {
        font-size: 1.3rem;
        margin-bottom: 10px;
    }

    .header-militar-info p {
        font-size: 0.95rem;
        color: #666666;
        line-height: 1.4;
    }

.foto-militar {
    flex: 1;
    max-width: 180px;
    border: 2px solid #d0d0d0;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e0e0e0;
    position: relative;
}

    .foto-militar span {
        font-size: 0.8rem;
        color: #666666;
        text-align: center;
        padding: 10px;
    }

/* Sección genérica */
.section-militar {
    margin-bottom: 25px;
}

.section-militar-title {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2c3e50;
    border-left: 4px solid #8e44ad;
    padding-left: 10px;
    margin-bottom: 12px;
}

/* Datos personales */
.datos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px 25px;
    font-size: 0.95rem;
}

.dato-label {
    font-weight: 600;
    color: #666666;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.dato-valor {
    margin-top: 2px;
}

/* Servicios realizados */
.servicios-lista {
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    overflow: hidden;
}

.servicio-item {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    border-bottom: 1px solid #d0d0d0;
}

    .servicio-item:nth-child(even) {
        background: #fafafa;
    }

.servicio-header {
    background: #ecf0f1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}

/* Condecoraciones */
.condecoraciones-lista {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.condecoracion {
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9rem;
    background: #f2f2f2;
}

    .condecoracion:hover {
        background-color: navajowhite;
        cursor: text;
    }

.condecoracion-titulo {
    font-weight: 600;
    margin-bottom: 4px;
}

.condecoracion-detalle {
    font-size: 0.8rem;
    line-height: 1.2em;
    color: #666666;
}

/* Otra información */
.otra-info {
    border: 1px dashed #d0d0d0;
    border-radius: 8px;
    padding: 12px;
    min-height: 80px;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-line; /* para respetar saltos de línea si se edita */
}

/* Pie */
.footer-militar {
    margin-top: 25px;
    font-size: 0.75rem;
    color: #666666;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid #d0d0d0;
    padding-top: 10px;
}


/* Estilos para la tabla */
.tablamilitar {
    width: 100%;
    border-collapse: collapse; /* Elimina el espacio entre bordes */
    margin: 20px 0;
    font-family: sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

    /* Estilo para la fila de títulos (thead) */
    .tablamilitar thead tr {
        background-color: darkred; /* Color verde oscuro profesional */
        color: navajowhite;
        text-align: left;
        font-weight: bold;
    }

    /* Relleno de las celdas */
    .tablamilitar th,
    .tablamilitar td {
        padding: 12px 15px;
        border: 1px solid #dddddd;
    }

    /* Colores alternos para filas pares (Efecto Cebra) */
    .tablamilitar tbody tr:nth-of-type(even) {
        background-color: #f3f3f3;
    }

    /* Efecto hover opcional: Resalta la fila al pasar el ratón */
    .tablamilitar tbody tr:hover {
        background-color: navajowhite;
        cursor: text;
    }

    /* Última fila con un borde inferior más grueso */
    .tablamilitar tbody tr:last-of-type {
        border-bottom: 2px solid #009879;
    }



/* Estilos para la tabla */
.tablaserviciosmilitares {
    width: 100%;
    border-collapse: collapse; /* Elimina el espacio entre bordes */
    margin: 20px 0;
    line-height: 1.35;
    font-family: sans-serif;
    font-size: 0.9rem;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

    /* Estilo para la fila de títulos (thead) */
    .tablaserviciosmilitares thead tr {
        background-color: darkred; /* Color verde oscuro profesional */
        color: navajowhite;
        text-align: left;
        font-weight: bold;
    }

    /* Relleno de las celdas */
    .tablaserviciosmilitares th,
    .tablaserviciosmilitares td {
        padding: 12px 15px;
        border: 1px solid #dddddd;
    }

    /* Colores alternos para filas pares (Efecto Cebra) */
    .tablaserviciosmilitares tbody tr:nth-of-type(even) {
        background-color: #f3f3f3;
    }

    /* Efecto hover opcional: Resalta la fila al pasar el ratón */
    .tablaserviciosmilitares tbody tr:hover {
        background-color: navajowhite;
        cursor: text;
    }

    /* Última fila con un borde inferior más grueso */
    .tablaserviciosmilitares tbody tr:last-of-type {
        border-bottom: 2px solid #009879;
    }

.galeria {
    float: right;
    padding: 5px;
}

/* Estilo básico de las miniaturas */
.thumb {
    width: 100px;
    cursor: pointer;
    transition: transform 0.3s;
}

    .thumb:hover {
        transform: scale(1.05);
    }

/* El contenedor flotante (oculto) */
/* El contenedor flotante con transición */
.lightbox {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    /* Centrado */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Estado oculto para la animación */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

    /* Estado activo con Fade-in */
    .lightbox:target {
        opacity: 1;
        visibility: visible;
    }

    /* Opcional: Que la imagen también escale un poco al aparecer */
    .lightbox img {
        max-width: 90%;
        max-height: 80%;
        border: 3px solid white;
        transform: scale(0.9); /* Empieza un poco más pequeña */
        transition: transform 0.4s ease;
    }

    .lightbox:target img {
        transform: scale(1); /* Crece a su tamaño original */
    }

/* Botón de cerrar */
.cierra {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    text-decoration: none;
}

@media print {
    body {
        background: #ffffff;
        padding: 0;
    }

    .expediente {
        box-shadow: none;
        border: none;
        margin: 0;
        max-width: 100%;
    }
}
