/*
Theme Name: AN Blog
Theme URI: https://ancreativa.com/blog
Author: AN Agencia Creativa
Description: Tema del blog de AN Agencia Creativa, alineado con el diseño del sitio principal.
Version: 1.0.0
Text Domain: an-blog
*/

:root {
    --brand: #9064af;
    --mint: #8dc4b7;
    --coral: #ff9d7d;
    --dark: #1a1a1a;
    --light: #f8f8f8;
    --white: #fff;
    --muted: rgba(26, 26, 26, .7);
    --line: rgba(0, 0, 0, .08);
    --font-display: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; line-height: 1.1; margin: 0; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ── Header ── */
.an-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 50;
    background: #fff; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
}
.an-header__inner {
    max-width: 80rem; margin: 0 auto; padding: 0 1.5rem; height: 5rem;
    display: flex; align-items: center; justify-content: space-between;
}
.an-header__logo img { height: 3rem; width: auto; }
.an-nav { display: none; gap: 2rem; align-items: center; }
.an-nav a {
    font-size: .875rem; font-weight: 500; letter-spacing: .025em; text-transform: uppercase;
    color: var(--dark); transition: color .2s; padding-bottom: .25rem; border-bottom: 1px solid transparent;
}
.an-nav a:hover { color: var(--brand); }
.an-nav a.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.an-toggle { background: none; border: 0; font-size: 1.5rem; color: var(--dark); cursor: pointer; }
.an-mobile { display: none; background: #fff; border-top: 1px solid #f3f4f6; box-shadow: 0 10px 15px rgba(0,0,0,.1); }
.an-mobile.is-open { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.5rem; }
.an-mobile a { font-weight: 500; text-transform: uppercase; }
.an-mobile a.is-active { color: var(--brand); }
@media (min-width: 768px) {
    .an-header__inner { padding: 0 2.5rem; }
    .an-nav { display: flex; }
    .an-toggle, .an-mobile { display: none !important; }
}
.an-main { padding-top: 5rem; }

/* ── Shared ── */
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap--narrow { max-width: 46rem; }
@media (min-width: 768px) { .wrap { padding: 0 3rem; } }
.eyebrow { color: var(--mint); text-transform: uppercase; letter-spacing: 3px; font-size: .8rem; font-weight: 600; margin: 0 0 1.25rem; }
.btn-luxury {
    display: inline-block; background: var(--dark); color: #fff; padding: 16px 40px;
    font: 600 .85rem var(--font-body); text-transform: uppercase; letter-spacing: 2px;
    border: 0; cursor: pointer; transition: background .3s, transform .3s;
}
.btn-luxury:hover { background: var(--brand); transform: translateY(-2px); }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.active { opacity: 1; transform: none; }

/* ── Page header ── */
.page-head { padding: 4rem 1.5rem 2.5rem; text-align: center; }
@media (min-width: 768px) { .page-head { padding: 7rem 3rem 2.5rem; } }
.page-head h1 { font-size: clamp(3rem, 8vw, 7rem); line-height: 1.05; margin-bottom: 1.5rem; }
.page-head h1 em { color: var(--brand); }
.page-head p { max-width: 42rem; margin: 0 auto; font-size: 1.1rem; color: var(--muted); }

/* ── Category filter ── */
.cats { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; padding: 1rem 1.5rem 3rem; }
.cats a {
    padding: .55rem 1.25rem; border: 1px solid var(--line); border-radius: 100px;
    font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px;
    transition: all .3s;
}
.cats a:hover { border-color: var(--brand); color: var(--brand); }
.cats a.is-active { background: var(--dark); border-color: var(--dark); color: #fff; }

/* ── Cards ── */
.thumb { position: relative; overflow: hidden; background: var(--light); aspect-ratio: 16/10; display: block; }
.thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.card:hover .thumb img, .featured:hover .thumb img { transform: scale(1.05); }
.thumb--ph {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--coral));
}
.thumb--ph.v2 { background: linear-gradient(135deg, var(--mint), var(--brand)); }
.thumb--ph.v3 { background: linear-gradient(135deg, var(--coral), var(--mint)); }
.thumb--ph img { width: 30%; height: auto; object-fit: contain; opacity: .9; }
.meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .75rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; color: rgba(26,26,26,.5); }
.meta .cat { color: var(--brand); }

.featured { display: grid; gap: 2rem; margin-bottom: 5rem; align-items: center; }
@media (min-width: 900px) { .featured { grid-template-columns: 1.3fr 1fr; gap: 4rem; } }
.featured h2 { font-size: clamp(2rem, 4vw, 3.25rem); margin: 1rem 0; }
.featured h2 a:hover, .card h3 a:hover { color: var(--brand); }
.featured p { color: var(--muted); line-height: 1.8; }
.more { display: inline-flex; gap: .6rem; align-items: center; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--brand); margin-top: .5rem; }
.more i { transition: transform .3s; }
.more:hover i { transform: translateX(5px); }

