/* =====================================================
   CADIZPRO.COM - STYLESHEET REORGANIZADO
   
   Tu CSS original organizado con metodología ITCSS
   SIN cambiar nombres de clases - Todo funciona igual
   
   Estructura:
   1. Settings     → Variables
   2. Generic      → Reset
   3. Elements     → HTML puro
   4. Layout       → Estructura
   5. Components   → Componentes
   6. Responsive   → Media queries
   ===================================================== */


/* =====================================================
   1. SETTINGS - Variables globales
   ===================================================== */

   :root {
    /* Colores */
    --header-bg: #041227;
    --header-text: #FFFFFF;
    --muted: #666;
    
    /* Tipografía */
    --font-sans: -Roboto, apple-system, BlinkMacSystemFont, "Segoe UI", Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    
    /* Anchos */
    --max-width: 1200px;
    

    /* ← AÑADE ESTO: Tamaños de fuente */
    --fs-base: 1.125rem;      /* 20.25px - aumentado de 18px */
    --fs-reading: 1.35rem;    /* 24.3px - para lectura confortable */
    --fs-small: 1rem;         /* 18px */

    /* margin-right: auto; */
}

*,
*::before,
*::after {
    box-sizing: border-box;
}
/* =====================================================
   2. GENERIC - Reset básico
   ===================================================== */

html, body {
    height: 100%;
    margin: 0;
    /*overflow-x: hidden;*/
}

html {
    font-size: 18px;  /* ← AÑADE ESTO: aumenta de 16px a 18px */
}

body {
    margin: 0 auto;
    padding: 0 0px;
    font-family: var(--font-sans);
    font-size: var(--fs-base);  /* ← CAMBIA ESTO: usa la variable */
}
img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =====================================================
   3. ELEMENTS - Elementos HTML puros
   ===================================================== */

hr {
    border-top: 1px solid #ffffff;
    color: #0b134d;
    color: #c4c9eb;
}

article img {
    max-width: 100%;
    height: auto;
}

article header h1 {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

article header p {
    color: var(--muted);
}

article footer {
    margin-top: 3rem;
    font-size: 0.9rem;
    color: var(--muted);
}

article p {
    /*font-weight: 500;*/
    font-weight: 450;           /* ← CAMBIA: era 500 (más ligero) */
    /*font-size: 1.3rem;*/
    font-size: 1.35rem;         /* ← CAMBIA: era 1.3rem */
    line-height: 1.5;           /* ← AÑADE: más espaciado */
}


/* =====================================================
   4. LAYOUT - Estructura de página
   ===================================================== */

/* Sticky footer - siempre al final */
.site-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

/* Contenedores generales */
.container,
.content,
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0px;
}

main {
    flex: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    background-color: var(--header-text);
    color: var(--header-bg);
}


/* =====================================================
   5. COMPONENTS - Componentes específicos
   ===================================================== */
.site-title {
    color: var(--header-text);
    text-decoration: none;
    margin: 10px;
    font-size: 1.5rem;
    font-weight: 700;
}
.site-title-home {
    color: var(--header-text);
    text-decoration: none;
    margin: 10px;
    font-size: 4rem;
    font-weight: 700;
}
/* ----- HEADER ----- */
header {
    background-color: var(--header-bg);
    color: var(--header-text);
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

header .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .site-header-home {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1,
header a {
    color: var(--header-text);
    text-decoration: none;
    margin: 0;
}
/*
header h1 {
    font-size: 1.5rem;
    font-weight: 700;
}
*/
header nav {
    display: flex;
    gap: 0.75rem;
}

header nav a {
    font-size: 0.95rem;
    font-weight: 500;
    transition: opacity 0.2s;
}

header nav a:hover {
    opacity: 0.8;
}


/* ----- FOOTER ----- */
footer {
    background-color: var(--header-bg);
    color: var(--header-text);
    border-top: none;
    margin-top: 4rem;
    padding: 2rem 0;
    flex-shrink: 0;
}

footer p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-size: 0.9rem;
}

footer a {
    color: var(--header-text);
    text-decoration: underline;
}

footer a:hover {
    opacity: 0.8;
}


/* ----- HERO ----- */
.hero {
    max-width: 700px;
    margin: 0rem auto 1rem;
    padding: 0 1rem;
}

.hero h1 {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.hero p {
    font-family: var(--font-sans);
    font-weight: 400;
    font-size: 1.4rem;
    font-size: 1.5rem;          /* ← CAMBIA: era 1.4rem */
    color: var(--muted);
    line-height: 1.7;           /* ← AÑADE */
}

.hero-home {
    padding: 6rem 1rem;
    text-align: center;
    font-size: 1.5rem;
}

.hero-home h1 {
    padding: 0rem 1rem;
    text-align: center;
    font-size: 3.5rem;
}
.hero-home h2 {
    padding: 0rem 0.5rem;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.2rem;
    margin-top: 0.2rem;
}

/* ----- POSTS LIST ----- */
.posts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* ----- POST CARD ----- */
.post-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.post-card h2 {
    margin: 0 0 0.25rem;
    font-size: 1.75rem;
}

.post-card p {
    margin: 0;
    color: var(--muted);
}

.post-card-image {
    display: block;
    margin-bottom: 1rem;
    flex-shrink: 0;
    width: 300px;
}

.post-card-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0px;
}

.post-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.post-card-content h2 {
    font-family: var(--font-sans);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
    font-size: 1.5rem;
}

.post-card-content h2 a {
    text-decoration: none;
    color: inherit;
}

.post-card-content h2 a:hover {
    color: #ff6b35;
}

.post-card-description {
    margin: 0;
    color: #666;
}

.post-card-date {
    font-size: 0.9rem;
    color: #999;
}


/* ----- POST INDIVIDUAL ----- */
.post {
    width: 100%;
}

.post-header {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
    color: inherit;
    padding: 0;
    margin-bottom: 2rem;
}

.post-hero {
    margin: 0 0 2rem 0;
}

.post-hero img {
    width: 100%;
    height: auto;
    margin: 2rem 0;
}

.post-hero-th img {
    margin: 0 0 0 0rem;
    height: auto;
    width: 100%;
    display: block;
}

.post-title {
    max-width: 700px;
    margin: 3rem auto 1.5rem;
    padding: 0 1rem;
    /* font-size: 3.2rem; */
    font-size: 2.4rem;   /* antes 3.2 */
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 700;
    color: var(--header-bg);
}

.post-date {
    display: block;
    max-width: 700px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}
.mini-post-date {
    font-size: 0.9rem;
    color: var(--muted);
}
.post-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 1rem;
    font-family: var(--font-sans);
    /*line-height: 1.7;  */
    line-height: 1.8;   /* ← CAMBIA: era 1.7 */
    font-size: 1.1rem;
    /*font-size: 1.35rem; *//* ← CAMBIA: era 1.15rem (ahora ~24px) */
    color: #222;
    letter-spacing: -0.01em;
    word-spacing: 0.02em;
}

