:root {
    --primary-color: #1a5fb4;
    --secondary-color: #e6f2ff;
    --accent-color: #ff6b6b;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-color);
    color: #333;
    margin: 0;
    padding: 0;
}

/* Header Styles dengan Gradien */
.main-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0d4a9c 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.header-content {
    position: relative;
    z-index: 1;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
}

.brand-logo {
    font-size: 2rem;
    margin-right: 10px;
    color: #ffc107;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
/*
.brand-text h1 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.brand-text .tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
}
*/
/* styles.css */
/* ... kode sebelumnya ... */

/* Brand Text Styles 
.brand-text {
    position: relative;
    text-align: left;
}

.brand-text h1 {
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
    min-height: 2rem; Untuk menghindari layout shift 
    transition: opacity 0.5s ease, transform 0.5s ease;
}
*/
.brand-text .tagline {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 2px;
    min-height: 1.2rem; /* Untuk menghindari layout shift */
    display: block;
    transition: opacity 0.5s ease, transform 0.5s ease;
}
/* styles.css - Tambahan untuk slideshow */
.brand-text h1, 
.brand-text .tagline {
    transition: opacity 0.3s ease;
}

.slide-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #ffc107;
    transition: width 5s linear; /* Sesuaikan dengan slideDuration */
}

.slide-progress-bar.active {
    width: 100%;
}
/* Slide Animation */
.slide-title {
    display: inline-block;
    animation: slideInLeft 0.5s ease forwards;
}

.slide-tagline {
    display: inline-block;
    animation: slideInRight 0.5s ease forwards;
}

.slide-title.fade-out,
.slide-tagline.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Slide Dots */
.slide-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 8px;
}

.slide-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.slide-dot:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.slide-dot.active {
    background-color: #ffc107;
    transform: scale(1.2);
}

/* Slide Controls */
.slide-controls {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}

.slide-control-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.3s;
}

.slide-control-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: scale(1.1);
}

/* Slide Progress Bar */
.slide-progress {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.slide-progress-bar {
    height: 100%;
    width: 0%;
    background-color: #ffc107;
    transition: width 3s linear;
}

.slide-progress-bar.active {
    width: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .brand-text {
        text-align: center;
    }
    
    .brand-text h1 {
        font-size: 1.5rem;
        min-height: 1.8rem;
    }
    
    .brand-text .tagline {
        font-size: 0.75rem;
        min-height: 1rem;
    }
    
    .slide-controls {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        justify-content: center;
        margin-top: 8px;
    }
}


/* Auth Buttons Styles */
.auth-buttons .btn {
    border-radius: 25px;
    padding: 6px 15px;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.auth-buttons .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.auth-buttons .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.auth-buttons .btn-light {
    background: white;
    color: var(--primary-color);
    border: 2px solid white;
}

.auth-buttons .btn-light:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* User Profile Styles */
.user-profile .dropdown-toggle {
    border-radius: 25px;
    padding: 6px 15px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.user-profile .dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.user-profile .dropdown-toggle:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

.user-profile .dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    padding: 10px 0;
    margin-top: 10px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-profile .dropdown-item {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--dark-color);
    transition: all 0.2s;
}

.user-profile .dropdown-item:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding-left: 25px;
}

.user-profile .dropdown-item i {
    width: 20px;
    color: var(--primary-color);
}

.user-profile .dropdown-divider {
    margin: 8px 0;
}

/* Premium Badge */
.premium-badge {
    background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
    color: #8b4513;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    margin-left: 5px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

/* Header Bottom */
.header-bottom {
    background: rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    border-radius: 10px;
    margin-top: 10px;
}

.stats-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.9;
}

.stat-item i {
    margin-right: 5px;
    color: #ffc107;
}

/* Search Box Styles */
.search-container {
    margin-bottom: 30px;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.95);
}

.search-input:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(26, 95, 180, 0.2);
    background: white;
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.search-button:hover {
    background: #0d4a9c;
}

/* Content Wrapper */
.content-wrapper {
    padding-bottom: 80px;
}

/* Kategori Styles */
.categories-section {
    margin-bottom: 30px;
}

.categories-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.see-all {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.see-all:hover {
    text-decoration: underline;
}

.categories-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px;
    scrollbar-width: thin;
}

.categories-container::-webkit-scrollbar {
    height: 6px;
}

.categories-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

.category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 15px;
    min-width: 100px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.category-btn:hover {
    background-color: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    color: var(--primary-color);
}

.category-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

.category-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.category-name {
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
}

