/* VARIABLES DE COLORES */
:root {
    --blue: #001e77;
    --dark-blue: #1a325e;
    --pink: #ff008f;
    --dark-pink: #d42f74;
    --white: #ffffff;
    --black: #000000;
    --grey: #b3b3b3;
    --gold: #7f6000;
    --ligth-gold: #bf9000;
}

/* ESTILOS GENERALES */
.data-box p, h1, h2, h3, h4, h5 {
    font-family: "Times New Roman", Times, serif;
    font-style: italic;
    color: var(--ligth-gold);
}

.col a {
    text-decoration: none;
}

/* CARD PRINCIPAL */
.card-contenedor {
    background-image: url('/static/images/fondo_obituarios_peque%C3%B1o.png');
    background-size: cover;
    background-position: top left;
    background-repeat: no-repeat;
    border: 1px solid var(--ligth-gold)!important;
    border-radius: 20px;
    width: 300px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 100%;
    height: auto;
    min-height: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* CONTENEDOR DE GRILLA */
.row.justify-content-center {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
    align-items: center;
    justify-items: center;
    min-height: 100vh;
    padding: 2rem 0;
}

.col-auto {
    display: flex;
    align-items: stretch;
}

/* Asegura que el contenedor de datos tome todo el espacio posible */
.data-box {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background-color: rgb(255, 255, 255);
    border-style: solid;
    border-color: rgb(191, 144, 0);
    border-width: 2px;
    border-radius: 10px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    padding: 0 5px;
    border-image-source: none;
    border-image-slice: 100%;
    border-image-width: 1;
    border-image-outset: 0;
    border-image-repeat: stretch;
    width: 100%;
    box-sizing: border-box;
}


.nombre h1 {
    font-size: 1.12rem;
    font-weight: bold;
    color: var(--gold)!important;
    margin: 10px 10px 10px 10px;
}

.subdata-box {
    margin: 0;
    flex: 1 1 auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sb-subtitle h4 {
    background-color: var(--ligth-gold);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-weight: bold;
    border-radius: 4px;
    font-size: 1.1rem;
    line-height: 1.2;
    text-align: center;
    margin: 0;
}

.sb-body {
    margin: 0;
    padding: 10px 10px 10px 10px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid gray;
    flex-direction: column;
}

.sb-body-image {
    margin: 0;
    padding: 0.4rem 1rem 0.6rem;
    text-align: center;
    display: grid;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0px solid gray;
    flex-direction: column;
}

.btn-download-image {
    background-image: url("/static/images/responsive/descargar_obituario.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 100%;
    height: 80px;
    margin: 0 auto;
    cursor: pointer;
}

.btn-download-image:active {
    background-image: url("/static/images/responsive/descargar_obituario_pressed.png");
}

.logo-live-link {
    display: block;
    width: 100%;
    height: 80px;
    background-image: url("/static/images/Logo_live.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.logo-live-link:active {
    background-image: url("/static/images/Logo_live_pressed.png");
}

.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 6rem;
    height: 6rem;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float img {
    width: 6rem;
    height: 6rem;
}

/* RESPONSIVE: FONT SIZES Y ESPACIOS */
@media (min-width: 576px) {
    .nombre h1 { font-size: 1.5rem; }
}

@media (min-width: 768px) {
    .nombre h1 { font-size: 1.5rem; }
}

@media (min-width: 992px) {
    .nombre h1 { font-size: 1.5rem; }
}

@media (min-width: 1200px) {
    .nombre h1 { font-size: 1.8rem; }
}

@media (min-width: 1400px) {
    .nombre h1 { font-size: 1.8rem; }
}

@media (min-width: 1900px) {
    .nombre h1 { font-size: 1.8rem; }
}

.g-logo {
    margin-bottom: 0px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
}

.logo-img {
    max-width: 150px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.page-general .footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
}

.page-general .main-content {
    padding-top: 0px;
    padding-bottom: 140px;
}

@media (prefers-color-scheme: dark) {
    html, body {
        background-color: white !important;
        color: black !important;
    }

    .card-contenedor,
    .sb-body,
    .sb-subtitle h4,
    .nombre h1,
    .data-box p,
    h1, h2, h3, h4, h5, p {
        background-color: white !important;
        color: var(--ligth-gold) !important;
    }

    .sb-subtitle h4 {
        background-color: var(--ligth-gold) !important;
        color: var(--white) !important;
    }

    img {
        filter: none !important;
    }
}
