/* ==========================================================================
   TANK IBÉRICA — REDISEÑO BLOG SINGLE POST
   --------------------------------------------------------------------------
   Destino: wp-content/themes/[child]/assets/css/tank-blog.css
   Se enqueuea automáticamente solo en single posts (ver functions.php).
   ========================================================================== */


/* === VARIABLES === */
:root {
    --tank-bg: #ffffff;
    --tank-bg-soft: #F1EFE8;
    --tank-text: #1a1a1a;
    --tank-text-soft: #5F5E5A;
    --tank-text-mute: #888780;
    --tank-border: rgba(0, 0, 0, 0.1);
    --tank-accent: #BA7517;
    --tank-accent-light: #FAEEDA;
    --tank-accent-dark: #633806;
    --tank-accent-bright: #EF9F27;
    --tank-dark: #2C2C2A;
}


/* ==========================================================================
   WRAPPER GLOBAL
   ========================================================================== */
.tank-single-post {
    background: var(--tank-bg);
}

.tank-post-wrapper {
    max-width: 760px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    font-family: inherit;
    color: var(--tank-text);
}


/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */
.tank-breadcrumbs {
    font-size: 13px;
    color: var(--tank-text-soft);
    margin-bottom: 20px;
}

.tank-breadcrumbs a {
    color: var(--tank-text-soft);
    text-decoration: none;
}

.tank-breadcrumbs a:hover {
    color: var(--tank-accent);
}

.tank-breadcrumbs span {
    color: var(--tank-text-mute);
    margin: 0 6px;
}


/* ==========================================================================
   META ROW
   ========================================================================== */
.tank-post-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 13px;
    color: var(--tank-text-soft);
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tank-post-cat {
    background: var(--tank-accent-light);
    color: var(--tank-accent-dark);
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
}

.tank-post-cat:hover {
    background: var(--tank-accent-bright);
    color: var(--tank-accent-dark);
}

.tank-post-meta .tank-dot {
    color: var(--tank-text-mute);
}


/* ==========================================================================
   TÍTULO H1 + TAGLINE
   ========================================================================== */
.tank-post-h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
    color: var(--tank-text);
}

.tank-post-tagline {
    font-size: 18px;
    color: var(--tank-text-soft);
    line-height: 1.5;
    margin: 0 0 28px;
}

@media (max-width: 600px) {
    .tank-post-h1 {
        font-size: 28px;
    }
    .tank-post-tagline {
        font-size: 16px;
    }
}


/* ==========================================================================
   HERO con overlay
   ========================================================================== */
.tank-post-hero {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 360px;
    margin-bottom: 36px;
    background-size: cover;
    background-position: center;
}

.tank-post-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.2) 60%,
        transparent 100%);
    pointer-events: none;
    z-index: 1;
}

.tank-post-hero-content {
    position: absolute;
    left: 28px;
    right: 28px;
    bottom: 28px;
    z-index: 2;
    color: #ffffff;
}

.tank-post-hero-tag {
    background: var(--tank-accent-bright);
    color: var(--tank-accent-dark);
    padding: 4px 12px;
    font-size: 11px;
    border-radius: 999px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tank-post-hero-title {
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    max-width: 80%;
    line-height: 1.25;
    color: #ffffff;
}

@media (max-width: 600px) {
    .tank-post-hero {
        min-height: 240px;
    }
    .tank-post-hero-content {
        left: 18px;
        right: 18px;
        bottom: 18px;
    }
    .tank-post-hero-title {
        font-size: 20px;
        max-width: 100%;
    }
}


/* ==========================================================================
   CUERPO DEL ARTÍCULO
   ========================================================================== */
.tank-post-content {
    font-size: 17px;
    line-height: 1.75;
    color: var(--tank-text);
}

.tank-post-content p {
    margin: 0 0 1.25em;
}

.tank-post-content a {
    color: var(--tank-accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.tank-post-content a:hover {
    color: var(--tank-accent-dark);
}


/* ==========================================================================
   ENTRADILLA con capitular
   ========================================================================== */
.tank-post-content p.tank-post-lead {
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 32px;
}

.tank-post-content p.tank-post-lead::first-letter {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 68px;
    float: left;
    line-height: 0.9;
    margin: 6px 12px 0 0;
    color: var(--tank-accent);
    font-weight: 600;
}

@media (max-width: 600px) {
    .tank-post-content p.tank-post-lead {
        font-size: 18px;
    }
    .tank-post-content p.tank-post-lead::first-letter {
        font-size: 56px;
    }
}


/* ==========================================================================
   H2 con icono
   ========================================================================== */
.tank-post-content h2.tank-section-h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 40px 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--tank-text);
    line-height: 1.3;
}

.tank-post-content h2.tank-section-h2::before {
    content: "\25A0";
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--tank-accent-light);
    color: var(--tank-accent-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

@media (max-width: 600px) {
    .tank-post-content h2.tank-section-h2 {
        font-size: 20px;
    }
}


/* ==========================================================================
   STATS GRID
   ========================================================================== */
.tank-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 28px 0 36px;
}

.tank-stat {
    background: var(--tank-bg-soft);
    padding: 18px 16px;
    border-radius: 8px;
}

.tank-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.05;
    color: var(--tank-text);
    margin: 0 0 6px;
}

.tank-stat-value--accent {
    color: var(--tank-accent);
}

