/*
Theme Name: Himalaya Blog (Kadence Child)
Theme URI: https://thehimalaya.co.in
Description: Child theme of Kadence that replicates the main Himalaya Composites & Precast website's header and footer for the WordPress blog (thehimalaya.co.in/blog).
Author: Himalaya Composites & Precast Pvt. Ltd.
Author URI: https://thehimalaya.co.in
Template: kadence
Version: 1.0.1
Text Domain: himalaya-blog
*/

/* ================================================================
   This stylesheet ONLY contains small overrides so the WordPress
   content area (post lists, single posts, pages, comments) blends
   in with the Himalaya site styling that is loaded from
   https://thehimalaya.co.in/assets/css/style.css (enqueued in
   functions.php). The header & footer markup itself is an exact
   copy of the main site's header/footer (see header.php / footer.php).
   ================================================================ */

/* ----------------------------------------------------------------
   Remove default bullet markers from the replicated header
   navigation and footer link lists.
   On the main site, "ul, ol { list-style: none }" resets these,
   but on the WordPress blog the parent Kadence theme's list styles
   load with the same/higher priority and win, so a "•" bullet shows
   before/around the Home/About/Products/.../Quick Links/Products
   footer links. This restores the intended bullet-free look without
   touching .entry-content or .widget lists (which intentionally keep
   list bullets, see rules further below).
   ---------------------------------------------------------------- */
.nav-list,
.nav-list li,
.dropdown,
.dropdown li,
.sub-dropdown,
.sub-dropdown li,
.footer-links,
.footer-links li,
.footer-contact-list,
.footer-contact-list li {
    list-style: none;
}

/* Keep WordPress content centered and at the same width as the
   rest of the site (.container = max-width 1440px) */
.content-container.site-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 48px 24px;
    width: 100%;
    box-sizing: border-box;
}

#main.site-main {
    width: 100%;
}