.post-content p {
    font-size: 1.15rem;
    /*font-size: 1.35rem;*/         /* ← CAMBIA: era 1.15rem */
    /*line-height: 1.75;*/
    line-height: 1.8;           /* ← CAMBIA: era 1.75 */
    margin: 1.6rem 0;
}

.post-content h2 {
    /* font-size: 1.3rem;
    margin: 3rem 0 1.2rem; */
    font-weight: 700;
    font-size: 1.6rem;   /* antes 1.3 */
    margin: 3.5rem 0 1.4rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

.post-content h3 {
    /* font-size: 1.6rem; */ 
    font-size: 1.25rem;
    margin: 2.5rem 0 1rem;
    font-weight: 700;
}

.post-content h4 {
    font-size: 1.3rem;
    margin: 2rem 0 0.8rem;
    font-weight: 600;
}

.post-content h5 {
    font-size: 1.1rem;
    margin: 1.8rem 0 0.6rem;
    font-weight: 600;
}

.post-content h6 {
    font-size: 1rem;
    margin: 1.5rem 0 0.5rem;
    font-weight: 600;
    color: #555;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0 1.5rem 1.5rem;
    padding: 0;
}

.post-content li {
    margin: 0.5rem 0;
    line-height: 1.6;
}

.post-content code {
    background: #f5f5f5;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.post-content pre {
    /* background: #003c00; */
    /* color: #ffffff; */
    /* background: #f7dfe9; */
    background: #d5ddf7;
    color: #000000;
    padding: 1.2rem;
    margin: 2rem 0;
    overflow-x: auto;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content blockquote {
    background: #f8f8f8;
    border-left: 4px solid #ff6b35;
    font-size: 1.15rem;
    /*padding: 1rem 1.2rem;*/
    padding: 0.1rem 0.7rem;
    margin: 1rem 0;
    border-radius: 4px;
    color: #555;
    font-style: italic;

}

.post-content hr {
    border-top: 1px solid #ffffff;
    margin: 3rem 0;
    color: #c4c9eb;
}

/* Metadatos del post */
.post > p {
    max-width: 700px;
    margin: 0 auto 0.75rem;
    padding: 0 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.post > p:first-of-type a {
    margin-right: 0.5rem;
}

.post > p:nth-of-type(2) {
    font-weight: 600;
    color: #333;
}


/* ----- POST NAVIGATION ----- */
.post-navigation {
    max-width: 700px;
    margin: 4rem auto 0;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.95rem;
}

.post-navigation a {
    color: #444;
    text-decoration: none;
}

.post-navigation a:hover {
    color: #ff6b35;
}


/* ----- RELATED POSTS ----- */
.related-posts {
    max-width: 1200px;
    margin: 5rem auto 0;
    padding: 0 1rem;
}

.related-posts h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

.post-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.related-posts .post-card {
    display: block;
    margin: 0;
}

.related-posts .post-card-image {
    width: 100%;
    display: block;
    margin-bottom: 1rem;
}

.related-posts .post-card-image img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.related-posts .post-card-content {
    display: block;
}

.related-posts .post-card-content h2 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.related-posts .post-card-content h2 a {
    text-decoration: none;
    color: inherit;
}

.related-posts .post-card-content p {
    font-size: 0.95rem;
    color: #666;
    margin: 0 0 0.75rem;
}

.related-posts time {
    font-size: 0.8rem;
    color: #999;
}


/* ----- FORMS ----- */
form input[type="search"] {
    border: 1px solid #ddd;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
}

.taxonomy-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 1.5rem 0;
}

.taxonomy-item {
    padding: 0.4rem 0.6rem;
    display: inline-block;
}

.taxonomy-item h4 {
    margin: 0;
    display: inline;
}

.taxonomy-item a {
    text-decoration: none;
}


/* Para páginas de archivo (1 columna) */
.archive {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.archive-item {
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}
/* Archivo minimalista */
.archive-minimal {
    max-width: 780px;
    margin: 0 auto;
    padding: 0.2rem 0.1rem;
}
.archive-minimal h2 {
    margin: 0.2rem 0 0.5rem;
    font-size: 1.5rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.archive-minimal ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    border-bottom: 1px solid #eee;
    padding: 1rem 0;
}

.archive-minimal li {
    padding: 0.5rem 0;
}

.archive-minimal a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s;
}

.archive-minimal a:hover {
    color: #0052a3;
    text-decoration: underline;
}
/* Tamaños de fuente dinámicos basados en cantidad de artículos */
/*
.taxonomy-item[data-count="1"] { font-size: 0.9rem; }
.taxonomy-item[data-count="2"] { font-size: 1rem; }
.taxonomy-item[data-count="3"] { font-size: 1.1rem; }
.taxonomy-item[data-count="4"] { font-size: 1.2rem; }
.taxonomy-item[data-count="5"] { font-size: 1.3rem; }
.taxonomy-item[data-count="6-9"] { font-size: 1.4rem; }
.taxonomy-item[data-count="10+"] { font-size: 1.6rem; }
*/
.taxonomy-item[data-count="1"] { font-size: 1.4rem; }
.taxonomy-item[data-count="2"] { font-size: 1.5rem; }
.taxonomy-item[data-count="3"] { font-size: 1.6rem; }
.taxonomy-item[data-count="4"] { font-size: 1.7rem; }
.taxonomy-item[data-count="5"] { font-size: 1.8rem; }
.taxonomy-item[data-count="6-9"] { font-size: 2.0rem; }
.taxonomy-item[data-count="10+"] { font-size: 2.3rem; }
.taxonomy-item .count {
    font-size: 0.85em;
    opacity: 0.7;
    margin-left: 0.3rem;
}
/* =====================================================
   6. RESPONSIVE - Media queries
   ===================================================== */

/* Móviles pequeños */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.2rem;
    }
}

