/* ==========================================
   GUÍA DNI ESPAÑA - STYLE.CSS
   Diseño responsive, limpio y profesional
   ========================================== */

:root {
    --primary: #0f4c81;
    --primary-dark: #0a3558;
    --secondary: #f5f7fa;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #dbe3ea;
    --white: #ffffff;
    --success: #0f766e;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

    --container: 1100px;
    --radius: 14px;
}

/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: #f8fafc;
}

/* TIPOGRAFÍA */

h1,
h2,
h3,
h4 {
    line-height: 1.25;
    margin-top: 0;
    color: #111827;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    margin-bottom: 1.2rem;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

p {
    margin: 0 0 1.25rem;
}

ul,
ol {
    padding-left: 1.4rem;
}

li {
    margin-bottom: 0.6rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.25s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* CONTENEDOR */

.container {
    width: min(100% - 2rem, var(--container));
    margin-inline: auto;
}

/* HEADER */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    padding: 1rem 0;
}

.logo {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.logo:hover {
    text-decoration: none;
}

/* BREADCRUMB */

.breadcrumb {
    margin-top: 0.75rem;
    font-size: 0.95rem;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--primary);
}

/* MAIN */

main {
    padding: 2rem 0 4rem;
}

/* HERO */

.hero-card {
    background: linear-gradient(
        135deg,
        #ffffff 0%,
        #f5f9fd 100%
    );
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* SECCIONES */

.content-section {
    background: var(--white);
    padding: 2rem;
    margin-bottom: 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.content-section h2 {
    position: relative;
    padding-bottom: 0.8rem;
}

.content-section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 70px;
    height: 4px;
    border-radius: 20px;
    background: var(--primary);
}

/* TARJETAS */

.card {
    background: #f8fbff;
    border: 1px solid #dce8f3;
    border-radius: 12px;
    padding: 1.4rem;
    margin: 1.25rem 0;
    transition: 0.25s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 76, 129, 0.08);
}

.card h3 {
    color: var(--primary);
}

/* TABLAS */

.table-responsive {
    overflow-x: auto;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 650px;
}

thead {
    background: var(--primary);
    color: white;
}

th,
td {
    padding: 1rem;
    text-align: left;
    border: 1px solid var(--border);
}

tbody tr:nth-child(even) {
    background: #f8fafc;
}

tbody tr:hover {
    background: #eef6fd;
}

/* LISTAS DESTACADAS */

.content-section ul li::marker {
    color: var(--primary);
}

/* FAQ */

.faq-section .card {
    background: #fff;
}

.faq-section h3 {
    margin-bottom: 0.5rem;
}

/* ADSENSE */

div:has(> .adsbygoogle),
.ad-container,
.adsense-container {
    margin: 2rem 0;
}

article > .adsense,
article > .ad-slot {
    min-height: 250px;
}

body *:has(> comment) {
    display: block;
}

/* CAJAS DE INFORMACIÓN */

.notice,
.info-box {
    background: #eef6fd;
    border-left: 5px solid var(--primary);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* FOOTER */

.site-footer {
    background: #111827;
    color: rgba(255,255,255,0.85);
    padding: 3rem 0;
    margin-top: 3rem;
}

.site-footer h3 {
    color: white;
    margin-bottom: 1rem;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    display: grid;
    gap: 0.7rem;
}

.site-footer a {
    color: rgba(255,255,255,0.85);
}

.site-footer a:hover {
    color: white;
}

.site-footer p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* BOTONES */

.btn,
button {
    display: inline-block;
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: 0.25s ease;
}

.btn:hover,
button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

/* TABLA DE CONTENIDOS OPCIONAL */

.toc {
    background: #f8fbff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.toc ul {
    margin: 0;
}

.toc li {
    margin-bottom: 0.5rem;
}

/* MOBILE */

@media (max-width: 768px) {

    .hero-card,
    .content-section {
        padding: 1.4rem;
    }

    .site-header {
        position: relative;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    table {
        min-width: 600px;
    }
}

/* DESKTOP GRANDE */

@media (min-width: 1200px) {

    .hero-card,
    .content-section {
        padding: 2.5rem;
    }
}

/* MEJORAS DE LEGIBILIDAD */

article {
    max-width: 900px;
    margin: auto;
}

article p,
article li {
    font-size: 1.05rem;
}

article img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ACCESIBILIDAD */

:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* SELECCIÓN DE TEXTO */

::selection {
    background: rgba(15, 76, 129, 0.15);
}
/* MOBILE MEJORADO */

@media(max-width:768px){

body{
    overflow-x:hidden;
}

.container{
    width:calc(100% - 24px);
}


.hero-card,
.content-section{
    padding:1.1rem;
}


h1{
    font-size:1.75rem;
}


h2{
    font-size:1.35rem;
}


h3{
    font-size:1.1rem;
}


.logo{
    font-size:1.15rem;
}


.breadcrumb{
    font-size:.85rem;
}


.card{
    padding:1rem;
}


.card:hover{
    transform:none;
}


main{
    padding:1rem 0 2rem;
}


table{
    min-width:650px;
    font-size:.9rem;
}


.table-responsive{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
}


a,
button,
.btn{
    min-height:44px;
}


.site-footer{
    text-align:center;
    padding:2rem 0;
}

}


@media(max-width:380px){

h1{
    font-size:1.55rem;
}

.content-section,
.hero-card{
    padding:.9rem;
}

}