/* ===========================================
   Mada Platform - Teacher Selection Page
   Hero, Breadcrumb, Teacher Cards, Video Modal
   =========================================== */

/* ===========================================
   HERO SECTION
   =========================================== */
.subject-hero {
    background: var(--dark-gradient);
    color: white;
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
}

/* Animated Bubbles */
.subject-hero .bubbles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.subject-hero .bubble {
    position: absolute;
    bottom: -100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.15);
    animation: floatUp 15s infinite ease-in-out;
}

.subject-hero .bubble:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-delay: 0s; animation-duration: 18s; }
.subject-hero .bubble:nth-child(2) { left: 25%; width: 40px; height: 40px; animation-delay: 2s; animation-duration: 15s; }
.subject-hero .bubble:nth-child(3) { left: 40%; width: 100px; height: 100px; animation-delay: 4s; animation-duration: 20s; }
.subject-hero .bubble:nth-child(4) { left: 55%; width: 60px; height: 60px; animation-delay: 1s; animation-duration: 16s; }
.subject-hero .bubble:nth-child(5) { left: 70%; width: 90px; height: 90px; animation-delay: 3s; animation-duration: 17s; }
.subject-hero .bubble:nth-child(6) { left: 85%; width: 50px; height: 50px; animation-delay: 5s; animation-duration: 14s; }

@keyframes floatUp {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translateY(-120vh) rotate(720deg); opacity: 0; }
}

/* Remove old SVG pattern - using bubbles now */

/* ===========================================
   BREADCRUMB NAVIGATION
   =========================================== */
.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: 50px;
    width: fit-content;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.2);
    animation: slideRightFade 0.8s ease forwards;
}

.breadcrumb-nav a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb-nav a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* ===========================================
   SUBJECT HEADER CONTENT
   =========================================== */
.subject-header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    animation: slideUpFade 0.8s ease 0.2s forwards;
    opacity: 0;
}

.subject-icon-large {
    font-size: 5rem;
    background: var(--icon-bg, rgba(255,255,255,0.2));
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: var(--icon-justify, center);
    border-radius: 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    position: relative;
}

.subject-term-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
}

.subject-term-badge.term-term1 {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
}

.subject-term-badge.term-term2 {
    background: linear-gradient(135deg, #1d4ed8, #0ea5e9);
}

.subject-name-hero {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.subject-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* ===========================================
   TEACHERS SECTION
   =========================================== */
.teachers-section {
    padding: 60px 0;
    background: var(--bg-light);
    overflow-x: hidden;
}

.section-title-metallic {
    text-align: center;
    font-size: 2rem;
    margin: 0 auto 50px;
    font-weight: 800;
    color: #333;
    position: relative;
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 0 12px;
    left: auto;
    transform: none;
}

.section-title-metallic::after {
    content: '';
    display: block;
    width: 60%;
    height: 4px;
    background: var(--primary-gradient);
    margin: 10px auto 0;
    border-radius: 2px;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

.empty-content-card {
    display: block;
    padding: 24px 22px;
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.28);
    background:
        radial-gradient(circle at 88% 14%, rgba(16, 185, 129, 0.14), rgba(16, 185, 129, 0)),
        radial-gradient(circle at 12% 88%, rgba(59, 130, 246, 0.24), rgba(59, 130, 246, 0)),
        linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.9));
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.35);
    position: relative;
    overflow: hidden;
}

.empty-content-card::before {
    content: '';
    position: absolute;
    inset: -40% auto auto -30%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(59, 130, 246, 0.24), rgba(59, 130, 246, 0));
    pointer-events: none;
}

.empty-content-chip {
    position: absolute;
    top: 14px;
    left: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    color: #dbeafe;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(96, 165, 250, 0.35);
}

.empty-content-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1;
    margin-top: 16px;
}

