/*
Theme Name: Innova Ambipetrol
Theme URI: https://iambipetrol.com
Author: Innova Ambipetrol
Author URI: https://iambipetrol.com
Description: Tema profesional para Innova Ambipetrol - Gestión Ambiental. 100% dinámico y editable desde el panel de WordPress.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: iambipetrol
Tags: environmental, green, business, responsive
*/

/* =============================================
   IAMBIPETROL THEME - BASE STYLES
   ============================================= */

:root {
    --color-primary:    #86AE31;
    --color-primary-dark: #326E4E;
    --color-primary-light: #9BD4B6;
    --color-accent:     #BCE27F;
    --color-dark:       #1A1A1A;
    --color-gray:       #333333;
    --color-light-bg:   #D5E0D1;
    --color-white:      #ffffff;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    font-family: var(--font-main);
    box-sizing: border-box;
}

body {
    background-color: var(--color-dark);
    margin: 0;
    padding: 0;
}

/* ----- Navigation ----- */
#site-header {
    position: relative;
    z-index: 100;
}

.iambi-nav {
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 50;
    transition: all 0.3s ease;
}

.iambi-nav .nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.75rem 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

.iambi-nav .nav-logo img {
    max-width: 13rem;
    width: 100%;
}

.iambi-nav .nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-right: 2rem;
}

.iambi-nav .nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    transition: text-decoration 0.2s;
}

.iambi-nav .nav-links a:hover,
.iambi-nav .nav-links a.current-menu-item {
    text-decoration: underline;
}

