/* ============================================================
   HMD Blog Pro v2.1 — Main Stylesheet
   Full Mobile-Responsive | Home Massage Dubai
   All text sizes controlled via CSS variables from backend
   Breakpoints: 480 | 600 | 768 | 960 | 1200
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;0,700;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ================================================================
   CSS CUSTOM PROPERTIES
   Default values — all overridden by PHP via wp_head inline style
   ================================================================ */
:root {
    /* Brand Colors */
    --hmd-primary:       #c9a96e;
    --hmd-accent:        #1a1a2e;
    --hmd-bg:            #faf9f7;
    --hmd-surface:       #ffffff;
    --hmd-border:        #ece8e0;
    --hmd-text:          #2d2d2d;
    --hmd-muted:         #8a8a8a;
    /* Radius & Shadow */
    --hmd-radius:        12px;
    --hmd-radius-sm:     8px;
    --hmd-shadow:        0 4px 24px rgba(0,0,0,0.08);
    --hmd-shadow-hover:  0 12px 40px rgba(0,0,0,0.14);
    /* Fonts */
    --hmd-font-serif:    'Cormorant Garamond', Georgia, serif;
    --hmd-font-sans:     'Jost', sans-serif;
    /* WhatsApp */
    --hmd-wa-green:      #25d366;
    /* Layout */
    --hmd-sidebar-width: 28%;
    /* Typography tokens — overridden by PHP */
    --hmd-fs-body:        1rem;
    --hmd-fs-title:       2.2rem;
    --hmd-fs-h2:          1.45rem;
    --hmd-fs-h3:          1.2rem;
    --hmd-fs-h4:          1rem;
    --hmd-fs-card:        1.1rem;
    --hmd-fs-excerpt:     0.875rem;
    --hmd-fs-meta:        0.73rem;
    --hmd-fs-hero-title:  3rem;
    --hmd-fs-hero-sub:    1rem;
    --hmd-fs-sidebar:     1.1rem;
    --hmd-fs-author-name: 1.4rem;
    --hmd-fs-author-bio:  0.88rem;
    --hmd-fs-toc:         0.88rem;
    --hmd-lh-body:        1.85;
    --hmd-ls-body:        0em;
}

/* ================================================================
   BASE RESET
   ================================================================ */
.hmd-blog-wrap *,
.hmd-single-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
.hmd-blog-wrap,
.hmd-single-wrap {
    font-family: var(--hmd-font-sans);
    color: var(--hmd-text);
    background: var(--hmd-bg);
    min-height: 60vh;
    -webkit-text-size-adjust: 100%;
    /* Do NOT add overflow:hidden here — breaks position:sticky on sidebar */
}
img { max-width: 100%; height: auto; display: block; }

/* ================================================================
   CONTAINER
   ================================================================ */
.hmd-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 60px;
}
@media (max-width: 960px) { .hmd-container { padding: 0 32px; } }
@media (max-width: 600px) { .hmd-container { padding: 0 20px; } }
@media (max-width: 400px) { .hmd-container { padding: 0 14px; } }

/* ================================================================
   BLOG LISTING — HERO BANNER
   ================================================================ */