/* Typography inside posts/pages - matches .blog-content on the main site */
.entry-content {
    color: var(--body-text, #1e293b);
    line-height: 1.8;
}
.entry-content p { margin-bottom: 18px; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin: 32px 0 14px;
    color: #111111;
}
.entry-content ul,
.entry-content ol {
    margin: 16px 0 18px 20px;
    list-style: revert;
}
.entry-content li { margin-bottom: 8px; line-height: 1.7; }
.entry-content img {
    border-radius: var(--radius-md, 8px);
    margin: 20px 0;
}
.entry-content a { color: var(--primary-bright, #00AFEF); }

/* Archive / single post title area */
.entry-header .entry-title,
.page-title {
    font-family: var(--font-heading, 'Rubik', sans-serif);
    color: #111111;
}

/* Comments area spacing */
#comments {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border, #dce8f0);
}

/* Avoid double scroll-to-top / whatsapp buttons if a Kadence
   builder element ever gets re-enabled */
.kadence-mobile-toggle-open #wrapper { overflow: visible; }

/* ----------------------------------------------------------------
   The main site stylesheet applies a global reset
   (*{margin:0;padding:0} and ul,ol{list-style:none}). The rules
   below restore sensible default spacing/appearance for standard
   WordPress elements (blog index, single post, pagination, comments,
   widgets, blocks) so nothing looks broken or unstyled.
   ---------------------------------------------------------------- */

/* Blog index / archive cards */
.site-main { display: block; }
.site-main article {
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border, #dce8f0);
}
.site-main article:last-child {
    border-bottom: none;
}
.entry-header { margin-bottom: 12px; }
.entry-header .entry-title a { color: inherit; text-decoration: none; }
.entry-meta {
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--muted-text, #64748b);
}
.entry-summary p { margin-bottom: 12px; }

/* Pagination */
.pagination,
.nav-links,
.page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
    align-items: center;
}
.page-numbers li { list-style: none; }
.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--border, #dce8f0);
    border-radius: var(--radius-sm, 4px);
    color: var(--body-text, #1e293b);
    text-decoration: none;
}
.page-numbers .current,
.page-numbers a:hover {
    background: var(--primary-bright, #00AFEF);
    border-color: var(--primary-bright, #00AFEF);
    color: #fff;
}

/* Blockquote / code / table inside post content */
.entry-content blockquote {
    margin: 20px 0;
    padding: 12px 20px;
    border-left: 4px solid var(--primary-bright, #00AFEF);
    background: var(--off-white, #f5f8fb);
    font-style: italic;
}
.entry-content pre,
.entry-content code {
    background: var(--off-white, #f5f8fb);
    border-radius: var(--radius-sm, 4px);
    padding: 2px 6px;
    font-family: monospace;
}
.entry-content pre {
    padding: 16px;
    overflow-x: auto;
    margin: 16px 0;
}
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}
.entry-content table th,
.entry-content table td {
    border: 1px solid var(--border, #dce8f0);
    padding: 8px 12px;
    text-align: left;
}

/* Image captions / alignment helpers used by core blocks */
.wp-caption,
.wp-block-image {
    margin: 20px 0;
}
.wp-caption-text,
.wp-block-image figcaption {
    font-size: 13px;
    color: var(--muted-text, #64748b);
    margin-top: 6px;
    text-align: center;
}
.alignleft { float: left; margin: 0 20px 10px 0; }
.alignright { float: right; margin: 0 0 10px 20px; }
.aligncenter { display: block; margin: 16px auto; }

/* Widgets / sidebar (if a sidebar template is ever used) */
.widget { margin-bottom: 32px; }
.widget-title {
    font-family: var(--font-heading, 'Rubik', sans-serif);
    margin-bottom: 14px;
    color: #111111;
}
.widget ul { list-style: revert; margin-left: 20px; }
.widget li { margin-bottom: 8px; }

/* Comment form & list */
#comments .comments-title,
#comments .comment-reply-title {
    margin-bottom: 16px;
    font-family: var(--font-heading, 'Rubik', sans-serif);
}
.comment-list { list-style: none; margin: 0; }
.comment-list .comment-body {
    padding: 16px 0;
    border-bottom: 1px solid var(--border, #dce8f0);
}
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; margin-bottom: 6px; font-weight: 500; }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border, #dce8f0);
    border-radius: var(--radius-sm, 4px);
    font-family: var(--font-body, 'Rubik', sans-serif);
    font-size: 15px;
    box-sizing: border-box;
}
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit input[type="submit"] {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius-md, 8px);
    background: var(--primary-bright, #00AFEF);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
}
.comment-form .form-submit input[type="submit"]:hover {
    background: var(--primary-dark, #1d3467);
}

/* Search form (if used) */
.search-form input[type="search"] {
    padding: 10px 14px;
    border: 1px solid var(--border, #dce8f0);
    border-radius: var(--radius-sm, 4px);
}
.search-form input[type="submit"] {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm, 4px);
    background: var(--primary-bright, #00AFEF);
    color: #fff;
    cursor: pointer;
    margin-left: 8px;
}

/* ================================================================
   SINGLE POST - professional, responsive "card" content area
   ================================================================ */

/* Flat, card-free content area - matches the clean, no-border look of
   the reference design (content sits directly on the page background,
   relying on heading/section styling rather than a boxed container). */
.entry-content-wrap {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    box-sizing: border-box;
}

/* Headings inside the post body */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
    font-family: var(--font-heading, 'Rubik', sans-serif);
    font-weight: 700;
    line-height: 1.35;
    scroll-margin-top: 110px; /* keeps headings visible below sticky site header when jumped to */
}
.entry-content > *:first-child {
    margin-top: 0;
}
.entry-content h2 {
    font-size: clamp(1.3rem, 2.6vw, 1.6rem);
    margin-top: 40px;
    padding: 2px 0 2px 16px;
    border-left: 4px solid var(--primary-bright, #00AFEF);
}
.entry-content h3 {
    font-size: clamp(1.1rem, 2.1vw, 1.3rem);
    color: var(--primary-dark, #1d3467);
    margin-top: 28px;
}
.entry-content h4 {
    font-size: 1.05rem;
    color: var(--primary-dark, #1d3467);
    margin-top: 22px;
}

/* Body text */
.entry-content p,
.entry-content li {
    font-size: 1rem;
}
.entry-content strong { color: #111111; }

/* ----------------------------------------------------------------
   Consistent vertical rhythm for single-post content.
   WordPress core block-library CSS (p.wp-block-paragraph,
   ul.wp-block-list, h2.wp-block-heading, etc.) has the SAME
   specificity as the ".entry-content p / h2 / ul" rules above and
   loads AFTER this stylesheet, so it was winning cascade ties and
   producing uneven "kam-zyada" spacing - e.g. 32px between
   paragraphs but only 8px between list items, and headings landing
   a few px off the values set above. The selectors below combine
   BOTH classes already present on the content wrapper
   (entry-content single-content) for higher specificity
   (0,2,x > 0,1,1), so these values always win and give every
   element type one predictable rhythm.
   ---------------------------------------------------------------- */
.entry-content.single-content p,
.entry-content.single-content ul,
.entry-content.single-content ol,
.entry-content.single-content blockquote,
.entry-content.single-content .wp-block-image,
.entry-content.single-content .wp-block-table {
    margin-top: 0;
    margin-bottom: 20px;
}
.entry-content.single-content h2 {
    margin-top: 35px;
    margin-bottom: 18px;
}
.entry-content.single-content h3 {
    margin-top: 35px;
    margin-bottom: 14px;
}
.entry-content.single-content h4 {
    margin-top: 28px;
    margin-bottom: 12px;
}
/* A heading immediately followed by another heading (e.g. "Key
   Benefits..." h2 -> "1. Lightweight Handling" h3) is a
   title/subtitle pair - keep them close instead of the full gap. */
.entry-content.single-content h2 + h3,
.entry-content.single-content h2 + h4,
.entry-content.single-content h3 + h4 {
    margin-top: 6px;
}
.entry-content.single-content ul,
.entry-content.single-content ol {
    padding-left: 22px;
}
.entry-content.single-content li {
    margin-bottom: 10px;
    line-height: 1.7;
}
/* Avoid stacking the last item's gap on top of the list's own
   bottom margin (would otherwise total 34px vs 24px for paragraphs). */
.entry-content.single-content li:last-child {
    margin-bottom: 0;
}
/* Safety net for the rare post that opens directly with a heading
   (normally the TOC or an intro paragraph is first). */
.entry-content.single-content > h2:first-child,
.entry-content.single-content > h3:first-child,
.entry-content.single-content > h4:first-child {
    margin-top: 0;
}
/* No trailing gap before the share-buttons row / end of content. */
.entry-content.single-content > *:last-child {
    margin-bottom: 0;
}

/* Responsive images */
.entry-content img {
    max-width: 100%;
    height: auto;
}

/* Links get a subtle underline on hover for clarity */
.entry-content a {
    text-decoration: underline;
    text-decoration-color: rgba(0, 175, 239, 0.35);
    text-underline-offset: 2px;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
.entry-content a:hover {
    color: var(--primary-dark, #1d3467);
    text-decoration-color: currentColor;
}

/* Tables - horizontally scrollable wrapper for mobile so wide tables
   never break the layout (wrapper div added via PHP content filter) */
.hm-table-scroll {
    overflow-x: auto;
    margin: 24px 0;
    border: 1px solid var(--border, #dce8f0);
    border-radius: var(--radius-sm, 4px);
    -webkit-overflow-scrolling: touch;
}
.hm-table-scroll table {
    margin: 0;
    min-width: 480px;
}
.entry-content table th {
    background: var(--off-white, #f4f8fc);
    font-weight: 600;
    color: #111111;
}
.entry-content table tr:nth-child(even) td {
    background: rgba(244, 248, 252, 0.5);
}

/* ----------------------------------------------------------------
   Auto Table of Contents (generated via `the_content` filter)
   ---------------------------------------------------------------- */
.hm-toc {
    background: var(--off-white, #f4f8fc);
    border: 1px solid var(--border, #dce8f0);
    border-left: 4px solid var(--primary-bright, #00AFEF);
    border-radius: var(--radius-md, 8px);
    padding: 20px 24px;
    margin: 0 0 32px;
}
.hm-toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 15px;
}
.hm-toc-title {
    font-family: var(--font-heading, 'Rubik', sans-serif);
    font-weight: 700;
    font-size: 1.05rem;
    color: #111111;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hm-toc-title i { color: var(--primary-bright, #00AFEF); }
.hm-toc-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-dark, #1d3467);
    font-size: 0.9rem;
    padding: 4px 6px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.hm-toc-toggle.hm-toc-collapsed { transform: rotate(-90deg); }
.hm-toc-list {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 0px;
}
.hm-toc-list.hm-toc-collapsed { display: none; }
.hm-toc-list li { margin: 0; }
.hm-toc-list a {
    color: var(--body-text, #1e293b);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.5;
    display: inline-block;
    transition: color 0.2s ease, padding-left 0.2s ease;
}
.hm-toc-list a:hover {
    color: var(--primary-bright, #00AFEF);
    padding-left: 4px;
}
@media (max-width: 600px) {
    .hm-toc { padding: 16px 18px; }
}

/* ----------------------------------------------------------------
   Social sharing row below the single post content. Reuses the main
   site's .blog-share / .share-btn / .share-facebook / .share-linkedin /
   .share-whatsapp classes (assets/css/style.css) for visual consistency.
   .share-twitter and .share-copy are new - only defined here.
   ---------------------------------------------------------------- */
.hm-share {
    flex-wrap: wrap;
}
.hm-share-label {
    flex-shrink: 0;
}
/* The main site's generic ".entry-content a" rule (underline + bright
   blue color) would otherwise override the share buttons' own colors,
   so re-assert white text / no underline here with matching specificity. */
.entry-content .hm-share a.share-btn,
.entry-content .hm-share a.share-btn:hover {
    color: var(--white, #ffffff);
    text-decoration: none;
}
.share-twitter {
    background: #000000;
    color: var(--white, #ffffff);
}
.share-copy {
    background: var(--off-white, #f4f8fc);
    border: 1px solid var(--border, #dce8f0);
    color: var(--body-text, #1e293b);
    font-family: inherit;
    cursor: pointer;
}
.share-copy:hover {
    background: var(--border, #dce8f0);
}
.share-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}
.hm-copy-link.hm-copied {
    background: var(--off-white, #f4f8fc);
    color: var(--primary-dark, #1d3467);
    border-color: var(--primary-bright, #00AFEF);
}
@media (max-width: 600px) {
    .hm-share {
        gap: 8px;
    }
    .hm-share-label {
        width: 100%;
        margin-bottom: 4px;
    }
}

/* ----------------------------------------------------------------
   Sticky "Contact Information" box in the sidebar of single posts
   ---------------------------------------------------------------- */

/* Stretch the sidebar's inner wrapper to the full height of the
   article (the grid item itself already stretches to match #main
   via CSS Grid's default align-items:stretch) so the sticky box
   below has room to stick while the long article scrolls. */
.primary-sidebar .sidebar-inner-wrap {
    height: 100%;
    box-sizing: border-box;
}

.hm-sidebar-contact {
    position: sticky;
    top: 90px;
    background: var(--white, #ffffff);
    border: 1px solid var(--border, #dce8f0);
    border-radius: var(--radius-md, 8px);
    padding: 24px;
    margin-bottom: 24px;
    box-sizing: border-box;
}
/* Title inherits the same .widget-title look (dark navy, uppercase,
   bottom border) used by the main site's other sidebar widgets - no
   color override needed now that the box is a white card. */
.hm-contact-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hm-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--body-text, #1e293b);
}
.hm-contact-list li i {
    color: var(--primary-bright, #00AFEF);
    margin-top: 3px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}
.hm-contact-list a {
    color: var(--primary-bright, #00AFEF);
    text-decoration: none;
}
.hm-contact-list a:hover {
    color: var(--primary-dark, #1d3467);
}
.hm-contact-btn {
    display: block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 10px;
    color:white !important;
}
.hm-contact-btn:last-child { margin-bottom: 0; }

/* Below the breakpoint where the sidebar stacks under the content,
   sticky positioning isn't useful (and could overlap the footer) -
   let the box sit in normal flow instead. */
@media (max-width: 1024px) {
    .primary-sidebar .sidebar-inner-wrap {
        height: auto;
    }
    .hm-sidebar-contact {
        position: static;
    }
}