/* ===========================================
   PRELOADER HIDE
   =========================================== */
/* Simple preloader hide */
#loading {
    display: none !important;
}

/* Ensure normal scrolling */
body {
    overflow: auto !important;
}


/* ===========================================
   MOBILE VIEW FIXES
   =========================================== */
/* Mobile view fix */
@media (max-width: 768px) {
    .header-wrapper {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Add spacing between hamburger menu and logo */
    .ham__menu {
        margin-right: 30px;   /* pushes logo away from menu */
        font-size: 14px;      /* optional: make icon larger for easier tap */
        padding: 5px;        /* increases clickable area */
    }

    .post-content, .wyg.markdown-body {
        white-space: pre-wrap; /* Preserves spaces and line breaks */
    }

    .logo-wrapper {
        margin-left: 10px;    /* ensures logo isn’t too close */
    }
}


/* ===========================================
   POST CONTENT & MARKDOWN STYLES
   =========================================== */
/* Fix paragraph spacing on desktop */
.wyg.markdown-body,
.post-content,
.forum-card .card-sub-title,
.card-content .markdown-body {
    white-space: pre-wrap !important;
    word-wrap: break-word !important;
    line-height: 1.7 !important;
}


/* ===========================================
   HIDE POST EXCERPT ON HOME AND CATEGORY PAGES
   =========================================== */

/* Hide excerpt on home page */
body:has(.home-page) .card-sub-title.wyg,
body:has(body.home) .card-sub-title.wyg,
body:has(.index-page) .card-sub-title.wyg {
    display: none !important;
}

/* Hide excerpt on category pages */
body:has(.category-page) .card-sub-title.wyg,
body:has(.post-category) .card-sub-title.wyg,
body[class*="category"] .card-sub-title.wyg {
    display: none !important;
}



/* Alternative: Hide based on URL */
body:has(.forum-card-wraper) .card-sub-title.wyg {
    display: none !important;
}





/* Full width responsive ad */
.home-ad-container,
.ad-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 15px 0 !important;
    padding: 0 !important;
    text-align: center !important;
    background: transparent !important;
}

/* Make images responsive */
.home-ad-container img,
.ad-container img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
}


/* Remove any white space or overflow */
.home-ad-container *,
.ad-container * {
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
}


/* ===========================================
   SHARE DROPDOWN FIXES
   =========================================== */

/* Fix dropdown positioning */
.actn-dropdown-box {
    position: relative !important;
}

.actn-dropdown {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    min-width: 180px !important;
    background: #fff !important;
    border-radius: 8px !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
}

.actn-dropdown-box:hover .actn-dropdown,
.actn-dropdown-box .actn-dropdown.is-open-actn-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
}

.actn-dropdown ul {
    margin: 0 !important;
    padding: 8px 0 !important;
    list-style: none !important;
}

.actn-dropdown li {
    margin: 0 !important;
    padding: 0 !important;
}

.actn-dropdown a,
.actn-dropdown button {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 15px !important;
    color: #333 !important;
    text-decoration: none !important;
    background: none !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    cursor: pointer !important;
    font-size: 14px !important;
    transition: background 0.2s !important;
}

.actn-dropdown a:hover,
.actn-dropdown button:hover {
    background: #f5f5f5 !important;
}

.actn-dropdown i {
    width: 18px !important;
    font-size: 14px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .actn-dropdown {
        min-width: 160px !important;
        right: -10px !important;
    }
    
    .actn-dropdown a,
    .actn-dropdown button {
        padding: 10px 15px !important;
        font-size: 13px !important;
    }
}

/* Ensure dropdown doesn't overlap header */
.forum-cad-footer {
    position: relative !important;
    z-index: 10 !important;
}

/* Fix for any z-index issues */
.card-auth-meta,
.forum-cad-footer {
    z-index: 5 !important;
}



/* ===========================================
   PAGINATION STYLES
   =========================================== */
.pagination-wrapper {
    margin-top: 30px;
    margin-bottom: 20px;
    text-align: center;
}

.pagination {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination li a:hover {
    background: #e0e0e0;
}

.pagination li.active span {
    background: #007bff;
    color: #fff;
}

.pagination li.disabled span {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

/* Dark mode */
.dark-mode .pagination li a,
.dark-mode .pagination li span {
    background: #2d2d2d;
    color: #e0e0e0;
}

.dark-mode .pagination li a:hover {
    background: #3d3d3d;
}

.dark-mode .pagination li.active span {
    background: #007bff;
    color: #fff;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .pagination li a,
    .pagination li span {
        padding: 6px 10px;
        font-size: 12px;
    }
}


/* ===========================================
   RESPONSIVE EMBEDS (YouTube, Vimeo, etc.)
   =========================================== */

/* Universal iframe fix */
iframe {
    max-width: 100% !important;
    width: 100% !important;
}

/* YouTube embeds - maintain 16:9 aspect ratio */
iframe[src*="youtube"],
iframe[src*="youtu.be"] {
    aspect-ratio: 16 / 9 !important;
}

/* Vimeo embeds */
iframe[src*="vimeo"] {
    aspect-ratio: 16 / 9 !important;
}

/* Instagram embeds */
iframe[src*="instagram"] {
    min-height: 480px !important;
    aspect-ratio: auto !important;
}

/* Twitter embeds */
.twitter-tweet {
    max-width: 100% !important;
    margin: 10px auto !important;
}

/* Prevent overflow */
.wyg.markdown-body,
.post-content {
    overflow-x: hidden !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
    iframe[src*="instagram"] {
        min-height: 400px !important;
    }
}