.hmd-blog-hero {
    position: relative;
    background: var(--hmd-accent);
    padding: 80px 24px 70px;
    text-align: center;
    overflow: hidden;
}
.hmd-blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(201,169,110,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.hmd-blog-hero-decor {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--hmd-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.hmd-blog-hero-inner { position: relative; z-index: 1; }

.hmd-blog-hero-title {
    font-family: var(--hmd-font-serif);
    font-size: var(--hmd-fs-hero-title);
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.04em;
    line-height: 1.2;
}
.hmd-blog-hero-title em,
.hmd-blog-hero-title span { color: var(--hmd-primary); font-style: italic; }

.hmd-blog-hero-sub {
    font-size: var(--hmd-fs-hero-sub);
    color: rgba(255,255,255,0.65);
    margin-top: 12px;
    font-weight: 300;
    letter-spacing: 0.06em;
}

@media (max-width: 768px) {
    .hmd-blog-hero { padding: 56px 20px 52px; }
    .hmd-blog-hero-title { font-size: calc(var(--hmd-fs-hero-title) * 0.75); }
}
@media (max-width: 480px) {
    .hmd-blog-hero { padding: 44px 16px 42px; }
    .hmd-blog-hero-title { font-size: calc(var(--hmd-fs-hero-title) * 0.6); }
    .hmd-blog-hero-sub   { font-size: calc(var(--hmd-fs-hero-sub) * 0.9); }
    .hmd-blog-hero-decor { height: 28px; }
}

/* ================================================================
   BLOG LISTING — CARDS GRID
   ================================================================ */
.hmd-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding: 60px 0 50px;
}
@media (max-width: 1024px) { .hmd-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px)  { .hmd-cards-grid { grid-template-columns: 1fr; gap: 16px; padding: 30px 0; } }
@media (max-width: 480px)  { .hmd-cards-grid { gap: 14px; padding: 22px 0; } }

/* Card */
.hmd-card {
    background: var(--hmd-surface);
    border-radius: var(--hmd-radius);
    overflow: hidden;
    box-shadow: var(--hmd-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--hmd-border);
}
.hmd-card:hover { transform: translateY(-5px); box-shadow: var(--hmd-shadow-hover); }
@media (hover: none) { .hmd-card:hover { transform: none; box-shadow: var(--hmd-shadow); } }

/* Card Thumb */
.hmd-card-thumb-link { display: block; position: relative; overflow: hidden; }
.hmd-card-thumb { height: 210px; background-size: cover; background-position: center; transition: transform 0.5s ease; }
.hmd-card:hover .hmd-card-thumb { transform: scale(1.04); }
@media (max-width: 600px) { .hmd-card-thumb { height: 195px; } }
@media (max-width: 480px) { .hmd-card-thumb { height: 175px; } }

.hmd-card-thumb--placeholder { background: var(--hmd-border); display: flex; align-items: center; justify-content: center; }
.hmd-card-thumb--placeholder svg { width: 40px; height: 40px; color: var(--hmd-muted); }

.hmd-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--hmd-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Card Body */
.hmd-card-body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
@media (max-width: 480px) { .hmd-card-body { padding: 16px 16px 18px; } }

.hmd-card-meta {
    display: flex;
    gap: 12px;
    font-size: var(--hmd-fs-meta);
    color: var(--hmd-muted);
    margin-bottom: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.hmd-card-meta span { display: flex; align-items: center; gap: 4px; }
.hmd-card-meta svg  { width: 12px; height: 12px; flex-shrink: 0; }

.hmd-card-title {
    font-family: var(--hmd-font-serif);
    font-size: var(--hmd-fs-card);
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
}
.hmd-card-title a { color: var(--hmd-text); text-decoration: none; transition: color 0.2s; }
.hmd-card-title a:hover { color: var(--hmd-primary); }

.hmd-card-excerpt {
    font-size: var(--hmd-fs-excerpt);
    color: var(--hmd-muted);
    line-height: 1.65;
    flex: 1;
    margin-bottom: 16px;
}

.hmd-card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hmd-primary);
    text-decoration: none;
    transition: gap 0.2s;
    align-self: flex-start;
    min-height: 36px;
}
.hmd-card-link svg { width: 13px; height: 13px; transition: transform 0.2s; }
.hmd-card-link:hover { gap: 10px; }
.hmd-card-link:hover svg { transform: translateX(3px); }

/* No Posts */
.hmd-no-posts { grid-column: 1/-1; text-align: center; padding: 60px 20px; color: var(--hmd-muted); }
.hmd-no-posts svg { width: 48px; height: 48px; margin: 0 auto 16px; opacity: 0.4; }
.hmd-no-posts h3 { font-family: var(--hmd-font-serif); font-size: 1.5rem; font-weight: 400; margin-bottom: 8px; color: var(--hmd-text); }

/* Mobile tap feedback */
.hmd-card-tap { transform: scale(0.98) !important; box-shadow: var(--hmd-shadow) !important; }

/* ================================================================
   PAGINATION
   ================================================================ */
