/*
Theme Name: Atheer
Theme URI: https://atheer.net
Author: Atheer
Author URI: https://atheer.net
Description: A comprehensive media platform theme designed for podcasts, shows, and interactive content. Features include custom post types (shows, episodes, interactives), advanced audio player with fullscreen mode, DOM-level audio protection, SPA navigation, RTL Arabic support with auto-detection, voice search in Arabic, RSS feed integration, search analytics and caching, author profiles for podcast hosts, extensive customization options, and cross-platform podcast service integration (Apple, Spotify, YouTube, SoundCloud).
Version: 1.5
License: Proprietary - All Rights Reserved
License URI: https://atheer.net/license
Text Domain: atheer
Tags: rtl-language-support, arabic, custom-logo, custom-menu, featured-images, footer-widgets, translation-ready, block-editor-styles, editor-style, grid-layout, one-column, two-columns, three-columns, theme-options, blog, news, entertainment, podcast, audio, responsive-layout, accessibility-ready, custom-colors, custom-header, flexible-header, full-width-template, post-formats, sticky-post, threaded-comments, microformats, e-commerce, front-page-post-form, single-page-application, voice-search, search-suggestions, media-integration, rss-integration, content-caching, mega-menu, social-sharing, audio-protection, author-profiles, ajax-search, theme-setup-wizard, custom-background, admin-customizations, cross-platform-integration, spa-navigation, fullscreen-templates, mobile-friendly
*/

/* style.css - Consolidated and Updated */

:root {
    --primary-color: #1e2348;
    --secondary-color: #4e8f89;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #666666;
    --white: #ffffff;
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --border-radius: 8px;
    --container-width: 1200px;
    --grid-gap: 2rem;
    --player-bg: #1e2348;
    --player-fullscreen-bg: linear-gradient(180deg, #396378, #1e2348);
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--white);
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    overflow-x: hidden;
}

/* RTL Support */
.rtl {
    direction: rtl;
    text-align: right;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Grid Layout */
.grid {
    display: grid;
    gap: var(--grid-gap);
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-md);
    line-height: 1.3;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-md);
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--secondary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-content {
    padding: var(--spacing-md);
}