.iambi-nav .nav-cta a {
    background: #fff;
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.iambi-nav .nav-cta a:hover {
    background: var(--color-primary-light);
    color: #fff;
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-links-wrapper {
    display: flex;
}

@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links-wrapper { display: none; }
    .nav-links-wrapper.open {
        display: flex;
        position: fixed;
        inset: 0;
        background: rgba(17,24,39,0.97);
        z-index: 40;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.5rem;
    }
    .nav-links-wrapper.open .nav-links { flex-direction: column; }
    .nav-links-wrapper.open .nav-links a { font-size: 1.875rem; }
}

/* ----- Hero Types ----- */
.iambi-hero {
    min-height: 100svh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.iambi-hero-v {
    min-height: 100svh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    position: relative;
}

.iambi-hero-v .hero-subtitle {
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.iambi-hero-v .hero-title {
    color: var(--color-primary-light);
    font-weight: 600;
    font-size: clamp(1.5rem, 4vw, 3rem);
    max-width: 56rem;
    padding: 0 1rem;
}

.iambi-hero-h {
    min-height: 100svh;
    background-size: cover;
    background-position: center;
    position: relative;
}

/* ----- Page header strip (no hero) ----- */
.iambi-header-strip {
    height: 9rem;
    background-size: cover;
    background-position: center;
}

/* ----- Feature Post Section ----- */
.iambi-feature-post {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 5rem 2.5rem;
}

.iambi-feature-post .fp-text { flex: 1 1 45%; }
.iambi-feature-post .fp-image { flex: 1 1 45%; }

.iambi-feature-post h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 1rem;
}

.iambi-feature-post.theme-dark h2 { color: var(--color-primary); }
.iambi-feature-post.theme-light h2 { color: #fff; }
.iambi-feature-post.theme-dark .fp-content { color: #333; }
.iambi-feature-post.theme-light .fp-content { color: #fff; }

.iambi-feature-post img {
    width: 100%;
    border-radius: 1rem;
    object-fit: cover;
}

/* ----- Tabs Section ----- */
.iambi-tabs {
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .iambi-tabs { flex-direction: row; }
}

.iambi-tab-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    color: #fff;
    font-size: 2.25rem;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    transition: flex 0.5s ease, min-height 0.5s ease;
    border: none;
}

.iambi-tab-item:hover { flex: 1.5; }

/* ----- Brand / Clients Slider ----- */
.iambi-brand-list {
    overflow: hidden;
    padding: 2rem 0;
}

.iambi-brand-track {
    display: flex;
    gap: 3rem;
    animation: slide-brands 30s linear infinite;
    width: max-content;
}

.iambi-brand-track img {
    height: 3rem;
    object-fit: contain;
    filter: grayscale(30%);
    transition: filter 0.3s;
}

.iambi-brand-track img:hover { filter: grayscale(0); }

@keyframes slide-brands {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ----- Gallery Progressive ----- */
.iambi-gallery-grid {
    columns: 1;
    column-gap: 1rem;
    padding: 1rem;
}

@media (min-width: 640px)  { .iambi-gallery-grid { columns: 2; } }
@media (min-width: 1024px) { .iambi-gallery-grid { columns: 3; } }

.iambi-gallery-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.5rem;
    cursor: pointer;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.iambi-gallery-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.iambi-gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.iambi-gallery-item:hover img { transform: scale(1.04); }

/* Gallery Lightbox */
.iambi-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.iambi-lightbox.active { display: flex; }

.iambi-lightbox img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.iambi-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    font-size: 1.5rem;
    transition: background 0.2s;
}

.iambi-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.iambi-lightbox-prev { left: 1rem; }
.iambi-lightbox-next { right: 1rem; }

.iambi-lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

/* ----- Product Cards ----- */
.iambi-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.iambi-product-card {
    background: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s, transform 0.3s;
    display: flex;
    flex-direction: column;
}

.iambi-product-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.iambi-product-card .card-img {
    height: 16rem;
    overflow: hidden;
}

.iambi-product-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.iambi-product-card:hover .card-img img { transform: scale(1.05); }

.iambi-product-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.iambi-product-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.iambi-product-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.iambi-product-card .btn-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--color-primary-dark);
    color: #fff;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.iambi-product-card .btn-details:hover { background: var(--color-primary); }

/* ----- Contact Form ----- */
.iambi-contact-form input,
.iambi-contact-form textarea,
.iambi-contact-form select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    background: #fff;
    margin-bottom: 1rem;
    transition: border-color 0.2s;
}

.iambi-contact-form input:focus,
.iambi-contact-form textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.iambi-contact-form .btn-submit {
    background: var(--color-primary-dark);
    color: #fff;
    border: none;
    padding: 0.85rem 2rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s;
    width: 100%;
}

.iambi-contact-form .btn-submit:hover { background: var(--color-primary); }

/* ----- Footer ----- */
#site-footer {
    background: #111;
    color: #ccc;
    padding: 3rem 2rem 1.5rem;
}

#site-footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 80rem;
    margin: 0 auto;
}

#site-footer .footer-logo img { max-width: 10rem; margin-bottom: 1rem; }
#site-footer h4 { color: #fff; margin: 0 0 1rem; font-size: 1rem; }
#site-footer a { color: #ccc; text-decoration: none; display: block; margin-bottom: 0.5rem; }
#site-footer a:hover { color: var(--color-primary); }

#site-footer .footer-bottom {
    /* border-top: 1px solid #333; */
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #888;
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

