/*
Theme Name: APK Ocean Ultimate Premium
Author: Coding Partner
Description: Upgraded to Premium APK Site Level (Moddroid/An1 Style)
Version: 99.3
*/

/* ================= 1. VARIABLES ================= */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --accent: #10b981;
    --accent-hover: #059669;

    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --bg-header: #ffffff;

    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #e2e8f0;

    --site-width: 1200px;
    --header-h: 70px;

    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 15px 30px rgba(37,99,235,0.15);

    --primary-soft: rgba(37, 99, 235, 0.10);
    --accent-soft: rgba(16, 185, 129, 0.12);
    --ring: 0 0 0 3px rgba(37,99,235,0.16);
}

body.dark-mode {
    --bg-body: #0b1120;
    --bg-card: #1e293b;
    --bg-header: #0f172a;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: #334155;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
    --shadow-md: 0 8px 20px rgba(0,0,0,0.6);
    --shadow-hover: 0 15px 30px rgba(16,185,129,0.15);
}

/* ================= 2. RESET & BASE ================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    padding-top: var(--header-h);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s, color 0.3s;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease-in-out;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

button,
input,
textarea,
select {
    font: inherit;
}

.container {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
}

.text-highlight {
    color: var(--primary);
    font-weight: 800;
}

.text-mod {
    color: var(--accent);
    font-weight: 800;
}

/* Helper classes for future contrast-safe text usage */
.text-on-light {
    color: #0f172a !important;
}

.text-on-dark {
    color: #ffffff !important;
}

/* ================= 3. HEADER ================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.dark-mode .site-header {
    background: rgba(15,23,42,0.96);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    min-height: var(--header-h);
    gap: 14px;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.custom-logo-link {
    display: flex;
    align-items: center;
}

.custom-logo {
    border-radius: 10px;
}

.logo {
    font-size: 24px;
    font-weight: 900;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

/* Header text contrast fix */
.site-branding,
.site-branding * {
    min-width: 0;
}

.site-title,
.site-title a,
.site-header .site-title,
.site-header .site-title a {
    color: var(--text-main) !important;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: none !important;
}

.site-description,
.site-header .site-description,
.site-tagline,
.site-header .site-tagline,
.site-branding p {
    color: var(--text-muted) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.site-title a:hover,
.site-title a:focus {
    color: var(--primary) !important;
}

.header-tools {
    display: flex;
    gap: 15px;
    align-items: center;
}

.theme-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: 0.3s;
}

.theme-btn:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.menu-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--primary);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.menu-toggle:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.desktop-nav {
    display: block;
    position: fixed;
    top: 70px;
    right: -320px;
    width: 300px;
    height: calc(100vh - 70px);
    background: var(--bg-card);
    border-left: 1px solid rgba(148,163,184,0.18);
    padding: 25px 20px;
    overflow-y: auto;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    z-index: 999;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.desktop-nav.open {
    right: 0;
}

.desktop-nav ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.desktop-nav a {
    display: block;
    padding: 14px 18px;
    background: var(--bg-body);
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    color: var(--text-main);
    border: 1px solid var(--border);
    transition: 0.2s;
}

.desktop-nav a:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    padding-left: 22px;
    box-shadow: var(--shadow-sm);
}

.nav-overlay {
    position: fixed;
    inset: 70px 0 0;
    background: rgba(15,23,42,0.36);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ================= 4. HERO & SLIDER ================= */
.hero-section {
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.18), transparent 30%),
        linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 68px 0 96px;
    text-align: center;
    color: #fff;
    margin-bottom: -60px;
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to top, var(--bg-body), transparent);
}

.hero-content h1 {
    font-size: clamp(30px, 4vw, 38px);
    font-weight: 900;
    margin-bottom: 25px;
    text-shadow: 0 4px 15px rgba(0,0,0,0.2);
    letter-spacing: -0.5px;
    line-height: 1.15;
    max-width: 820px;
    margin-left: auto;
    margin-right: auto;
}

.search-box {
    position: relative;
    max-width: 650px;
    margin: 0 auto;
    z-index: 2;
}

.search-box input {
    width: 100%;
    min-height: 62px;
    padding: 20px 30px;
    padding-right: 145px;
    border-radius: 50px;
    border: 2px solid rgba(255,255,255,0.2);
    font-size: 16px;
    background: #fff;
    color: #333;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    transition: 0.3s;
}

.search-box input:focus {
    border-color: var(--accent);
    box-shadow: 0 15px 35px rgba(16,185,129,0.3);
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 8px;
    bottom: 8px;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0 35px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    min-width: 120px;
}

.search-box button:hover {
    background: var(--accent-hover);
    transform: scale(1.05);
}