/* Featured Sections */
.featured-section {
    margin: var(--spacing-xl) 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    :root {
        --container-width: 100%;
        --grid-gap: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}

/* Arabic Font Support */
@font-face {
    font-family: 'Atheer Arabic';
    src: local('Cairo'), local('Tajawal');
    font-weight: normal;
    font-style: normal;
}

.rtl body {
    font-family: 'Atheer Arabic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Header & Navigation */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    height: 64px;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Left Side Navigation */
.nav-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Toggle Button */
.navbar-toggle {
    background: none;
    border: none;
    padding: var(--spacing-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.menu-icon {
    width: 24px;
    height: 2px;
    background: var(--text-color);
    position: relative;
    transition: all 0.3s ease;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--text-color);
    left: 0;
    transition: all 0.3s ease;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    bottom: -6px;
}

/* Navigation Links */
.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: 2rem;
}

.nav-links a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    font-family: 'Al Jazeera Bold', sans-serif !important;
    font-size: 1.1em;
}

.nav-links a:hover {
    color: var(--secondary-color);
}

/* Center Logo */
.site-branding {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* Hide site title when logo is present */
.custom-logo-link + .site-title {
    display: none;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: bold;
}

.site-title a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Right Side Search */
.search-wrapper {
    min-width: 250px;
}

.search-form {
    display: flex;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-field {
    width: 100%;
    height: 40px;
    padding: 8px 80px 8px 16px;
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.voice-search-button,
.search-submit {
    position: absolute;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.voice-search-button {
    right: 40px;
}

.search-submit {
    right: 8px;
}

/* Active States */
.navbar-toggle.active .menu-icon {
    background: transparent;
}

.navbar-toggle.active .menu-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggle.active .menu-icon::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* RTL Support */
.rtl .search-field {
    padding: 8px 16px 8px 80px;
    text-align: right;
}

.rtl .voice-search-button {
    right: auto;
    left: 40px;
}

.rtl .search-submit {
    right: auto;
    left: 8px;
}

/* Mobile Styles */
@media (max-width: 991px) {
    .nav-links {
        display: none;
    }
    .search-wrapper {
        min-width: 200px;
        padding: 2%;
    }
}

/* Logo */
.site-branding {
    flex-shrink: 0;
}

.custom-logo-link {
    display: block;
}

.custom-logo {
    height: 40px;
    width: auto;
    display: block;
}

/* Mega Menu */
.mega-menu {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    display: none;
    overflow-y: auto;
}

.mega-menu.active {
    display: block;
}

.mega-menu-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    padding: var(--spacing-xl) 0;
}

.mega-menu-column h3 {
    margin-bottom: var(--spacing-lg);
    font-size: 1.2rem;
    color: var(--primary-color);
}

.categories-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.categories-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.categories-menu a:hover {
    color: var(--primary-color);
}

/* Modern Header Styles */
.header-full-content {
    background: var(--white);
    position: relative;
    z-index: 1030;
}

.navbar-collapse {
    flex-grow: 0;
}

/* Search Section */
.menu-search {
    position: relative;
}

.search-actions {
    position: relative;
}

/* Voice Search Styles */
.voice-search-button:hover {
    background: var(--light-gray);
    color: var(--secondary-color);
}

.voice-search-button.listening {
    background: var(--primary-color);
    color: var(--white);
    animation: pulse 1.5s infinite;
}

.voice-search-button svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.voice-search-button:hover svg {
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 35, 72, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(30, 35, 72, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 35, 72, 0);
    }
}

/* Branding Section */
.branding-wrap {
    text-align: center;
}

.site-description {
    margin: 4px 0 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
}

/* Mega Menu */
.has-megamenu {
    position: static !important;
}

.mega-menu-wrapper {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0;
}

.mega-menu-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.mega-menu-items a {
    color: var(--white);
    text-decoration: none;
    padding: 8px;
    display: block;
    transition: all 0.3s ease;
}

.mega-menu-items a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* Dropdown Toggle Button */
.nav-link.dropdown-toggle {
    padding: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.navbar-toggler-icon {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    position: relative;
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -6px;
}

.navbar-toggler-icon::after {
    bottom: -6px;
}

/* Darkening Overlay */
.darken {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1020;
}

.megamenu.show + .darken {
    display: block;
}

/* RTL Adjustments */
.rtl .search-submit {
    right: auto;
    left: 8px;
}

.rtl .mega-menu-items {
    direction: rtl;
}

/* Mobile Styles */
@media (max-width: 991px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        padding: 1rem;
        background: var(--white);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1040;
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    .mega-menu-wrapper {
        height: 100%;
        overflow-y: auto;
    }

    .mega-menu-items {
        grid-template-columns: 1fr;
    }

    .rtl .navbar-collapse {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    .rtl .navbar-collapse.show {
        transform: translateX(0);
    }
}

/* Add margin to the main content to prevent overlap with fixed header */
#primary {
    margin-top: 1.5%;
}

/* Add proper margin on mobile for SPA navigation */
@media (max-width: 768px) {
    #primary {
        margin-top: 22px; /* Adjust margin-top for mobile to prevent content from being hidden under the fixed header */
    }
}

h1 {
    font-family: 'Al Jazeera Heavy', sans-serif !important;
}

h2, h3, h4, h5, h6 {
    font-family: 'Al Jazeera Bold', sans-serif !important;
}

p {
    font-family: 'Al Jazeera Regular', sans-serif !important;
}

body {
    font-family: 'Al Jazeera Light', sans-serif !important;
}

/**
 * Sticky Audio Player
 */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 15%;
    background-color: #1e2348;
    border-top: 2px solid #222;
    padding-top: 10px;
    padding-bottom: 10px;
    z-index: 9999;
    transform: translateY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.sticky-player-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: 1fr 1fr;
    align-items: center;
    height: 100%;
    padding: 0 5px;
    max-width: 1200px;
    margin: 0 auto;
    direction: ltr;
    justify-content: center;
}

/* Close button */
.close-player {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Optional: Adjust SVG size if needed */
.close-player svg {
    width: 100%;
    height: 100%;
}

/* Volume control */
.volume-control {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 100px;
    justify-content: flex-start;
}

/* Progress bar */
.player-progress {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 50%;
    margin: 0 auto;
    justify-content: center;
}

.current-time {
    text-align: right;
    width: auto;
    min-width: 60px;
    display: inline-block;
}

/* RTL adjustments */
.rtl .volume-control {
    left: auto;
    right: 65px;
}

.rtl .current-time {
    margin-left: 0;
    margin-right: 0;
}

.volume-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.volume-slider-container {
    width: 120px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    height: 100%;
}

.volume-slider {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #aaa;
    outline: none;
    border-radius: 2px;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #4e8f89;
    border-radius: 50%;
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #4e8f89;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Time display */
.time {
    font-size: 16px;
    color: white;
    min-width: 50px;
    width: auto;
}

.duration {
    margin-left: 0px;
    text-align: left;
    width: auto;
    min-width: 60px;
    display: inline-block;
}

/* Progress bar */
.progress-bar-container {
    position: relative;
    width: 100%;
    flex-grow: 1;
    justify-content: center;
    height: 5px;
    background-color: #555;
    border-radius: 2px;
    cursor: pointer;
    margin: 0 auto;
}

.progress-bar {
    position: relative;
    width: 100%;
    height: 5px;
    justify-content: center;
    background-color: #777;
    border-radius: 2px;
    cursor: pointer;
}

.progress-loaded {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #777;
    border-radius: 2px;
    width: 0;
}

.progress-played {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background-color: #4e8f89;
    border-radius: 2px;
    width: 0;
}

.progress-handle {
    position: absolute;
    top: 50%;
    left: 0;
    width: 16px;
    height: 16px;
    background-color: #4e8f89;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.1s ease;
}

.progress-bar:hover .progress-handle {
    opacity: 1;
}

.progress-tooltip {
    position: absolute;
    top: -25px;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 11px;
    display: none;
    pointer-events: none;
}

/* Player controls */
.player-controls {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin: 0 auto;
}

.control-button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(2.5);
}

.control-button:hover {
    color: #4e8f89;
}

.control-button svg {
    width: 22.5px;
    height: 22.5px;
}

.play-button {
    width: 50px;
    height: 50px;
    background-color: #4e8f89;
    border-radius: 50%;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transform: translateY(-10px) scale(1.5);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.play-button:hover {
    background-color: #347b74;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transform: translateY(-12px) scale(1.5);
}

.play-button svg {
    width: 45px;
    height: 45px;
}

.rewind-button svg text,
.forward-button svg text {
    fill: currentColor;
    text-anchor: middle;
    dominant-baseline: middle;
    font-weight: bold;
}

.hidden {
    display: none !important;
}

.control-button.active {
    color: #2271b1;
}

.speed-button {
    position: relative !important;
    font-weight: bold !important;
    min-width: 35px !important;
    transform: scale(2.5) !important;
    cursor: pointer !important;
}

.speed-menu {
    position: fixed !important;
    background-color: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1) !important;
    z-index: 10001 !important;
    overflow: hidden !important;
    min-width: 100px !important;
    transform: translateX(-50%) !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.speed-menu.hidden {
    display: none !important;
}

.speed-option {
    padding: 8px 15px !important;
    cursor: pointer !important;
    text-align: center !important;
    transition: background-color 0.2s ease !important;
    color: #333 !important;
    font-size: 14px !important;
    display: block !important;
}

.speed-option:hover {
    background-color: #f5f5f5 !important;
}

.speed-option[data-default="true"] {
    font-weight: bold !important;
    color: #2271b1 !important;
}

/* Episode info */
.episode-info {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    width: 500px;
    margin-right: -300px;
    margin-left: -200px;
}

.episode-text {
    display: flex;
    position: fixed;
    flex-direction: column;
    justify-content: center;
    right: 175px;
    direction: rtl;
    text-align: right;
}

.episode-title {
    font-weight: bold;
    font-size: 14px;
    font-family: 'Al Jazeera Heavy', sans-serif;
    color: white;
    overflow: visible; /* Or auto, depending on your needs */
    max-width: 300px;
    word-wrap: break-word; /* Ensures long words break */
    margin-bottom: 5px;
}

.show-title {
    font-size: 16px;
    color: #ccc;
    overflow: visible; /* Or auto, depending on your needs */
    font-family: 'Al Jazeera Regular', sans-serif;
    max-width: 250px;
    word-wrap: break-word; /* Ensures long words break */
}

/* Show thumbnail in player */
.sticky-player .show-thumbnail {
    position: fixed;
    right: 80px;
    width: 80px;  /*Adjust these values*/
    height: 80px;  /*As needed*/
    overflow: hidden;
    border-radius: 4px;
}

.sticky-player .show-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;  /* Prevents extra spacing below the image */
}

/* Body adjustments when player is active */
body.has-sticky-player {
    padding-bottom: 100px;
}

/* Desktop Responsive Behavior (Spotify-style) */
@media (max-width: 1400px) {
    .episode-title {
        max-width: 250px;
    }
    
    .show-title {
        max-width: 200px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .player-controls {
        gap: 30px;
    }
    
    /* Slightly decrease play button size */
    .play-button {
        transform: translateY(-10px) scale(1.4);
    }
}

@media (max-width: 1200px) {
    .episode-info {
        width: 350px;
        margin-right: -300px;
        margin-left: -200px;
        height: 50px;
    }
    
    .episode-title {
        max-width: 200px;
    }
    
    .show-title {
        max-width: 180px;
    }
    
    .player-controls {
        gap: 25px;
    }
    
    .sticky-player .show-thumbnail {
        width: 70px;
        height: 70px;
        right: 70px;
    }
    
    .episode-text {
        right: 155px;
    }
    
    /* Further reduce play button size */
    .play-button {
        transform: translateY(-9px) scale(1.3);
    }
}

@media (max-width: 992px) {
    .sticky-player-container {
        grid-template-columns: auto 1fr auto;
        padding: 0 10px;
    }
    
    .player-controls {
        gap: 20px;
    }
    
    .control-button {
        transform: scale(2.2);
    }
    
    .speed-button {
        transform: scale(2.2);
    }
    
    .volume-slider-container {
        width: 80px;
    }
    
    .episode-info {
        width: 280px;
        margin-right: -280px;
        margin-left: -150px;
        height: 50px;
    }
    
    .episode-title {
        max-width: 170px;
        font-size: 13px;
    }
    
    .show-title {
        max-width: 150px;
        font-size: 14px;
    }
    
    .sticky-player .show-thumbnail {
        position: relative;
        right: auto;
        width: 50px;
        height: 50px;
        /* Ensure consistent positioning */
        flex-shrink: 0;
    }
    
    .episode-text {
        right: 130px;
    }
    
    /* Further reduce play button size for medium screens */
    .play-button {
        transform: translateY(-8px) scale(1.2);
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 850px) {
    .episode-info {
        width: 220px;
        margin-right: -220px;
        margin-left: -120px;
        height: 50px;
    }
    
    .episode-title {
        max-width: 140px;
        font-size: 12px;
    }
    
    .show-title {
        max-width: 120px;
        font-size: 12px;
    }
    
    .sticky-player .show-thumbnail {
        position: relative;
        right: auto;
        width: 50px;
        height: 50px;
        /* Ensure consistent positioning */
        flex-shrink: 0;
    }
    
    .episode-text {
        right: 110px;
    }
    
    .player-controls {
        gap: 15px;
    }
    
    .control-button {
        transform: scale(2);
    }
    
    .speed-button {
        transform: scale(2);
    }
    
    /* Appropriately size play button for half-screen desktop */
    .play-button {
        transform: translateY(-5px) scale(1.1);
        width: 45px;
        height: 45px;
    }
}

/* RTL desktop responsive adjustments */
@media (max-width: 1200px) {
    .rtl .episode-text {
        left: 155px;
        right: auto;
    }
    
    .rtl .sticky-player .show-thumbnail {
        left: 70px;
        right: auto;
    }
}

@media (max-width: 992px) {
    .rtl .episode-text {
        left: 130px;
        right: auto;
    }
    
    .rtl .sticky-player .show-thumbnail {
        left: 60px;
        right: auto;
    }
}

@media (max-width: 850px) {
    .rtl .episode-text {
        left: 110px;
        right: auto;
    }
    
    .rtl .sticky-player .show-thumbnail {
        left: 50px;
        right: auto;
    }
}

/* Episode play buttons */
.episode-play-button, .show-play-button {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2271b1;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: background-color 0.2s ease;
}

.episode-play-button:hover, .show-play-button:hover {
    background-color: #185a8c;
}

/* RTL support for player */
.rtl .sticky-player-container {
    direction: rtl;
}

.rtl .close-player {
    left: auto;
    right: 10px;
}

.rtl .episode-info {
    grid-column: 1;
    flex-direction: row-reverse;
}

.rtl .episode-text {
    margin-right: 0;
    margin-left: 15px;
    align-items: flex-start;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sticky-player-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto; 
        padding: 10px;
        height: auto;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .volume-control {
        display: none;
    }

    .player-controls {
        grid-column: 1;
        grid-row: 2;
        justify-content: center;
        gap: 15px;
        margin: 10px 0;
    }

    .play-button {
        transform: translateY(0) scale(1.3);
        width: 50px;
        height: 50px;
        /* Improve touch target for mobile */
        min-width: 50px;
        min-height: 50px;
    }

    .control-button {
        transform: scale(1.3);
        /* Improve touch target for mobile */
        min-width: 44px;
        min-height: 44px;
    }

    .speed-button {
        transform: scale(1.3);
        /* Improve touch target for mobile */
        min-width: 44px;
        min-height: 44px;
    }

    .player-progress {
        width: 100%;
        grid-column: 1;
        grid-row: 3;
        margin: 5px 0;
    }

    .progress-handle {
        width: 18px;
        height: 18px;
    }

    /* Make progress handle always visible on touch devices */
    .progress-bar:active .progress-handle {
        opacity: 1;
    }

    .episode-info {
        grid-column: 1;
        grid-row: 1;
        justify-content: center;
        margin-left: 0;
        width: 100%;
        display: flex;
        align-items: center;
        height: 50px;
        /* Add fixed positioning */
        position: relative;
    }

    .episode-text {
        position: relative;
        right: auto;
        margin: 0 10px;
        /* Set a fixed width to prevent shifting */
        width: calc(100% - 70px);
        overflow: hidden;
    }

    .sticky-player .show-thumbnail {
        position: relative;
        right: auto;
        width: 50px;
        height: 50px;
        /* Ensure consistent positioning */
        flex-shrink: 0;
    }

    .episode-title {
        font-size: 14px;
        font-family: 'Al Jazeera Heavy', sans-serif;
        max-width: 500px;
        /* Prevent text overflow */
    }

    .show-title {
        display: none;
    }

    .sticky-player {
        height: auto;
        min-height: 160px;
    }

    body.has-sticky-player {
        padding-bottom: 160px;
    }

    /* RTL support for mobile */
    .rtl .episode-text {
        left: auto;
        right: auto;
    }
    
    .rtl .sticky-player .show-thumbnail {
        left: auto;
        right: auto;
    }
    
    .rtl .episode-info {
        flex-direction: row-reverse;
    }
}

/* Small screen devices */
@media (max-width: 480px) {
    .sticky-player {
        min-height: 170px;
    }
    
    .player-controls {
        gap: 10px;
    }
    
    .play-button {
        transform: scale(1.2);
    }
    
    .control-button {
        transform: scale(1.2);
    }
    
    .speed-button {
        transform: scale(1.2);
    }
    
    .episode-title {
        font-size: 13px;
        max-width: 300px;
    }
    
    .show-title {
        display: none;
    }
    
    .sticky-player .show-thumbnail {
        width: 40px;
        height: 40px;
    }
    
    .time {
        font-size: 12px;
        min-width: 40px;
    }
    
    body.has-sticky-player {
        padding-bottom: 170px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .sticky-player {
        min-height: 180px;
    }
    
    .player-controls {
        gap: 8px;
    }
    
    .control-button {
        transform: scale(1.1);
    }
    
    .speed-button {
        transform: scale(1.1);
    }
    
    .play-button {
        transform: scale(1.1);
    }
    
    .episode-title {
        font-size: 12px;
        max-width: 130px;
    }
    
    .show-title {
        font-size: 10px !important;
        max-width: 120px;
    }
    
    body.has-sticky-player {
        padding-bottom: 180px;
    }
}

/* Fullscreen Player Styles */
.expand-player-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 5px;
    z-index: 10;
    display: none; /* Hide on desktop */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.expand-player-button:hover {
    opacity: 1;
}

.expand-player-button svg {
    width: 22px;
    height: 22px;
}

.rtl .expand-player-button {
    right: auto;
    left: 10px;
}

.sticky-player.fullscreen-mode {
    height: 100vh !important;
    min-height: 100vh !important;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100000;
    background: var(--player-fullscreen-bg);
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.fullscreen-mode .sticky-player-container {
    height: 100%;
    grid-template-rows: auto 1fr auto auto;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px 10px;
}

.fullscreen-mode .episode-info {
    grid-row: 2;
    grid-column: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin: 0;
}

.fullscreen-mode .show-thumbnail {
    width: 80% !important;
    height: auto !important;
    max-width: 300px;
    margin: 0 auto 30px;
    aspect-ratio: 1/1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-radius: 5px;
    overflow: hidden;
    order: -1;
    position: fixed;
    top: 12%;
}

.fullscreen-mode .show-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fullscreen-mode .episode-text {
    width: 100%;
    height: 100%;
    position: fixed;
    margin-top: 55%;
    margin-bottom: 70px;
    text-align: center;
}

.fullscreen-mode .episode-title {
    font-size: 22px;
    position: fixed;
    margin-top: 30%;
    font-weight: bold;
    margin-bottom: 6px;
    align-self: center;
    max-width: 85%;
    white-space: normal;
}

.fullscreen-mode .show-title {
    display: none; /* Show in fullscreen mode */
}

.fullscreen-mode .player-controls {
    grid-row: 3;
    grid-column: 1;
    justify-content: center;
    gap: 2px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 10;
}

.fullscreen-mode .player-progress {
    grid-row: 4;
    grid-column: 1;
    height: 100%;
    width: 100%;
    margin-bottom: 20px;
}

.fullscreen-mode .close-player {
    top: 20px;
    left: 20px;
    z-index: 10000; /* Ensure high z-index */
    position: absolute; /* Make sure it's absolutely positioned */
    pointer-events: auto !important; /* Force pointer events to be enabled */
    opacity: 1;
    visibility: visible;
}

.fullscreen-mode .expand-player-button svg {
    transform: rotate(180deg);
}

.minimize-label {
    display: none;
}

.fullscreen-mode .expand-label {
    display: none;
}

.fullscreen-mode .minimize-label {
    display: inline;
}

/* Progress bar enhancements for fullscreen mode */
.fullscreen-mode .progress-played {
    background-color: var(--secondary-color);
    height: 5px;
}

.fullscreen-mode .progress-bar {
    height: 5px;
}

.fullscreen-mode .progress-handle {
    width: 16px;
    height: 16px;
    background-color: var(--secondary-color);
}

@media (max-width: 768px) {
    .expand-player-button {
        display: block;
    }
}

/**
 * Episode Player Integration
 */
.episode-player-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.episode-meta {
    flex-grow: 1;
}

.episode-meta .entry-title {
    margin-top: 0;
    margin-bottom: 10px;
}

.episode-show {
    margin-bottom: 5px;
    font-size: 0.9em;
}

.episode-duration {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    color: #666;
    font-size: 0.85em;
}

.duration-icon {
    display: inline-flex;
    align-items: center;
}

/* Make episode play button larger on episode pages */
.episode-player-header .episode-play-button {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.episode-player-header .episode-play-button svg {
    width: 30px;
    height: 30px;
}

/* RTL Support for episode player */
.rtl .episode-player-header {
    flex-direction: row-reverse;
}

/* Archive and list view */
.archive .episode-play-button,
.home .episode-play-button {
    margin-right: 15px;
    float: left;
}

.rtl.archive .episode-play-button,
.rtl.home .episode-play-button {
    margin-left: 15px;
    margin-right: 0;
    float: right;
}

/* Episode featured image */
.episode-featured-image {
    margin-bottom: 20px;
}

.episode-featured-image img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .episode-player-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .episode-meta {
        width: 100%;
    }

    .episode-duration {
        justify-content: center;
    }
}

/* Resume overlay for autoplay restrictions */
.resume-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    cursor: pointer;
    border-radius: 4px;
}

.resume-message {
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.resume-message svg {
    margin-bottom: 8px;
    animation: pulse 1.5s infinite;
}

.resume-message span {
    font-size: 14px;
    font-weight: bold;
}

/* RTL support for episode text */
.rtl .episode-text {
    direction: rtl;
    text-align: right;
    margin-right: 0;
    margin-left: 15px;
}

/* RTL support updates */
.rtl .volume-control {
    left: auto;
    right: 25px;
}

/* Update mobile responsiveness - remove platform links reference */
@media (max-width: 768px) {
    .volume-control {
        display: none;
    }
}

@media (max-width: 768px) {
    body.has-sticky-player {
        padding-bottom: 150px;
    }
}


/* Pagination Fix - ensure clickability in all contexts */
.page-numbers,
.nav-prev,
.nav-next,
html[dir="rtl"] .nav-prev,
html[dir="rtl"] .nav-next,
.page-numbers.prev,
.page-numbers.next,
html[dir="rtl"] .page-numbers.prev,
html[dir="rtl"] .page-numbers.next {
    cursor: pointer !important;
    position: relative !important;
    z-index: 5 !important;
    pointer-events: auto !important;
}

/* Footer styles for new layout */
.site-footer {
    background-color: #1e2348;
    color: #ffffff;
    padding: 2.5rem 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.footer-heading {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    color: #ffffff;
    position: relative;
}

.footer-heading:after {
    content: '';
    position: absolute;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    bottom: -8px;
    right: 0;
}

.footer-shows-list,
.footer-episodes-list,
.footer-about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-shows-list li,
.footer-episodes-list li,
.footer-about-list li {
    margin-bottom: 0.7rem;
}

.footer-shows-list a,
.footer-episodes-list a,
.footer-about-list a {
    color: #f9f9f9;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    font-size: 0.95rem;
}

.footer-shows-list a:hover,
.footer-episodes-list a:hover,
.footer-about-list a:hover {
    color: #ffffff;
}

/* Footer shows columns layout */
.footer-shows-columns {
    display: flex;
    gap: 2rem;
}

.footer-shows-columns .footer-shows-list {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing */
}

/* Ensure proper RTL support for columns */
html[dir="rtl"] .footer-shows-columns {
    flex-direction: row; /* Explicitly set direction for RTL */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .footer-shows-columns {
        flex-direction: column;
        gap: 0;
    }
    
    .footer-shows-columns .footer-shows-list {
        margin-bottom: 1rem;
    }
}

.footer-social {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    transition: background-color 0.3s ease;
}

.social-link:hover {
    background-color: var(--secondary-color);
}

.social-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.facebook-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><path fill="white" d="M512 0C229.12 0 0 229.12 0 512c0 255.18 187.2 467.37 432 505.78V660H302V512h130V399.2C432 270.88 508.4 200 625.39 200c56 0 114.61 10 114.61 10v126h-64.56c-63.6 0-83.44 39.47-83.44 79.96V512h142l-22.7 148H592v357.78c244.8-38.41 432-250.6 432-505.78C1024 229.12 794.88 0 512 0z"></path></svg>');
}

.twitter-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 1227"><path fill="white" d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"></path></svg>');
}

.instagram-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12 2.982c2.937 0 3.285.011 4.445.064 1.072.049 1.655.228 2.042.379.513.2.88.438 1.265.822.385.385.622.752.822 1.265.151.387.33.97.379 2.042.053 1.16.064 1.508.064 4.445 0 2.937-.011 3.285-.064 4.445-.049 1.072-.228 1.655-.379 2.042-.2.513-.438.88-.822 1.265-.385.385-.752.622-1.265.822-.387.151-.97.33-2.042.379-1.16.053-1.508.064-4.445.064-2.937 0-3.285-.011-4.445-.064-1.072-.049-1.655-.228-2.042-.379-.513-.2-.88-.438-1.265-.822-.385-.385-.622-.752-.822-1.265-.151-.387-.33-.97-.379-2.042-.053-1.16-.064-1.508-.064-4.445 0-2.937.011-3.285.064-4.445.049-1.072.228-1.655.379-2.042.2-.513.438-.88.822-1.265.385-.385.752-.622 1.265-.822.387-.151.97-.33 2.042-.379 1.16-.053 1.508-.064 4.445-.064M12 0C8.74 0 8.333.015 7.053.072 5.775.132 4.905.333 4.14.63c-.789.306-1.459.717-2.126 1.384S.935 3.35.63 4.14C.333 4.905.132 5.775.072 7.053.015 8.333 0 8.74 0 12s.015 3.667.072 4.947c.06 1.277.261 2.148.558 2.913.306.788.717 1.459 1.384 2.126.667.666 1.336 1.079 2.126 1.384.766.296 1.636.499 2.913.558C8.333 23.988 8.74 24 12 24s3.667-.015 4.947-.072c1.277-.06 2.148-.262 2.913-.558.788-.306 1.459-.718 2.126-1.384.666-.667 1.079-1.335 1.384-2.126.296-.765.499-1.636.558-2.913.06-1.28.072-1.687.072-4.947s-.015-3.667-.072-4.947c-.06-1.277-.262-2.149-.558-2.913-.306-.789-.718-1.459-1.384-2.126C21.319 1.347 20.651.935 19.86.63c-.765-.297-1.636-.499-2.913-.558C15.667.012 15.26 0 12 0zm0 5.838a6.162 6.162 0 100 12.324 6.162 6.162 0 000-12.324zM12 16a4 4 0 110-8 4 4 0 010 8zm7.846-10.405a1.441 1.441 0 11-2.883 0 1.441 1.441 0 012.883 0z"></path></svg>');
}

.youtube-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z"></path></svg>');
}

.tiktok-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M12.53.02C13.84 0 15.14.01 16.44 0c.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z"></path></svg>');
}

.telegram-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.064-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z"></path></svg>');
}

.whatsapp-icon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="white" d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"></path></svg>');
}

.footer-logo {
    display: flex;
    justify-content: center;
}

.footer-logo img {
    max-height: 120px;
    width: auto;
}

.footer-site-title {
    font-size: 2.5rem;
    margin: 0;
}

.footer-site-title a {
    color: #ffffff;
    text-decoration: none;
}

.copyright {
    font-size: 0.9rem;
    color: #d7d7d7;
    margin-top: 0.5rem;
    max-width: 220px;
    line-height: 1.5;
    direction: rtl;
    text-align: center;
    unicode-bidi: embed;
}

/* RTL support for footer */
html[dir="rtl"] .footer-heading:after {
    right: 0;
    left: auto;
}

/* Responsive footer */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

#page {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
}