.category-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--accent-color);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.card-video {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-video:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.video-thumbnail {
    height: 140px;
    background-color: #2c3e50;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail .play-btn {
    background-color: rgba(255, 255, 255, 0.9);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.card-video:hover .play-btn {
    transform: scale(1.1);
}

.video-stats {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 6px;
}

.video-title {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 8px;
    color: #2c3e50;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-description {
    font-size: 0.8rem;
    color: #555;
    line-height: 1.4;
    margin-bottom: 10px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.channel-name {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 5px;
    font-size: 0.8rem;
}

/* Ustadz Styles */
.ustadz-section {
    margin-bottom: 30px;
}

.ustadz-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.ustadz-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.ustadz-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.ustadz-avatar {
    height: 100px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.ustadz-info {
    padding: 15px;
    flex-grow: 1;
}

.ustadz-name {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 5px;
    color: #2c3e50;
}

.ustadz-specialization {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 10px;
}

.ustadz-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #888;
    margin-bottom: 10px;
}

.subscribe-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    width: 100%;
    transition: background-color 0.3s;
}

.subscribe-btn:hover {
    background-color: #0d4a9c;
}

.subscribe-btn.subscribed {
    background-color: #6c757d;
}

/* Promo Banner */
.promo-banner {
    background: linear-gradient(to right, #ff6b6b, #ff8e53);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.2);
}

.promo-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.promo-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.promo-date {
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 20px;
    border-radius: 50px;
    display: inline-block;
    font-weight: 600;
    margin-bottom: 10px;
}

.promo-discount {
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 5px;
}

.promo-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Divider */
.divider {
    border-top: 1px solid #ddd;
    margin: 30px 0;
    position: relative;
}

.divider:before {
    content: "•••";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f8f9fa;
    padding: 0 15px;
    color: #aaa;
    font-size: 12px;
}

/* Section Title */
.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

/* Search Suggestions */
.suggested-searches {
    margin-top: 15px;
    text-align: center;
}

.suggested-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}

.suggested-tag {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.suggested-tag:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Carousel Styles */
.carousel-video {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
}

.carousel-item {
    height: 400px;
}

.carousel-item .video-thumbnail {
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item .video-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6));
}

.carousel-item .video-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    color: white;
    z-index: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.carousel-item .video-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-item .video-description {
    font-size: 1rem;
    margin-bottom: 15px;
    opacity: 0.9;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-item .play-btn-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1;
    transition: transform 0.3s;
}

.carousel-item:hover .play-btn-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

/* Footer Menu Styles */
.footer-menu {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.footer-menu .menu-item {
    text-align: center;
    color: #666;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: color 0.3s;
}

.footer-menu .menu-item:hover {
    color: var(--primary-color);
}

.footer-menu .menu-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.footer-menu .menu-icon {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.footer-menu .menu-text {
    font-size: 0.8rem;
}

.footer-menu .add-button {
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-top: -25px;
    box-shadow: 0 4px 10px rgba(26, 95, 180, 0.3);
    border: 4px solid #f8f9fa;
    transition: background-color 0.3s, transform 0.2s;
}

.footer-menu .add-button:hover {
    background-color: #0d4a9c;
    transform: scale(1.05);
}

/* Search Results Styles */
.search-results-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary-color);
}

.search-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.no-results-icon {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 20px;
}

.clear-search {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    margin-left: 15px;
}

.clear-search:hover {
    text-decoration: underline;
}

.search-highlight {
    background-color: yellow;
    padding: 2px 0;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .brand {
        justify-content: center;
    }

    .auth-buttons,
    .user-profile {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .brand-text h1 {
        font-size: 1.5rem;
    }

    .carousel-item {
        height: 300px;
    }

    .carousel-item .video-title {
        font-size: 1.4rem;
    }

    .carousel-item .video-description {
        font-size: 0.9rem;
        -webkit-line-clamp: 2;
    }

    .promo-title {
        font-size: 1.5rem;
    }

    .promo-subtitle {
        font-size: 1.1rem;
    }

    .promo-discount {
        font-size: 2rem;
    }

    .ustadz-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .video-thumbnail {
        height: 180px;
    }

    .video-title {
        font-size: 1.1rem;
    }

    .video-description {
        font-size: 0.9rem;
    }

    .ustadz-container {
        grid-template-columns: repeat(4, 1fr);
    }

    .ustadz-avatar {
        height: 120px;
    }
}

@media (min-width: 992px) {
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ustadz-container {
        grid-template-columns: repeat(6, 1fr);
    }
}

