/*
Theme Name: Galaxy v1.8.3 PREMIUM COMMENTS
Theme URI: https://alexrudson.clica.site/
Author: Alex Rudson (Replicated by Antigravity)
Author URI: f:/ALEX RUDSON/23- blog alex rudson/backup blogger alex rudson/
Description: WordPress replication of the Galaxy Blogger theme with Premium Comments and Social Sharing.
Version: 1.8.3
License: GNU General Public License v2 or later
Text Domain: galaxy-rep
*/

:root {
    --body-font: 'Open Sans', sans-serif;
    --title-font: 'Open Sans', sans-serif;
    --main-color: #002ce6;
    --main-hover: #001ba1;
    --title-color: #161619;
    --text-font: 'Open Sans', sans-serif;
    --bg-color: #f3f8fb;
    --white-color: #ffffff;
    --black-color: #000000;
    --header-bg: #ffffff;
    --top-bar-bg: #171717;
    --dark-bg: #292929;
    --dark-widget-bg: #383838;
    --dark-text: #c1c1c1;
    --dark-title: #ffffff;

    /* Social Brand Colors */
    --facebook: #3b5998;
    --twitter: #00acee;
    --whatsapp: #25d366;
    --reddit: #ff4500;
    --pinterest: #bd081c;
    --threads: #000000;
    --instagram: #e1306c;
    --youtube: #ff0000;
}

body {
    background: var(--bg-color);
    font-family: var(--body-font);
    font-size: 14px;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.4em;
}

#outer-wrapper {
    overflow: hidden;
    width: 100%;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Header Sections */
.top-bar {
    background: var(--top-bar-bg);
    height: 41px;
    line-height: 41px;
    color: #e3e3e3;
    font-size: 12px;
}

.top-bar .row {
    display: flex;
    justify-content: space-between;
}

.top-bar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.top-bar ul li a {
    color: #e3e3e3;
    padding: 0 10px;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.top-bar ul.social {
    font-size: 16px;
}

.top-bar ul.social li a {
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 30px;
}

.top-bar ul.social li a svg {
    display: block;
    width: 14px;
    height: 14px;
}

#Menu-GalaxyNew {
    background: var(--header-bg);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    /* Slightly taller for better logo clearance */
}

/* Video Preview Styles */
.video-preview-full {
    width: 100%;
    margin-bottom: 25px;
    background: #000;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    width: 100%;
    margin: 20px 0;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure post content containers are properly limited */
.post-body {
    width: 100%;
    clear: both;
    line-height: 1.8;
}

.post-body iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto;
}

.post-tags-container a {
    text-decoration: none;
    color: #333;
}

.post-tags-container a:hover {
    color: var(--main-color);
}

.post-content-wrap {
    display: flex;
    padding: 20px;
}

.has-video .post-content-wrap {
    padding-top: 0;
}

.header-left {
    display: flex;
    align-items: center;
}

.SuperLogo-img {
    text-decoration: none;
}

#title-header {
    margin: 0;
    padding-right: 20px;
}

.xx0xx-promenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.xx0xx-promenu ul li a {
    padding: 0 15px;
    color: #111;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
}

.header-right .search-wrap {
    display: flex;
    align-items: center;
}

.mega-mode input:checked+.dark-toggle-label {
    background-color: var(--main-color) !important;
}

.mega-mode input:checked+.dark-toggle-label .dark-toggle-knob {
    left: 24px !important;
    color: var(--main-color) !important;
}

.mega-mode {
    padding-right: 15px;
    display: flex;
    align-items: center;
}

/* Post List Layout */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 10px;
}

.section-header h3 {
    font-size: 14px;
    font-weight: 800;
    text-transform: none;
    /* Changed from uppercase to match original preference */
    color: #333;
    margin: 0;
    letter-spacing: 0.5px;
}

.section-header .view-more {
    font-size: 12px;
    color: #999;
    text-decoration: none;
    font-weight: 600;
}

