/* Custom Styles for AL-QAYIM.TV */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #2b0402;
    --primary-dark: #1e8a57;
    --secondary-color: #8051d4;
    --dark-color: #151f30;
    --dark-light: #1a223f;
    --text-color: #e0e0e0;
    --text-muted: #8fa0bc;
    --border-radius: 10px;
    --box-shadow: 0 5px 25px 0 rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
    --font-primary: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 80px 0 40px;
    background: linear-gradient(135deg, var(black) 0%, var(--dark-light) 100%);
    color: white;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: var(--text-muted);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.video-card {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--box-shadow);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    opacity: 0.9;
}

.video-card:hover .video-thumbnail img {
    transform: scale(1.05);
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    padding: 15px;
}

.video-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
    text-overflow: ellipsis;
    max-height: 3em;
    min-height: 2.8em;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: white;
    margin: 0;
}

.view-all {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.view-all:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Featured Section */
.featured-section {
    position: relative;
    margin: 40px 0;
}

.featured-card {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: var(--box-shadow);
}

.featured-thumbnail {
    position: relative;
    padding-top: 56.25%;
    overflow: hidden;
}

.featured-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.featured-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: white;
}

.featured-description {
    color: var(--text-muted);
    margin-bottom: 15px;
    flex-grow: 1;
}

/* RTL Adjustments */
[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .section-title {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .featured-title {
        font-size: 1.3rem;
    }
    
    .btn-custom {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Speakers Page */
:root {
    --primary-color: #2b0402;
    --primary-dark: #2b0402;
    --dark-color: #151f30;
    --dark-light: #1a223f;
    --text-color: #e0e0e0;
    --text-muted: #8fa0bc;
    --border-radius: 10px;
    --box-shadow: 0 5px 25px 0 rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
}

body.page-speakers {
    color: var(--text-color);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

.page-speakers .main {
    min-height: calc(100vh - 200px);
    padding: 1rem 0;
}

/* =====================
   BREADCRUMB STYLES
   ===================== */
.breadcrumb {
    --breadcrumb-bg: rgba(26, 34, 63, 0.7);
    --breadcrumb-padding: 0.65rem 1.25rem;
    --breadcrumb-radius: 8px;
    --breadcrumb-spacing: 1.5rem;
    --breadcrumb-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    background: var(--breadcrumb-bg);
    backdrop-filter: blur(8px);
    border-radius: var(--breadcrumb-radius);
    padding: var(--breadcrumb-padding);
    margin: 0 0 var(--breadcrumb-spacing);
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    list-style: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    position: relative;
    transition: var(--breadcrumb-transition);
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--breadcrumb-transition);
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    position: relative;
    z-index: 1;
}

.breadcrumb-item a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 165, 106, 0.1);
    border-radius: 4px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover::before {
    transform: scaleX(1);
}

.breadcrumb-item.active {
    color: var(--primary-color);
    font-weight: 500;
}

.breadcrumb-item + .breadcrumb-item {
    margin-left: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    display: inline-block;
    padding: 0 0.75rem 0 0.5rem;
    color: var(--text-muted);
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.7;
    transform: translateY(-1px);
    transition: var(--breadcrumb-transition);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .breadcrumb {
        padding: 0.5rem 0.75rem;
        border-radius: 6px;
    }
    
    .breadcrumb-item {
        font-size: 0.8rem;
    }
    
    .breadcrumb-item a {
        padding: 0.2rem 0.4rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 0.5rem 0 0.25rem;
    }
}

/* Animation for breadcrumb items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.breadcrumb-item {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.breadcrumb-item:nth-child(1) { animation-delay: 0.1s; }
.breadcrumb-item:nth-child(2) { animation-delay: 0.2s; }
.breadcrumb-item:nth-child(3) { animation-delay: 0.3s; }
.breadcrumb-item:nth-child(4) { animation-delay: 0.4s; }

/* Page Header */
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.page-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: white;
    margin: 0 0 1rem;
    display: flex;
    align-items: center;
}

.page-title i {
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.speakers-count .badge {
    background-color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
}

/* Speakers Grid */
.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 0 auto;
    padding: 0 1rem;
    max-width: 1400px;
}

.speaker-card {
    background: var(--dark-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.speaker-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.speaker-image {
    position: relative;
    padding-top: 100%;
    background: var(--dark-color);
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--dark-light) 100%);
}

.speaker-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(15%) contrast(1.1) brightness(0.9);
}