.empty-content-name {
    margin: 0 0 2px;
    font-size: clamp(1.35rem, 3.2vw, 2rem);
    font-weight: 900;
    letter-spacing: 0.3px;
    line-height: 1.2;
    background: linear-gradient(90deg, #93c5fd, #a7f3d0, #93c5fd);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 10px 26px rgba(59, 130, 246, 0.2);
    animation: emptyNameShine 4.2s linear infinite;
}

.empty-content-body h3 {
    margin: 0;
    color: #f8fafc;
    font-size: 1.35rem;
    font-weight: 800;
}

.empty-content-body p {
    margin: 0;
    color: #cbd5e1;
    line-height: 1.8;
    font-size: 0.98rem;
}

.empty-content-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.empty-content-card.is-float {
    animation: emptyCardFloat 4.5s ease-in-out infinite;
}

.empty-content-card.is-pulse {
    animation: emptyCardPulse 2.4s ease-in-out infinite;
}

.empty-content-card.is-glow {
    animation: emptyCardGlow 3.2s ease-in-out infinite;
}

/* ===========================================
   METALLIC TEACHER CARD
   =========================================== */
.teacher-card-metallic {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Metallic Border Effect */
.teacher-card-metallic::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 16px;
    padding: 2px;
    background: linear-gradient(120deg, rgba(47, 91, 255, 0.6), rgba(18, 182, 166, 0.5), rgba(246, 197, 107, 0.6));
    -webkit-mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: 
       linear-gradient(#fff 0 0) content-box, 
       linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.5;
}

.teacher-card-metallic:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Video Preview */
.card-video-preview {
    height: 140px;
    background: #eee;
    position: relative;
    overflow: hidden;
}

.teacher-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.teacher-card-metallic:hover .teacher-image {
    transform: scale(1.1);
}

.play-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.teacher-card-metallic:hover .play-overlay {
    background: rgba(0,0,0,0.4);
}

.play-icon {
    font-size: 2rem;
    color: white;
    opacity: 0.8;
    transition: transform 0.3s, opacity 0.3s;
    text-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.teacher-card-metallic:hover .play-icon {
    transform: scale(1.2);
    opacity: 1;
}

/* Card Info */
.card-info {
    padding: 12px;
    text-align: center;
}

.teacher-name {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.teacher-stats {
    display: flex;
    justify-content: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 12px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat .icon {
    font-size: 1rem;
}

/* Teacher Name Link */
.teacher-name-link {
    text-decoration: none;
    display: block;
}

.teacher-name-link:hover .teacher-name {
    color: var(--color-primary);
}

/* Content Button */
.btn-teacher-content {
    display: inline-block;
    padding: 8px 20px;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.btn-teacher-content:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 22px rgba(47, 91, 255, 0.35);
}

.btn-teacher-content.secondary {
    background: rgba(11, 17, 32, 0.9);
}

/* ===========================================
   VIDEO MODAL
   =========================================== */
.video-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 900px;
    background: rgba(25, 25, 25, 0.9);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.1);
}

.video-modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-embed-container {
    position: absolute;
    inset: 0;
}

.video-embed-container iframe,
.video-embed-container video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #000;
}

.video-message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    background: rgba(15, 23, 42, 0.85);
    color: #e2e8f0;
    text-align: center;
    padding: 20px;
}

.video-message-icon {
    font-size: 2.4rem;
}

.video-message-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.video-message-sub {
    font-size: 0.9rem;
    color: #cbd5f5;
}

/* ===========================================
   ANIMATIONS
   =========================================== */
@keyframes slideRightFade {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes emptyCardFloat {
    0% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

@keyframes emptyCardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.015); }
}

@keyframes emptyCardGlow {
    0%, 100% { box-shadow: 0 24px 48px rgba(2, 6, 23, 0.35); }
    50% { box-shadow: 0 24px 48px rgba(37, 99, 235, 0.42); }
}

@keyframes emptyNameShine {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

/* ===========================================
   RESPONSIVE - TEACHER SELECTION
   =========================================== */
@media (max-width: 768px) {
    .subject-hero { padding: 120px 0 40px; }
    .subject-name-hero { font-size: 2rem; }
    .subject-icon-large { width: 80px; height: 80px; font-size: 3rem; }
    .subject-header-content { flex-direction: column; text-align: center; gap: 15px; }
    .teachers-grid { grid-template-columns: 1fr; }
    .modal-content { width: 95%; }
    .empty-content-card {
        text-align: center;
        padding: 18px 14px;
    }
    .empty-content-chip {
        position: static;
        margin-bottom: 4px;
    }
    .empty-content-name {
        font-size: 1.25rem;
    }
    .empty-content-body h3 {
        font-size: 1.08rem;
    }
    .empty-content-body p {
        font-size: 0.9rem;
    }
    .empty-content-actions {
        justify-content: center;
    }
}

.subject-icon-large img {
    width: var(--icon-size, 60%);
    height: var(--icon-size, 60%);
    object-fit: contain;
}