.blog-posts .grid-posts {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.post-filter {
    background: #fff;
    border-radius: 5px;
    box-shadow: -1px 7px 8px 0 rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: row;
    /* Default list style */
    transition: transform 0.3s ease;
    padding: 8px;
    /* Uniform card padding — thumbnail drop is controlled via margin-top on .post-filter-image */
}

.post-filter:hover {
    transform: translateY(-2px);
    /* No additional shadow to match v1.1 */
}

/* No longer stacking video on homepage */
.post-filter.has-video {
    flex-direction: row;
}

.post-filter-image,
.video-preview-full {
    width: 320px;
    height: 200px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    margin-right: 12px;
    margin-top: 24px;
    /* Push video lower in the card */
    border-radius: 4px;
}

.post-filter-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-filter:hover .post-filter-link img {
    transform: scale(1.05);
}

.label-news-flex {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff0000;
    /* Red box for category as seen in screenshot */
    color: #fff;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
}

.GalaxyPSpeedSet-box {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.entry-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    line-height: 1.3em;
}

.entry-title a {
    color: var(--title-color);
    text-decoration: none;
    transition: color 0.3s;
}

.entry-title a:hover {
    color: var(--main-color);
}

.post-snippet {
    font-size: 13px;
    color: #666;
    line-height: 1.6em;
    margin-bottom: 15px;
}

.post-snip {
    font-size: 12px;
    color: #aaa;
    margin-bottom: 15px;
}

.post-snip .post-author {
    color: #888;
}

.read-more-btn {
    background: #0044cc;
    color: #fff;
    padding: 10px 25px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    align-self: flex-start;
    transition: background 0.3s;
}

.read-more-btn:hover {
    background: #0033aa;
}

/* Breadcrumbs */
.breadcrumb-section {
    padding: 0 0 20px;
    font-size: 14px;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

.breadcrumb-link:hover {
    color: var(--main-color);
}

/* PWA Install Banner (from XML) */
#pwa-install-banner {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: #1a2744;
    color: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: system-ui, -apple-system, sans-serif;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* Iubenda Cookie Consent Adjustments */
#iubenda-cs-preferences-link {
    display: block !important;
}

@media (max-width: 768px) {
    #iubenda-cs-preferences-link {
        display: none !important;
    }
}

/* Sidebar */
.sidebar {
    width: 340px;
    flex-shrink: 0;
}

.sidebar .widget {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: -1px 7px 8px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.widget-title {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.widget-title h3 {
    font-size: 14px;
    text-transform: uppercase;
    color: #333;
    font-weight: 800;
    margin: 0;
}

.widget-title:before {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 10px;
    font-size: 12px;
}

/* Search Widget */
.search-widget-form {
    display: flex !important;
    border: 1px solid #e0e0e0 !important;
    padding: 0 !important;
}

.search-widget-input {
    flex: 1 !important;
    border: none !important;
    padding: 12px 15px !important;
    outline: none !important;
    font-size: 13px !important;
    font-family: inherit !important;
    background: transparent !important;
}

.search-widget-submit {
    background: var(--main-color) !important;
    color: #fff !important;
    border: none !important;
    padding: 0 16px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    height: auto !important;
}

/* Social Grid Widget */
.social-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.social-grid li a {
    display: flex !important;
    align-items: center !important;
    padding: 0 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: opacity 0.3s !important;
    overflow: hidden !important;
    min-height: 40px !important;
}

.social-grid li a:hover {
    opacity: 0.9 !important;
}

.social-grid li a .s-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    align-self: stretch !important;
    border-right: 1px solid rgba(255, 255, 255, 0.2) !important;
    margin-right: 12px !important;
    font-size: 16px !important;
    background: rgba(0, 0, 0, 0.1) !important;
}

.social-grid li a .s-icon i,
.social-grid li a .s-icon svg {
    display: block;
}

.social-grid .facebook {
    background: var(--facebook);
}

.social-grid .twitter {
    background: #000000 !important;
}

.social-grid .whatsapp {
    background: var(--whatsapp);
}

.social-grid .reddit {
    background: var(--reddit);
}

.social-grid .pinterest {
    background: var(--pinterest);
}

.social-grid .threads {
    background: var(--threads);
}

.social-grid .instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-grid .youtube {
    background: var(--youtube);
}

/* Categories Widget */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #eee;
    font-size: 12px;
    font-weight: 600;
}