.speaker-card:hover .speaker-image img {
    transform: scale(1.08);
    filter: grayscale(0%) contrast(1.1) brightness(1);
}

.speaker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 1;
    transition: var(--transition);
    padding: 1rem;
}

.speaker-card:hover .speaker-overlay {
    opacity: 1;
}

.view-profile {
    color: white;
    background: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    transform: translateY(10px);
    transition: all 0.3s ease;
    opacity: 0;
}

.speaker-card:hover .view-profile {
    transform: translateY(0);
    opacity: 1;
}

.speaker-info {
    padding: 1rem;
    text-align: center;
    background: var(--dark-light);
    width: 100%;
}

.speaker-name {
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Pagination */
.pagination {
    margin: 3rem 0 1rem;
    justify-content: center;
}

.page-item {
    margin: 0 0.25rem;
}

.page-link {
    color: var(--text-color);
    background-color: var(--dark-light);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 6px !important;
    transition: all 0.2s ease;
    min-width: 42px;
    text-align: center;
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    background-color: var(--dark-light);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    opacity: 0.7;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

@media (max-width: 992px) {
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 1.75rem;
    }
    
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    
    .speaker-name {
        font-size: 0.95rem;
    }
    
    .speaker-info {
        padding: 0.85rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .speakers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .speaker-name {
        font-size: 0.8rem;
    }
    
    .page-link {
        padding: 0.4rem 0.8rem;
        min-width: 36px;
    }
}

/* Speakers Section */
.speakers-section {
    margin: 4rem 0;
    position: relative;
    padding: 2rem 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.8) 0%, rgba(26, 34, 63, 0.5) 100%);
    border-radius: 12px;
}

.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0.5rem 0;
}

.speaker-card {
    background: var(--dark-light);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.speaker-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-color);
}

.speaker-image {
    width: 100%;
    padding-top: 100%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a223f 0%, #0f172a 100%);
    margin-bottom: 0;
}

.speaker-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    filter: grayscale(15%) contrast(1.1) brightness(0.9);
}

.speaker-card:hover .speaker-image img {
    transform: scale(1.08);
    filter: grayscale(0%) contrast(1.1) brightness(1);
}

.speaker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 1;
    transition: var(--transition);
    padding: 1rem;
}

.speaker-card:hover .speaker-overlay {
    opacity: 1;
}

.view-profile {
    color: white;
    background: var(--primary-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    transform: translateY(10px);
    transition: all 0.3s ease;
    opacity: 0;
}

.speaker-card:hover .view-profile {
    transform: translateY(0);
    opacity: 1;
}

.speaker-info {
    padding: 1.25rem 0.75rem;
    position: relative;
    z-index: 1;
    background: linear-gradient(to bottom, rgba(26, 34, 63, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    margin-top: -4px;
}

.speaker-name {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    position: relative;
    display: inline-block;
}

.speaker-name::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.speaker-card:hover .speaker-name::after {
    width: 40px;
}

/* Speaker Grid Navigation */
.speakers-navigation {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.speaker-nav-btn {
    background: var(--dark-light);
    border: none;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.speaker-nav-btn:hover {
    background: var(--primary-color);
    color: white;
}

.speaker-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--dark-light);
    color: var(--text-muted);
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 992px) {
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .speakers-section {
        margin: 3rem 0;
    }
    
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 1rem;
    }
    
    .speaker-name {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .speakers-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
    }
    
    .speaker-name {
        font-size: 0.85rem;
    }
    
    .speaker-info {
        padding: 0.85rem 0.5rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.back-to-top:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(37, 165, 106, 0.4);
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Custom Buttons */
.btn-custom {
    background: #2b0402;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-custom:hover {
    background: #2b0402;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px #2b0402;
}

.btn-custom i {
    margin-left: 8px;
}

/* Live Badge */
.live-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff4e45;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    z-index: 2;
}

.live-badge::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    margin-right: 5px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(0.95); opacity: 1; }
}
