/* ==========================================================================
   PERU BY LOCALS - RESPONSIVE STYLESHEET
   Comprehensive Mobile & Tablet Layout Optimization
   ========================================================================== */

/* Universal Mobile Overflow Protection */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
}

/* Global Responsive Embeds & Tables */
.article-main table,
.post-content table,
.comparison-table,
.checklist-table,
.wp-block-table,
table {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
}

.article-main img,
.post-content img,
figure.wp-block-image,
.wp-caption,
img {
    max-width: 100% !important;
    height: auto !important;
}

/* Mobile-only elements strictly hidden on desktop (> 1024px) */
.sub-arrow-toggle,
.mobile-drawer-top,
.mobile-drawer-quick-actions,
.mobile-drawer-footer,
.mobile-menu-close,
.mobile-menu-overlay {
    display: none !important;
}

/* ==========================================================================
   LARGE TABLETS & SMALL LAPTOPS (<= 1100px)
   ========================================================================== */
@media screen and (max-width: 1100px) {
    /* Hide floating share dock to prevent obscuring text */
    .floating-share-dock {
        display: none !important;
    }

    .content.single.blog {
        gap: 32px;
        padding: 36px 20px 70px;
    }

    aside.sidebarRight {
        flex: 0 0 310px;
    }
}

/* ==========================================================================
   TABLET & MOBILE NAVIGATION DRAWER BREAKPOINT (<= 1024px)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    /* Header Container Stacking & Height */
    header.pbl-main-header {
        position: sticky !important;
        top: 0 !important;
        z-index: 99999 !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: #00786e !important;
    }

    header.header .container {
        padding: 10px 16px;
        position: relative;
    }

    .brand-logo {
        max-width: 165px;
        height: auto;
    }

    /* Mobile Hamburger Toggle Button */
    .mobile-nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 38px !important;
        height: 34px !important;
        padding: 7px 5px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.28) !important;
        border-radius: 8px !important;
        cursor: pointer !important;
        z-index: 10001 !important;
        transition: background 0.2s ease, border-color 0.2s ease !important;
    }

    .mobile-nav-toggle:hover,
    .mobile-nav-toggle:focus {
        background: rgba(255, 255, 255, 0.2) !important;
        outline: none;
    }

    .mobile-nav-toggle span {
        display: block !important;
        width: 22px !important;
        height: 2.5px !important;
        background-color: #ffffff !important;
        border-radius: 2px !important;
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease !important;
        transform-origin: center !important;
    }

    /* Animated Hamburger to X */
    .mobile-nav-toggle.is-active span:nth-child(1) {
        transform: translateY(7.5px) rotate(45deg) !important;
    }
    .mobile-nav-toggle.is-active span:nth-child(2) {
        opacity: 0 !important;
    }
    .mobile-nav-toggle.is-active span:nth-child(3) {
        transform: translateY(-7.5px) rotate(-45deg) !important;
    }

    /* Backdrop Overlay (Sibling to #menu inside header, LOWER z-index) */
    .mobile-menu-overlay {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background-color: rgba(0, 0, 0, 0.65) !important;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        z-index: 100 !important; /* Stacks below drawer */
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transition: opacity 0.3s ease, visibility 0.3s ease !important;
    }

    .mobile-menu-overlay.active {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Mobile Menu Drawer Architecture (HIGHER z-index than overlay) */
    #menu {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 320px !important;
        max-width: 86vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        background: #002824 !important; /* Signature deep Andean emerald teal */
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        z-index: 200 !important; /* Stacks IN FRONT OF overlay (100) */
        box-shadow: 12px 0 36px rgba(0, 0, 0, 0.55) !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateX(-100%) !important;
        visibility: hidden !important;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease !important;
    }

    #menu.active,
    #menu.mobile-open {
        transform: translateX(0) !important;
        visibility: visible !important;
    }

    /* Drawer Header Branding & Close Button */
    .mobile-drawer-top {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 16px 18px !important;
        background: #001a18 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 10 !important;
    }

    .mobile-drawer-top img {
        max-width: 140px !important;
        height: auto !important;
    }

    .mobile-menu-close {
        position: static !important;
        width: 36px !important;
        height: 36px !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.25) !important;
        border-radius: 50% !important;
        color: #ffffff !important;
        font-size: 24px !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        transition: background 0.2s ease, transform 0.2s ease !important;
    }

    .mobile-menu-close:hover {
        background: var(--pbl-orange, #ff8416) !important;
        border-color: var(--pbl-orange, #ff8416) !important;
        transform: rotate(90deg) !important;
    }

    /* High-Contrast Language Switcher in Drawer */
    .mobile-drawer-quick-actions {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
        padding: 14px 18px !important;
        background: #001f1c !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    .drawer-lang-btn {
        flex: 1 !important;
        text-align: center !important;
        padding: 9px 12px !important;
        border-radius: 8px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.12) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        text-decoration: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        transition: all 0.2s ease !important;
    }

    .drawer-lang-btn.active {
        background: var(--pbl-orange, #ff8416) !important;
        border-color: var(--pbl-orange, #ff8416) !important;
        color: #ffffff !important;
        box-shadow: 0 3px 10px rgba(255, 132, 22, 0.45) !important;
    }

    /* Drawer Menu List Container */
    #menu .menu-header {
        padding: 0 !important;
        flex: 1 1 auto !important;
    }

    #menu ul.menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
    }

    /* Top-level Menu Item Rows */
    #menu ul.menu > li {
        width: 100% !important;
        position: relative !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    }

    #menu ul.menu > li > a {
        display: block !important;
        padding: 15px 58px 15px 18px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        color: #ffffff !important; /* Crisp pure white */
        white-space: normal !important;
        text-decoration: none !important;
        border-radius: 0 !important;
        transition: background 0.15s ease, color 0.15s ease !important;
    }

    #menu ul.menu > li:hover > a,
    #menu ul.menu > li.open > a {
        color: #fed7aa !important;
        background-color: rgba(255, 255, 255, 0.06) !important;
    }

    /* Remove Desktop Pseudo-chevrons */
    #menu ul.menu > li > a::after,
    #menu ul.menu > li.megamenu > a::after,
    #menu ul.menu > li:has(> ul.sub-menu) > a::after {
        display: none !important;
        content: none !important;
    }

    /* Dedicated High-Contrast Chevron Toggle Button (Firmly anchored to top header row) */
    .sub-arrow-toggle {
        position: absolute !important;
        top: 7px !important; /* Firmly anchored to top row - NEVER drifts down when expanded! */
        bottom: auto !important;
        transform: none !important;
        right: 12px !important;
        width: 36px !important;
        height: 36px !important;
        background: rgba(255, 132, 22, 0.15) !important;
        border: 1px solid rgba(255, 132, 22, 0.35) !important;
        border-radius: 8px !important;
        color: var(--pbl-orange, #ff8416) !important;
        font-size: 13px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        cursor: pointer !important;
        z-index: 5 !important;
        transition: background 0.25s ease, border-color 0.25s ease !important;
    }

    .sub-arrow-toggle:hover,
    .sub-arrow-toggle.active {
        background: var(--pbl-orange, #ff8416) !important;
        color: #ffffff !important;
        border-color: var(--pbl-orange, #ff8416) !important;
        box-shadow: 0 2px 8px rgba(255, 132, 22, 0.35) !important;
    }

    .sub-arrow-toggle i {
        display: inline-block !important;
        transition: transform 0.25s ease !important;
    }

    .sub-arrow-toggle.active i,
    li.open > .sub-arrow-toggle i {
        transform: rotate(180deg) !important;
        color: #ffffff !important;
    }

    /* Mobile Sub-menus (Accordion Dropdown Container) */
    #menu ul.menu li ul.sub-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background-color: #001a18 !important;
        padding: 4px 0 !important;
        margin: 0 !important;
        display: none !important;
        flex-direction: column !important;
        list-style: none !important;
    }

    #menu ul.menu li.open > ul.sub-menu {
        display: flex !important;
    }

    /* Regular 1-level dropdown sub-items */
    #menu ul.menu li:not(.megamenu) > ul.sub-menu > li a {
        color: #e2e8f0 !important;
        font-size: 13.5px !important;
        font-weight: 500 !important;
        padding: 10px 18px 10px 28px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
        display: block !important;
        line-height: 1.4 !important;
        text-decoration: none !important;
        transition: color 0.15s ease, background 0.15s ease !important;
    }

    #menu ul.menu li:not(.megamenu) > ul.sub-menu > li a:hover,
    #menu ul.menu li:not(.megamenu) > ul.sub-menu > li a:focus {
        color: var(--pbl-orange, #ff8416) !important;
        background-color: rgba(255, 255, 255, 0.06) !important;
        padding-left: 32px !important;
    }

    /* Megamenus Mobile Layout & 2nd-Level Accordions */
    #menu ul.menu li.megamenu > ul.sub-menu {
        padding: 0 !important;
        gap: 0 !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li {
        width: 100% !important;
        position: relative !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
        padding: 0 !important;
        border-right: none !important;
    }

    /* Megamenu Category Header Links */
    #menu ul.menu li.megamenu > ul.sub-menu > li > a {
        color: #2dd4bf !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        padding: 12px 52px 12px 24px !important;
        display: block !important;
        text-decoration: none !important;
        background: rgba(45, 212, 191, 0.06) !important;
        border-bottom: none !important;
        margin-bottom: 0 !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li > .sub-arrow-toggle {
        top: 5px !important; /* Firmly anchored to megamenu category header */
        bottom: auto !important;
        transform: none !important;
        right: 10px !important;
        width: 32px !important;
        height: 32px !important;
        background: rgba(45, 212, 191, 0.15) !important;
        border-color: rgba(45, 212, 191, 0.35) !important;
        color: #2dd4bf !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li > .sub-arrow-toggle.active {
        background: #2dd4bf !important;
        color: #002824 !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li > .sub-arrow-toggle.active i,
    #menu ul.menu li.megamenu > ul.sub-menu > li.open > .sub-arrow-toggle i {
        transform: rotate(180deg) !important;
        color: #002824 !important;
    }

    /* Megamenu 2nd-level sub-links container */
    #menu ul.menu li.megamenu > ul.sub-menu > li > ul.sub-menu {
        display: none !important;
        background: #001210 !important;
        padding: 4px 0 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.03) !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li.open > ul.sub-menu {
        display: flex !important;
        flex-direction: column !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li > ul.sub-menu li a {
        color: #cbd5e1 !important;
        font-size: 13px !important;
        font-weight: 400 !important;
        padding: 9px 18px 9px 34px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.03) !important;
        display: block !important;
        line-height: 1.35 !important;
        text-decoration: none !important;
        border-left: none !important;
        border-radius: 0 !important;
        transition: color 0.15s ease, background 0.15s ease !important;
    }

    #menu ul.menu li.megamenu > ul.sub-menu > li > ul.sub-menu li a:hover,
    #menu ul.menu li.megamenu > ul.sub-menu > li > ul.sub-menu li a:focus {
        color: var(--pbl-orange, #ff8416) !important;
        background-color: rgba(255, 255, 255, 0.06) !important;
        padding-left: 38px !important;
    }

    #menu ul.menu li ul.sub-menu li a strong {
        color: #94a3b8 !important;
        font-size: 11.5px !important;
        font-weight: 400 !important;
        display: block !important;
        margin-top: 2px !important;
    }

    /* Mobile Drawer Sticky WhatsApp Footer */
    .mobile-drawer-footer {
        padding: 16px 18px 24px !important;
        background: #001a18 !important;
        border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
        margin-top: auto !important;
    }

    .drawer-wa-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        background: #25d366 !important;
        color: #ffffff !important;
        font-size: 14px !important;
        font-weight: 700 !important;
        padding: 12px 16px !important;
        border-radius: 8px !important;
        text-decoration: none !important;
        box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35) !important;
        transition: transform 0.2s ease !important;
    }

    .drawer-wa-btn i {
        font-size: 18px !important;
    }

    .drawer-wa-btn:active {
        transform: scale(0.98) !important;
    }

    /* Single Post Layout Stack */
    .content.single.blog {
        flex-direction: column !important;
        padding: 28px 16px 60px !important;
        gap: 36px !important;
    }

    .content.single.blog article.article-main {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }

    aside.sidebarRight {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .content.single.blog h1 {
        font-size: 28px !important;
        line-height: 1.25 !important;
    }
}