.category-list li a {
    text-decoration: none;
    color: #333;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.category-list li a:hover {
    color: var(--main-color);
    padding-left: 10px;
}

.category-list li a:before {
    content: '\f101';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.category-list li:hover a:before {
    margin-right: 12px;
}

.category-list li .count {
    background: transparent;
    color: #0044cc;
    font-weight: 700;
    font-size: 12px;
    padding-left: 10px;
}

/* Dark Mode Overrides */
body.dark {
    background: var(--dark-bg);
    color: var(--dark-text);
}

body.dark .post-filter,
body.dark #Menu-GalaxyNew,
body.dark .sidebar .widget {
    background: var(--dark-widget-bg);
    box-shadow: none;
}

body.dark .entry-title a,
body.dark .xx0xx-promenu ul li a,
body.dark .widget-title h3,
body.dark .category-list li a {
    color: var(--dark-title);
}

body.dark .post-snippet {
    color: #8e8e8e;
}

/* Comment Section Styles */
.comments-area {
    transition: background 0.3s ease;
}

.comment-form textarea:focus,
.comment-form input:focus {
    border-color: var(--main-color) !important;
    outline: none;
    box-shadow: 0 0 0 2px rgba(var(--main-color-rgb, 0, 68, 204), 0.1);
}

.comment-reply-link {
    color: var(--main-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    filter: brightness(1.1);
}

/* Dark Mode Overrides for Comments */
body.dark #comments,
body.dark .comments-area {
    background: #1e1e1e !important;
    color: #eee !important;
}

body.dark .comments-title,
body.dark .comment-author {
    color: #fff !important;
}

body.dark .comment-text {
    color: #ccc !important;
}

body.dark .comment-form input,
body.dark .comment-form textarea {
    background: #2a2a2a !important;
    border-color: #333 !important;
    color: #fff !important;
}

body.dark .comment-reply-link {
    color: #fff !important;
}

body.dark .comment-list li {
    border-bottom: 1px solid #333;
}

body.dark .comment-list li:last-child {
    border-bottom: none;
}

/* Media Queries */
@media screen and (max-width: 980px) {
    .container {
        padding: 0 15px;
    }

    .row {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .post-filter {
        flex-direction: column;
    }

    .post-filter-image {
        width: 100%;
        height: auto;
    }
}

/* Social Share Buttons */
.social-share-container {
    margin-top: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.share-label {
    border: 1px solid #eee;
    padding: 6px 15px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.share-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    color: #fff !important;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
}

.share-btn:hover {
    transform: translateY(-3px);
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.share-facebook {
    background: #3b5998;
}

.share-twitter {
    background: #1da1f2;
}

.share-whatsapp {
    background: #25d366;
}

.share-pinterest {
    background: #bd081c;
}

.share-linkedin {
    background: #0077b5;
}

.share-reddit {
    background: #ff4500;
}

.share-telegram {
    background: #0088cc;
}

.share-email {
    background: #888;
}

/* Spam Alert */
.spam-alert {
    background: #fdfdfd;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.spam-line {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-style: italic;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
}

.spam-line:last-child {
    margin-bottom: 0;
}

.spam-line i {
    font-size: 16px;
    width: 20px;
}

.spam-line .dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

/* Dark Mode Social Share */
body.dark .share-label {
    background: #2a2a2a;
    border-color: #444;
    color: #fff;
}

body.dark .spam-alert {
    background: #1e1e1e;
    border-color: #333;
}

body.dark .spam-line {
    color: #bbb;
}

@media screen and (max-width: 600px) {
    .social-share-container {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Mobile Responsiveness Improvements */

@media screen and (max-width: 768px) {

    /* Top Bar Mobile Config */
    .top-bar {
        height: auto;
        line-height: normal;
        padding: 10px 0;
    }

    .top-bar .row {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .top-bar ul.nav1 {
        flex-wrap: wrap;
        justify-content: center;
        margin-bottom: 10px;
    }

    .top-bar ul.nav1 li {
        margin-right: 10px;
        margin-bottom: 5px;
    }

    /* Header Config */
    .header-section {
        flex-direction: column;
        height: auto;
        padding: 15px 0;
        align-items: stretch;
    }

    .header-left {
        justify-content: space-between;
        width: 100%;
        margin-bottom: 15px;
    }

    .SuperLogo-img img {
        height: 35px;
        /* scale down logo */
    }

    /* Search and Dark Mode in Header Right */
    .header-right {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .header-right .search-wrap {
        width: 100%;
        justify-content: space-between;
    }

    .mobile-menu-toggle {
        display: inline-block !important;
        /* show menu icon */
    }

    /* Primary Navigation Menu (Hidden by default, toggled via JS) */
    .xx0xx-promenu {
        margin-left: 0 !important;
        position: absolute;
        top: 100%;
        /* drop below header */
        left: 0;
        right: 0;
        background: var(--header-bg);
        border-top: 1px solid #eee;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 100;
        display: none;
        /* hidden until active */
    }

    body.dark .xx0xx-promenu {
        background: var(--dark-widget-bg);
        border-top-color: #333;
    }

    .xx0xx-promenu.active {
        display: block;
    }

    .xx0xx-promenu ul {
        flex-direction: column;
        padding: 15px 0 !important;
    }

    .xx0xx-promenu ul li {
        width: 100%;
    }

    .xx0xx-promenu ul li a {
        display: block;
        padding: 12px 20px !important;
        border-bottom: 1px solid #f0f0f0;
    }

    body.dark .xx0xx-promenu ul li a {
        border-bottom-color: #333;
    }

    /* Fix Post List Layouts */
    .post-filter-image,
    .video-preview-full {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 16/9;
        /* keeps a good video/image proportion */
        margin-right: 0 !important;
    }

    .post-filter.has-video {
        flex-direction: column !important;
    }

    .post-content-wrap {
        flex-direction: column;
        padding: 15px !important;
    }

    .GalaxyPSpeedSet-box {
        padding: 15px 0 0 0 !important;
    }

    /* Adjust typography for mobile */
    .entry-title {
        font-size: 18px !important;
    }

    .post-snippet {
        font-size: 12px !important;
    }

    /* Widgets and Sidebar Config */
    .sidebar {
        width: 100% !important;
        margin-top: 30px;
    }

    .social-grid {
        grid-template-columns: 1fr !important;
    }
}

@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .SuperLogo-img img {
        height: 30px;
    }

    .entry-title {
        font-size: 16px !important;
    }

    .video-container {
        margin: 10px 0 !important;
    }

    #pwa-install-banner {
        width: 95%;
        padding: 12px;
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   Mobile Accessibility & Responsiveness Fixes (< 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {

    /* 1. Global Safety Nets */
    body {
        overflow-x: hidden !important;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Critical: prevent ALL containers from overflowing horizontally */
    *,
    *::before,
    *::after {
        box-sizing: border-box;
        max-width: 100%;
    }

    /* Single Post: override the inline `padding: 30px` in single.php */
    .post-inner-area {
        padding: 7px !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    /* Ensure main feed column never causes horizontal scroll */
    #feed-view {
        min-width: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        /* Remove excess padding that was causing right-side space in single post */
    }

    /* Reduce gap between post cards on mobile */
    .blog-posts .grid-posts {
        gap: 12px !important;
    }

    /* Fix text justification which causes Chrome mobile to clip text */
    .post-body,
    .post-body p,
    .entry-content,
    .entry-content p {
        text-align: left !important;
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        -webkit-hyphens: auto;
        hyphens: auto;
    }

    .ar-main-container,
    .ar-content-area,
    .ar-sidebar-area {
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box;
        padding-left: 10px;
        padding-right: 10px;
    }

    img,
    iframe,
    video {
        max-width: 100% !important;
        height: auto !important;
    }

    /* 2. Header Fixes */
    .ar-top-bar .ar-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 10px;
    }

    .top-menu,
    .ap-social-menu {
        justify-content: center;
        margin-bottom: 5px;
    }

    .ar-header-main .ar-container {
        flex-direction: column;
        align-items: center;
    }

    .ar-logo-col {
        margin-bottom: 15px;
    }

    .ar-logo-col img {
        max-width: 200px;
        /* Constrain huge logos */
    }

    .ar-search-col {
        width: 100%;
        margin-top: 10px;
        display: flex;
        justify-content: center;
    }

    /* 3. Navigation Tweaks */
    .ar-main-navigation {
        overflow-x: auto;
        white-space: nowrap;
        /* Allow horizontal scroll for simple menus instead of ugly wrapping */
        padding: 10px 0;
    }

    /* 4. Index Grid Re-flow (Card Style) */
    .post-filter {
        flex-direction: column !important;
        /* Stack image and text */
        margin-bottom: 20px;
    }

    .post-filter-image {
        width: 100% !important;
        max-width: 100% !important;
        flex-basis: auto !important;
    }

    .post-filter-image img {
        aspect-ratio: 16/9;
        object-fit: cover;
        width: 100%;
    }

    .GalaxyPSpeedSet-box {
        width: 100% !important;
        padding: 15px !important;
        box-sizing: border-box;
    }

    /* 5. Typography Scaling */
    h1,
    .entry-title {
        font-size: 1.8rem !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.3rem !important;
    }

    /* 6. Single Post Content — Critical Text & Video Fixes */
    .post-body {
        /* Text overflow fix: prevent words from being cut at edge */
        overflow-wrap: break-word !important;
        word-break: break-word !important;
        word-wrap: break-word !important;
        /* Prevent ANY content from overflowing the container */
        overflow: hidden !important;
        /* Comfortable reading padding on mobile */
        padding: 10px 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Ensure the single post wrapper doesn't create horizontal scroll */
    .post-content-wrap,
    .single-post-wrap,
    .post-single,
    article.post {
        overflow: hidden !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    /* All images inside posts must be fully fluid */
    .post-body img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
    }

    /* 16:9 iframe/video wrapper — Full-width responsive video */
    .post-body .ar-video-wrapper,
    .post-body .video-container {
        position: relative !important;
        padding-bottom: 56.25% !important;
        /* 16:9 ratio */
        height: 0 !important;
        overflow: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
        margin: 15px 0 !important;
    }

    .post-body .ar-video-wrapper iframe,
    .post-body .video-container iframe {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
    }

    /* Fallback: bare iframes NOT wrapped — force full width + auto height */
    .post-body>iframe,
    .post-body p>iframe {
        width: 100% !important;
        max-width: 100% !important;
        aspect-ratio: 16 / 9 !important;
        height: auto !important;
        display: block !important;
        margin: 15px 0 !important;
    }

    .ar-social-share-box {
        justify-content: center;
    }

    /* 7. Sidebar Stacking */
    .ar-content-layout {
        display: flex;
        flex-direction: column;
    }

    .ar-sidebar-area {
        margin-top: 30px;
    }
}

/* =====================================================
   MOBILE PRO OPTIMIZATION – BLOG ALEX RUDSON
   ===================================================== */

@media (max-width: 768px) {

    /* segurança contra scroll lateral */
    body {
        overflow-x: hidden !important;
    }

    /* container principal */
    .container {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    /* área interna do post */
    .post-inner-area {
        padding: 4px !important;
        margin: 0 auto !important;
    }

    /* remove espaço extra do feed */
    #feed-view {
        padding: 0 !important;
    }

    /* wrapper do post */
    .post-content-wrap,
    .single-post-wrap,
    .post-single,
    article.post {
        padding: 0 !important;
        margin: 0 auto !important;
        max-width: 100% !important;
    }

    /* título do post */
    .entry-title {
        font-size: 24px !important;
        line-height: 1.25 !important;
        margin-bottom: 12px;
    }

    /* conteúdo do artigo */
    .post-body {
        padding: 8px 4px !important;
        margin: auto !important;
        font-size: 17px;
        line-height: 1.7;
        max-width: 680px;
    }

    /* imagens */
    .post-body img {
        width: 100% !important;
        height: auto !important;
        display: block;
        border-radius: 4px;
    }

    /* vídeos full width – estilo portal moderno */
    .video-container,
    .video-preview-full {
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(50% - 50vw) !important;
        margin-right: calc(50% - 50vw) !important;
        border-radius: 0;
    }

    /* iframe do vídeo */
    .video-container iframe {
        width: 100% !important;
        height: 100% !important;
    }

    /* ajuste de espaçamento do vídeo */
    .video-container {
        margin-top: 12px !important;
        margin-bottom: 18px !important;
    }

    /* melhora leitura de parágrafos */
    .post-body p {
        margin-bottom: 16px;
    }

    /* melhora subtítulos */
    .post-body h2 {
        font-size: 22px;
        margin-top: 26px;
    }

    .post-body h3 {
        font-size: 20px;
        margin-top: 22px;
    }

    /* centraliza botões sociais */
    .social-share-container {
        justify-content: center;
    }

    /* sidebar sempre abaixo */
    .sidebar {
        width: 100% !important;
        margin-top: 30px;
    }
}

/* =====================================================
   EXTRA MOBILE (TELAS PEQUENAS < 480px)
   ===================================================== */

@media (max-width: 480px) {

    .entry-title {
        font-size: 22px !important;
    }

    .post-body {
        font-size: 18px;
    }

    .container {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }
}

/* =====================================================
   GALAXY MOBILE MICRO-PATCH – CONTAINER FIX
   ===================================================== */

@media (max-width: 768px) {

    /* corrige containers duplicados */
    .container,
    .ar-main-container,
    .ar-content-layout {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    /* área principal do conteúdo */
    .ar-content-area {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* sidebar abaixo do post */
    .ar-sidebar-area {
        width: 100% !important;
        margin-top: 25px;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* remove espaço do breadcrumb */
    .breadcrumb-section {
        margin-bottom: 6px !important;
        padding: 4px 0 !important;
    }

    /* reduz espaço entre header e conteúdo */
    #Menu-GalaxyNew {
        margin-bottom: 8px !important;
    }

    /* título mais próximo do topo */
    .entry-title {
        margin-top: 6px !important;
    }

    /* remove margem extra do primeiro elemento do post */
    .post-body>*:first-child {
        margin-top: 0 !important;
    }

    /* sombra mais leve — melhor renderização em celulares fracos */
    .post-filter,
    .sidebar .widget {
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08) !important;
    }

    /* gap entre posts da listagem */
    .blog-posts .grid-posts {
        gap: 16px !important;
    }

    /* widgets pesados: mostra só os 3 primeiros no mobile */
    .sidebar .widget:nth-child(n+4) {
        display: none;
    }
}

/* =====================================================
   HEADER COMPACTO MOBILE
   ===================================================== */

@media (max-width: 768px) {

    .header-section {
        padding: 6px 0 !important;
        height: auto !important;
    }

    .SuperLogo-img img {
        max-height: 40px !important;
    }
}

/* =====================================================
   GALAXY VIDEO RESPONSIVE FIX (global)
   ===================================================== */

.post-body iframe,
.post-body embed,
.post-body object {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    display: block;
    margin: 16px auto;
}

.post-body .video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 16px 0;
}

.post-body .video-container iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* impede overflow em múltiplos vídeos */
.post-body {
    overflow: hidden;
}

/* =====================================================
   LAZY YOUTUBE EMBED
   ===================================================== */

.yt-lazy {
    position: relative;
    cursor: pointer;
    background: #000;
    overflow: hidden;
    display: block;
    width: 100%;
}

.yt-lazy img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: opacity 0.3s;
}

.yt-lazy:hover img {
    opacity: 0.85;
}

.yt-lazy .play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: #ff0000;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-lazy .play::after {
    content: '';
    border-left: 22px solid #fff;
    border-top: 13px solid transparent;
    border-bottom: 13px solid transparent;
    margin-left: 5px;
}