/*
Theme Name: Benjamín Blog
Theme URI: https://benjamincardenasoncologo.com/
Author: MUNGALON
Author URI: https://mungalon.com/
Description: Tema ligero para el blog del Dr. Benjamín A. Cárdenas, inspirado en la identidad visual del sitio principal.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: benjamin-blog
License: GNU General Public License v2 or later
*/

:root {
  --bb-primary: #e88dae;
  --bb-primary-dark: #2c2a2a;
  --bb-primary-soft: #f7d6e2;
  --bb-accent: #f1de56;
  --bb-accent-dark: #dbc93c;
  --bb-bg: #fbf8f5;
  --bb-bg-soft: #f5eee8;
  --bb-card: #ffffff;
  --bb-text: #2f2d2d;
  --bb-muted: #77706d;
  --bb-border: #eee7e2;
  --bb-radius: 18px;
  --bb-shadow: 0 14px 40px rgba(44, 42, 42, .08);
  --bb-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--bb-text);
  font-family: "Poppins", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--bb-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--bb-primary); }
img { max-width: 100%; height: auto; }
.container { width: min(calc(100% - 40px), var(--bb-container)); margin-inline: auto; }
.screen-reader-text { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.98);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(44,42,42,.08);
}
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 92px; display:flex; align-items:center; justify-content:space-between; gap:28px; }
.site-branding { display:flex; align-items:center; gap:14px; min-width: 220px; }
.custom-logo { max-height: 58px; width:auto; display:block; }
.brand-text { text-decoration:none; }
.site-title { margin:0; color:var(--bb-primary-dark); font: 700 22px/1.15 "Playfair Display", Georgia, serif; letter-spacing:.2px; }
.site-description { margin:4px 0 0; color:var(--bb-muted); font-size:11px; line-height:1.3; text-transform:uppercase; letter-spacing:1.2px; }
.header-actions { display:flex; align-items:center; gap:22px; margin-left:auto; }
.main-navigation { display:flex; align-items:center; }
.primary-menu { list-style:none; display:flex; align-items:center; gap:28px; padding:0; margin:0; }
.primary-menu a { color:var(--bb-text); text-decoration:none; font-size:15px; font-weight:600; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color:var(--bb-primary); }
.header-buttons { display:flex; align-items:center; gap:12px; }
.btn, .wp-block-button__link {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height: 48px;
  padding:13px 24px; border-radius:999px; border:1px solid transparent;
  color:var(--bb-primary-dark) !important; text-decoration:none; font-size:15px; font-weight:700;
  transition:.2s ease; box-shadow:none;
}
.btn:hover, .wp-block-button__link:hover { transform:translateY(-1px); }
.btn--yellow, .btn, .wp-block-button__link {
  background:var(--bb-accent); border-color:var(--bb-accent);
}
.btn--yellow:hover, .btn:hover, .wp-block-button__link:hover {
  background:var(--bb-accent-dark); border-color:var(--bb-accent-dark); color:var(--bb-primary-dark) !important;
}
.btn--pink {
  background:var(--bb-primary); border-color:var(--bb-primary); color:#fff !important;
}
.btn--pink:hover {
  background:#da78a0; border-color:#da78a0; color:#fff !important;
}
.menu-toggle { display:none; background:none; border:0; padding:10px; color:var(--bb-primary-dark); cursor:pointer; }
.menu-toggle span { display:block; width:26px; height:2px; background:currentColor; margin:5px 0; }