/* ----- Utilities ----- */
.iambi-btn-primary {
    display: inline-block;
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 2.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.iambi-btn-primary:hover { background: #7cb342; color: #fff; }

.iambi-section { padding: 5rem 2.5rem; }
.iambi-container { max-width: 80rem; margin: 0 auto; }

/* Estilo base (Mobile: tw-px-2) */
.iambi-container {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Tablet y superiores (md: tw-px-10 -> 768px) */
  @media (min-width: 768px) {
    .iambi-container {
      padding-left: 2.5rem;
      padding-right: 2.5rem;
    }
  }

.bg-dark-body { background-color: var(--color-dark); }
.bg-white      { background-color: #fff; }
.bg-light-green{ background-color: var(--color-light-bg); }

/* Animate on scroll utility */
.aos-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.aos-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Footer ----- */
/* ── FOOTER ── */
#site-footer {
    background: #111;
    color: #ccc;
    padding: 0 0 0;
    font-size: 0.9rem;
}

/* Divisor superior — igual al inferior */
.footer-divider-top,
.footer-divider-bottom {
    height: 1px;
    background: #2a2a2a;
    margin: 0;
}
.footer-divider-top-c  { 
    max-width: 80rem;
    height: 2rem;
    background: #111; 
    margin: 0 auto;
}

.footer-divider-top-c {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* Tablet y superiores (md: tw-px-10 -> 768px) */
  @media (min-width: 768px) {
    .footer-divider-top-c {
      padding-left: 2.5rem;
      padding-right: 2.5rem;
    }
  }

.footer-divider-bottom { margin-bottom: 1rem; }

/* Grilla de columnas */
/* Estilo base (Mobile) */
.footer-menu-grid {
    display: grid;
    gap: 1rem; /* tw-gap-4 (4 * 0.25rem) */
  }
  
  /* Tablet y superiores (md: 768px) */
  @media (min-width: 768px) {
    .footer-menu-grid {
      grid-auto-columns: max-content; /* md:tw-auto-cols-max */
      grid-auto-flow: column;         /* md:tw-grid-flow-col */
      gap: 1.75rem;                  /* md:tw-gap-7 */
      padding-top: 5rem;             /* md:tw-py-20 */
      padding-bottom: 5rem;
    }
  }
  
  /* Desktop (lg: 1024px) */
  @media (min-width: 1024px) {
    .footer-menu-grid {
      gap: 4rem;                     /* lg:tw-gap-16 */
    }
  }

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr repeat(auto-fill, minmax(170px, 1fr));
    gap: 2rem 2.5rem;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
    align-items: start;
}

/* Columna brand */
.footer-col--brand .footer-brand-logo-link { display: inline-block; margin-bottom: 1rem; }
.footer-col--brand .footer-brand-logo      { max-width: 9rem; display: block; }
.footer-col--brand .footer-brand-desc      { font-size: 0.82rem; line-height: 1.65; color: #999; margin: 0; }

/* Columna imagen */
.footer-col--image .footer-col-img-wrap { margin-bottom: 1rem; }
.footer-col--image .footer-col-img      { 
    margin-bottom: .75rem; 
    object-fit: contain; 
    display: block; 
    width: min-content;
}

.footer-col--image {
    max-width: min-content;
}

/* Columna título */
.footer-col--title .footer-col-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.9rem;
}

/* Lista de links de cualquier columna */
#site-footer .footer-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: fit-content;
    white-space: nowrap;
}
#site-footer .footer-nav-list li { margin-bottom: 0.45rem; }
#site-footer .footer-nav-list a {
    color: #aaa;
    text-decoration: none;
    font-size: 1rem;
    line-height: 1.5rem;
    transition: color 0.2s;
}
#site-footer .footer-nav-list a:hover { color: var(--color-primary); }

/* Copyright bar */
.footer-bottom {
    padding-bottom: 1.25rem;
    text-align: center;
}
.footer-copy {
    font-size: 0.78rem;
    color: #666;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .footer-inner {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col--brand {
        grid-column: 1 / -1;
    }
}
@media (max-width: 480px) {
    .footer-inner {
        grid-template-columns: 1fr;
    }
}

.container-animation {
    position: absolute;
    width: 100%;
    height: 100%; /* Ajusta según el padre */
}

.anim-left {
    display: none; /* tw-hidden */
    position: absolute;
    left: 0;
    bottom: 0;
    height: 80%;
    width: 80vh;
}

.anim-right {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 80%;
    width: 80vh;
}

/* Media query para md:tw-block (768px suele ser el estándar de Tailwind) */
@media (min-width: 768px) {
    .anim-left {
        display: block;
    }
}