.search-box input[type="search"]::-webkit-search-decoration,
.search-box input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

/* Slider */
.slider-wrap {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 30px;
    scrollbar-width: none;
    margin-bottom: 40px;
    -webkit-overflow-scrolling: touch;
}

.slider-wrap::-webkit-scrollbar {
    display: none;
}

.slide-item {
    min-width: 300px;
    height: 190px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    border: 3px solid var(--bg-card);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
    transition: transform 0.3s;
    background: #000;
}

.slide-item:hover {
    transform: translateY(-5px);
}

.slide-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: 0.5s;
}

.slide-item:hover .slide-bg {
    transform: scale(1.1);
    opacity: 0.5;
}

.slide-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #fff;
    z-index: 2;
}

.slide-info span {
    background: var(--accent);
    color: #fff;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: inline-block;
}

.slide-info h3 {
    font-size: 18px;
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    margin: 0;
}

/* ================= 5. MAIN LAYOUT ================= */
.layout-grid {
    margin-bottom: 60px;
    align-items: start;
}

.layout-grid.has-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
}

.layout-grid.no-sidebar {
    display: block;
}

.layout-grid > * {
    min-width: 0;
}

.main-content,
.content-area,
.sidebar {
    min-width: 0;
}

.layout-grid.no-sidebar .main-content {
    width: 100%;
    max-width: 100%;
}

/* ================= 6. APP GRID ================= */
.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 18px;
    padding: 20px 15px;
    text-align: center;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 24px rgba(15,23,42,0.04);
    overflow: hidden;
}

.app-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.28), transparent 50%);
    opacity: .7;
    pointer-events: none;
}

body.dark-mode .app-card::before,
body.dark-mode .sidebar .widget::before,
body.dark-mode .single-box::before {
    display: none;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.mod-badge {
    position: absolute;
    top: 12px;
    right: -25px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    padding: 5px 30px;
    transform: rotate(45deg);
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    letter-spacing: 1px;
}

.app-icon-wrap {
    position: relative;
    width: 90px;
    height: 90px;
    margin-bottom: 15px;
}

.app-icon {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s;
    background: var(--bg-body);
    object-fit: cover;
    border: 1px solid rgba(148,163,184,0.16);
}

.app-card:hover .app-icon {
    transform: scale(1.08);
}

.app-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 8px;
    width: 100%;
    line-height: 1.4;
    min-height: 42px;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-meta {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
}

.app-ver {
    color: var(--text-muted);
    background: var(--bg-body);
    padding: 3px 10px;
    border-radius: 6px;
    font-weight: 600;
    border: 1px solid var(--border);
}

.app-btn {
    width: 100%;
    padding: 12px;
    background: var(--bg-body);
    color: var(--primary);
    font-weight: 800;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: 0.3s;
}

.app-btn:hover,
.app-card:hover .app-btn {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.app-btn-static {
    margin-top: 10px;
}

/* ================= 7. SIDEBAR ================= */
.sidebar .widget {
    background: var(--bg-card);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 30px;
    border: 1px solid rgba(148,163,184,0.18);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.sidebar .widget::before,
.single-box::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37,99,235,0.28), transparent);
}

.widget-title {
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--bg-body);
    padding-bottom: 12px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.side-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    margin-bottom: 15px;
    background: var(--bg-body);
    border-radius: 16px;
    border: 1px solid transparent;
    transition: 0.3s;
    position: relative;
    min-width: 0;
}

