/* =========================================
   Luis Alberto García Medina | Abogado
   Diseño claro y profesional
   ========================================= */


/* CONFIGURACIÓN GENERAL */

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

html {
    scroll-behavior: smooth;
}

body {
    background: #f7f8f6;
    color: #26312c;

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.7;

    min-height: 100vh;
}


/* LÍNEA SUPERIOR */

body::before {
    content: "";
    display: block;

    width: 100%;
    height: 4px;

    background: #2f7251;
}


/* CONTENEDORES */

header,
main,
footer {
    width: 90%;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}


/* =========================================
   ENCABEZADO
   ========================================= */

header {
    padding: 100px 0 75px;

    border-bottom: 1px solid #dfe4e1;
}

header h1 {
    color: #17221d;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.5rem, 6vw, 4.8rem);

    font-weight: normal;
    line-height: 1.05;
    letter-spacing: -1.5px;

    max-width: 850px;
}

header p {
    margin-top: 22px;

    color: #2f7251;

    font-size: 0.9rem;
    font-weight: bold;

    letter-spacing: 4px;
    text-transform: uppercase;
}

/* =========================================
   ÚLTIMAS NOTICIAS EN ENCABEZADO
   ========================================= */

.header-inicio {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 70px;
}

.identidad {
    flex: 1;
}

.ultimas-noticias {
    width: 300px;
    padding-left: 28px;
    border-left: 1px solid #c8b38f;
}