/* ── Content Flow Section ── */
.framed-section-wrapper {
    border-radius: 20px;
    border: 2px solid #f4f9e6;
    padding: 60px 16px;
}
@media (min-width: 768px) {
    .framed-section-wrapper { padding: 80px 44px; }
}
.flow-header {
    display: flex;
    justify-content: center;
    padding-bottom: 60px;
}
.flow-main-title {
    margin: 0;
    text-align: center;
    font-size: clamp(1.875rem, 4vw, 3.75rem);
    line-height: 1.1;
    color: #353535;
}
.flow-focus-text { color: rgb(134,174,49); }
.block-content-flow { width: 100%; }
.flow-block:last-child { margin-bottom: 0 !important; }

/* ============================================================
   BLOG — home.php, archive.php, single.php, 404.php
   ============================================================ */

/* ── Variables reutilizadas ── */
:root {
    --blog-radius:  6px;
    --blog-gap:     2.5rem;
    --blog-max:     80rem;
    --blog-font:    var(--font-main, 'Inter', system-ui, sans-serif);
}

/* ── Hero principal del blog ── */
.blog-hero {
    padding: 3rem 2rem 2rem;
    text-align: center;
    background: #fff;
}
.blog-hero-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    font-style: italic;
    line-height: 1;
    color: #111;
    margin: 0;
}
.blog-hero-title a {
    transition: color 0.3s ease;
}
.blog-hero-divider {
    width: 6rem;
    height: 4px;
    background-color: #111;
    margin: 1rem auto 0;
    transition: background-color 0.3s ease;
}
.blog-hero-sub {
    margin-top: 1rem;
    color: #666;
    font-size: 1.05rem;
}

/* ── Contenedor interior del blog ── */
.blog-home-inner {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* ── Sección por categoría ── */
.blog-cat-section {
    margin-bottom: 4.5rem;
}
.blog-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: .5rem;
    margin-bottom: .5rem;
}
.blog-cat-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -.03em;
    margin: 0;
}
.blog-cat-link {
    font-size: .75rem;
    font-weight: 900;
    color: #111;
    text-decoration: none;
    letter-spacing: .05em;
    white-space: nowrap;
}
.blog-cat-link:hover { text-decoration: underline; }
.blog-cat-underline {
    height: 3px;
    border-radius: 2px;
    margin-bottom: 2rem;
    width: 5rem;
}

/* ── Grid de tarjetas ── */
.blog-grid {
    display: grid;
    gap: var(--blog-gap);
}
.blog-grid--3 {
    grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}
@media (min-width: 768px) {
    .blog-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

/* ── Post Card ── */
.post-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    transition: transform .25s ease;
}
.post-card:hover { transform: translateY(-4px); }

.post-card-img-wrap {
    display: block;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f3f4f6;
}
.post-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
    display: block;
}
.post-card:hover .post-card-img-wrap img { transform: scale(1.06); }

