/* =========================================================
   ESTILOS GENERALES
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
    background: #fff;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

.encabezado {
    width: 100%;
}

/* =========================================================
   BARRA SUPERIOR
========================================================= */

.barra-superior {
    height: 49px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 1px solid #d8d8d8;
    font-size: 14px;
}

.fecha {
    font-size: 14px;
}

.usuario {
    position: absolute;
    right: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-registrarme,
.btn-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.btn-registrarme {
    background: #f7dfbf;
}

.btn-login {
    border: 1px solid #c8c8c8;
    background: #fff;
}

.btn-registrarme:hover {
    background: #efd0a5;
}

.btn-login:hover {
    background: #f4f4f4;
}

/* =========================================================
   LOGO Y NOMBRE DEL DIARIO

   EDITAR EL DISEÑO DEL LOGO:
   Modificá principalmente .logo-text.
   Ahí podés cambiar fuente, tamaño, grosor, color,
   espaciado, mayúsculas, etc.
========================================================= */

.zona-logo {
    height: 139px;
    margin: 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #d8d8d8;
}

/* ======== EDITÁ EL LOGO DESDE ACÁ ======== */
.logo-text {
    display: block;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 72px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: -3px;
    color: #111;
}
/* ======== HASTA ACÁ LLEGA EL DISEÑO DEL LOGO ======== */

.zona-logo p {
    margin-top: 9px;
    color: #555;
    font-size: 15px;
    letter-spacing: 4px;
}

/* =========================================================
   SELECTOR NOTICIAS / EDICTOS
========================================================= */

.selector-publicaciones {
    height: 48px;
    margin: 0 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 45px;
    border-bottom: 1px solid #d8d8d8;
}

.selector-publicaciones input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.selector-publicaciones label {
    height: 48px;
    display: flex;
    align-items: center;
    position: relative;
    color: #555;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
}

.selector-publicaciones label:hover {
    color: #1d4f91;
}

.selector-publicaciones input[type="radio"]:checked + label {
    color: #1d4f91;
}

.selector-publicaciones input[type="radio"]:checked + label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: #1d4f91;
}

.enlace-selector {
    color: #555;
    font-size: 14px;
    font-weight: bold;
}

.enlace-selector:hover {
    color: #1d4f91;
}


/* =========================================================
   LOGO EN IMAGEN
   Colocá tu archivo como public/logo.png.
   Para cambiar el tamaño del logo, modificá width/height acá.
========================================================= */
.logo-imagen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.logo-imagen img {
    /* EDITAR ACÁ EL TAMAÑO DE LA IMAGEN DEL LOGO */
    width: 200px;
    max-width: 80vw;
    height: auto;
    display: block;
}

/* =========================================================
   PÁGINA PRINCIPAL / TARJETAS
========================================================= */