.grid { display: grid; gap: 3rem 2rem; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card h3 { font-size: 1.6rem; margin: .9rem 0 .7rem; line-height: 1.2; }
.card p { margin: 0 0 1rem; color: var(--muted); font-size: .95rem; line-height: 1.7; }
.card .meta { margin-top: 1.25rem; }

.pagination { margin: 5rem 0 6rem; }
.pagination .nav-links { display: flex; justify-content: center; gap: .5rem; flex-wrap: wrap; }
.pagination .page-numbers {
    min-width: 2.75rem; height: 2.75rem; padding: 0 1rem; display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--line); font-size: .85rem; font-weight: 600; transition: all .3s;
}
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--dark); color: #fff; border-color: var(--dark); }
.blog-body { padding-bottom: 2rem; }
.empty { text-align: center; padding: 3rem 0 6rem; color: var(--muted); }

/* ── Search ── */
.searchform { display: flex; max-width: 28rem; margin: 2rem auto 0; border-bottom: 2px solid var(--line); transition: border-color .3s; }
.searchform:focus-within { border-bottom-color: var(--brand); }
.searchform input { flex: 1; border: 0; background: transparent; padding: 1rem 0; font: 1rem var(--font-body); outline: none; }
.searchform button { background: none; border: 0; cursor: pointer; font-size: 1rem; color: var(--brand); }

/* ── Single ── */
.post-head { text-align: center; padding: 4rem 1.5rem 2rem; }
@media (min-width: 768px) { .post-head { padding-top: 6rem; } }
.post-head .meta { justify-content: center; margin-bottom: 1.5rem; }
.post-head h1 { font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.08; max-width: 56rem; margin: 0 auto; }
.post-hero { max-width: 64rem; margin: 2rem auto 0; padding: 0 1.5rem; }
.post-hero img { width: 100%; max-height: 34rem; object-fit: cover; }
.author-line { display: flex; align-items: center; justify-content: center; gap: .75rem; margin-top: 2rem; font-size: .85rem; color: var(--muted); }
.author-line img { border-radius: 50%; }

