/* ============================================================
   ClinEdu "Modern Studio" theme — Design 1 (GSAP Modern Studio)
   Scoped to body.studio.studio (public pages only; admin/dashboard keep
   their existing panel styling).
   ============================================================ */

body.studio.studio {
    --studio-bg: #112231;
    --studio-bg-2: #16303F;
    --studio-text: #F1F5F9;
    --studio-muted: #94A3B8;
    --studio-glass: rgba(36, 58, 78, 0.55);
    --studio-glass-border: rgba(255, 255, 255, 0.08);
    --studio-indigo: #4F46E5;
    --studio-indigo-2: #6366F1;
    --studio-blue: #60A5FA;
    --studio-purple: #A855F7;
    --studio-cyan: #22D3EE;
    --studio-grad: linear-gradient(135deg, #60A5FA, #A855F7);
    --studio-btn-grad: linear-gradient(135deg, #4F46E5, #7C3AED);

    background: var(--studio-bg);
    color: var(--studio-text);
    font-family: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', sans-serif;
}

/* ---------- generic surfaces ---------- */
body.studio.studio .bg-white,
body.studio.studio .bg-page,
body.studio.studio .bg-light,
body.studio.studio main {
    background: transparent !important;
}
body.studio.studio .section-overlay { background: transparent; }

body.studio.studio h1, body.studio.studio h2, body.studio.studio h3, body.studio.studio h4,
body.studio.studio .section-heading {
    color: var(--studio-text);
    letter-spacing: -0.02em;
}
body.studio.studio p, body.studio.studio .section-sub-heading { color: var(--studio-muted); }

/* gradient text accent */
body.studio.studio .gradient-text,
body.studio.studio .hero-content .text .changeable-word,
body.studio.studio .hero-content .text .clin-gradient {
    background: var(--studio-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- glass card primitive ---------- */
body.studio.studio .course-item,
body.studio.studio .single-feature-item,
body.studio.studio .instructor-item,
body.studio.studio .single-blog,
body.studio.studio .course-item-wrap,
body.studio.studio .bundle-item,
body.studio.studio .top-cat-item {
    background: var(--studio-glass) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--studio-glass-border) !important;
    border-radius: 16px !important;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.45);
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}
body.studio.studio .course-item:hover,
body.studio.studio .single-feature-item:hover,
body.studio.studio .instructor-item:hover,
body.studio.studio .single-blog:hover {
    transform: translateY(-6px);
    border-color: rgba(99, 102, 241, 0.45) !important;
    box-shadow: 0 16px 44px rgba(79, 70, 229, 0.25);
}
body.studio.studio .course-item .card-title a,
body.studio.studio .course-title a,
body.studio.studio .single-feature-item .h6,
body.studio.studio .single-blog h3 a {
    color: var(--studio-text);
}
body.studio.studio .course-item .card-title a:hover,
body.studio.studio .course-title a:hover { color: var(--studio-blue); }
body.studio.studio .course-item .card-text,
body.studio.studio .instructor-name-certificate,
body.studio.studio .course-item-bottom,
body.studio.studio .instructor-bottom-item { color: var(--studio-muted); }
body.studio.studio .color-hover { color: var(--studio-cyan) !important; }

/* ---------- buttons ---------- */
body.studio.studio .theme-btn,
body.studio.studio .theme-button1,
body.studio.studio .theme-button2,
body.studio.studio .theme-button3,
body.studio.studio .btn-primary {
    background: var(--studio-btn-grad) !important;
    border: none !important;
    border-radius: 999px !important;
    color: #fff !important;
    font-weight: 600;
    padding: 12px 28px;
    box-shadow: 0 10px 26px rgba(79, 70, 229, 0.35);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
body.studio.studio .theme-btn:hover,
body.studio.studio .btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.12);
    box-shadow: 0 14px 34px rgba(124, 58, 237, 0.45);
}
body.studio.studio .theme-btn svg, body.studio.studio .theme-btn i { color: #fff; }

/* outline / ghost variant */
body.studio.studio .hero-btns .theme-button3,
body.studio.studio a.theme-btn.ghost {
    background: var(--studio-glass) !important;
    border: 1px solid var(--studio-glass-border) !important;
    box-shadow: none;
}

/* ---------- navbar ---------- */
body.studio.studio #mainNav,
body.studio.studio .navbar {
    background: rgba(17, 34, 49, 0.78) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--studio-glass-border);
}
body.studio.studio #mainNav .nav-link,
body.studio.studio #mainNav .navbar-nav .nav-link {
    color: #CBD5E1;
    font-weight: 500;
}
body.studio.studio #mainNav .nav-link:hover,
body.studio.studio #mainNav .nav-link.active { color: var(--studio-blue); }