.post-card-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .75rem 0 .4rem;
    flex-wrap: wrap;
}
.post-card-cat {
    font-size: .65rem;
    font-weight: 900;
    padding: .2rem .6rem;
    border-radius: 5px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.post-card-byline,
.post-card-date {
    font-size: .68rem;
    color: #9ca3af;
    font-weight: 500;
    font-style: italic;
    margin-left: auto;
}
.post-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;
    margin: 0 0 .5rem;
    color: #111;
    flex: 1;
}
.post-card-title a {
    color: inherit;
    text-decoration: none;
}
.post-card-title a:hover { color: #4f46e5; }
.post-card-excerpt {
    font-size: .85rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* ── Página de archivo (archive.php) ── */
.blog-archive {
    background: #f9fafb;
    min-height: 80vh;
    padding-bottom: 5rem;
}
.blog-archive-header {
    padding: 4rem 2rem 2rem;
}
.blog-archive-label {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #9ca3af;
    margin: 0 0 .4rem;
}
.blog-archive-title {
    font-size: clamp(2.5rem, 7vw, 5rem);
    font-weight: 900;
    letter-spacing: -.04em;
    color: #111;
    margin: 0;
    line-height: 1;
}
.blog-archive-underline {
    width: 5rem;
    height: .5rem;
    border-radius: 3px;
    margin-top: 1rem;
}
.blog-archive-desc {
    margin-top: 1rem;
    color: #6b7280;
    max-width: 40rem;
}
.blog-archive-body {
    padding-top: 2.5rem;
}

/* ── Perfil autor en archivo ── */
.blog-author-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #fff;
    border-radius: 10px;
    max-width: 36rem;
}
.blog-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.blog-author-name {
    font-size: 1.1rem;
    font-weight: 800;
    color: #111;
    display: block;
}
.blog-author-bio {
    font-size: .85rem;
    color: #6b7280;
    margin: .25rem 0 0;
}

/* ── Botón "Cargar más" ── */
.blog-loadmore-wrap {
    text-align: center;
    margin-top: 3.5rem;
}
.blog-btn-loadmore {
    background: #111;
    color: #fff;
    border: none;
    padding: 1rem 3rem;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s ease;
    text-decoration: none;
    display: inline-block;
}
.blog-btn-loadmore:hover { background: #333; }
.blog-btn-loadmore:disabled,
.blog-btn--exhausted {
    background: #d1d5db;
    color: #9ca3af;
    cursor: default;
}
.blog-loadmore-status {
    display: block;
    margin-top: .75rem;
    font-size: .8rem;
    color: #9ca3af;
}

/* ── Estado vacío ── */
.blog-empty {
    text-align: center;
    padding: 5rem 2rem;
    color: #6b7280;
}
.blog-btn-back {
    display: inline-block;
    margin-top: 1rem;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 700;
}
.blog-btn-back:hover { text-decoration: underline; }

/* ── Single post ── */
.single-post {}

/* Hero del artículo */
.single-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #1a1a1a center/cover no-repeat;
    overflow: hidden;
}
.single-hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}
.single-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 6rem 2rem 4rem;
    max-width: 60rem;
    margin: 0 auto;
}
.single-cat-badge {
    display: inline-block;
    background: rgba(167,139,250,.25);
    color: #e9d5ff;
    font-size: .7rem;
    font-weight: 900;
    padding: .35rem 1rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: .06em;
    text-decoration: none;
    margin-bottom: 1.5rem;
}
.single-title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin: 0 0 1.25rem;
    text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.single-subtitle {
    color: #e5e7eb;
    font-size: 1.2rem;
    font-style: italic;
    font-weight: 300;
    margin: 0 0 1.5rem;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}