.noticias-etiqueta {
    display: block;

    margin-bottom: 14px;

    color: #9a7b48;

    font-size: 0.76rem;
    font-weight: bold;

    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.ultimas-noticias .noticia-titulo {
    margin-top: 0;

    color: #56615c;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    font-weight: normal;

    line-height: 1.5;
    letter-spacing: 0;
    text-transform: none;
}
/* =========================================
   SECCIONES
   ========================================= */

section {
    padding: 70px 0;

    border-bottom: 1px solid #dfe4e1;
}

section h2 {
    color: #2f7251;

    font-size: 0.78rem;
    font-weight: bold;

    text-transform: uppercase;
    letter-spacing: 3px;

    margin-bottom: 25px;
}

section h3 {
    color: #1e2924;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;

    font-weight: normal;

    margin-bottom: 10px;
}

section > p {
    color: #56615c;

    max-width: 760px;

    font-size: 1.08rem;
}


/* =========================================
   ÁREAS DE ATENCIÓN
   ========================================= */

.areas {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

    margin-top: 35px;
}

.area {
    background: #ffffff;

    padding: 30px;

    border: 1px solid #e1e5e2;

    border-radius: 4px;

    box-shadow:
        0 4px 18px rgba(30, 50, 40, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.area:hover {
    transform: translateY(-3px);

    border-color: #9bbcab;

    box-shadow:
        0 8px 25px rgba(30, 50, 40, 0.08);
}

.area h3 {
    color: #24352d;
}

.area p {
    margin-top: 10px;

    color: #66716c;

    font-size: 0.95rem;
}


/* PEQUEÑO DETALLE VISUAL */

.area::before {
    content: "";

    display: block;

    width: 30px;
    height: 2px;

    background: #4b8b68;

    margin-bottom: 20px;
}


/* =========================================
   CONTACTO
   ========================================= */

section:last-of-type {
    padding-top: 80px;
    padding-bottom: 90px;
}

section:last-of-type h3 {
    font-size: 2rem;

    margin-bottom: 15px;
}

.boton {
    display: inline-block;

    margin-top: 30px;

    padding: 14px 27px;

    background: #2f7251;

    color: #ffffff;

    text-decoration: none;

    font-size: 0.88rem;
    font-weight: bold;

    letter-spacing: 0.5px;

    border-radius: 3px;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.boton:hover {
    background: #245c40;

    transform: translateY(-1px);
}

/* Fondo ornamental de contacto */
#contacto {
    position: relative;

    padding-left: 35px;
    padding-right: 35px;

    overflow: hidden;
}

/* Imagen ornamental en transparencia */
#contacto::before {
    content: "";

    position: absolute;
    inset: 0;

    background-image: url("fondo-contacto.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;

    opacity: 0.45;

    z-index: 0;
    pointer-events: none;
}

/* Mantiene texto y botón por encima del fondo */
#contacto > * {
    position: relative;
    z-index: 1;
}


/* =========================================
   PIE DE PÁGINA
   ========================================= */

footer {
    padding: 35px 0 50px;

    color: #89918d;

    font-size: 0.75rem;

    letter-spacing: 0.5px;
}


/* =========================================
   CELULARES
   ========================================= */

@media (max-width: 700px) {

   header {
    padding: 70px 0 50px;
}

.header-inicio {
    flex-direction: column;
    align-items: flex-start;
    gap: 35px;
}

.ultimas-noticias {
    width: 100%;
    padding-left: 0;
    padding-top: 22px;

    border-left: none;
    border-top: 1px solid #c8b38f;
}
   
    header h1 {
        font-size: 2.7rem;
    }

    section {
        padding: 50px 0;
    }

    .areas {
        grid-template-columns: 1fr;
    }

    .area {
        padding: 25px;
    }

    section:last-of-type h3 {
        font-size: 1.7rem;
    }

}

/* =========================================
   TARJETAS INTERACTIVAS
   ========================================= */

.area-link {
    display: block;

    color: inherit;
    text-decoration: none;

    cursor: pointer;
}


/* Evita el estilo típico de los enlaces */

.area-link h3,
.area-link p {
    text-decoration: none;
}


/* INDICADOR "VER INFORMACIÓN" */

.ver-mas {
    display: inline-block;

    margin-top: 18px;

    color: #2f7251;

    font-size: 0.78rem;
    font-weight: bold;

    letter-spacing: 0.5px;

    opacity: 0.65;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


/* EFECTO AL PASAR EL CURSOR */

.area-link:hover {
    transform: translateY(-5px);

    border-color: #7da58f;

    box-shadow:
        0 12px 30px rgba(30, 50, 40, 0.13);

    background: #ffffff;
}


/* El indicador también reacciona */

.area-link:hover .ver-mas {
    opacity: 1;

    transform: translateX(4px);
}


/* ACCESIBILIDAD: NAVEGACIÓN CON TECLADO */

.area-link:focus-visible {
    outline: 2px solid #2f7251;
    outline-offset: 4px;
}
/* =========================================
   PÁGINAS DE ÁREAS JURÍDICAS
   ========================================= */

.servicios-detalle {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;
    margin-top: 40px;
}

.servicios-detalle > div {
    background: #ffffff;

    padding: 28px;

    border: 1px solid #e1e5e2;
    border-radius: 4px;

    box-shadow:
        0 4px 18px rgba(30, 50, 40, 0.04);
}

.servicios-detalle h3 {
    color: #24352d;

    font-size: 1.2rem;
}

.servicios-detalle p {
    color: #66716c;

    font-size: 0.95rem;
}


/* ENLACE PARA REGRESAR */

.volver {
    color: #2f7251;

    text-decoration: none;

    font-size: 0.85rem;
    font-weight: bold;

    transition: opacity 0.2s ease;
}

.volver:hover {
    opacity: 0.65;
}


/* CELULARES */

@media (max-width: 700px) {

    .servicios-detalle {
        grid-template-columns: 1fr;
    }

}
/* =========================================
   REGRESAR AL INICIO
   ========================================= */

.regresar-inicio {
    padding: 25px 0 45px;
    text-align: right;
}
/* =========================================
   BARRA DE NAVEGACIÓN
   ========================================= */

.navbar {
    width: 100%;
    background: #c8b38f;
    border-bottom: 1px solid #b39a72;
}

.nav-contenido {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;

    min-height: 64px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.nav-titulo {
    color: #3b3025;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: bold;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    white-space: nowrap;
}
.nav-enlaces {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-enlaces a {
    color: #3b3025;
    text-decoration: none;

    font-size: 0.78rem;
    font-weight: bold;

    letter-spacing: 0.8px;
    text-transform: uppercase;

    transition: color 0.2s ease;
}
.nav-enlaces a:hover {
    color: #2f7251;
}


/* CELULARES */

@media (max-width: 700px) {

    .nav-contenido {
        min-height: auto;
        padding: 16px 0;

        flex-direction: column;
        align-items: flex-start;

        gap: 12px;
    }

    .nav-enlaces {
        width: 100%;
        gap: 18px;

        overflow-x: auto;
        white-space: nowrap;
    }

    .nav-enlaces a {
        font-size: 0.72rem;
    }

}

/* =========================================
   PÁGINA DE ARTÍCULOS
   ========================================= */

/* Encabezado editorial */

.header-articulos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;

    padding-top: 90px;
    padding-bottom: 70px;

    border-bottom: 1px solid #d8ccb7;
}

.identidad-articulos {
    max-width: 850px;
}
/* Símbolos editoriales */

.simbolos-editoriales {
    position: relative;
    flex-shrink: 0;

    width: 330px;
    height: 280px;

    margin-right: 10px;
}

/* Configuración general */
/* Símbolos editoriales */

.simbolos-editoriales {
    position: relative;
    flex-shrink: 0;

    width: 330px;
    height: 280px;

    margin-right: 10px;
}

/* Configuración general */
.simbolos-editoriales img {
    position: absolute;
    display: block;
    object-fit: contain;
}

/* Caballo: figura de fondo */
.simbolo-caballo {
    width: 270px;

    right: 0;
    bottom: 15px;

    opacity: 0.30;

    z-index: 1;
}

/* Torre: figura principal */
.simbolo-torre {
    width: 155px;

    right: 130px;
    bottom: 17px;

    opacity: 0.72;

    z-index: 2;
}
.articulos-etiqueta {
    display: block;

    margin-bottom: 22px;

    color: #9a7b48;

    font-size: 0.78rem;
    font-weight: bold;

    letter-spacing: 3px;
    text-transform: uppercase;
}

.header-articulos h1 {
    max-width: 900px;

    color: #17221d;

    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.3rem, 5vw, 4.2rem);

    font-weight: normal;
    line-height: 1.08;
    letter-spacing: -1.2px;
}

.header-articulos .articulos-introduccion {
    max-width: 650px;

    margin-top: 28px;

    color: #62615b;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-weight: normal;

    line-height: 1.7;
    letter-spacing: 0;
    text-transform: none;
}


/* Sección de publicaciones */

.seccion-articulos {
    padding-top: 70px;
    padding-bottom: 80px;
}

.lista-articulos {
    margin-top: 35px;
}

.tarjeta-articulo {
    max-width: 800px;

    padding: 32px 35px;

    background: #ffffff;

    border: 1px solid #e2ddd4;
    border-left: 3px solid #9a7b48;

    border-radius: 3px;

    box-shadow:
        0 4px 18px rgba(30, 50, 40, 0.04);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.tarjeta-articulo:hover {
    transform: translateY(-2px);

    box-shadow:
        0 8px 25px rgba(30, 50, 40, 0.08);
}

.articulo-categoria {
    display: block;

    margin-bottom: 14px;

    color: #9a7b48;

    font-size: 0.72rem;
    font-weight: bold;

    letter-spacing: 2px;
    text-transform: uppercase;
}

.tarjeta-articulo h3 {
    margin-bottom: 14px;

    color: #24352d;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;

    font-weight: normal;
}

.tarjeta-articulo p {
    max-width: 680px;

    color: #66716c;

    font-size: 0.95rem;
    line-height: 1.7;
}

.leer-articulo {
    display: inline-block;
    margin-top: 18px;

    color: #9a7b48;
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;

    transition: transform 0.2s ease, color 0.2s ease;
}

.leer-articulo:hover {
    color: #24352d;
    transform: translateX(4px);
}

/* =========================================
   ARTÍCULO INDIVIDUAL
   ========================================= */

.pagina-articulo {
    max-width: 1100px;
    margin: 0 auto;
    padding: 80px 35px 90px;
}

.articulo-completo {
    max-width: 780px;
}

.articulo-completo h1 {
    margin-top: 18px;
    margin-bottom: 28px;

    color: #17221d;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: normal;
    line-height: 1.1;
    letter-spacing: -1px;
}

.articulo-entrada {
    margin-bottom: 45px;

    color: #62615b;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.2rem;
    line-height: 1.7;
}

.contenido-articulo {
    color: #3f4944;
    font-size: 1rem;
    line-height: 1.85;
}

.pagina-articulo .regresar-inicio {
    max-width: 780px;
    margin-top: 65px;
}
/* Adaptación para celular */

@media (max-width: 700px) {

    .header-articulos {
        padding-top: 65px;
        padding-bottom: 50px;

        flex-direction: column;
        align-items: flex-start;
        gap: 35px;
    }

    .header-articulos h1 {
        font-size: 2.35rem;
    }

    .seccion-articulos {
        padding-top: 50px;
        padding-bottom: 60px;
    }

    .tarjeta-articulo {
        padding: 26px 24px;
    }

  .simbolos-editoriales {
    width: 170px;
    height: 150px;

    align-self: flex-end;
    margin-right: 0;
}

.simbolo-torre {
    width: 105px;

    right: 50px;
    bottom: 0;
}

.simbolo-caballo {
    width: 95px;

    right: 0;
    bottom: 25px;
}


}
/* =========================================
   ACCESIBILIDAD
   ========================================= */

.accesibilidad {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.accesibilidad-boton {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 11px 16px;

    background: #2f7251;
    color: #ffffff;

    border: none;
    border-radius: 4px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;
    font-weight: bold;

    cursor: pointer;

    box-shadow: 0 5px 18px rgba(30, 50, 40, 0.18);

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.accesibilidad-boton:hover {
    background: #245c40;
    transform: translateY(-2px);
}

.accesibilidad-icono {
    font-size: 1.15rem;
}

.accesibilidad-panel {
    display: none;

    position: absolute;
    right: 0;
    bottom: 55px;

    width: 260px;
    padding: 22px;

    background: #f7f8f6;

    border: 1px solid #b39a72;
    border-radius: 4px;

    box-shadow: 0 8px 30px rgba(30, 50, 40, 0.18);
}

.accesibilidad-panel.activo {
    display: block;
}
/* ENCABEZADO DEL PANEL */

.accesibilidad-encabezado {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.accesibilidad-encabezado h2 {
    margin-bottom: 0;
}

.accesibilidad-cerrar {
    width: auto !important;
    margin: 0 !important;
    padding: 3px 8px !important;

    background: transparent !important;
    border: none !important;

    color: #3b3025 !important;

    font-size: 1.4rem !important;
    line-height: 1;

    cursor: pointer;
}

.accesibilidad-cerrar:hover {
    color: #2f7251 !important;
}
.accesibilidad-panel h2 {
    margin-bottom: 18px;

    color: #3b3025;

    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.accesibilidad-panel button {
    width: 100%;

    margin: 4px 0;
    padding: 10px;

    background: #ffffff;
    color: #3b3025;

    border: 1px solid #d8d2c7;
    border-radius: 3px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.82rem;

    text-align: left;
    cursor: pointer;
}

.accesibilidad-panel button:hover {
    border-color: #2f7251;
    color: #2f7251;
}

.accesibilidad-tamano {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.accesibilidad-tamano button {
    text-align: center;
}

.accesibilidad-panel hr {
    margin: 12px 0;

    border: none;
    border-top: 1px solid #dfe4e1;
}


/* CELULARES */

@media (max-width: 700px) {

    .accesibilidad {
        right: 12px;
        bottom: 12px;
    }

    .accesibilidad-boton {
        padding: 10px 13px;
    }

    .accesibilidad-panel {
        width: 250px;
    }
}

/* =========================================
   MODO ALTO CONTRASTE
   ========================================= */

body.alto-contraste {
    background: #000000;
    color: #ffffff;
}

body.alto-contraste::before {
    background: #ffff00;
}

body.alto-contraste header,
body.alto-contraste main,
body.alto-contraste footer {
    color: #ffffff;
}

body.alto-contraste header {
    border-bottom-color: #ffffff;
}

body.alto-contraste header h1,
body.alto-contraste header p,
body.alto-contraste section h2,
body.alto-contraste section h3,
body.alto-contraste section p {
    color: #ffffff;
}

body.alto-contraste section {
    border-bottom-color: #ffffff;
}


/* BARRA DE NAVEGACIÓN */

body.alto-contraste .navbar {
    background: #000000;
    border-bottom-color: #ffffff;
}

body.alto-contraste .nav-titulo,
body.alto-contraste .nav-enlaces a {
    color: #ffff00;
}


/* TARJETAS */

body.alto-contraste .area,
body.alto-contraste .servicios-detalle > div {
    background: #000000;
    border-color: #ffffff;
    box-shadow: none;
}

body.alto-contraste .area h3,
body.alto-contraste .area p,
body.alto-contraste .servicios-detalle h3,
body.alto-contraste .servicios-detalle p {
    color: #ffffff;
}

body.alto-contraste .area::before {
    background: #ffff00;
}

body.alto-contraste .ver-mas,
body.alto-contraste .volver {
    color: #ffff00;
}


/* BOTÓN DE WHATSAPP */

body.alto-contraste .boton {
    background: #ffff00;
    color: #000000;
}


/* PANEL DE ACCESIBILIDAD */

body.alto-contraste .accesibilidad-boton {
    background: #ffff00;
    color: #000000;
}

body.alto-contraste .accesibilidad-panel {
    background: #000000;
    border-color: #ffffff;
}

body.alto-contraste .accesibilidad-panel h2 {
    color: #ffffff;
}

body.alto-contraste .accesibilidad-panel button {
    background: #000000;
    color: #ffffff;
    border-color: #ffffff;
}

body.alto-contraste .accesibilidad-panel button:hover {
    background: #ffff00;
    color: #000000;
}

body.alto-contraste .accesibilidad-cerrar {
    color: #ffffff !important;
}

/* =========================================
   RESALTAR ENLACES
   ========================================= */

body.enlaces-resaltados a:not(.accesibilidad-boton) {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px;
    font-weight: bold;
}

body.enlaces-resaltados .area-link {
    border: 2px solid #2f7251;
}

body.enlaces-resaltados .boton {
    text-decoration: underline !important;
}

/* =========================================
   TEXTO MÁS LEGIBLE
   ========================================= */

body.texto-legible {
    line-height: 1.9;
}

body.texto-legible p,
body.texto-legible h1,
body.texto-legible h2,
body.texto-legible h3,
body.texto-legible a,
body.texto-legible button {
    letter-spacing: 0.06em;
    word-spacing: 0.12em;
}

body.texto-legible p {
    line-height: 1.9;
}