/* ==========================================================================
   TABLETS & MEDIUM SMARTPHONES (<= 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Topbar: Compact Single-Line Bar */
    .pbl-topbar {
        padding: 6px 0 !important;
    }

    .topbar-container {
        justify-content: space-between !important;
        align-items: center !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        padding: 0 14px !important;
    }

    .topbar-left {
        gap: 10px !important;
        flex-wrap: nowrap !important;
    }

    .live-status-pill,
    .topbar-divider,
    .topbar-left a[href^="mailto:"],
    .topbar-cta,
    .topbar-right .lang {
        display: none !important;
    }

    .topbar-whatsapp {
        font-size: 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        color: #2dd4bf !important;
        font-weight: 600 !important;
        text-decoration: none !important;
    }

    .topbar-whatsapp i {
        font-size: 14px !important;
        color: #25d366 !important;
    }

    .topbar-right {
        gap: 6px !important;
        flex-wrap: nowrap !important;
    }

    .lang-switch-pills {
        padding: 2px !important;
        background: rgba(255, 255, 255, 0.12) !important;
    }

    .lang-pill {
        font-size: 10.5px !important;
        padding: 3px 8px !important;
    }

    /* Hero Section Scaling */
    .blog-hero {
        padding: 40px 16px 36px !important;
    }

    .blog-hero h1 {
        font-size: 30px !important;
        line-height: 1.22 !important;
        margin-bottom: 12px !important;
    }

    .blog-hero p {
        font-size: 15px !important;
        line-height: 1.5 !important;
        margin-bottom: 24px !important;
    }

    /* Search Box Input Font Size (prevents iOS auto-zoom) */
    .blog-search-box {
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    .blog-search-box input {
        font-size: 16px !important;
        padding: 13px 18px 13px 46px !important;
    }

    .blog-search-box .search-icon {
        font-size: 16px !important;
        left: 16px !important;
    }

    /* Category Filter Bar: Swipeable Horizontal Carousel */
    .category-filter-bar {
        display: flex !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 8px 14px 16px 14px !important;
        margin: 22px -16px 16px -16px !important;
        gap: 8px !important;
        scrollbar-width: none !important;
    }

    .category-filter-bar::-webkit-scrollbar {
        display: none !important;
    }

    .filter-btn {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
        font-size: 13px !important;
        padding: 7px 15px !important;
        border-radius: 20px !important;
    }

    /* Blog Grid Cards */
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
        gap: 22px !important;
        margin: 24px 0 50px !important;
    }

    /* High-Converting In-Content CTA Box Mobile Stack */
    .pbl-cta-box {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        padding: 24px 20px !important;
        gap: 18px !important;
        margin: 32px 0 !important;
        border-radius: 14px !important;
    }

    .pbl-cta-box > div {
        width: 100% !important;
        text-align: center !important;
    }

    .pbl-cta-box h4 {
        font-size: 20px !important;
        line-height: 1.3 !important;
        margin-bottom: 8px !important;
        text-align: center !important;
    }

    .pbl-cta-box p {
        font-size: 14.5px !important;
        line-height: 1.5 !important;
        text-align: center !important;
    }

    .pbl-cta-btn {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 13px 20px !important;
        font-size: 15px !important;
        white-space: normal !important;
        box-sizing: border-box !important;
    }

    /* Contact Specialist Block Stack (#contactus) */
    #contactus {
        padding: 35px 0 !important;
        margin: 30px 0 0 !important;
    }

    #contactus .container {
        flex-direction: column !important;
        text-align: center !important;
        padding: 24px 18px !important;
        gap: 20px !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06) !important;
    }

    .contactleft {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
    }

    .contactleft figure {
        width: 80px !important;
        height: 80px !important;
        margin: 0 auto !important;
        flex-shrink: 0 !important;
        border-radius: 50% !important;
        overflow: hidden !important;
    }

    .contactleft figure img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: 60% center !important;
        display: block !important;
    }

    .contactleft p {
        text-align: center !important;
    }

    .contactright {
        text-align: center !important;
        align-items: center !important;
        gap: 14px !important;
    }

    .contactright p:first-child {
        border-left: none !important;
        border-top: 3px solid var(--pbl-orange, #ff8416) !important;
        padding-left: 0 !important;
        padding-top: 14px !important;
        text-align: center !important;
        font-size: 14.5px !important;
    }

    .contactright p:last-child {
        justify-content: center !important;
        text-align: center !important;
    }

    /* Footer Responsive Grid */
    .footer-grid-container {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
        padding-top: 30px !important;
    }

    .footer-newsletter-card {
        padding: 24px 18px !important;
    }

    .newsletter-input-group {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .newsletter-btn {
        width: 100% !important;
        justify-content: center !important;
    }

    .footer-trust-ribbon .container {
        flex-direction: column !important;
        gap: 16px !important;
        align-items: flex-start !important;
    }

    .sub-bar-container {
        flex-direction: column !important;
        gap: 12px !important;
        text-align: center !important;
    }

    .sub-bar-links {
        justify-content: center !important;
        flex-wrap: wrap !important;
    }

    /* Perfectly Aligned & Spaced Floating Action Widgets */
    .floating-whatsapp-widget {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 99999 !important;
        animation: none !important;
        margin: 0 !important;
    }

    .whatsapp-btn-pill {
        padding: 0 !important;
        width: 48px !important;
        height: 48px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.28) !important;
        border: 2px solid #22c55e !important;
        background: #ffffff !important;
    }

    .whatsapp-btn-pill .avatar-wrap {
        width: 44px !important;
        height: 44px !important;
        position: relative !important;
    }

    .whatsapp-btn-pill .avatar-wrap img {
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        display: block !important;
    }

    .whatsapp-btn-pill .online-indicator {
        position: absolute !important;
        bottom: 1px !important;
        right: 1px !important;
        width: 12px !important;
        height: 12px !important;
        background: #22c55e !important;
        border: 2px solid #ffffff !important;
        border-radius: 50% !important;
        z-index: 2 !important;
    }

    .whatsapp-btn-text,
    .whatsapp-icon-glow {
        display: none !important;
    }

    /* Back-to-Top Button Positioned on LEFT side (opposite to WhatsApp on the right) */
    .back-to-top-ring {
        position: fixed !important;
        bottom: 20px !important;
        left: 20px !important;
        right: auto !important;
        width: 48px !important;
        height: 48px !important;
        padding: 0 !important;
        margin: 0 !important;
        z-index: 99990 !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        border-radius: 50% !important;
        box-sizing: border-box !important;
    }

    .back-to-top-ring svg {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        transform: rotate(-90deg) !important;
        transform-origin: 50% 50% !important;
        pointer-events: none !important;
        overflow: visible !important;
    }

    .back-to-top-ring i {
        font-size: 15px !important;
        line-height: 1 !important;
        position: relative !important;
        z-index: 2 !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .back-to-top-ring.show {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    .back-to-top-ring:not(.show) {
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(15px) !important;
        pointer-events: none !important;
    }
}

/* ==========================================================================
   SMALL SMARTPHONES (<= 576px)
   ========================================================================== */
@media screen and (max-width: 576px) {
    /* Logo & Header Actions */
    .brand-logo {
        max-width: 145px !important;
    }

    .header-actions {
        gap: 8px !important;
    }

    .btn-primary-glow {
        padding: 7px 12px !important;
        font-size: 12px !important;
        letter-spacing: 0 !important;
    }

    .btn-primary-glow i {
        font-size: 12px !important;
    }

    /* Single Article Typography */
    .content.single.blog h1 {
        font-size: 24px !important;
        line-height: 1.25 !important;
    }

    .post-meta-top {
        gap: 8px !important;
        font-size: 12.5px !important;
    }

    .article-body {
        font-size: 16px !important;
        line-height: 1.7 !important;
    }

    .article-body h2 {
        font-size: 21px !important;
        line-height: 1.3 !important;
        margin-top: 30px !important;
        margin-bottom: 14px !important;
    }

    .article-body h3 {
        font-size: 18px !important;
        line-height: 1.35 !important;
        margin-top: 24px !important;
    }

    /* Table of Contents */
    .blog-toc,
    .toc-container {
        padding: 14px 16px !important;
        margin: 24px 0 !important;
        border-radius: 8px !important;
    }

    .toc-title,
    .blog-toc-header {
        font-size: 16px !important;
    }

    /* FAQ Accordion Elements */
    .pbl-faq-question {
        padding: 13px 14px !important;
        font-size: 14.5px !important;
        line-height: 1.4 !important;
    }

    .pbl-faq-answer {
        padding: 14px !important;
        font-size: 14px !important;
    }

    /* Callout Boxes */
    .tip-box,
    .note-box,
    .cultural-box,
    .alert-box {
        padding: 14px 15px !important;
        margin: 20px 0 !important;
        border-radius: 8px !important;
        font-size: 14.5px !important;
    }

    /* Author Card */
    .author-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px 16px !important;
        gap: 14px !important;
    }

    .author-avatar img {
        margin: 0 auto !important;
    }

    /* Blog Grid: Single Card Column */
    .blog-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ==========================================================================
   EXTRA COMPACT SMARTPHONES (<= 380px)
   ========================================================================== */
@media screen and (max-width: 380px) {
    header.header .container {
        padding: 8px 10px !important;
    }

    .brand-logo {
        max-width: 128px !important;
    }

    .btn-primary-glow {
        padding: 6px 8px !important;
        font-size: 11px !important;
    }

    .btn-primary-glow span {
        display: none !important;
    }

    .mobile-nav-toggle {
        width: 34px !important;
        height: 32px !important;
        padding: 6px 4px !important;
    }

    .mobile-nav-toggle span {
        width: 19px !important;
    }

    .blog-hero h1 {
        font-size: 26px !important;
    }
}