/* ---------- hero ---------- */
body.studio.studio .hero-area {
    background:
        radial-gradient(circle at 50% 12%, rgba(99, 102, 241, 0.28), transparent 62%),
        radial-gradient(circle at 85% 60%, rgba(168, 85, 247, 0.16), transparent 55%),
        var(--studio-bg) !important;
}
body.studio.studio .come-for-learn-text {
    display: flex;
    justify-content: center;
    padding-bottom: 14px;
}
body.studio.studio .hero-content .mini-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 30px;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #A5B4FC;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .18em;
    overflow: hidden;
    width: 100%;
    justify-content: center;
}
/* neutralize the old theme's orange ::after dot on the chip itself, then
   restyle as a matching cyan pulse dot (right side) */
body.studio.studio .come-for-learn-text .mini-chip-word::after {
    display: none;
}
body.studio.studio .come-for-learn-text .mini-chip::after {
    content: '';
    position: static;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--studio-cyan);
    box-shadow: 0 0 10px var(--studio-cyan);
    animation: chip-dot-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
body.studio.studio .mini-chip::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--studio-cyan);
    box-shadow: 0 0 10px var(--studio-cyan);
    animation: chip-dot-pulse 1.8s ease-in-out infinite;
}
body.studio.studio .mini-chip-word {
    display: inline-block;
    animation: chip-word-in 0.45s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    margin-right: -0.18em; /* cancel letter-spacing's trailing gap so the dots sit symmetric */
}
@keyframes chip-word-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}
@keyframes chip-dot-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}
body.studio.studio .hero-content p { color: var(--studio-muted); }
body.studio.studio .hero-right-side img {
    filter: drop-shadow(0 24px 60px rgba(79, 70, 229, 0.35));
    border-radius: 20px;
}
/* luminous orb sweeping left → right across banner mid-height, looping */
body.studio.studio .hero-area { overflow: hidden; }
body.studio.studio .hero-area .section-overlay { position: relative; z-index: 1; }
/* same luminous sweep on inner page banners */
body.studio.studio .page-banner-header { overflow: hidden; }
body.studio.studio .page-banner-header .section-overlay { position: relative; z-index: 1; }
body.studio.studio .page-banner-header .hero-light-sweep {
    width: 340px;
    height: 340px;
    margin-top: -170px;
}
body.studio.studio .hero-light-sweep {
    position: absolute;
    top: 50%;
    left: 0;
    z-index: 0;
    width: 460px;
    height: 460px;
    margin-top: -230px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.55), rgba(34, 211, 238, 0.22) 45%, transparent 70%);
    filter: blur(60px);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: hero-light-sweep 9s linear infinite;
}
@keyframes hero-light-sweep {
    0%   { transform: translateX(-25vw) scale(0.8); opacity: 0; }
    12%  { opacity: 1; }
    88%  { opacity: 1; }
    100% { transform: translateX(105vw) scale(1.05); opacity: 0; }
}
/* taller luminous band sweeping through content sections — starts at the
   section header, spans full height, faster + brighter than the hero orb */