.hmd-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 16px 0 52px;
    flex-wrap: wrap;
}
.hmd-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--hmd-radius-sm);
    border: 1px solid var(--hmd-border);
    color: var(--hmd-text);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--hmd-surface);
    touch-action: manipulation;
}
.hmd-pagination .page-numbers:hover,
.hmd-pagination .page-numbers.current { background: var(--hmd-primary); border-color: var(--hmd-primary); color: #fff; }
@media (max-width: 480px) { .hmd-pagination { gap: 4px; } .hmd-pagination .page-numbers { min-width: 34px; height: 34px; } }

/* ================================================================
   SINGLE POST — FULL WIDTH LAYOUT
   ================================================================ */

/* The outer wrap fills 100% of its parent — PHP also outputs !important overrides */
.hmd-single-wrap {
    width: 100%;
    max-width: 100%;
    /* NOTE: overflow-x:hidden is intentionally NOT set here —
       it would break position:sticky on the sidebar */
}

.hmd-single-container {
    display: grid;
    grid-template-columns: 1fr var(--hmd-sidebar-width);
    gap: 40px;
    padding-top: 100px;
    padding-bottom: 70px;
    align-items: start; /* REQUIRED — without this sticky does not work */
    width: 100%;
    min-width: 0;
}
@media (max-width: 960px) {
    .hmd-single-container { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
}
@media (max-width: 600px) {
    .hmd-single-container { gap: 20px; padding-top: 24px; padding-bottom: 40px; }
}

.hmd-single-main {
    min-width: 0;
    padding: 0 16px;
}
@media (max-width: 600px) { .hmd-single-main { padding: 0 4px; } }

/* Featured Image */
.hmd-single-featured { margin-bottom: 24px; border-radius: var(--hmd-radius); overflow: hidden; box-shadow: var(--hmd-shadow); }
.hmd-featured-img { width: 100%; height: 420px; object-fit: cover; display: block; }
@media (max-width: 768px) { .hmd-featured-img { height: 300px; } }
@media (max-width: 600px) { .hmd-featured-img { height: 230px; } }
@media (max-width: 480px) { .hmd-featured-img { height: 190px; border-radius: var(--hmd-radius-sm); } }

/* Category Badges */
.hmd-single-cats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.hmd-cat-badge {
    background: var(--hmd-primary);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 13px;
    border-radius: 20px;
    text-decoration: none;
    transition: background 0.2s;
    white-space: nowrap;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
}
.hmd-cat-badge:hover { background: var(--hmd-accent); }

/* Post Title */
.hmd-single-title {
    font-family: var(--hmd-font-serif);
    font-size: var(--hmd-fs-title);
    font-weight: 600;
    line-height: 1.22;
    color: var(--hmd-accent);
    margin-bottom: 18px;
    word-break: break-word;
}
@media (max-width: 768px) { .hmd-single-title { font-size: calc(var(--hmd-fs-title) * 0.82); } }
@media (max-width: 480px) { .hmd-single-title { font-size: calc(var(--hmd-fs-title) * 0.68); } }

/* Post Meta */
.hmd-single-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    font-size: var(--hmd-fs-meta);
    color: var(--hmd-muted);
    padding-bottom: 20px;
    border-bottom: 1px solid var(--hmd-border);
    margin-bottom: 28px;
}
.hmd-single-meta span { display: flex; align-items: center; gap: 5px; }
.hmd-single-meta svg  { width: 13px; height: 13px; flex-shrink: 0; }
.hmd-meta-tags        { flex-wrap: wrap; gap: 4px; }
.hmd-meta-tags a      { color: var(--hmd-primary); text-decoration: none; margin-left: 3px; }
.hmd-meta-tags a:hover { text-decoration: underline; }
@media (max-width: 480px) { .hmd-single-meta { gap: 10px; } }

/* ================================================================
   TABLE OF CONTENTS
   ================================================================ */
.hmd-toc {
    background: linear-gradient(135deg, #fdf8f0 0%, #fff 100%);
    border: 1px solid var(--hmd-primary);
    border-left: 4px solid var(--hmd-primary);
    border-radius: var(--hmd-radius);
    padding: 18px 22px;
    margin-bottom: 32px;
}
.hmd-toc-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--hmd-font-serif);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--hmd-accent);
    cursor: pointer;
    user-select: none;
}
.hmd-toc-header svg { width: 17px; height: 17px; color: var(--hmd-primary); flex-shrink: 0; }
.hmd-toc-toggle {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--hmd-muted);
    padding: 4px 8px;
    line-height: 1;
    transition: transform 0.3s;
    touch-action: manipulation;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hmd-toc.collapsed .hmd-toc-toggle { transform: rotate(-90deg); }
