@import "reset.css";
@import "font.css";

/* Shared layout keeps the original light, rounded blog appearance. */
:root { --hb-accent: #2b71f5; --hb-text: #161616; --hb-muted: #666; --hb-border: #dfdfdf; }
html { scroll-behavior: smooth; }
body { font-family: Estedad, sans-serif; background: #fafafa; color: var(--hb-text); line-height: 1.8; }
.container { width: min(1200px, calc(100% - 48px)); margin-inline: auto; }
.container-fluid { width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; height: auto; display: block; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex="-1"]:focus-visible { outline: 3px solid var(--hb-accent); outline-offset: 4px; }
.pull-left { float: left; }
.pull-right { float: right; }
.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; }
.skip-link:focus { clip: auto; width: auto; height: auto; margin: 0; padding: 12px 20px; inset-block-start: 8px; inset-inline-start: 8px; background: #fff; z-index: 1000; }

#header { display: flex; align-items: center; gap: 32px; padding: 16px; margin-block: 32px; background: #fff; border-radius: 12px; box-shadow: 0 0 20px #ebebeb; position: relative; z-index: 20; }
.site-branding { display: flex; align-items: center; gap: 12px; min-width: 0; max-width: 48%; }
.logo { flex: 0 1 auto; max-width: 180px; }
.logo .custom-logo-link { display: flex; align-items: center; }
.logo img { width: auto; height: auto; max-width: 180px; max-height: 64px; object-fit: contain; }
.name_site { min-width: 0; }
.site-title { font-size: 16px; font-weight: 600; line-height: 1.7; overflow-wrap: anywhere; }
.site-title a { font-weight: inherit; }
.main_menu { min-width: 0; margin-inline-start: auto; }
.main_menu .menu { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; }
.main_menu li { position: relative; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; min-width: 0; }
.main_menu li > a { padding: 10px 8px; font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.main_menu li > a:hover, .main_menu .current-menu-item > a { color: var(--hb-accent); }
.main_menu .sub-menu { grid-column: 1 / -1; min-width: 0; padding: 8px; border-radius: 10px; background: #fff; border: 1px solid var(--hb-border); }
.main_menu.is-enhanced .sub-menu { display: none; }
.main_menu.is-enhanced li.submenu-open > .sub-menu { display: block; }
.main_menu.is-enhanced .menu > li > .sub-menu { position: absolute; inset-block-start: 100%; inset-inline-end: 0; width: 240px; max-width: calc(100vw - 48px); box-shadow: 0 12px 24px #00000014; z-index: 25; }
.submenu-toggle { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 6px; background: #f4f4f4; }
.submenu-toggle span { font-size: 20px; line-height: 1; transition: transform .15s; }
.submenu-toggle[aria-expanded="true"] span { transform: rotate(180deg); }
.menu-toggle { display: none; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 12px; background: #f5f5f5; border: 1px solid var(--hb-border); border-radius: 8px; color: inherit; font-size: 14px; }
.menu-toggle-icon { display: grid; gap: 4px; width: 18px; }
.menu-toggle-icon span { display: block; height: 2px; background: currentColor; }

#hero { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; padding-block: 32px; }
.hero_lastest_post { min-width: 0; min-height: 510px; background: #27303e; overflow: hidden; border-radius: 10px; position: relative; }
.hero_lastest_post > a { display: block; height: 100%; min-height: inherit; }
.hero_lastest_post img { width: 100%; height: 100%; position: absolute; object-fit: cover; transition: transform .3s ease; }
.hero_lastest_post:hover img { transform: scale(1.025); }
.hero_lastest_post_cover { position: absolute; inset: 0; background: linear-gradient(180deg,#00000005,#000000cc); display: flex; align-items: flex-end; }
.hero_post_details { padding: 32px; width: 100%; min-width: 0; }
.hero_post_title { font-size: clamp(24px,2.6vw,32px); line-height: 1.7; font-weight: 700; color: #fff; margin-bottom: 12px; overflow-wrap: anywhere; }
.hero_post_excerpt { font-size: 14px; font-weight: 500; color: #eee; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hero_other_posts { min-width: 0; }
.hero_other_posts > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.hero_other_post_col, .col_posts { min-width: 0; }
.card_post { height: 100%; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 0 15px #ebebeb; }
.post_image { height: 215px; overflow: hidden; background: #f0f1f3; }
.post_image a { display: block; height: 100%; }
.post_image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post_image:hover img { transform: scale(1.025); }
.post-image-placeholder { width: 100%; height: 100%; min-height: 70px; background: linear-gradient(135deg,#eef0f4,#dde2e9); }
#hero .post_image { height: 155px; }
.post_details { padding: 24px; }
#hero .post_details { padding: 16px; }
.post_title { font-size: 18px; font-weight: 500; line-height: 1.8; overflow-wrap: anywhere; }
.post_title a { font-weight: inherit; }
#hero .post_title { font-size: 16px; }
.post_title a:hover { color: var(--hb-accent); }
.post_excerpt { font-size: 14px; color: var(--hb-muted); margin-top: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#popular { padding-block: 32px; }
.main_title { font-size: 22px; font-weight: 700; margin-bottom: 16px; line-height: 1.8; overflow-wrap: anywhere; }
.row_posts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.listing-page { padding-block: 24px 40px; }
.archive-description { margin-bottom: 24px; color: var(--hb-muted); }
.empty-state { padding: 32px; border: 1px solid var(--hb-border); border-radius: 12px; background: #fff; }
.pagination { margin-block: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.pagination .page-numbers, .pagination .post-page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; padding: 8px 12px; background: #fff; border: 1px solid var(--hb-border); border-radius: 8px; }
.pagination .current { background: var(--hb-text); border-color: var(--hb-text); color: #fff; }
.pagination a:hover { border-color: var(--hb-accent); color: var(--hb-accent); }
.search-form { display: flex; gap: 8px; width: 100%; max-width: 560px; margin-block: 24px; }
.search-form input { min-width: 0; flex: 1; padding: 10px 14px; border: 1px solid #bbb; border-radius: 8px; background: #fff; color: inherit; }
.search-form button, .home-link { padding: 10px 18px; border: 1px solid var(--hb-text); border-radius: 8px; background: var(--hb-text); color: #fff; min-height: 44px; }
.error-page { padding-block: 48px 64px; text-align: center; }
.error-page .search-form { margin-inline: auto; }
.error-code { font-size: clamp(64px,10vw,100px); font-weight: 800; color: #555; line-height: 1.5; }
.home-link { display: inline-flex; margin-top: 8px; }
#footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; border-top: 1px solid var(--hb-border); margin-block: 40px 24px; padding-block: 24px; }
.copy_right, .footer_credit { min-width: 0; margin: 0; font-size: 13px; line-height: 2; color: var(--hb-muted); overflow-wrap: anywhere; }
#footer a { color: var(--hb-text); font-weight: 500; text-underline-offset: 4px; }
#footer a:hover { text-decoration: underline; }
.footer_owner { color: var(--hb-text); font-weight: 500; }
#footer a:hover, .site-title a:hover, .sidebar_item_title a:hover, .content_list a:hover, .entry-content a:hover { color: var(--hb-accent); }

.breadcrumb { font-size: 13px; margin-bottom: 40px; overflow-wrap: anywhere; }
.breadcrumb a, .breadcrumb .separator { color: var(--hb-muted); }
.breadcrumb .separator { margin-inline: 5px; }
.header_page { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 48px; align-items: center; border-bottom: 1px solid var(--hb-border); padding-bottom: 32px; margin-bottom: 32px; }
.header_page.without-thumbnail { grid-template-columns: minmax(0,1fr); }
.col_details_post, .col_thumbnail_post { min-width: 0; }
.col_thumbnail_post img { width: 100%; border-radius: 10px; }
.main_title_page { font-size: clamp(26px,3.2vw,40px); font-weight: 700; line-height: 1.7; overflow-wrap: anywhere; }
.main_excerpt_page { font-size: 17px; color: var(--hb-muted); margin-top: 20px; }
.body_page { display: grid; grid-template-columns: 218px minmax(0,1fr) 288px; gap: 32px; align-items: start; }
.fixed_sidebar, .main_sidebar, .page_content { min-width: 0; }
.fixed_sidebar { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 4px; }
.admin-bar .fixed_sidebar { top: 52px; max-height: calc(100vh - 72px); }
.read_time_box { border-radius: 10px; padding: 16px; box-shadow: 0 0 20px #ebebeb; margin-bottom: 24px; background: #fff; }
.read_time { font-size: 13px; font-weight: 500; margin-bottom: 8px; }
.read_time_progress { height: 6px; background: #dcdcdc; border-radius: 999px; overflow: hidden; }
.read_time_fill { height: 100%; background: var(--hb-accent); width: 0; border-radius: inherit; transition: width .1s linear; }
.content_list_title, .main_sidebar_title { color: var(--hb-muted); font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.content_list ul li { font-size: 14px; padding-block: 4px; overflow-wrap: anywhere; }
.content_list ul li.h2 { font-weight: 600; }
.content_list ul li.h3 { padding-inline-start: 12px; color: var(--hb-muted); }
.content_list ul li a { display: block; font-weight: inherit; }
.content_list ul li.active a { color: var(--hb-accent); }
.row_sidebar_item { display: flex; align-items: center; gap: 16px; padding-block: 8px; min-width: 0; }
.sidebar_item_thumbnail { flex: 0 0 70px; width: 70px; }
.sidebar_item_thumbnail img, .sidebar_item_thumbnail .post-image-placeholder { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.sidebar_item_title { min-width: 0; font-size: 14px; line-height: 1.8; font-weight: 500; overflow-wrap: anywhere; }
.sidebar_item_title a { font-weight: inherit; }
.entry-content { font-size: 16px; line-height: 1.9; overflow-wrap: anywhere; }
.entry-content h1, .entry-content h2, .entry-content h3, .entry-content h4, .entry-content h5, .entry-content h6 { font-weight: 700; margin-block: 24px 12px; scroll-margin-top: 100px; }
.entry-content h1 { font-size: 26px; }
.entry-content h2 { font-size: 24px; }
.entry-content h3 { font-size: 21px; }
.entry-content h4 { font-size: 18px; }
.entry-content h5, .entry-content h6 { font-size: 16px; }
.entry-content a { color: #0064d9; text-decoration: underline; }
.entry-content p, .entry-content ol, .entry-content ul, .entry-content figure { margin-bottom: 16px; }
.entry-content ul:not(.wp-block-social-links) { list-style: disc; padding-inline-start: 24px; }
.entry-content ol { list-style: decimal; padding-inline-start: 24px; }
.entry-content img { max-width: 100%; height: auto; border-radius: 5px; }
.entry-content iframe, .entry-content video { max-width: 100%; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content table { max-width: 100%; }
.entry-content td, .entry-content th { padding: 8px; border: 1px solid var(--hb-border); }
.entry-content pre { overflow-x: auto; white-space: pre; padding: 16px; background: #eee; border-radius: 8px; }
.alignleft { float: left; margin: 0 15px 15px 0; max-width: 100%; }
.alignright { float: right; margin: 0 0 15px 15px; max-width: 100%; }
.aligncenter { margin-inline: auto; }
.entry-content::after { content: ""; display: block; clear: both; }

@media (max-width: 1100px) {
    #header { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 16px; }
    .site-branding { max-width: none; }
    .main_menu { display: contents; }
    .main_menu .menu { grid-column: 1 / -1; display: block; width: 100%; border-top: 1px solid var(--hb-border); padding-top: 12px; }
    .main_menu.is-enhanced .menu-toggle { display: inline-flex; }
    .main_menu.is-enhanced:not(.menu-open) > .menu { display: none; }
    .main_menu li > a { min-height: 44px; }
    .submenu-toggle { width: 44px; height: 44px; }
    .main_menu.is-enhanced .menu > li > .sub-menu { position: static; width: 100%; max-width: none; box-shadow: none; }
    .main_menu .sub-menu { margin-block: 4px 8px; }
    #hero { gap: 20px; }
    .hero_other_posts > div { gap: 20px; }
    .body_page { grid-template-columns: 200px minmax(0,1fr); gap: 24px; }
    .main_sidebar { grid-column: 1 / -1; border-top: 1px solid var(--hb-border); padding-top: 24px; }
    .sidebar-posts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 24px; }
    .header_page { gap: 24px; }
}
@media (max-width: 900px) {
    #hero { grid-template-columns: minmax(0,1fr); }
    .hero_lastest_post { min-height: 420px; }
    .hero_other_posts > div { grid-template-columns: repeat(4,minmax(0,1fr)); }
    #hero .post_image { height: 125px; }
    #hero .post_details { padding: 12px; }
    #hero .post_title { font-size: 14px; }
    .row_posts { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 767px) {
    .container { width: calc(100% - 32px); }
    #footer { flex-direction: column; gap: 8px; margin-block: 32px 16px; padding-block: 20px; text-align: center; }
    #header { margin-block: 16px 24px; padding: 12px; gap: 12px; }
    .site-branding { gap: 10px; }
    .logo { max-width: min(120px,35vw); }
    .logo img { max-width: min(120px,35vw); max-height: 52px; }
    .site-title { font-size: 14px; }
    #hero, #popular { padding-block: 16px; }
    .hero_lastest_post { min-height: 360px; }
    .hero_post_details { padding: 24px; }
    .hero_other_posts > div { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
    #hero .post_image { height: 140px; }
    .body_page { grid-template-columns: minmax(0,1fr); gap: 24px; }
    .fixed_sidebar, .admin-bar .fixed_sidebar { position: static; max-height: none; overflow: visible; padding: 0; }
    .content_list { padding: 16px; border: 1px solid var(--hb-border); border-radius: 10px; background: #fff; }
    .read_time_box { margin-bottom: 16px; }
    .main_sidebar { grid-column: auto; }
    .header_page { grid-template-columns: minmax(0,1fr); gap: 20px; padding-bottom: 24px; margin-bottom: 24px; }
    .main_excerpt_page { font-size: 15px; margin-top: 12px; }
    .breadcrumb { margin-bottom: 24px; }
    .row_posts { gap: 16px; }
    .post_details { padding: 18px; }
    .post_title { font-size: 16px; }
    .main_title { font-size: 20px; }
    .entry-content { font-size: 15px; }
    .entry-content .alignleft, .entry-content .alignright { float: none; margin: 16px auto; }
    .empty-state { padding: 20px; }
}
@media (max-width: 480px) {
    .row_posts, .sidebar-posts { grid-template-columns: minmax(0,1fr); }
    .hero_lastest_post { min-height: 340px; }
    .hero_post_details { padding: 20px; }
    #hero .post_image { height: 120px; }
    #hero .post_details { padding: 12px; }
    .post_image { height: 210px; }
    .search-form button { padding-inline: 12px; }
    .menu-toggle { padding-inline: 8px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