body.studio.studio .courses-area,
body.studio.studio .top-instructor-area,
body.studio.studio .video-area,
body.studio.studio .customers-says-area,
body.studio.studio .course-instructor-support-area {
    position: relative;
    overflow: hidden;
}
body.studio.studio .section-light-sweep ~ * { position: relative; z-index: 1; }
body.studio.studio .section-light-sweep {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    width: 380px;
    background: radial-gradient(ellipse 55% 100% at center, rgba(99, 102, 241, 0.6), rgba(34, 211, 238, 0.28) 50%, transparent 75%);
    filter: blur(75px);
    mix-blend-mode: screen;
    pointer-events: none;
    animation: section-light-sweep 6s linear infinite;
}
@keyframes section-light-sweep {
    0%   { transform: translateX(-35vw); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { transform: translateX(110vw); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    body.studio.studio .hero-light-sweep { animation: none; opacity: 0.5; left: 35%; }
    body.studio.studio .section-light-sweep { animation: none; opacity: 0.35; left: 35%; }
}

/* ---------- section headings ---------- */
body.studio.studio .section-heading { font-weight: 800; }
body.studio.studio .section-heading-img img { filter: brightness(0) invert(1); opacity: .9; }

/* ---------- feature / category cards ---------- */
body.studio.studio .feature-img-wrap {
    background: rgba(99, 102, 241, 0.14);
    border-radius: 14px;
}
body.studio.studio .single-feature-item { border-left: 4px solid var(--studio-indigo-2) !important; }
body.studio.studio .home-category-card { border-left-color: var(--studio-purple) !important; }

/* ---------- course grid cards ---------- */
body.studio.studio .course-img-wrap img { border-radius: 14px 14px 0 0; }
body.studio.studio .course-item .card-body { padding: 18px 20px 20px; }

/* price / rating chips */
body.studio.studio .course-item .price,
body.studio.studio .course-price { color: var(--studio-cyan); font-weight: 700; }
body.studio.studio .rating-list .star-full svg,
body.studio.studio .rating-list .star-full { color: #FBBF24; }

/* ---------- tabs (public + player) ---------- */
body.studio.studio .nav-tabs .nav-link,
body.studio.studio .course-details-tab .nav-link {
    background: var(--studio-glass) !important;
    border: 1px solid var(--studio-glass-border) !important;
    color: #CBD5E1 !important;
    opacity: 1;
}
body.studio.studio .nav-tabs .nav-link.active,
body.studio.studio .course-details-tab .nav-link.active {
    background: var(--studio-btn-grad) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4);
}

/* ---------- accordion ---------- */
body.studio.studio .accordion-item {
    background: var(--studio-glass);
    border: 1px solid var(--studio-glass-border) !important;
    border-radius: 12px !important;
    overflow: hidden;
    margin-bottom: 10px;
}
body.studio.studio .accordion-button {
    background: transparent !important;
    color: var(--studio-text) !important;
    font-weight: 600;
    box-shadow: none !important;
}
body.studio.studio .accordion-body { color: var(--studio-muted); }
body.studio.studio .accordion-body a { color: #CBD5E1; }
body.studio.studio .accordion-body a:hover { color: var(--studio-blue); }

/* ---------- forms ---------- */
body.studio.studio .form-control,
body.studio.studio input[type="text"],
body.studio.studio input[type="email"],
body.studio.studio input[type="password"],
body.studio.studio input[type="search"],
body.studio.studio select,
body.studio.studio textarea {
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(100, 116, 139, 0.5) !important;
    color: var(--studio-text) !important;
    border-radius: 10px;
}
body.studio.studio .form-control:focus {
    border-color: var(--studio-indigo-2) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25) !important;
}
body.studio.studio ::placeholder { color: #64748B; }
body.studio.studio label { color: #CBD5E1; }

/* ---------- footer ---------- */
body.studio.studio footer,
body.studio.studio .footer-area,
body.studio.studio .footer__area {
    background: rgba(22, 42, 56, 0.7) !important;
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--studio-glass-border);
}
body.studio.studio footer a, body.studio.studio .footer-area a { color: var(--studio-muted); }
body.studio.studio footer a:hover, body.studio.studio .footer-area a:hover { color: #fff; }
body.studio.studio footer h4, body.studio.studio footer .h6, body.studio.studio .footer-title { color: var(--studio-text); }

/* ---------- preloader stays on-brand ---------- */
body.studio.studio .site-loader { background: var(--studio-bg); }
body.studio.studio #preloader, body.studio.studio #ajax-nav-loader {
    background: radial-gradient(circle at 50% 30%, rgba(99,102,241,.22), transparent 70%), var(--studio-bg);
}

/* ---------- breadcrumb / inner hero ---------- */
body.studio.studio .breadcrumb-area,
body.studio.studio .page-banner,
body.studio.studio .page-banner-header,
body.studio.studio .inner-banner,
body.studio.studio .gradient-bg {
    background:
        radial-gradient(circle at 50% 0%, rgba(99,102,241,.28), transparent 65%),
        radial-gradient(circle at 90% 80%, rgba(168,85,247,.14), transparent 55%),
        var(--studio-bg) !important;
}
body.studio.studio .page-banner-heading,
body.studio.studio .breadcrumb-item,
body.studio.studio .breadcrumb-item a { color: var(--studio-text); }
body.studio.studio .breadcrumb-item.active { color: var(--studio-blue); }
body.studio.studio .footer-gradient-bg {
    background: rgba(15, 23, 42, 0.65) !important;
}
/* secondary buttons on dark pages */
body.studio.studio .sidebar-filter-btn,
body.studio.studio .course-filter-btn,
body.studio.studio .btn-outline-primary,
body.studio.studio .btn-outline-secondary,
body.studio.studio .filter-btn {
    background: var(--studio-glass) !important;
    border: 1px solid var(--studio-glass-border) !important;
    color: #CBD5E1 !important;
    border-radius: 999px !important;
}
body.studio.studio .menu-section-area,
body.studio.studio .courses-area,
body.studio.studio .top-instructor-area,
body.studio.studio .video-area,
body.studio.studio .special-feature-area,
body.studio.studio .customers-says-area { background: transparent !important; }

/* course detail sidebar */
body.studio.studio .course-single-details-right-content {
    background: var(--studio-glass) !important;
    backdrop-filter: blur(16px);
    border: 1px solid var(--studio-glass-border) !important;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.45);
}
body.studio.studio .course-single-details-right-content li,
body.studio.studio .course-single-details-right-content span,
body.studio.studio .course-price-title { color: var(--studio-muted); }
body.studio.studio .course-price-value,
body.studio.studio .price-status-free { color: var(--studio-cyan) !important; font-weight: 700; }

/* ---------- contact ---------- */
body.studio.studio .contact-form-title { color: var(--studio-text); }
body.studio.studio .contact-page-right { margin-bottom: 60px; }

/* readable content panels — lighter than the page bg so text pops */
body.studio.studio .prose-panel {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(2, 6, 23, 0.3);
}
body.studio.studio .prose-panel .prose,
body.studio.studio .prose-panel p,
body.studio.studio .prose-panel li,
body.studio.studio .prose-panel strong,
body.studio.studio .prose-panel b,
body.studio.studio .prose-panel em,
body.studio.studio .prose-panel span,
body.studio.studio .prose-panel u,
body.studio.studio .prose-panel blockquote,
body.studio.studio .prose-panel td { color: #E2E8F0; }
body.studio.studio .prose-panel a { color: var(--studio-cyan); }

/* symmetric support cards — equal height, icons level, buttons aligned */
body.studio.studio .course-instructor-support-wrap [class*="col-"] { display: flex; }
body.studio.studio .instructor-support-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 300px;
    padding: 34px 24px;
}
body.studio.studio .instructor-support-img-wrap {
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.studio.studio .instructor-support-img-wrap img { max-height: 84px; object-fit: contain; }
body.studio.studio .instructor-support-item .h6 { min-height: 28px; }
body.studio.studio .instructor-support-item p { flex: 1; }
body.studio.studio .instructor-support-item .theme-btn { margin-top: auto; }
body.studio.studio .prose-panel .prose h1,
body.studio.studio .prose-panel .prose h2,
body.studio.studio .prose-panel .prose h3,
body.studio.studio .prose-panel .prose h4 { color: #F8FAFC; }

/* faq accordion inside panels */
body.studio.studio .faq details {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--studio-glass-border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
body.studio.studio .faq summary {
    color: var(--studio-text);
    font-weight: 600;
    cursor: pointer;
}
body.studio.studio .faq details p { color: var(--studio-muted); margin: 10px 0 0; }

/* ---------- auth pages ---------- */
body.studio.studio .sign-up-area,
body.studio.studio .login-area { background: var(--studio-bg); }
body.studio.studio .sign-up-top-logo img,
body.studio.studio .navbar-brand img { filter: brightness(0) invert(1); }
body.studio.studio .sign-up-top-logo img {
    width: 150px;
    height: auto;
    max-height: 44px;
    object-fit: contain;
    object-position: left center;
}

/* ---------- misc ---------- */
body.studio.studio ::selection { background: rgba(99, 102, 241, 0.5); }
body.studio.studio .text-muted { color: var(--studio-muted) !important; }
body.studio.studio hr { border-color: var(--studio-glass-border); }
body.studio.studio .modal-content {
    background: var(--studio-bg-2);
    border: 1px solid var(--studio-glass-border);
    color: var(--studio-text);
}
body.studio.studio .pagination .page-link {
    background: var(--studio-glass);
    border-color: var(--studio-glass-border);
    color: #CBD5E1;
}
body.studio.studio .pagination .page-item.active .page-link {
    background: var(--studio-btn-grad);
    border-color: transparent;
    color: #fff;
}

/* ---------- entrance animations (CSS keyframes — hydration-safe) ---------- */
@keyframes studio-in-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes studio-in-down { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: none; } }
@keyframes studio-in-left { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: none; } }
@keyframes studio-in-right { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes studio-in-scale { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes studio-in-fade { from { opacity: 0; } to { opacity: 1; } }

body.studio.studio [data-gsap] {
    animation: studio-in-up 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) both;
    animation-delay: var(--gsap-delay, 0s);
}
body.studio.studio [data-gsap="fade-down"] { animation-name: studio-in-down; }
body.studio.studio [data-gsap="fade-left"] { animation-name: studio-in-left; }
body.studio.studio [data-gsap="fade-right"] { animation-name: studio-in-right; }
body.studio.studio [data-gsap="scale"] { animation-name: studio-in-scale; }
body.studio.studio [data-gsap="fade"] { animation-name: studio-in-fade; }
body.studio.studio [data-gsap-delay="0.2"] { animation-delay: 0.2s; }
body.studio.studio [data-gsap-delay="0.4"] { animation-delay: 0.4s; }
body.studio.studio [data-gsap-delay="0.5"] { animation-delay: 0.5s; }
body.studio.studio [data-gsap-delay="0.6"] { animation-delay: 0.6s; }
body.studio.studio [data-gsap-delay="0.8"] { animation-delay: 0.8s; }
body.studio.studio [data-gsap-delay="1"] { animation-delay: 1s; }

/* staggered groups — children cascade, scroll-triggered where supported */
body.studio.studio [data-gsap-group] > * {
    animation: studio-in-up 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
@supports (animation-timeline: view()) {
    body.studio.studio [data-gsap-group] > * {
        animation-timeline: view();
        animation-range: entry 0% entry 60%;
    }
}
body.studio.studio [data-gsap-group] > :nth-child(2) { animation-delay: 0.12s; }
body.studio.studio [data-gsap-group] > :nth-child(3) { animation-delay: 0.24s; }
body.studio.studio [data-gsap-group] > :nth-child(4) { animation-delay: 0.36s; }
body.studio.studio [data-gsap-group] > :nth-child(5) { animation-delay: 0.48s; }
body.studio.studio [data-gsap-group] > :nth-child(6) { animation-delay: 0.6s; }
body.studio.studio [data-gsap-group] > :nth-child(7) { animation-delay: 0.72s; }
body.studio.studio [data-gsap-group] > :nth-child(n+8) { animation-delay: 0.84s; }

@media (prefers-reduced-motion: reduce) {
    body.studio.studio [data-gsap],
    body.studio.studio [data-gsap-group] > * { animation: none !important; }
}