.hmd-toc-list { margin-top: 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.hmd-toc.collapsed .hmd-toc-list { display: none; }
.hmd-toc-item a {
    color: var(--hmd-text);
    text-decoration: none;
    font-size: var(--hmd-fs-toc);
    line-height: 1.5;
    transition: color 0.2s;
}
.hmd-toc-item a:hover,
.hmd-toc-item a.hmd-toc-active { color: var(--hmd-primary); }
.hmd-toc-item a.hmd-toc-active { font-weight: 600; }
.hmd-toc-h3        { margin-left: 16px; }
.hmd-toc-h3 a      { font-size: calc(var(--hmd-fs-toc) - 0.06rem); color: var(--hmd-muted); }
@media (max-width: 480px) { .hmd-toc { padding: 14px 16px; margin-bottom: 22px; } }

/* ================================================================
   POST CONTENT
   ================================================================ */
.hmd-single-content {
    font-size: var(--hmd-fs-body);
    line-height: var(--hmd-lh-body);
    letter-spacing: var(--hmd-ls-body);
    color: #3a3a3a;
    overflow-wrap: break-word;
    word-break: break-word;
}
.hmd-single-content h2 {
    font-family: var(--hmd-font-serif);
    font-size: var(--hmd-fs-h2);
    font-weight: 600;
    color: var(--hmd-accent);
    margin: 34px 0 13px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--hmd-border);
    line-height: 1.3;
}
.hmd-single-content h3 {
    font-family: var(--hmd-font-serif);
    font-size: var(--hmd-fs-h3);
    font-weight: 600;
    color: var(--hmd-accent);
    margin: 26px 0 10px;
    line-height: 1.3;
}
.hmd-single-content h4 { font-size: var(--hmd-fs-h4); font-weight: 600; margin: 20px 0 8px; }
.hmd-single-content p  { margin-bottom: 16px; }
.hmd-single-content a  { color: var(--hmd-primary); text-decoration: underline; text-underline-offset: 3px; }
.hmd-single-content ul,
.hmd-single-content ol { margin: 0 0 18px 24px; }
.hmd-single-content li { margin-bottom: 7px; }
.hmd-single-content blockquote {
    border-left: 4px solid var(--hmd-primary);
    margin: 26px 0;
    padding: 14px 20px;
    background: #fdf8f0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
    font-family: var(--hmd-font-serif);
    font-size: calc(var(--hmd-fs-body) * 1.05);
}
.hmd-single-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 22px 0; box-shadow: var(--hmd-shadow); }
.hmd-single-content pre {
    background: var(--hmd-accent);
    color: #e2e8f0;
    padding: 18px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85rem;
    margin-bottom: 22px;
    -webkit-overflow-scrolling: touch;
}
.hmd-single-content code { background: #f0ebe3; padding: 2px 6px; border-radius: 4px; font-size: 0.87em; color: #c9692d; }
.hmd-single-content pre code { background: none; color: inherit; padding: 0; }

/* Responsive Tables */
.hmd-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 22px; border-radius: 4px; }
.hmd-single-content table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 340px; }
.hmd-single-content th { background: var(--hmd-accent); color: #fff; padding: 10px 13px; text-align: left; white-space: nowrap; }
.hmd-single-content td { padding: 9px 13px; border-bottom: 1px solid var(--hmd-border); }
.hmd-single-content tr:nth-child(even) td { background: #faf7f2; }

@media (max-width: 600px) {
    .hmd-single-content h2 { margin: 26px 0 11px; }
    .hmd-single-content h3 { margin: 20px 0 8px; }
    .hmd-single-content blockquote { padding: 12px 16px; }
    .hmd-single-content pre { padding: 14px; font-size: 0.82rem; }
    .hmd-single-content ul,
    .hmd-single-content ol { margin-left: 20px; }
}

/* Tags Footer */
.hmd-single-tags-footer { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 32px 0; font-size: 0.8rem; color: var(--hmd-muted); }
.hmd-tag-pill { background: var(--hmd-border); color: var(--hmd-text); padding: 5px 12px; border-radius: 20px; text-decoration: none; font-size: 0.76rem; transition: all 0.2s; white-space: nowrap; }
.hmd-tag-pill:hover { background: var(--hmd-primary); color: #fff; }

/* ================================================================
   AUTHOR BOX
   ================================================================ */
.hmd-author-box {
    background: linear-gradient(135deg, var(--hmd-accent) 0%, #16213e 100%);
    border-radius: var(--hmd-radius);
    padding: 28px 32px;
    margin-top: 12px;
}
.hmd-author-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--hmd-primary);
    margin-bottom: 14px;
}
.hmd-author-content { display: flex; gap: 24px; align-items: flex-start; }
.hmd-author-logo { display: flex; flex-direction: column; align-items: center; gap: 8px; flex-shrink: 0; }
.hmd-author-logo img { width: 96px; height: 96px; object-fit: contain; border-radius: 10px; background: #fff; padding: 8px; }
.hmd-author-logo-name { font-size: 0.68rem; color: rgba(255,255,255,0.5); font-weight: 500; text-transform: uppercase; letter-spacing: 0.07em; white-space: nowrap; }
.hmd-author-name { font-family: var(--hmd-font-serif); font-size: var(--hmd-fs-author-name); font-weight: 600; color: #fff; margin-bottom: 8px; }
.hmd-author-bio  { font-size: var(--hmd-fs-author-bio); color: rgba(255,255,255,0.72); line-height: 1.7; margin-bottom: 16px; }
.hmd-author-socials { display: flex; gap: 8px; flex-wrap: wrap; }
.hmd-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--hmd-primary);
    color: #fff;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
    touch-action: manipulation;
}
.hmd-social-icon:hover { transform: translateY(-3px); background: #e0bc7f; }
.hmd-social-icon svg { width: 16px; height: 16px; }

@media (max-width: 768px) {
    .hmd-author-box { padding: 22px 20px; }
    .hmd-author-content { gap: 16px; }
    .hmd-author-logo img { width: 80px; height: 80px; }
}
@media (max-width: 520px) {
    .hmd-author-box { padding: 20px 16px; }
    .hmd-author-content { flex-direction: column; align-items: center; text-align: center; }
    .hmd-author-socials { justify-content: center; }
}

/* ================================================================
   SIDEBAR
   CSS sticky works after Astra overflow:visible fix in PHP.
   JS fallback kicks in automatically if CSS sticky still fails.
   ================================================================ */
.hmd-sidebar {
    position: sticky;
    top: 20px;
    padding-top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    align-self: start;
}
@media (max-width: 960px) {
    .hmd-sidebar {
        position: static;
        top: auto;
        padding-top: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
}
@media (max-width: 600px) {
    .hmd-sidebar { grid-template-columns: 1fr; gap: 14px; }
}

.hmd-sidebar-widget {
    background: var(--hmd-surface);
    border-radius: var(--hmd-radius);
    padding: 22px;
    box-shadow: var(--hmd-shadow);
    border: 1px solid var(--hmd-border);
}
@media (max-width: 480px) { .hmd-sidebar-widget { padding: 18px 16px; } }

.hmd-sidebar-widget-title {
    font-family: var(--hmd-font-serif);
    font-size: var(--hmd-fs-sidebar);
    font-weight: 600;
    color: var(--hmd-accent);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--hmd-border);
}

/* Span full width on tablet grid */
@media (max-width: 960px) {
    .hmd-sidebar-whatsapp { grid-column: 1 / -1; }
}

/* WhatsApp Widget */
.hmd-sidebar-whatsapp {
    background: linear-gradient(135deg, #128c7e, #25d366);
    border: none;
    padding: 16px 18px;
    margin-top: 50px;
}
.hmd-wa-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
    letter-spacing: 0.03em;
    padding: 4px 0;
    min-height: 44px;
}
.hmd-wa-btn svg { width: 22px; height: 22px; flex-shrink: 0; }

/* Contact Form */
.hmd-form-wrap input[type="text"],
.hmd-form-wrap input[type="email"],
.hmd-form-wrap input[type="tel"],
.hmd-form-wrap textarea,
.hmd-form-wrap select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--hmd-border);
    border-radius: var(--hmd-radius-sm);
    font-family: var(--hmd-font-sans);
    font-size: 0.875rem;
    color: var(--hmd-text);
    background: var(--hmd-bg);
    margin-bottom: 10px;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.hmd-form-wrap input:focus,
.hmd-form-wrap textarea:focus { outline: none; border-color: var(--hmd-primary); }
.hmd-form-wrap textarea { min-height: 90px; resize: vertical; }
.hmd-form-wrap input[type="submit"],
.hmd-form-wrap button[type="submit"] {
    width: 100%;
    padding: 13px;
    background: var(--hmd-primary);
    color: #fff;
    border: none;
    border-radius: var(--hmd-radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--hmd-font-sans);
    transition: background 0.2s;
    touch-action: manipulation;
    min-height: 44px;
}
.hmd-form-wrap input[type="submit"]:hover { background: #b8933d; }

/* Recent Posts */
.hmd-recent-list { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.hmd-recent-item { display: flex; gap: 10px; align-items: flex-start; }
.hmd-recent-thumb { flex-shrink: 0; display: block; width: 58px; height: 58px; border-radius: var(--hmd-radius-sm); overflow: hidden; }
.hmd-recent-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.hmd-recent-thumb:hover img { transform: scale(1.08); }
.hmd-recent-info { flex: 1; min-width: 0; }
.hmd-recent-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--hmd-text);
    text-decoration: none;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s;
}
.hmd-recent-title:hover { color: var(--hmd-primary); }
.hmd-recent-date { font-size: 0.7rem; color: var(--hmd-muted); }

/* Categories */
.hmd-cat-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.hmd-cat-item a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: var(--hmd-radius-sm);
    color: var(--hmd-text);
    text-decoration: none;
    font-size: 0.855rem;
    transition: all 0.2s;
    border: 1px solid transparent;
    min-height: 40px;
}
.hmd-cat-item a:hover { background: #fdf8f0; border-color: var(--hmd-border); color: var(--hmd-primary); }
.hmd-cat-count { background: var(--hmd-border); color: var(--hmd-muted); font-size: 0.7rem; padding: 2px 8px; border-radius: 10px; font-weight: 600; flex-shrink: 0; }

/* ================================================================
   FLOATING WHATSAPP
   ================================================================ */
.hmd-wa-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--hmd-wa-green);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37,211,102,0.4);
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    animation: hmd-pulse 2.5s infinite;
    touch-action: manipulation;
}
.hmd-wa-float:hover { transform: scale(1.1); box-shadow: 0 10px 32px rgba(37,211,102,0.55); animation: none; }
.hmd-wa-float svg { width: 28px; height: 28px; }
@keyframes hmd-pulse {
    0%   { box-shadow: 0 6px 24px rgba(37,211,102,0.4); }
    50%  { box-shadow: 0 6px 36px rgba(37,211,102,0.7); }
    100% { box-shadow: 0 6px 24px rgba(37,211,102,0.4); }
}
@media (max-width: 600px) { .hmd-wa-float { bottom: 16px; right: 16px; width: 50px; height: 50px; } .hmd-wa-float svg { width: 26px; height: 26px; } }
@media (max-width: 380px) { .hmd-wa-float { bottom: 12px; right: 12px; width: 46px; height: 46px; } }

/* ================================================================
   PRINT
   ================================================================ */
@media print {
    .hmd-sidebar, .hmd-wa-float, .hmd-sidebar-whatsapp, .hmd-author-socials { display: none !important; }
    .hmd-single-container { grid-template-columns: 1fr !important; }
    .hmd-single-content { font-size: 11pt; line-height: 1.6; }
}