/* More specific search button hiding */
.site-footer .search-form,
.site-footer .search-submit,
.site-footer .search-field,
.site-footer form[role="search"],
.site-footer button[type="submit"],
.site-footer .search-wrapper,
.site-footer svg[viewBox="0 0 24 24"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Fix for white space after footer */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    overflow-x: hidden;
}

/* Fix for sticky player */
.sticky-player {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    margin: 0;
}

/* Episode page specific fixes */
.single-episode .site-footer .search-submit,
.single-episode .site-footer button[type="submit"],
.single-episode .site-footer .search-wrapper,
.single-episode .site-footer form[role="search"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
}

.single-episode {
    overflow-x: hidden;
}

.single-episode #content {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* General cleanup for all pages */
.comment-form-cookies-consent {
    position: relative;
}

.site-footer .footer-logo img,
.footer-social .footer-logo img {
    max-height: 100px !important;
    width: auto !important;
    min-height: 90px !important;
}

.site-footer .footer-site-title,
.footer-social .footer-site-title {
    font-size: 3.5rem !important;
    margin: 0;  
    line-height: 1.2;
}

/* Footer mobile accordion styles */
.footer-toggle-indicator {
    display: none; /* Hidden by default */
    margin-right: 8px;
    font-size: 20px;
    font-weight: bold;
    float: left;
    transition: transform 0.3s ease;
}