.side-card:hover {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.side-img {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}

.side-info {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.side-info h4 {
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.side-meta {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
}

.side-dl {
    width: 35px;
    height: 35px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    border: 1px solid var(--border);
    margin-left: auto;
    font-weight: bold;
    transition: 0.3s;
    flex-shrink: 0;
}

.side-card:hover .side-dl {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ================= 8. SINGLE PAGE ================= */
.single-layout {
    margin-top: 40px;
}

.single-breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.single-breadcrumb-current {
    color: var(--text-main);
}

.single-box {
    background: var(--bg-card);
    border-radius: 24px;
    border: 1px solid rgba(148,163,184,0.18);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.dl-area {
    padding: 20px 0;
    max-width: 100%;
    overflow: hidden;
    min-width: 0;
}

.content-wrap {
    padding: 40px;
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.85;
    min-width: 0;
}

.content-wrap p,
.content-wrap ul,
.content-wrap ol {
    margin-bottom: 16px;
}

.content-wrap h2,
.content-wrap h3 {
    font-weight: 800;
    color: var(--text-main);
    margin: 25px 0 15px;
    line-height: 1.3;
}

.content-wrap img {
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: var(--shadow-sm);
}

.entry-content,
.entry-content > *,
.content-wrap > * {
    max-width: 100%;
}

.content-wrap img,
.entry-content img {
    max-width: 100%;
    height: auto;
}

.content-wrap iframe,
.content-wrap video,
.content-wrap object,
.content-wrap embed,
.content-wrap figure,
.content-wrap .wp-block-image,
.content-wrap .wp-caption,
.content-wrap .wp-block-embed,
.content-wrap .wp-block-video {
    max-width: 100%;
}

.content-wrap iframe,
.content-wrap video,
.content-wrap object,
.content-wrap embed {
    width: 100%;
    max-width: 100%;
    min-height: 220px;
    border: 0;
}

.content-wrap table,
.content-wrap .wp-block-table table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
}

.content-wrap pre {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.content-wrap ul,
.content-wrap ol {
    padding-left: 20px;
}

.content-wrap .alignwide,
.content-wrap .alignfull {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.content-wrap .wp-block-buttons {
    row-gap: 12px;
}

.single-related {
    margin-top: 50px;
}

.single-related-title {
    margin-bottom: 25px;
    font-weight: 900;
    border-left: 6px solid var(--primary);
    padding-left: 15px;
    font-size: 22px;
    line-height: 1.3;
}

/* ================= 9. FOOTER ================= */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 52px 0 34px;
    margin-top: 80px;
    text-align: center;
    border-top: 6px solid var(--primary);
    width: 100%;
    clear: both;
}

.site-footer .container {
    width: 100%;
    max-width: var(--site-width);
    margin: 0 auto;
    padding: 0 15px;
}

.footer-nav {
    margin-top: 18px;
}

.footer-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.footer-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    transition: background .2s ease, color .2s ease;
}

.footer-nav a:hover {
    background: rgba(255,255,255,0.06);
    text-decoration: none;
}

.footer-copy {
    margin-top: 18px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

/* ================= 10. ACCESSIBILITY ================= */
:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: none;
    box-shadow: var(--ring);
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* ================= 11. RESPONSIVE ================= */
@media (max-width: 1024px) {
    .layout-grid.has-sidebar {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .sidebar {
        display: block;
        margin-top: 10px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 66px;
    }

    .site-header {
        height: 66px;
    }

    .desktop-nav,
    .nav-overlay {
        top: 66px;
    }

    .desktop-nav {
        width: min(300px, 88vw);
        height: calc(100vh - 66px);
    }

    .hero-section {
        padding: 50px 0 84px;
        margin-bottom: -48px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .search-box input {
        min-height: 56px;
        padding: 16px 18px;
        padding-right: 18px;
    }

    .search-box button {
        position: static;
        width: 100%;
        margin-top: 12px;
        min-height: 50px;
    }

    .slide-item {
        min-width: 260px;
        height: 172px;
    }

    .app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .app-card {
        padding: 14px 10px;
        border-radius: 16px;
    }

    .app-icon-wrap {
        width: 75px;
        height: 75px;
    }

    .app-title {
        font-size: 14px;
        min-height: 38px;
    }

    .widget-title {
        font-size: 17px;
    }

    .single-layout {
        margin-top: 24px;
    }

    .single-breadcrumb {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .single-box {
        border-radius: 18px;
    }

    .dl-area {
        padding: 14px 0;
    }

    .content-wrap {
        padding: 24px 18px;
        font-size: 15px;
        line-height: 1.75;
    }

    .single-related {
        margin-top: 36px;
    }

    .single-related-title {
        font-size: 18px;
        margin-bottom: 18px;
        padding-left: 12px;
        border-left-width: 4px;
    }

    .content-wrap iframe,
    .content-wrap video,
    .content-wrap object,
    .content-wrap embed {
        min-height: 180px;
    }

    .site-footer {
        padding: 44px 0 28px;
        margin-top: 56px;
    }

    .footer-nav ul {
        gap: 10px;
    }

    .site-description,
    .site-tagline {
        display: none;
    }
}

@media (max-width: 480px) {
    .container,
    .site-footer .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .content-wrap {
        padding: 20px 14px;
    }

    .app-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* ================= 12. CONTRAST HOTFIX ================= */
/* Previous fix targeted .site-title, but header.php renders the site name with .logo */
.site-header .logo,
.site-branding .logo,
a.logo {
    color: var(--text-main) !important;
    text-shadow: none !important;
    opacity: 1 !important;
}

.site-header .logo:hover,
.site-header .logo:focus {
    color: var(--primary) !important;
}

body.dark-mode .site-header .logo,
body.dark-mode .site-branding .logo,
body.dark-mode a.logo {
    color: #f8fafc !important;
}

/* Keep logo image crisp and sized nicely */
.site-header .custom-logo-link {
    flex-shrink: 0;
}

.site-header .custom-logo {
    display: block;
    width: auto;
    max-width: min(140px, 32vw);
    max-height: 52px;
    height: auto;
    opacity: 1 !important;
    filter: none !important;
}

/* Breadcrumb contrast */
.single-breadcrumb,
.single-breadcrumb a,
.single-breadcrumb span,
.single-breadcrumb-current {
    opacity: 1 !important;
    text-shadow: none !important;
}

.single-breadcrumb {
    color: var(--text-muted) !important;
}

.single-breadcrumb a:not(.text-highlight) {
    color: var(--text-main) !important;
}

.single-breadcrumb-current {
    color: var(--text-main) !important;
    font-weight: 800;
}

/* Shortcode/download card area:
   the screenshot issue is most visible inside [apk_pro] output, so force readable defaults */
.dl-area,
.dl-area * {
    text-shadow: none !important;
}

.dl-area {
    color: var(--text-main);
}

.dl-area h1,
.dl-area h2,
.dl-area h3,
.dl-area h4,
.dl-area h5,
.dl-area h6,
.dl-area strong,
.dl-area b,
.dl-area li,
.dl-area p,
.dl-area div,
.dl-area span,
.dl-area small {
    opacity: 1 !important;
    color: inherit;
}

/* Better defaults on light cards */
.dl-area .card,
.dl-area .box,
.dl-area .apk-card,
.dl-area .download-card,
.dl-area .post-card,
.dl-area .info-card,
.dl-area [class*="card"],
.dl-area [class*="box"] {
    color: var(--text-main) !important;
}

/* Text helpers for plugin output that may inherit pale colors */
.dl-area .text-dark,
.dl-area .dark-text,
.dl-area [style*="color: black"],
.dl-area [style*="color:black"] {
    color: #0f172a !important;
}

.dl-area .text-light,
.dl-area .white-text {
    color: #ffffff !important;
}

/* Common muted utility classes from plugin-like output */
.dl-area .text-muted,
.dl-area .muted,
.dl-area .meta,
.dl-area .subtext {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* Prevent accidental washout from opacity/filter classes coming from shortcode output */
.dl-area [style*="opacity"],
.single-box [style*="opacity"],
.entry-content [style*="opacity"] {
    opacity: 1 !important;
}

.dl-area [style*="filter"],
.single-box [style*="filter"],
.entry-content [style*="filter"] {
    filter: none !important;
}

/* Menu overlay should never affect page unless explicitly active */
.nav-overlay {
    pointer-events: none;
}

.nav-overlay.active {
    pointer-events: auto;
}

/* Safer text defaults in single content */
.single-box,
.single-box .content-wrap,
.single-box .entry-content,
.single-box .entry-content p,
.single-box .entry-content li,
.single-box .entry-content h1,
.single-box .entry-content h2,
.single-box .entry-content h3,
.single-box .entry-content h4,
.single-box .entry-content h5,
.single-box .entry-content h6 {
    color: var(--text-main);
}

/* Mobile header polish */
@media (max-width: 768px) {
    .site-branding {
        gap: 8px;
    }

    .site-header .custom-logo {
        max-width: 110px;
        max-height: 46px;
    }

    .site-header .logo {
        font-size: 18px;
    }
}
/* ================= OVERLAY FADE FIX ================= */
/* Screenshot se lag raha hai page header ke neeche dim ho raha hai.
   Theme ke nav overlay ko hard-disable karke test/fix karo. */

.nav-overlay,
#nav-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
}

/* Menu open hone par bhi overlay page ko fade na kare */
.nav-overlay.active,
#nav-overlay.active,
body.menu-open .nav-overlay,
body.menu-open #nav-overlay {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background: transparent !important;
}

/* Single page content ko force full visibility */
.single-layout,
.single-layout *,
.single-box,
.single-box *,
.dl-area,
.dl-area * {
    opacity: 1 !important;
    filter: none !important;
}

/* Header/logo text visibility */
.site-header .logo,
.site-branding .logo,
a.logo {
    color: var(--text-main) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

body.dark-mode .site-header .logo,
body.dark-mode .site-branding .logo,
body.dark-mode a.logo {
    color: #f8fafc !important;
}

/* Breadcrumb and download box text */
.single-breadcrumb,
.single-breadcrumb a,
.single-breadcrumb-current,
.dl-area h1,
.dl-area h2,
.dl-area h3,
.dl-area h4,
.dl-area p,
.dl-area li,
.dl-area span,
.dl-area div,
.dl-area strong,
.dl-area b {
    color: var(--text-main) !important;
    opacity: 1 !important;
    text-shadow: none !important;
}