.entry { padding: 3rem 0 2rem; font-size: 1.1rem; line-height: 1.9; color: rgba(26,26,26,.82); }
.entry > * { margin-top: 0; margin-bottom: 0; }
.entry > * + * { margin-top: 1.5rem; }
.entry h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); margin-top: 3rem; color: var(--dark); }
.entry h3 { font-size: 1.6rem; margin-top: 2.25rem; color: var(--dark); }
.entry a { color: var(--brand); border-bottom: 1px solid rgba(144,100,175,.35); transition: border-color .3s; }
.entry a:hover { border-bottom-color: var(--brand); }
.entry ul, .entry ol { padding-left: 1.4rem; }
.entry li + li { margin-top: .5rem; }
.entry li::marker { color: var(--brand); }
.entry blockquote {
    margin-left: 0; margin-right: 0; padding: .5rem 0 .5rem 1.75rem; border-left: 3px solid var(--brand);
    font-family: var(--font-display); font-style: italic; font-size: 1.5rem; line-height: 1.5; color: var(--dark);
}
.entry img { width: 100%; }
.entry figure { margin-left: 0; margin-right: 0; }
.entry figcaption { font-size: .85rem; color: rgba(26,26,26,.5); margin-top: .6rem; text-align: center; }
.entry hr { border: 0; height: 1px; background: var(--line); margin: 3rem 0; }
.entry pre, .entry code { background: var(--light); font-size: .9em; }
.entry code { padding: .15em .4em; }
.entry pre { padding: 1.25rem; overflow-x: auto; }
.entry table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.entry th, .entry td { border-bottom: 1px solid var(--line); padding: .75rem; text-align: left; }
.entry .wp-block-button__link, .entry .wp-element-button { background: var(--dark); color: #fff; border: 0; border-radius: 0; padding: 16px 40px; text-transform: uppercase; letter-spacing: 2px; font-size: .85rem; font-weight: 600; }
.entry .wp-block-button__link:hover { background: var(--brand); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: 3rem; }
.tags a { padding: .4rem 1rem; background: var(--light); font-size: .75rem; font-weight: 600; letter-spacing: 1px; transition: all .3s; }
.tags a:hover { background: var(--brand); color: #fff; }

.share { display: flex; align-items: center; gap: 1rem; padding: 1.5rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; }
.share a { font-size: 1.1rem; transition: color .3s; }
.share a:hover { color: var(--brand); }

.cta-box { background: var(--dark); color: #fff; text-align: center; padding: 4rem 2rem; margin: 4rem 0; }
.cta-box h2 { font-size: clamp(2rem, 4vw, 3rem); color: #fff; margin-bottom: 1rem; }
.cta-box h2 em { color: var(--brand); }
.cta-box p { color: rgba(255,255,255,.65); max-width: 30rem; margin: 0 auto 2rem; }
.cta-box .btn-luxury { background: var(--brand); }
.cta-box .btn-luxury:hover { background: #fff; color: var(--dark); }

.related { background: var(--light); padding: 5rem 0 6rem; }
.related h2.title { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 3rem; text-align: center; }
.related h2.title em { color: var(--brand); }
.postnav { display: flex; justify-content: space-between; gap: 1rem; padding: 2rem 0; font-size: .85rem; font-weight: 600; }
.postnav a:hover { color: var(--brand); }

/* ── Comments ── */
.comments { padding: 2rem 0 4rem; }
.comments h2, .comment-reply-title { font-size: 2rem; margin-bottom: 1.5rem; }
.comment-list { list-style: none; padding: 0; margin: 0 0 3rem; }
.comment-list .children { list-style: none; padding-left: 1.5rem; }
.comment-body { padding: 1.5rem 0; border-bottom: 1px solid var(--line); }
.comment-author img { display: inline; border-radius: 50%; vertical-align: middle; margin-right: .6rem; }
.comment-author .fn { font-weight: 600; }
.comment-metadata { font-size: .75rem; color: rgba(26,26,26,.5); margin: .25rem 0 .75rem; }
.reply a { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; color: var(--brand); }
.comment-form p { margin: 0 0 1.5rem; }
.comment-form label { display: block; font-size: .8rem; font-weight: 600; color: var(--brand); margin-bottom: .25rem; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea {
    width: 100%; background: transparent; border: 0; border-bottom: 2px solid var(--line); padding: .9rem 0;
    font: 1rem var(--font-body); outline: none; border-radius: 0; transition: border-color .3s;
}
.comment-form input:focus, .comment-form textarea:focus { border-bottom-color: var(--brand); }
.comment-form .submit { background: var(--dark); color: #fff; border: 0; padding: 16px 40px; font: 600 .85rem var(--font-body); text-transform: uppercase; letter-spacing: 2px; cursor: pointer; transition: background .3s; }
.comment-form .submit:hover { background: var(--brand); }
.comment-form-cookies-consent { display: flex; gap: .6rem; font-size: .85rem; }
.comment-form-cookies-consent label { color: var(--muted); font-weight: 400; }

/* ── 404 ── */
.nf { text-align: center; padding: 6rem 1.5rem 8rem; }
.nf .big { font: italic 500 clamp(7rem, 25vw, 16rem)/1 var(--font-display); background: linear-gradient(120deg, var(--brand), var(--coral)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf p { color: var(--muted); margin: 1rem 0 2rem; }

/* ── Footer ── */
.an-footer { background: var(--dark); color: #fff; padding: 5rem 0 2rem; }
.an-footer__grid { display: grid; gap: 2.5rem; margin-bottom: 4rem; }
@media (min-width: 640px) { .an-footer__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .an-footer__grid { grid-template-columns: repeat(3, 1fr); gap: 3.5rem; } }
.an-footer h2 { font-size: 2.25rem; margin-bottom: 1rem; color: #fff; }
.an-footer h2 em { color: var(--brand); }
.an-footer p { color: rgba(255,255,255,.6); max-width: 20rem; line-height: 1.7; font-size: .95rem; margin: 0; }
.an-footer h4 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: 2px; color: var(--mint); margin: 0 0 1.25rem; font-weight: 600; }
.an-footer ul { list-style: none; margin: 0; padding: 0; }
.an-footer li + li { margin-top: .5rem; }
.an-footer li a { color: rgba(255,255,255,.8); transition: color .3s; }
.an-footer li a:hover { color: var(--brand); }
.an-footer .social { display: flex; gap: 1rem; padding-top: .75rem; font-size: 1.1rem; }
.an-footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 2rem; display: flex; flex-direction: column; gap: 1rem; align-items: center; justify-content: space-between; font-size: .8rem; color: rgba(255,255,255,.5); }
.an-footer__bottom p { max-width: none; font-size: inherit; color: inherit; }
@media (min-width: 640px) { .an-footer__bottom { flex-direction: row; } }

.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; width: 65px; height: 65px;
    background: linear-gradient(135deg, #25d366, #128c7e); color: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 2.2rem; z-index: 40;
    box-shadow: 0 10px 30px rgba(37,211,102,.3); transition: all .5s cubic-bezier(.175,.885,.32,1.275);
}
.whatsapp-float:hover { transform: scale(1.1) translateY(-8px) rotate(5deg); }
@media (max-width: 640px) { .whatsapp-float { width: 55px; height: 55px; font-size: 1.8rem; bottom: 20px; right: 20px; } }

.admin-bar .an-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .an-header { top: 46px; } }
