/* ============================================
           CUSTOM STYLES - RESPONSIVE FIX
           ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f8f9fa;
    transition: background 0.3s ease;
}

/* Dark Mode */
body.dark-mode {
    background: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .top-bar,
body.dark-mode .navbar,
body.dark-mode .footer {
    background: #16213e !important;
}

body.dark-mode .post-card,
body.dark-mode .card,
body.dark-mode .podcast-player,
body.dark-mode .radio-player {
    background: #16213e !important;
    color: #e0e0e0 !important;
    border-color: #2a3a5e !important;
}

body.dark-mode .card-title a,
body.dark-mode .podcast-title {
    color: #e0e0e0 !important;
}

body.dark-mode .bg-light {
    background: #16213e !important;
}

/* Top Bar */
.top-bar {
    background: #1a1a2e;
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
}

.top-bar a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: #f39c12;
}

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    transition: background 0.3s ease;
}

body.dark-mode .navbar {
    background: #16213e !important;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: #1a1a2e;
}

body.dark-mode .navbar-brand {
    color: #fff;
}

.navbar-brand span {
    color: #e74c3c;
}

.navbar-brand img {
    display: inline-block;
    margin-right: 10px;
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.nav-link {
    font-weight: 600;
    color: #333;
    padding: 10px 18px !important;
    transition: color 0.3s;
}

body.dark-mode .nav-link {
    color: #ccc;
}

.nav-link:hover,
.nav-link.active {
    color: #e74c3c !important;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    background: #f1f1f1;
    border-radius: 30px;
    padding: 2px;
    overflow: hidden;
}

body.dark-mode .search-form {
    background: #2a3a5e;
}

.search-form input {
    border: none;
    background: transparent;
    padding: 8px 15px;
    outline: none;
    width: 180px;
    font-size: 0.9rem;
    color: #333;
}

body.dark-mode .search-form input {
    color: #fff;
}

.search-form input::placeholder {
    color: #999;
}

.search-form button {
    background: #e74c3c;
    border: none;
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-form button:hover {
    background: #c0392b;
}

/* Breadcrumb */
.breadcrumb-area {
    background: #f1f1f1;
    padding: 12px 0;
    margin-top: 0;
}

body.dark-mode .breadcrumb-area {
    background: #16213e;
}

.breadcrumb {
    margin: 0;
    background: transparent;
}

.breadcrumb-item a {
    color: #e74c3c;
    text-decoration: none;
}

/* Hero Slider */
.hero-slider {
    margin-bottom: 30px;
}

.heroSwiper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.heroSwiper .swiper-slide {
    position: relative;
    min-height: 400px;
}

.heroSwiper .swiper-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 50px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
}

.hero-slide-content .category {
    display: inline-block;
    background: #e74c3c;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.hero-slide-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.hero-slide-content p {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 10px;
}

.hero-slide-content .meta {
    font-size: 0.85rem;
    opacity: 0.8;
}

.hero-slide-content .meta span {
    margin-right: 15px;
}

/* Radio Player */
.radio-player-section {
    margin: 20px 0;
}

.radio-player {
    background: #fff;
    border-radius: 15px;
    padding: 20px 30px;
    box-shadow: 0 3px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.radio-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    flex-shrink: 0;
}

.radio-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a1a2e;
}

body.dark-mode .radio-title {
    color: #fff;
}

.radio-subtitle {
    font-size: 0.85rem;
    color: #666;
}

body.dark-mode .radio-subtitle {
    color: #aaa;
}

.radio-controls {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: flex-end;
}

.btn-radio {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-radio:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.4);
}

