/*
Theme Name: OPAP Blog
Theme URI: https://orlandopasoapaso.com/blog
Author: Orlando Paso a Paso
Description: Tema a medida del blog de Orlando Paso a Paso, alineado visualmente al sitio principal (orlandopasoapaso.com).
Version: 1.0
Text Domain: opap-blog
*/

:root {
    --bg-dark-1: #292929;
    --bg-dark-2: #3b3b3b;
    --bg-dark-grey: #404040;
    --bg-footer: #222222;
    --primary-purple: #6632e7;
    --primary-purple-hover: #711ff0;
    --light-purple: #977cff;
    --light-purple-bg: #f4f1ff;
    --blue-accent: #0986c0;
    --cyan-accent: #00d2ff;
    --text-light: #ffffff;
    --text-muted: #c4c4c4;
    --text-dark: #3b3b3b;
    --whatsapp-green: #25D366;
    --font-body: 'Sora', sans-serif;
    --font-display: 'Nothing You Could Do', cursive;
}

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

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #ffffff;
    line-height: 1.65;
    overflow-x: hidden;
    font-size: 15px;
    padding-top: 74px; /* espacio para nav fija */
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ===================== NAV ===================== */
.opap-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 74px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    z-index: 1000;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
}

.opap-nav-inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

/* Logo centrado, mas grande, "sobresaliendo" por delante del nav hacia el contenido */
.opap-nav-logo-center {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: block;
}

.opap-nav-logo-center img {
    height: 108px;
    width: auto;
    max-width: none;
    display: block;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.opap-nav-home-link {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.opap-nav-home-link:hover {
    color: var(--primary-purple);
}

.opap-nav-home-link svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}

.btn-whatsapp {
    background-color: var(--whatsapp-green);
    color: #fff;
    padding: 9px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: none;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(37, 211, 102, 0.35);
}

.btn-whatsapp.btn-whatsapp-large {
    padding: 13px 26px;
    font-size: 1.05rem;
    gap: 8px;
}

.wa-icon {
    width: 17px;
    height: 17px;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.btn-whatsapp-large .wa-icon {
    width: 21px;
    height: 21px;
}

@media (max-width: 600px) {
    .opap-nav-home-link span { display: none; }
    .opap-nav-logo-center { top: 6px; }
    .opap-nav-logo-center img { height: 72px; }
}

/* ===================== BLOG HERO (archive) ===================== */
.blog-hero {
    padding: 3.2rem 0 2.4rem;
    text-align: center;
    background: linear-gradient(180deg, var(--light-purple-bg) 0%, #ffffff 100%);
}

.blog-hero-header {
    position: relative;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-hero-ghost {
    font-family: var(--font-display);
    font-size: 5.5rem;
    color: rgba(102, 50, 231, 0.08);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    letter-spacing: 0.4rem;
    pointer-events: none;
}

.blog-hero-title {
    position: relative;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #000;
}

.blog-hero-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--primary-purple);
    margin: 12px auto 0;
}

.blog-hero-sub {
    max-width: 620px;
    margin: 1rem auto 0;
    font-size: 1rem;
    color: #555;
}

.blog-hero-sub strong { color: var(--primary-purple); }

/* Category archive title variant */
.blog-hero.is-category .blog-hero-title { text-transform: uppercase; }

/* ===================== POST GRID ===================== */
.post-grid-section {
    padding: 2.5rem 0 4rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
}

@media (max-width: 900px) {
    .post-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
    .post-grid { grid-template-columns: 1fr; }
}

.post-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.1);
}

.post-card-img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
    background-color: var(--light-purple-bg);
}

.post-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--primary-purple);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
}

.post-card-body {
    padding: 1.2rem 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-date {
    font-size: 0.72rem;
    color: #999;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.6rem;
    color: var(--text-dark);
}

.post-card:hover .post-card-title {
    color: var(--primary-purple);
}

.post-card-excerpt {
    font-size: 0.83rem;
    color: #666;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.post-card-more {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--primary-purple);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-card-more svg {
    width: 13px;
    height: 13px;
    transition: transform 0.2s ease;
}

.post-card:hover .post-card-more svg {
    transform: translateX(3px);
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: #777;
}

/* Pagination */
.opap-pagination {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.opap-pagination a,
.opap-pagination span {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f2f2f2;
    color: var(--text-dark);
}

.opap-pagination .current {
    background: var(--primary-purple);
    color: #fff;
}

.opap-pagination a:hover {
    background: var(--light-purple-bg);
    color: var(--primary-purple);
}

/* ===================== SINGLE POST ===================== */
.single-post-header {
    padding: 4rem 0 0;
}

.single-post-cat {
    display: inline-block;
    background: var(--light-purple-bg);
    color: var(--primary-purple);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 1rem;
}

.single-post-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #000;
    max-width: 800px;
    margin: 0 auto 0.9rem;
}

.single-post-meta {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 2rem;
}

.single-post-hero-img {
    max-width: 1000px;
    margin: 0 auto 0.6rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.12);
}

