/* css/style.css */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f7f5;
    color: #333;
    line-height: 1.6;
    padding: 10px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(to right, #e0e0e0, #ffffff);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

h1 {
    color: #5a4b6b;
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.difunto-list {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.difunto-list th,
.difunto-list td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.difunto-list th {
    background-color: #f1f1f1;
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difunto-list tr:hover {
    background-color: #f5f5f5;
}

.difunto-list td {
    font-size: 0.95rem;
    word-break: break-word;
}

.map-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #8c7ae6;
    color: white !important;
    text-decoration: none !important;
    padding: 8px 14px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(140, 122, 230, 0.3);
    transition: all 0.3s ease;
}

.map-link:hover {
    background: #7565d0;
    transform: translateY(-1px);
}

.tabla-foto,
.tabla-esquela {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .difunto-list th,
    .difunto-list td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    .tabla-foto,
    .tabla-esquela {
        width: 60px;
        height: 60px;
    }

    .map-link {
        padding: 6px 10px;
        font-size: 0.85rem;
    }
}

footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background: #eef0f2;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #555;
    position: relative;
}

.contacto {
    font-weight: bold;
    color: #333;
}

.backend-link {
    position: absolute;
    top: 10px;
    right: 20px;
    padding: 8px 15px;
    background: #d32f2f;
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(211, 47, 47, 0.3);
}

.backend-link:hover {
    background: #b71c1c;
}

/* 🔍 Buscador */
.search-box {
    text-align: center;
    margin: 20px 0;
}
.search-box input[type="text"] {
    padding: 8px 12px;
    width: 250px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.search-box button {
    padding: 8px 14px;
    margin-left: 5px;
    background: #0073e6;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
}
.search-box button:hover {
    background: #005bb5;
}

/* Mensajes */
.no-resultados {
    text-align: center;
    color: #777;
    font-size: 1.1rem;
    margin-top: 40px;
}
.no-ubicacion {
    color: #999;
}

/* 🖼 Modal imágenes */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 80px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}
.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 8px;
}
.modal-close {
    position: absolute;
    top: 30px; right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}
.modal-close:hover {
    color: #ccc;
}

/* Ajuste columna correlativo (#) */
.difunto-list td:first-child,
.difunto-list th:first-child {
    width: 50px;
    text-align: center;
    font-weight: bold;
}

/* Ajuste columna correlativo (#) */
.difunto-list td:first-child,
.difunto-list th:first-child {
    width: 50px;
    text-align: center;
    font-weight: bold;
}

/* Estilos para fecha y hora */
.fecha-strong {
    font-weight: bold;
    color: #333;
}
.hora-light {
    color: #777;
    font-size: 0.9rem;
}