.contenedor-principal {
    width: 100%;
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.grilla-noticias {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tarjeta-noticia {
    border: 1px solid #222;
    background: #fff;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tarjeta-noticia:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.etiqueta-publicacion {
    display: block;
    padding: 14px 15px 0;
    color: #1d4f91;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.tarjeta-noticia h2 {
    min-height: 125px;
    padding: 10px 15px 15px;
    font-size: 22px;
    line-height: 1.25;
}

.subtitulo-miniatura {
    margin: 8px 15px 14px;
    color: #555;
    line-height: 1.35;
}

.tarjeta-edicto {
    min-height: 220px;
}

.tarjeta-edicto .subtitulo-miniatura {
    margin-bottom: 20px;
}

.contenedor-imagen {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.tarjeta-noticia img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.mensaje-carga,
.sin-articulos {
    width: 100%;
    padding: 30px 0;
    text-align: center;
    color: #666;
}

/* =========================================================
   PÁGINA DE UNA NOTICIA / EDICTO
========================================================= */

.contenedor-noticia {
    width: 100%;
    max-width: 900px;
    margin: 45px auto;
    padding: 0 25px;
}

.noticia-completa h1 {
    margin-bottom: 12px;
    font-size: 48px;
    line-height: 1.1;
}

.tipo-noticia {
    display: inline-block;
    margin-bottom: 12px;
    color: #1d4f91;
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.subtitulo-noticia {
    margin: 0 0 15px;
    color: #555;
    font-size: 21px;
    line-height: 1.45;
}

.fecha-noticia {
    margin-bottom: 25px;
    color: #666;
    font-size: 14px;
}

.imagen-noticia {
    width: 100%;
    max-height: 550px;
    display: block;
    margin-bottom: 30px;
    object-fit: cover;
}

.contenido-noticia {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 19px;
    line-height: 1.7;
}

.contenido-noticia p {
    margin-bottom: 20px;
}

.encabezado-simple .zona-logo {
    border-bottom: none;
}

/* =========================================================
   LOGIN / REGISTRO
========================================================= */

.contenedor-formulario {
    min-height: calc(100vh - 190px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 45px 20px;
}

.formulario-caja {
    width: 100%;
    max-width: 420px;
    padding: 30px;
    border: 1px solid #222;
    background: #fff;
}

.formulario-caja h1 {
    margin-bottom: 25px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    text-align: center;
}

.formulario-caja form {
    display: flex;
    flex-direction: column;
}

.formulario-caja label {
    margin-bottom: 7px;
    font-size: 14px;
    font-weight: bold;
}

.formulario-caja input {
    height: 42px;
    margin-bottom: 20px;
    padding: 0 12px;
    border: 1px solid #aaa;
    font-size: 16px;
    outline: none;
}

.formulario-caja input:focus {
    border-color: #1d4f91;
}

.formulario-caja button {
    height: 44px;
    border: none;
    background: #1d4f91;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.formulario-caja button:hover {
    background: #163d70;
}

.texto-formulario {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.texto-formulario a {
    color: #1d4f91;
    font-weight: bold;
}

/* =========================================================
   PANEL DE ADMINISTRACIÓN
========================================================= */

.contenedor-admin {
    width: 100%;
    max-width: 1100px;
    margin: 45px auto;
    padding: 0 25px;
}

.cabecera-admin {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.cabecera-admin h1 {
    margin-bottom: 7px;
    font-size: 32px;
}

.cabecera-admin p {
    color: #666;
}

.formulario-admin {
    border: 1px solid #ccc;
    padding: 25px;
    margin-bottom: 40px;
}

.formulario-admin form {
    display: flex;
    flex-direction: column;
}

.formulario-admin label {
    margin: 14px 0 6px;
    font-weight: bold;
}

.formulario-admin input,
.formulario-admin textarea,
.formulario-admin select {
    box-sizing: border-box;
    width: 100%;
    padding: 11px;
    border: 1px solid #aaa;
    font-family: inherit;
    font-size: 15px;
}

.formulario-admin small {
    margin-top: 5px;
    color: #666;
}

.formulario-admin .boton-agregar {
    align-self: flex-start;
    margin-top: 20px;
}

.boton-agregar {
    padding: 13px 20px;
    border: none;
    background: #1d4f91;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.boton-agregar:hover {
    background: #163d70;
}

.mensaje-admin {
    margin-top: 12px;
    font-weight: bold;
}

.lista-admin {
    display: flex;
    flex-direction: column;
    border-top: 1px solid #222;
}

.lista-admin h2 {
    margin-bottom: 15px;
}

.fila-admin {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 18px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
}

.fila-admin h3 {
    margin: 8px 0;
}

.fila-admin p {
    margin: 5px 0;
    color: #555;
}

.acciones-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.acciones-admin a,
.acciones-admin button {
    padding: 9px 13px;
    border: 1px solid #999;
    background: #fff;
    color: #222;
    text-decoration: none;
    cursor: pointer;
}

.acciones-admin .boton-eliminar {
    border-color: #a33;
    color: #a33;
}

.usuario-logueado {
    margin-right: 12px;
    font-size: 14px;
}

.btn-admin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    margin-right: 8px;
    border-radius: 18px;
    background: #1d4f91;
    color: #fff;
    font-size: 13px;
    font-weight: bold;
}

/* =========================================================
   PUBLICIDADES
========================================================= */

.publicidades {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-items: center;
}

.publicidades img {
    width: 100%;
    height: 105px;
    object-fit: contain;
    display: block;
    border: 1px solid #ddd;
    background: #fff;
}

/* =========================================================
   FOOTER
========================================================= */

footer {
    margin-top: 60px;
    padding: 30px 50px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    border-top: 1px solid #ddd;
    color: #777;
    font-size: 13px;
}

.footer-lado {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.footer-lado strong {
    margin-bottom: 3px;
    color: #222;
    font-size: 14px;
}

.footer-identidad {
    text-align: left;
}

.footer-contacto {
    text-align: right;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 950px) {
    .grilla-noticias {
        grid-template-columns: repeat(2, 1fr);
    }

    .publicidades {
        grid-template-columns: repeat(4, 1fr);
    }

    .usuario {
        right: 15px;
    }

    .zona-logo,
    .selector-publicaciones {
        margin-left: 35px;
        margin-right: 35px;
    }
}

@media (max-width: 700px) {
    .fila-admin {
        flex-direction: column;
        align-items: flex-start;
    }

    .acciones-admin {
        width: 100%;
    }
}

@media (max-width: 650px) {
    .barra-superior {
        height: auto;
        min-height: 49px;
        padding: 8px 10px;
    }

    .usuario {
        position: static;
        gap: 7px;
    }

    .barra-superior {
        justify-content: space-between;
    }

    .fecha {
        display: block;
        font-size: 11px;
        white-space: nowrap;
    }

    .btn-registrarme,
    .btn-login {
        min-height: 31px;
        padding: 0 11px;
        font-size: 10px;
    }

    .zona-logo {
        height: 125px;
        margin-left: 20px;
        margin-right: 20px;
    }

    /* También podés cambiar el tamaño móvil del logo acá. */
    .logo-imagen img {
        /* EDITAR ACÁ EL TAMAÑO DEL LOGO EN CELULAR */
        width: 280px;
    }

    .zona-logo p {
        font-size: 11px;
        letter-spacing: 3px;
    }

    .selector-publicaciones {
        height: 43px;
        margin-left: 20px;
        margin-right: 20px;
        gap: 30px;
    }

    .selector-publicaciones label {
        height: 43px;
        font-size: 12px;
    }

    .grilla-noticias {
        grid-template-columns: 1fr;
    }

    .publicidades {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .publicidades img {
        height: 65px;
    }

    .tarjeta-noticia h2 {
        min-height: auto;
        font-size: 21px;
    }

    .contenedor-imagen {
        height: 210px;
    }

    .noticia-completa h1 {
        font-size: 34px;
    }

    .contenido-noticia {
        font-size: 18px;
    }

    .cabecera-admin {
        align-items: flex-start;
        flex-direction: column;
    }

    footer {
        padding: 25px 20px;
        flex-direction: column;
        gap: 25px;
    }

    .footer-identidad,
    .footer-contacto {
        text-align: left;
    }
}


/* =========================================================
   DIARIO DE HOY
========================================================= */
.zona-diario-hoy {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 18px 20px 4px;
}

.boton-diario {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    background: #1d4f91;
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: .3px;
}

.boton-diario:hover {
    background: #163d70;
}

.mensaje-diario {
    color: #777;
    font-size: 12px;
}

#campo-dias {
    margin-top: 4px;
}

#campo-dias input {
    max-width: 180px;
}

.formulario-diario {
    margin-top: 40px;
    border-top: 3px solid #1d4f91;
}

.formulario-diario p:not(.mensaje-admin) {
    color: #666;
    margin-bottom: 15px;
}

.formulario-diario form {
    display: flex;
    flex-direction: column;
}

/* =========================================================
   RECORDATORIO DE EDICTOS VENCIDOS
========================================================= */
.recordatorio-edicto {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 11px;
    border-left: 3px solid #1d4f91;
    background: #eef4fb;
    color: #1d4f91;
    font-size: 13px;
    font-weight: bold;
}


.boton-diario-deshabilitado {
    background: #aaa;
    cursor: not-allowed;
}

.boton-diario-deshabilitado:hover {
    background: #aaa;
}

/* =========================================================
   FECHA DEL DIARIO
========================================================= */
.fecha-diario-simple {
    margin-top: 8px !important;
    color: #555;
    font-size: 13px !important;
    letter-spacing: 1px !important;
    text-transform: capitalize;
}

/* =========================================================
   FOOTER - DATOS DEL DIARIO
========================================================= */
footer {
    padding: 30px 50px;
    gap: 50px;
    color: #555;
    font-size: 12px;
    line-height: 1.4;
}

.footer-lado {
    flex: 1;
    gap: 4px;
}

.footer-lado strong {
    color: #222;
    font-size: 12px;
}

.footer-contacto {
    text-align: right;
}

@media (max-width: 650px) {
    .fecha-diario-simple {
        font-size: 11px !important;
        letter-spacing: 0.5px !important;
    }

    footer {
        padding: 25px 20px;
        gap: 20px;
    }

    .footer-identidad,
    .footer-contacto {
        text-align: left;
    }
}