@media (max-width: 768px) {
    .footer-toggle-indicator {
        display: inline-block;
    }
    
    .footer-heading {
        width: 100%;
        position: relative;
    }
    
    .footer-heading:after {
        display: none; /* Hide the default underline on mobile */
    }
    
    .footer-shows, 
    .footer-episodes, 
    .footer-about {
        padding: 0.1rem 0;
    }
    
    /* Make the social media section always visible */
    .footer-social {
        padding-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    /* Base styles for all headings */
    .footer-heading {
        width: 100%;
        position: relative;
        user-select: none;
    }
    
    /* Style for accordion headings */
    .footer-shows .footer-heading,
    .footer-episodes .footer-heading,
    .footer-about .footer-heading {
        cursor: pointer;
        text-align: right;
    }
    
    /* Style for social heading (not an accordion) */
    .footer-social {
        cursor: default;
        text-align: center;
    }

    /* Style for social heading (not an accordion) */
    .footer-heading {
        cursor: default;
        text-align: right;
    }
    
    /* Center "ابق على تواصل معنا" heading in mobile footer */
    .footer-social .footer-heading {
        text-align: center !important;
    }

    /* Additional specific rule to ensure centering */
    .footer-grid .footer-social h3.footer-heading {
        text-align: center !important;
    }
}

/* RTL support for mobile footer */
html[dir="rtl"] .footer-toggle-indicator {
    float: right;
    margin-right: 0;
    margin-left: 8px;
}

@media (max-width: 768px) {
    /* No need for additional RTL text alignment since we're already using text-align: right for the headings */
}

/* Interactive Post Type Styles */
.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.interactive-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.interactive-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.interactive-thumbnail {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.interactive-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.interactive-item:hover .interactive-thumbnail img {
    transform: scale(1.05);
}

.interactive-content {
    padding: 20px;
    position: relative;
}

.interactive-type-badge {
    position: absolute;
    top: -15px;
    right: 20px;
    background-color: #0073aa;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.interactive-item .entry-title {
    margin-top: 10px;
    margin-bottom: 15px;
    font-size: 20px;
    line-height: 1.3;
}

.interactive-item .entry-title a {
    color: #333;
    text-decoration: none;
}

.interactive-item .entry-title a:hover {
    color: #0073aa;
}

.interactive-item .entry-title a:hover {
    color: #0073aa;
}

.interactive-item .entry-summary {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
}

.interactive-link {
    display: inline-block;
    padding: 8px 20px;
    background-color: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.interactive-link:hover {
    background-color: #005177;
    color: #fff;
}

/* Interactive Filters */
.interactive-filters {
    margin: 20px 0;
    padding: 15px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.interactive-filters h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.interactive-type-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.interactive-type-filters li a {
    display: inline-block;
    padding: 5px 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.interactive-type-filters li a:hover,
.interactive-type-filters li a.active {
    background-color: #0073aa;
    border-color: #0073aa;
    color: #fff;
}

/* Single Interactive Post */
.single-interactive .entry-meta {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.single-interactive .interactive-type {
    background-color: #0073aa;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-weight: bold;
}

.single-interactive .post-thumbnail {
    margin-bottom: 30px;
}

.single-interactive .post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.single-interactive .entry-content {
    margin-bottom: 30px;
}

.single-interactive .entry-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: #666;
}

.single-interactive .cat-links,
.single-interactive .tags-links {
    display: block;
    margin-bottom: 10px;
}

/* No Interactives Found */
.no-interactives {
    text-align: center;
    padding: 50px 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin: 30px 0;
}

.no-interactives h2 {
    color: #333;
    margin-bottom: 15px;
}

.no-interactives p {
    color: #666;
    font-size: 16px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .interactive-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .interactive-thumbnail {
        height: 180px;
    }
    
    .interactive-content {
        padding: 15px;
    }
    
    .interactive-item .entry-title {
        font-size: 18px;
    }
    
    .interactive-type-filters {
        flex-direction: column;
        gap: 5px;
    }
    
    .interactive-type-filters li {
        width: 100%;
    }
    
    .interactive-type-filters li a {
        display: block;
        text-align: center;
    }
}

/* Ensure consistent UTF-8 character display */
html, body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Text selection color */
::selection {
    background-color: #333;
    color: #fff;
}

/* Responsive settings for speed button */
@media (max-width: 992px) {
    .speed-button {
        transform: scale(2.2) !important;
    }
}

@media (max-width: 850px) {
    .speed-button {
        transform: scale(2) !important;
    }
}

@media (max-width: 768px) {
    .speed-button {
        transform: scale(1.3) !important;
    }
}

@media (max-width: 480px) {
    .speed-button {
        transform: scale(1.2) !important;
    }
}

@media (max-width: 360px) {
    .speed-button {
        transform: scale(1.1) !important;
    }
}

/* SPA navigation margin fix */
#primary, 
.site-main, 
.site-main-content,
main {
    margin-top: 30px !important; /* Force proper top margin */
}

/* Ensure content has spacing after navigation */
.site-header + #primary,
.site-header + .site-main,
.site-header + .site-main-content,
.site-header + main,
.mega-menu + #primary,
.mega-menu + .site-main,
.mega-menu + .site-main-content,
.mega-menu + main {
    margin-top: 30px !important;
}

/* Hero Content Type Indicator */
.hero-content-type {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
    .hero-content-type {
        top: 10px;
        font-size: 12px;
        padding: 4px 12px;
    }
}