.blog-hero {
  position:relative; overflow:hidden;
  padding:96px 0 88px;
  background: linear-gradient(135deg, #b9687f 0%, #ca8797 42%, #b8867d 72%, #7f665d 100%);
  color:#fff;
}
.blog-hero:after { content:""; position:absolute; width:360px; height:360px; right:-80px; top:-170px; border:1px solid rgba(255,255,255,.18); border-radius:50%; box-shadow:0 0 0 55px rgba(255,255,255,.035),0 0 0 110px rgba(255,255,255,.025); }
.blog-hero .container { position:relative; z-index:1; }
.eyebrow { margin:0 0 12px; color:#fbe8ef; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:2.2px; }
.blog-hero h1 { max-width:760px; margin:0; color:#fff; font:700 clamp(44px,7vw,76px)/.98 "Playfair Display", Georgia, serif; }
.blog-hero p { max-width:720px; margin:24px 0 0; color:rgba(255,255,255,.90); font-size:18px; }

.main-area { padding:72px 0 92px; background:linear-gradient(#fff, var(--bb-bg)); }
.posts-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:28px; }
.post-card { display:flex; flex-direction:column; overflow:hidden; background:var(--bb-card); border:1px solid var(--bb-border); border-radius:var(--bb-radius); box-shadow:var(--bb-shadow); transition:.25s ease; }
.post-card:hover { transform:translateY(-5px); box-shadow:0 22px 54px rgba(44,42,42,.12); }
.post-card__image { display:block; aspect-ratio:16/10; background:#f4e7e8; overflow:hidden; }
.post-card__image img { width:100%; height:100%; object-fit:cover; transition:.35s ease; }
.post-card:hover .post-card__image img { transform:scale(1.035); }
.post-card__body { display:flex; flex-direction:column; flex:1; padding:26px; }
.post-meta { color:var(--bb-muted); font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:1px; }
.post-card h2 { margin:10px 0 12px; font:700 31px/1.12 "Playfair Display", Georgia, serif; }
.post-card h2 a { color:var(--bb-primary-dark); text-decoration:none; }
.post-card p { margin:0 0 20px; color:var(--bb-muted); font-size:15px; line-height:1.7; }
.read-more { margin-top:auto; font-size:13px; font-weight:800; text-transform:uppercase; letter-spacing:.8px; text-decoration:none; color:var(--bb-primary); }
.read-more:after { content:"  →"; }

.content-wrap { display:grid; grid-template-columns:minmax(0,780px) 320px; gap:54px; align-items:start; }
.article-card { background:#fff; border:1px solid var(--bb-border); border-radius:var(--bb-radius); box-shadow:var(--bb-shadow); overflow:hidden; }
.article-header { padding:54px 60px 30px; }
.article-header h1 { margin:12px 0 16px; color:var(--bb-primary-dark); font:700 clamp(42px,6vw,68px)/1 "Playfair Display", Georgia, serif; }
.article-thumbnail img { display:block; width:100%; max-height:520px; object-fit:cover; }
.entry-content { padding:46px 60px 60px; }
.entry-content h2, .entry-content h3, .entry-content h4 { color:var(--bb-primary-dark); font-family:"Playfair Display",Georgia,serif; line-height:1.12; }
.entry-content h2 { margin-top:1.7em; font-size:42px; }
.entry-content h3 { margin-top:1.6em; font-size:32px; }
.entry-content blockquote { margin:32px 0; padding:22px 28px; border-left:4px solid var(--bb-primary); background:var(--bb-bg-soft); font-family:"Playfair Display",Georgia,serif; font-size:25px; }
.entry-content a { font-weight:600; color: var(--bb-primary); }
.entry-content ul, .entry-content ol { padding-left:24px; }
.entry-content img { border-radius:12px; }

.sidebar { position:sticky; top:112px; }
.widget { margin-bottom:24px; padding:26px; background:#fff; border:1px solid var(--bb-border); border-radius:16px; box-shadow:0 10px 28px rgba(44,42,42,.06); }
.widget-title { margin:0 0 16px; color:var(--bb-primary-dark); font:700 28px/1.1 "Playfair Display",Georgia,serif; }
.widget ul { list-style:none; padding:0; margin:0; }
.widget li { padding:9px 0; border-bottom:1px solid var(--bb-border); font-size:14px; }
.widget li:last-child { border-bottom:0; }
.widget a { text-decoration:none; }
.search-form { display:flex; }
.search-field { width:100%; min-width:0; padding:12px 14px; border:1px solid var(--bb-border); border-radius:10px 0 0 10px; font:inherit; font-size:14px; }
.search-submit { border:0; border-radius:0 10px 10px 0; background:var(--bb-primary); color:#fff; padding:0 15px; font-weight:700; cursor:pointer; }

.pagination { margin-top:48px; }
.nav-links { display:flex; flex-wrap:wrap; justify-content:center; gap:8px; }
.page-numbers { min-width:42px; height:42px; display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--bb-border); border-radius:50%; background:#fff; text-decoration:none; }
.page-numbers.current { background:var(--bb-primary); color:#fff; border-color:var(--bb-primary); }

.cta-strip { padding:64px 0; background:linear-gradient(135deg, #faf2f6 0%, #f8f2e0 100%); border-top:1px solid var(--bb-border); border-bottom:1px solid var(--bb-border); }
.cta-inner { display:flex; align-items:center; justify-content:space-between; gap:36px; }
.cta-inner h2 { margin:0; color:var(--bb-primary-dark); font:700 clamp(34px,5vw,52px)/1.05 "Playfair Display",Georgia,serif; }
.cta-inner p { margin:10px 0 0; color:var(--bb-muted); }

.site-footer { padding:52px 0 26px; background:#fff; color:var(--bb-text); border-top:1px solid var(--bb-border); }
.footer-grid { display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:40px; }
.site-footer h3 { margin:0 0 14px; color:var(--bb-primary-dark); font:700 28px/1.1 "Playfair Display",Georgia,serif; }
.site-footer p { color: var(--bb-muted); }
.site-footer a { color:var(--bb-text); text-decoration:none; }
.site-footer a:hover { color:var(--bb-primary); }
.footer-bottom { margin-top:36px; padding-top:22px; border-top:1px solid var(--bb-border); font-size:12px; color: var(--bb-muted); }

.alignwide { margin-left:-50px; margin-right:-50px; max-width:calc(100% + 100px); }
.alignfull { margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw); max-width:100vw; width:100vw; }

@media (max-width: 1080px) {
  .header-inner { gap: 18px; }
  .primary-menu { gap:16px; }
  .header-buttons .btn { padding: 12px 18px; font-size: 14px; }
}
@media (max-width: 980px) {
  .posts-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .content-wrap { grid-template-columns:1fr; }
  .sidebar { position:static; }
}
@media (max-width: 760px) {
  .admin-bar .site-header { top:46px; }
  .container { width:min(calc(100% - 28px),var(--bb-container)); }
  .header-inner { min-height:74px; align-items:center; flex-wrap: wrap; padding: 12px 0; }
  .menu-toggle { display:block; }
  .header-actions { position:relative; width:100%; justify-content:flex-end; flex-wrap:wrap; gap:12px; }
  .main-navigation { display:none; position:absolute; left:0; right:0; top:54px; width:100%; padding:18px; background:#fff; border:1px solid var(--bb-border); border-radius:14px; box-shadow:var(--bb-shadow); }
  .main-navigation.is-open { display:block; }
  .primary-menu { display:block; }
  .primary-menu li { border-bottom:1px solid var(--bb-border); }
  .primary-menu li:last-child { border-bottom:0; }
  .primary-menu a { display:block; padding:12px 4px; }
  .header-buttons { width:100%; justify-content:flex-start; }
  .header-buttons .btn { flex:1; padding:12px 16px; min-width:0; text-align:center; }
  .blog-hero { padding:70px 0 64px; }
  .posts-grid { grid-template-columns:1fr; }
  .main-area { padding:48px 0 65px; }
  .article-header, .entry-content { padding-left:25px; padding-right:25px; }
  .article-header { padding-top:38px; }
  .entry-content h2 { font-size:35px; }
  .cta-inner { align-items:flex-start; flex-direction:column; }
  .footer-grid { grid-template-columns:1fr; gap:20px; }
  .alignwide { margin-left:0; margin-right:0; max-width:100%; }
}
