/* ===========================================
   Catalog Pages (Courses / Library / Live / Support)
   Modern, clean RTL layout
   =========================================== */

.page-hero {
    position: relative;
    background: var(--dark-gradient);
    padding: calc(var(--header-offset) + 28px) 0 52px;
    overflow: hidden;
    color: #ffffff;
    box-shadow: 0 22px 50px rgba(2, 6, 23, 0.35);
}

.page-hero .bubbles-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.page-hero .bubble {
    position: absolute;
    bottom: -120px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.06));
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
    animation: catalogFloatUp 16s infinite ease-in-out;
}

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

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

.page-hero::before,
.page-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(18px);
    opacity: 0.5;
}

.page-hero::before {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, rgba(47, 91, 255, 0.28), transparent 70%);
    top: -220px;
    right: -200px;
    z-index: 0;
}

.page-hero::after {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(18, 182, 166, 0.22), transparent 70%);
    bottom: -220px;
    left: -200px;
    z-index: 0;
}

.page-hero .hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 920px;
    margin-inline: auto;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: clamp(22px, 3vw, 34px);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(16px);
    overflow: hidden;
}

.page-hero .hero-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.7;
}

.page-hero .hero-title {
    font-size: clamp(1.9rem, 2.4vw, 2.6rem);
    margin-bottom: 12px;
    color: #ffffff;
    text-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.page-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.78);
    max-width: 720px;
    margin-inline: auto;
}

.page-hero .hero-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 10px;
    backdrop-filter: blur(10px);
}

.page-hero form.hero-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(12px);
}

.page-hero .filter-input {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    min-width: 220px;
}

.page-hero .filter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-primary-solid,
.btn-secondary-ghost {
    padding: 12px 22px;
    border-radius: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: var(--transition-normal, 250ms ease);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.btn-primary-solid {
    background: var(--primary-gradient);
    color: #ffffff;
}

.btn-secondary-ghost {
    background: rgba(255, 255, 255, 0.85);
    color: var(--text-primary);
    border: 1px solid rgba(15, 23, 42, 0.1);
}

.page-hero .btn-primary-solid {
    box-shadow: 0 12px 26px rgba(47, 91, 255, 0.35);
}

.page-hero .btn-secondary-ghost {
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@media (max-width: 900px) {
    .page-hero form.hero-actions {
        grid-template-columns: 1fr;
    }
}

.filters-panel {
    background: white;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.filters-panel .filter-title {
    font-weight: 700;
    margin-bottom: 12px;
}

.filters-panel .filter-group + .filter-group {
    margin-top: 16px;
}

.filter-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: block;
}

.filter-select,
.filter-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #fff;
    font-family: inherit;
}

.page-section {
    padding: 50px 0;
}

.section-title {
    font-size: 1.6rem;
    margin-bottom: 20px;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .catalog-layout {
        grid-template-columns: 1fr;
    }
}

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

.catalog-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border-radius: 20px;
    border: 1px solid rgba(148, 163, 184, 0.15);
    box-shadow: 0 18px 32px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.catalog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.12);
}

.catalog-thumb {
    position: relative;
    background: #e2e8f0;
    height: 160px;
    overflow: hidden;
}

.catalog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.catalog-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(11, 17, 32, 0.75);
    color: white;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
}

.catalog-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.catalog-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
}

.catalog-meta {
    color: var(--text-secondary);
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-meta span {
    background: #f1f5f9;
    padding: 4px 8px;
    border-radius: 999px;
}

.catalog-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.catalog-actions .action-btn {
    flex: 1;
    text-align: center;
    padding: 10px 12px;
    border-radius: 12px;
    background: #0f172a;
    color: white;
    font-weight: 600;
}

.catalog-actions .action-btn.ghost {
    background: #f8fafc;
    color: #0f172a;
    border: 1px solid #e2e8f0;
}

.empty-state {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 1px dashed rgba(148, 163, 184, 0.4);
}

.empty-state .emoji {
    font-size: 3rem;
    margin-bottom: 12px;
}

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

.support-card {
    background: white;
    border-radius: 18px;
    padding: 18px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.06);
}

.faq-list details {
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 700;
}

.hint-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