.single-post-hero-img img {
    width: 100%;
    height: auto;
}

.img-source-credit {
    text-align: center;
    font-size: 0.72rem;
    color: #999;
    font-style: italic;
    margin: 0 auto 2.5rem;
}

.single-post-body {
    max-width: 720px;
    margin: 0 auto;
    padding: 0.5rem 20px 3rem;
    font-size: 1.02rem;
    color: #333;
}

.single-post-body p {
    margin-bottom: 1.3rem;
}

.single-post-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.2rem 0 1rem;
}

.single-post-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 1.8rem 0 0.8rem;
}

.single-post-body a {
    color: var(--primary-purple);
    text-decoration: underline;
    text-decoration-color: rgba(102, 50, 231, 0.3);
}

.single-post-body blockquote {
    border-left: 4px solid var(--primary-purple);
    padding: 0.3rem 0 0.3rem 1.3rem;
    margin: 1.8rem 0;
    font-style: italic;
    color: var(--primary-purple);
    font-size: 1.05rem;
}

.single-post-body figure {
    margin: 2rem 0;
}

.single-post-body figure img {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.single-post-body figcaption,
.single-post-body .wp-caption-text {
    font-size: 0.72rem;
    color: #999;
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

.single-post-body ul,
.single-post-body ol {
    margin: 0 0 1.3rem 1.3rem;
}

.single-post-body li {
    margin-bottom: 0.4rem;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #777;
    margin-bottom: 1.5rem;
}

.back-to-blog:hover { color: var(--primary-purple); }
.back-to-blog svg { width: 13px; height: 13px; }

/* End of post CTA */
.post-cta {
    text-align: center;
    padding: 3rem 1.5rem;
    margin: 1rem auto 4rem;
    max-width: 900px;
    background: var(--light-purple-bg);
    border-radius: 24px;
}

.post-cta-heading {
    font-family: var(--font-display);
    font-size: 2.4rem;
    color: var(--primary-purple);
    line-height: 1.25;
    margin-bottom: 0.6rem;
}

.post-cta-text {
    font-size: 1rem;
    font-weight: 500;
    font-style: italic;
    color: var(--primary-purple);
    max-width: 560px;
    margin: 0 auto 1.4rem;
}

/* ===================== FOOTER ===================== */
.opap-footer {
    background-color: var(--bg-footer);
    color: #999;
    padding: 2.5rem 0 1.5rem;
    text-align: center;
    line-height: 1.5;
}

.opap-footer-logo {
    max-width: 130px;
    margin: 0 auto 1.2rem;
    opacity: 0.9;
}

.opap-footer-text {
    font-size: 0.65rem;
    color: #999;
    margin-bottom: 0.25rem;
    word-wrap: break-word;
}

.opap-footer-text a {
    color: #bbb;
}

.opap-footer-text a:hover { color: #fff; }

/* ===================== FLOATING WHATSAPP ===================== */
.floating-whatsapp-container {
    position: fixed;
    bottom: 26px;
    right: 26px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wa-tooltip {
    background: #fff;
    color: #333;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.floating-whatsapp {
    width: 55px;
    height: 55px;
    background-color: var(--whatsapp-green);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0); }
}

.floating-whatsapp:hover { transform: scale(1.1); }

.whatsapp-ico {
    width: 30px;
    height: 30px;
    fill: #ffffff;
}

@media (max-width: 767px) {
    .wa-tooltip { display: none; }
    .single-post-title { font-size: 1.5rem; }
    .blog-hero-ghost { font-size: 3.5rem; }
    .blog-hero-title { font-size: 1.4rem; }
    .post-cta-heading { font-size: 1.8rem; }
    body { padding-top: 64px; }
    .opap-nav { height: 64px; }
}