/* Tablets y móviles */
@media (max-width: 768px) {
    .post-card {
        flex-direction: column;
    }
    
    .post-card-image {
        width: 100%;
    }
    
    .post-title {
        font-size: 2.4rem;
    }

    .post-content {
        font-size: 1.05rem;
    }
}

/* =================================================== */
/* =================================================== */
/* =================================================== */
/* ===== Columnas responsivas SOLO para la home ===== */
/* ===== Columnas responsivas SOLO para la home ===== */
/* ===== Columnas responsivas SOLO para la home ===== */
/* ===== Columnas responsivas SOLO para la home ===== */
/* =================================================== */
/* =================================================== */
/* =================================================== */

.home-columns {
    /*max-width: 1200px;*/
    margin: 3rem auto;
    padding: 0 2rem;
    /*width: 700px;*/
    max-width: 700px;
    width: 100%;
}

/* 3 columnas en pantallas grandes */
@media (min-width: 1024px) {
    .home-columns article {
        column-count: 3;
        column-gap: 3rem;
        column-rule: 1px solid #ddd;
        text-align: justify;
    }
}

/* 2 columnas en tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .home-columns article {
        column-count: 2;
        column-gap: 2.5rem;
        column-rule: 1px solid #ddd;
        text-align: justify;
    }
}

/* 1 columna en móviles */
@media (max-width: 767px) {
    .home-columns article {
        column-count: 1;
    }
}
@media (max-width: 767px) {

    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header nav {
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

    header .site-header-home {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header .site-header-home nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
    }

}
/* Evitar que títulos se partan entre columnas */
.home-columns h1,
.home-columns h2,
.home-columns h3 {
    break-after: avoid;
    column-span: all;
   /* text-align: center;*/
    margin-bottom: 2rem;
}

/* Ajustar párrafos */
.home-columns p {
    margin: 0rem 0;
    line-height: 1.65;
}

@keyframes blink {
    50% { opacity: 0; }
  }
  
  .parpadeo {
    background: rgb(167, 0, 0);
    color:  rgb(255, 255, 254);
    animation: blink 0.75s step-start infinite;
  }


/* DEBUG LAYOUT 
main { outline: 2px solid red; }
.container { outline: 2px solid blue; }
.post { outline: 2px solid green; }
.home-columns { outline: 2px solid purple; }
.post-hero-th { outline: 2px solid orange; } /*