.btn-radio.playing {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(231, 76, 60, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.waveform {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 40px;
    padding: 0 10px;
}

.waveform .bar {
    width: 4px;
    height: 15px;
    background: #e74c3c;
    border-radius: 3px;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.waveform.radio-stopped .bar {
    height: 10px !important;
    opacity: 0.3;
}

.waveform:not(.radio-stopped) .bar:nth-child(1) {
    height: 25px;
    animation: wave 0.8s ease-in-out infinite alternate;
}

.waveform:not(.radio-stopped) .bar:nth-child(2) {
    height: 35px;
    animation: wave 1.0s ease-in-out infinite alternate 0.1s;
}

.waveform:not(.radio-stopped) .bar:nth-child(3) {
    height: 20px;
    animation: wave 0.6s ease-in-out infinite alternate 0.2s;
}

.waveform:not(.radio-stopped) .bar:nth-child(4) {
    height: 40px;
    animation: wave 1.2s ease-in-out infinite alternate 0.3s;
}

.waveform:not(.radio-stopped) .bar:nth-child(5) {
    height: 28px;
    animation: wave 0.9s ease-in-out infinite alternate 0.4s;
}

.waveform:not(.radio-stopped) .bar:nth-child(6) {
    height: 32px;
    animation: wave 1.1s ease-in-out infinite alternate 0.5s;
}

.waveform:not(.radio-stopped) .bar:nth-child(7) {
    height: 22px;
    animation: wave 0.7s ease-in-out infinite alternate 0.6s;
}

.waveform:not(.radio-stopped) .bar:nth-child(8) {
    height: 38px;
    animation: wave 1.3s ease-in-out infinite alternate 0.7s;
}

.waveform:not(.radio-stopped) .bar:nth-child(9) {
    height: 26px;
    animation: wave 0.5s ease-in-out infinite alternate 0.8s;
}

.waveform:not(.radio-stopped) .bar:nth-child(10) {
    height: 30px;
    animation: wave 1.4s ease-in-out infinite alternate 0.9s;
}

@keyframes wave {
    0% {
        transform: scaleY(0.3);
    }

    100% {
        transform: scaleY(1);
    }
}

.radio-status {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.radio-status.offline {
    color: #999;
}

.radio-status.live {
    color: #2ecc71;
}

.radio-status.error {
    color: #e74c3c;
}

/* Section Title */
.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.section-title h3 {
    font-weight: 800;
    font-size: 1.8rem;
    color: #1a1a2e;
    margin: 0;
    position: relative;
}

body.dark-mode .section-title h3 {
    color: #fff;
}

.section-title h3::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 50px;
    height: 3px;
    background: #e74c3c;
    border-radius: 3px;
}

.see-all {
    color: #e74c3c;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.see-all:hover {
    color: #c0392b;
    transform: translateX(3px);
}

/* Post Card */
.post-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.post-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.post-card .card-body {
    padding: 20px;
}

.post-category {
    display: inline-block;
    background: #e74c3c;
    color: #fff;
    padding: 2px 14px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.post-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.post-card .card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: color 0.3s;
}

.post-card .card-title a:hover {
    color: #e74c3c;
}

.post-card .card-text {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

body.dark-mode .post-card .card-text {
    color: #aaa;
}

.post-meta {
    font-size: 0.8rem;
    color: #888;
}

.post-meta span {
    margin-right: 10px;
}

/* Podcast Section - RESPONSIVE FIX */
.podcast-section {
    padding: 30px 0;
}

.podcast-player {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    gap: 15px;
    width: 100%;
}

.podcast-player:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

body.dark-mode .podcast-player {
    background: #16213e;
}

.podcast-thumb {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
}

.podcast-info {
    flex: 1;
    min-width: 0;
}

.podcast-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a2e;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

body.dark-mode .podcast-title {
    color: #fff;
}

.podcast-meta {
    font-size: 0.8rem;
    color: #888;
}

.podcast-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-play {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-play:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.btn-play.playing {
    background: #2ecc71;
    animation: pulse 1.5s infinite;
}

/* Counter Section */
.counter-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    padding: 60px 0;
    color: #fff;
}

.counter-box {
    text-align: center;
}

.counter-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #e74c3c;
}

.counter-number {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.counter-label {
    font-size: 1rem;
    opacity: 0.8;
}

/* Video Section */
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Book Card */
.book-card {
    text-align: center;
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    height: 100%;
}

body.dark-mode .book-card {
    background: #16213e;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.book-card a {
    text-decoration: none;
    color: inherit;
}

.book-card img {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 12px;
}

.book-card h6 {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: #1a1a2e;
}

body.dark-mode .book-card h6 {
    color: #fff;
}

.book-author {
    font-size: 0.85rem;
    color: #666;
}

body.dark-mode .book-author {
    color: #aaa;
}

.book-year {
    font-size: 0.75rem;
    color: #999;
    margin-top: 3px;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: #fff;
    font-size: 2rem;
}

.gallery-item:hover .overlay {
    opacity: 1;
}

/* Infinite Loader */
.infinite-loader {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.3);
}

.loader-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Scroll Top */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: #e74c3c;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(231, 76, 60, 0.3);
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    background: #c0392b;
    transform: translateY(-3px);
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 30px;
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: #e74c3c;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    color: #fff;
    margin-right: 8px;
    transition: all 0.3s;
}

.social-links a:hover {
    background: #e74c3c;
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
}

.footer-bottom a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-bottom a:hover {
    color: #e74c3c;
}

/* ============================================
           RESPONSIVE STYLES
           ============================================ */

/* Mobile First - Small Screens */
@media (max-width: 575.98px) {

    /* Top Bar - Hide social icons on very small screens */
    .top-bar .col-md-6.text-end {
        display: none;
    }

    .top-bar .col-md-6:first-child {
        width: 100%;
        text-align: center;
    }

    /* Navbar */
    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        width: 35px;
        height: 35px;
    }

    .search-form input {
        width: 120px;
        font-size: 0.8rem;
    }

    /* Hero Slider */
    .heroSwiper .swiper-slide img {
        height: 250px;
    }

    .hero-slide-content {
        padding: 20px 15px;
    }

    .hero-slide-content h2 {
        font-size: 1.1rem;
    }

    .hero-slide-content p {
        font-size: 0.8rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hero-slide-content .meta {
        font-size: 0.7rem;
    }

    /* Radio Player */
    .radio-player {
        padding: 15px;
    }

    .radio-controls {
        justify-content: center;
        margin-top: 10px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .radio-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }

    .radio-title {
        font-size: 1rem;
    }

    .radio-subtitle {
        font-size: 0.75rem;
    }

    .btn-radio {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .waveform {
        height: 30px;
    }

    .waveform .bar {
        width: 3px;
    }

    /* Section Title */
    .section-title h3 {
        font-size: 1.3rem;
    }

    .section-title h3::after {
        width: 30px;
    }

    /* Podcast Player - RESPONSIVE FIX */
    .podcast-player {
        flex-wrap: wrap;
        padding: 12px 15px;
        gap: 10px;
    }

    .podcast-thumb {
        width: 60px;
        height: 60px;
    }

    .podcast-info {
        flex: 1;
        min-width: 120px;
    }

    .podcast-title {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }

    .podcast-meta {
        font-size: 0.7rem;
    }

    .btn-play {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }

    /* Post Cards */
    .post-card .card-img-top {
        height: 180px;
    }

    .post-card .card-title {
        font-size: 0.95rem;
    }

    /* Counter */
    .counter-number {
        font-size: 2rem;
    }

    /* Books */
    .book-card img {
        max-height: 180px;
    }

    .book-card h6 {
        font-size: 0.85rem;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    /* Footer */
    .footer {
        padding: 30px 0 15px;
    }

    .footer h5 {
        font-size: 1rem;
    }

    /* Scroll Top */
    .scroll-top {
        width: 40px;
        height: 40px;
        bottom: 15px;
        right: 15px;
        font-size: 1rem;
    }
}

/* Tablet Screens */
@media (min-width: 576px) and (max-width: 991.98px) {

    /* Hero */
    .heroSwiper .swiper-slide img {
        height: 380px;
    }

    .hero-slide-content h2 {
        font-size: 1.5rem;
    }

    /* Podcast - Tablet */
    .podcast-player {
        padding: 15px 18px;
    }

    .podcast-thumb {
        width: 65px;
        height: 65px;
    }

    /* Post Cards */
    .post-card .card-img-top {
        height: 200px;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Large Screens */
@media (min-width: 992px) {
    .podcast-player {
        padding: 18px 25px;
    }

    .podcast-thumb {
        width: 80px;
        height: 80px;
    }

    .podcast-title {
        font-size: 1.05rem;
    }
}

/* Extra Small Landscape Fix */
@media (max-height: 600px) and (orientation: landscape) {
    .heroSwiper .swiper-slide img {
        height: 200px;
    }
}

/* Print Styles */
@media print {

    .top-bar,
    .navbar,
    .footer,
    .scroll-top,
    .radio-player-section {
        display: none !important;
    }
}