.single-byline {
    color: #d1d5db;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.single-byline a { color: inherit; text-decoration: none; }
.single-byline a:hover { color: #86AE31; }

/* Cuerpo del artículo */
.single-body {
    padding: 5rem 2rem;
    max-width: 52rem;
}
.single-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #374151;
}
.single-content p  { margin-bottom: 1.5rem; }
.single-content h2 { font-size: 1.6rem; font-weight: 800; color: #111; margin: 2.5rem 0 1rem; }
.single-content h3 { font-size: 1.3rem; font-weight: 700; color: #111; margin: 2rem 0 .75rem; }
.single-content a  { color: #4f46e5; }
.single-content img { max-width: 100%; border-radius: 8px; margin: 1.5rem 0; }
.single-content blockquote {
    border-left: 4px solid #86AE31;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    font-style: italic;
    color: #4b5563;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

/* Tags */
.single-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 2.5rem;
}
.single-tag-pill {
    background: #f3f4f6;
    color: #374151;
    padding: .3rem .75rem;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s;
}
.single-tag-pill:hover { background: #e9d5ff; color: #7c3aed; }

/* Bloque compartir */
.single-share {
    background: #e1f5e6;
    margin-top: 4rem;
    padding: 2.5rem 3rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}
/* border-radius: superior-izq | superior-der | inferior-der | inferior-izq */
.custom-rect { border-radius: 0 0 40px 40px; }

.single-share-p1 {
    font-size: 1.3rem;
    color: #1a4532;
    font-weight: 400;
    margin: 0;
    line-height: 1.3;
}
.single-share-p2 {
    font-size: 1.3rem;
    color: #1a4532;
    font-weight: 900;
    text-transform: lowercase;
    margin: .25rem 0 0;
}
.single-share-icons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
.share-icon {
    color: #1a4532;
    text-decoration: none;
    transition: transform .2s, opacity .2s;
    display: flex;
}
.share-icon:hover { transform: scale(1.15); opacity: .75; }

/* Caja de autor */
.single-author-box {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: #f9fafb;
    border-radius: 10px;
    padding: 1.5rem;
    margin-top: 3rem;
}
.single-author-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.single-author-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9ca3af;
    display: block;
}
.single-author-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #111;
    text-decoration: none;
    display: block;
    margin-top: .2rem;
}
.single-author-name:hover { color: #4f46e5; }
.single-author-bio {
    font-size: .875rem;
    color: #6b7280;
    margin: .5rem 0 0;
    line-height: 1.6;
}

/* Artículos relacionados */
.single-related { margin-top: 4rem; }
.single-related-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 1.5rem;
    letter-spacing: -.01em;
}

/* ── 404 ── */
.error-404 {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 5rem 2rem;
}
.error-404-inner { text-align: center; }
.error-404-code {
    font-size: clamp(6rem, 20vw, 14rem);
    font-weight: 900;
    letter-spacing: -.05em;
    color: #f3f4f6;
    line-height: 1;
    margin-bottom: -1rem;
}
.error-404-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #111;
    margin: 0 0 1rem;
}
.error-404-desc {
    color: #6b7280;
    font-size: 1.05rem;
    max-width: 32rem;
    margin: 0 auto 2rem;
    line-height: 1.7;
}
.error-404-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}
.error-404-blog-link {
    display: inline-block;
    padding: 1rem 3rem;
    border: 2px solid #111;
    color: #111;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.error-404-blog-link:hover { background: #111; color: #fff; }
.error-404-search {
    max-width: 32rem;
    margin: 0 auto 3rem;
}
.error-404-search-label {
    font-size: .85rem;
    color: #9ca3af;
    margin-bottom: .75rem;
}
.error-404-search .search-form {
    display: flex;
    gap: .5rem;
}
.error-404-search .search-field {
    flex: 1;
    padding: .75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    font-size: .9rem;
    outline: none;
}
.error-404-search .search-field:focus { border-color: #86AE31; }
.error-404-search .search-submit {
    background: #111;
    color: #fff;
    border: none;
    padding: .75rem 1.25rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 4px;
}
.error-404-recent-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111;
    margin: 0 0 1.5rem;
}

/* ── Responsive ajustes blog ── */
@media (max-width: 640px) {
    .single-share { flex-direction: column; padding: 1.75rem; }
    .single-author-box { flex-direction: column; }
    .blog-archive-title { font-size: 2.5rem; }
}


/* Generic class to add a zigzag border to the bottom of any element */
.zigzag-bottom {
    position: relative;
    --zigzag-color: white; /* Change this to match your element's background */
  }
  
  .zigzag-bottom::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px; /* Adjust height of the zigzag area */
    height: 10px;
    background-color: var(--zigzag-color);
    z-index: 999;
    
    /* Mask logic for sharp, continuous triangles */
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" preserveAspectRatio="none"><polygon points="0,0 10,20 20,0" fill="black"/></svg>');
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" preserveAspectRatio="none"><polygon points="0,0 10,20 20,0" fill="black"/></svg>');
    
    -webkit-mask-repeat: repeat-x;
    mask-repeat: repeat-x;
    
    /* mask-size: [width of each peak] [height of each peak] */
    -webkit-mask-size: 20px 10px;
    mask-size: 20px 10px;
  }

  .blog-hero-title a {
    text-decoration: none;
    color: inherit;
  }

  .blog-hero-title a:visited {
    color: inherit;
  }

  .blog-hero:has(h1 a:hover) .blog-hero-divider {
    background-color: #86AE31;
  }

  .blog-hero:has(h1 a:hover) .blog-hero-title {
    color: #86AE31;
  }