.tank-stat-label {
    font-size: 13px;
    color: var(--tank-text-soft);
    margin: 0;
    line-height: 1.3;
}

@media (max-width: 600px) {
    .tank-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .tank-stat-value {
        font-size: 24px;
    }
}


/* ==========================================================================
   COMPARATIVA antes/después
   ========================================================================== */
.tank-compare {
    background: var(--tank-bg-soft);
    border-radius: 12px;
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 16px;
    align-items: center;
    margin: 16px 0 36px;
}

.tank-compare-side {
    text-align: center;
}

.tank-compare-num {
    font-size: 44px;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 8px;
}

.tank-compare-num--old {
    color: var(--tank-text-soft);
    text-decoration: line-through;
    text-decoration-thickness: 2px;
}

.tank-compare-num--new {
    color: var(--tank-accent);
}

.tank-compare-label {
    font-size: 13px;
    color: var(--tank-text-soft);
    margin: 0;
}

.tank-compare-arrow {
    font-size: 28px;
    color: var(--tank-text-mute);
    font-weight: 300;
    text-align: center;
}

@media (max-width: 600px) {
    .tank-compare-num {
        font-size: 34px;
    }
}


/* ==========================================================================
   PULL QUOTE
   ========================================================================== */
.tank-pullquote {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    line-height: 1.5;
    border-left: 4px solid var(--tank-accent-bright);
    padding: 8px 0 8px 22px;
    margin: 32px 0;
    font-style: italic;
    color: var(--tank-text);
}

.tank-pullquote p {
    margin: 0;
}

@media (max-width: 600px) {
    .tank-pullquote {
        font-size: 19px;
        padding-left: 18px;
    }
}


/* ==========================================================================
   CTA — bloque oscuro
   ========================================================================== */
.tank-cta {
    background: var(--tank-dark);
    color: #ffffff;
    border-radius: 12px;
    padding: 28px;
    margin: 36px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tank-cta-text {
    flex: 1;
    min-width: 240px;
}

.tank-cta-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 6px;
    color: #ffffff;
}

.tank-cta-sub {
    font-size: 14px;
    color: #B4B2A9;
    margin: 0;
    line-height: 1.5;
}

.tank-cta-btn,
a.tank-cta-btn {
    background: var(--tank-accent-bright);
    color: var(--tank-accent-dark);
    padding: 12px 26px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    border: none;
    transition: transform 0.15s ease, background 0.15s ease;
    white-space: nowrap;
}

.tank-cta-btn:hover {
    transform: translateY(-1px);
    background: var(--tank-accent);
    color: #ffffff;
}


/* ==========================================================================
   RELATED CARDS
   ========================================================================== */
.tank-related-section {
    margin-top: 56px;
    padding-top: 36px;
    border-top: 1px solid var(--tank-border);
}

.tank-related-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tank-text-soft);
    margin: 0 0 18px;
}

.tank-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.tank-related-card {
    background: var(--tank-bg);
    border: 1px solid var(--tank-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.tank-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.tank-related-img {
    height: 150px;
    background: var(--tank-bg-soft);
    position: relative;
    overflow: hidden;
}

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

.tank-related-cat-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--tank-text);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.tank-related-body {
    padding: 14px 16px 18px;
}

.tank-related-meta {
    font-size: 11px;
    color: var(--tank-text-mute);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.tank-related-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--tank-text);
    margin: 0;
}

@media (max-width: 768px) {
    .tank-related-grid {
        grid-template-columns: 1fr;
    }
}


/* Ocultar imagen duplicada (ya aparece en hero) */
.tank-post-content > p:first-child:has(img) {
    display: none !important;
}
.tank-post-content > p.tank-post-lead:has(img) {
    display: none !important;
}


/* Centrar artículo en pantalla */
.tank-main {
    width: 100% !important;
    max-width: 100% !important;
}


/* Ocultar bloque NOTICIAS del footer en single posts */
.single-post .site-footer .elementor-element-ae9ce25,
.blog .site-footer .elementor-element-ae9ce25,
.category .site-footer .elementor-element-ae9ce25 {
    display: none !important;
}


/* Header shrink en scroll (replicar reglas del Customizer) */
.site-header.scrolled {
    padding-top: 2px !important;
    padding-bottom: 2px !important;
    transition: padding 0.3s ease;
}
.site-header.scrolled .inside-header {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}
.site-header.scrolled .site-logo img,
.site-header.scrolled .custom-logo {
    transition: max-height 0.3s ease;
    max-height: 30px !important;
    width: auto !important;
}
.site-header.scrolled .main-navigation .main-nav > ul > li > a {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}


/* Replicar reglas del Customizer para header consistente */
.site-header {
    background: linear-gradient(90deg, rgb(27, 42, 49) 0%, rgb(43, 66, 74) 100%);
    position: sticky !important;
    top: 0;
    z-index: 999;
    transition: 0.3s;
}
.main-navigation .main-nav ul li a {
    line-height: 30px !important;
}
.site-logo img, .custom-logo {
    object-fit: contain !important;
    height: auto !important;
    max-height: 57px !important;
    transition: max-height 0.3s;
}
@media (min-width: 768px) and (max-width: 1024px) {
    .site-logo { max-width: 25%; }
    .inside-header { padding: 10px 5px; }
    .main-navigation .main-nav ul li a { padding-left: 15px; padding-right: 15px; }
}
