/* lms-home.css - Custom styling for the LMS Home Page */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

body.lms-home-active,
.lms-home-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--lms-home-text, #ffffff);
    background-color: var(--lms-home-bg, #111111);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Overriding standard theme containers */
.lms-home-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
    background-color: var(--lms-home-bg, #111111);
}

.lms-home-wrapper * {
    box-sizing: border-box;
}

.lms-home-container {
    max-width: 1222px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.lms-home-container-narrow {
    max-width: 800px;
}

/* Typography elements */
.lms-home-wrapper h1,
.lms-home-wrapper h2,
.lms-home-wrapper h3 {
    margin: 0;
    color: inherit;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lms-home-wrapper p {
    margin: 0;
    color: var(--lms-home-accent, #888888);
}

.lms-home-wrapper a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Badges */
.lms-home-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 100px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--lms-home-gradient, #5542f6);
    background: #f0f0ff;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.lms-home-badge-small {
    background: var(--lms-home-gradient, #f0f0ff);
    color: var(--lms-home-gradient, #5542f6);
    opacity: 0.9;
    padding: 4px 12px;
    margin-bottom: 16px;
    font-size: 11px;
}

/* Buttons */
.lms-home-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
}

.lms-home-btn-primary {
    background-color: var(--lms-home-btn-bg, #ffffff);
    color: var(--lms-home-btn-text, #000000);
}

.lms-home-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.lms-home-btn-dark {
    background-color: #000000;
    color: #ffffff;
    gap: 8px;
}

.lms-home-btn-dark:hover {
    background-color: #222222;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.lms-home-btn-white {
    background-color: #ffffff;
    color: var(--lms-home-btn-text, #000000);
}

.lms-home-btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Layout Utilities */
.lms-home-section-header {
    text-align: center;
    margin-bottom: 48px;
}

.lms-home-section-header h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

/* HERO SECTION */
.lms-home-hero {
    padding: 60px 0 100px;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at top left, rgba(160, 110, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(230, 230, 250, 0.1) 0%, transparent 40%),
        var(--lms-home-bg, #111111);
    overflow: hidden;
}

.lms-home-hero-video-wrapper {
    max-width: 1000px;
    margin: 0 auto 80px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    width: 100%;
    /* 16:9 Aspect Ratio hack */
    padding-bottom: 56.25%;
    height: 0;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    z-index: 10;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lms-home-hero-video-wrapper:hover {
    transform: scale(1.02);
}

.lms-home-hero-video-wrapper video,
.lms-home-hero-video-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lms-home-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 20;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lms-home-title {
    font-size: 76px;
    line-height: .95;
    margin-bottom: 30px;
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.lms-home-subtitle {
    font-size: 20px;
    max-width: 600px;
    margin: 40px auto 60px !important;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
    text-align: center !important;
}

/* PRODUCT SECTION */
.lms-home-product-section {
    padding: 100px 0;
    background-color: var(--lms-home-section-bg, #f9f9f9);
    color: #111111;
}

.lms-home-product-card {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.lms-home-product-image {
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: linear-gradient(45deg, #a770ef, #cf8bf3, #fdb99b);
}

.lms-home-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lms-home-product-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
}

.lms-home-product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center everything in product card info wrapper */
    text-align: center;
}

.lms-home-product-title {
    font-size: 36px;
    margin-bottom: 16px;
}

.lms-home-product-desc {
    font-size: 16px;
    color: #555555;
    margin: 20px auto 40px !important;
    line-height: 1.6;
    text-align: center !important;
    width: 100%;
}

.lms-home-product-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-top: auto;
}

.lms-home-product-price {
    display: flex;
    flex-direction: column;
}

.price-value {
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.lms-price-strikethrough {
    text-decoration: line-through;
    color: #888888;
    font-size: 18px;
    font-weight: 500;
}

.price-sale {
    color: #e02b27;
}

.price-label {
    font-size: 12px;
    color: #888888;
    text-transform: uppercase;
}

/* LEARN SECTION */
.lms-home-learn-section {
    padding: 120px 0;
    background: radial-gradient(circle at top left, rgba(160, 110, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(230, 230, 250, 0.1) 0%, transparent 40%),
        var(--lms-home-bg, #111111);
}

.lms-home-learn-section .lms-home-section-header p {
    margin-top: 24px;
    margin-bottom: 40px;
    font-size: 18px;
    color: var(--lms-home-accent, #888888);
}

.lms-home-modules-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lms-home-module-item {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.lms-home-module-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    transform: scale(1.01);
}

.module-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    margin-right: 24px;
    flex-shrink: 0;
}

.module-title {
    font-size: 18px;
    font-weight: 600;
    flex-grow: 1;
}

.module-lessons {
    font-size: 14px;
    color: var(--lms-home-accent, #888888);
}

/* CTA TOP / BOTTOM SECTION */
.lms-home-cta-section {
    padding: 120px 0;
    background: radial-gradient(circle at top left, rgba(160, 110, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(230, 230, 250, 0.1) 0%, transparent 40%),
        var(--lms-home-bg, #111111);
    text-align: center;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.lms-home-cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.lms-home-title-large {
    font-size: 72px;
    letter-spacing: -0.03em;
}

.lms-home-cta-content .lms-home-subtitle {
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 40px auto 50px !important;
    font-size: 18px;
    line-height: 1.6;
    text-align: center !important;
}

.lms-home-benefits {
    margin-top: 32px;
    font-size: 12px;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

/* ABOUT DIGITAL PRODUCTS SECTION */
.lms-home-about-section {
    padding: 100px 0 100px;
    background-color: var(--lms-home-section-bg, #f9f9f9);
    color: #111111;
}

.lms-home-about-card {
    text-align: center;
    padding: 60px 40px;
    background: #ffffff;
    border: none;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

.lms-home-about-title {
    font-size: 56px;
    font-weight: 800;
    text-align: center !important;
    letter-spacing: -0.03em;
    margin-bottom: 20px !important;
    line-height: 1.15;
    color: #111111;
    -webkit-text-fill-color: #111111;
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
}

.lms-home-about-subtitle {
    font-size: 16px;
    color: #555555;
    margin: 0 auto 40px !important;
    line-height: 1.6;
    max-width: 500px;
    text-align: center !important;
    background: linear-gradient(135deg, #333333 0%, #888888 50%, #333333 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Remove old outline button — now using btn-dark */

/* ABOUT POPUP MODAL */
.lms-about-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    padding: 24px;
}

.lms-about-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lms-about-modal {
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    width: 100%;
    max-width: 680px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    padding: 48px 40px;
    transform: translateY(30px) scale(0.96);
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lms-about-modal-overlay.active .lms-about-modal {
    transform: translateY(0) scale(1);
}

.lms-about-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
}

.lms-about-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
}

.lms-about-modal-header h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 32px;
    text-align: center;
    background: linear-gradient(180deg, #FFFFFF 30%, rgba(255, 255, 255, 0.55) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lms-about-modal-body {
    font-size: 15px;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
}

.lms-about-modal::-webkit-scrollbar {
    width: 6px;
}

.lms-about-modal::-webkit-scrollbar-track {
    background: transparent;
}

.lms-about-modal::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

/* FAQS SECTION */
.lms-home-faq-section {
    padding: 100px 0;
    background: radial-gradient(circle at top left, rgba(160, 110, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(230, 230, 250, 0.1) 0%, transparent 40%),
        var(--lms-home-bg, #111111);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.lms-home-faq-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.faq-title-accent {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--lms-home-primary, #a06eff);
    background: rgba(160, 110, 255, 0.12);
    border: 1px solid rgba(160, 110, 255, 0.25);
    padding: 6px 18px;
    border-radius: 50px;
}

.faq-title-text {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 600px;
    line-height: 1.3;
    background: linear-gradient(180deg, #FFFFFF 30%, rgba(255, 255, 255, 0.55) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.lms-home-faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lms-home-faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.lms-home-faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 24px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--lms-home-text, #ffffff);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: inherit;
}

.lms-home-faq-icon {
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
}

.lms-home-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.lms-home-faq-answer p {
    padding-bottom: 24px;
}

/* SOCIAL LINKS SECTION */
.lms-home-social-section {
    padding: 60px 0 80px;
    background: radial-gradient(circle at top left, rgba(160, 110, 255, 0.15) 0%, transparent 40%),
        radial-gradient(circle at bottom right, rgba(230, 230, 250, 0.1) 0%, transparent 40%),
        var(--lms-home-bg, #111111);
    text-align: center;
}

.lms-home-social-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.social-link {
    color: var(--lms-home-text, #ffffff);
    opacity: 0.6;
    font-size: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease, color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-link svg {
    width: 28px;
    height: 28px;
}

.social-link:hover {
    opacity: 1;
    color: var(--lms-home-gradient, #5542f6);
}

/* RESPONSIVE DESIGN */
@media (max-width: 900px) {
    .lms-home-product-card {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 32px;
    }
}

@media (max-width: 768px) {
    .lms-home-hero {
        padding: 40px 0 60px;
    }

    /* Make video square on mobile */
    .lms-home-hero-video-wrapper {
        padding-bottom: 100% !important;
        /* Forces 1:1 Aspect Ratio */
        margin: 0 auto 40px;
        border-radius: 16px;
    }

    .lms-home-title {
        font-size: 48px;
    }

    .lms-home-title-large {
        font-size: 52px;
    }

    .lms-home-subtitle {
        font-size: 18px;
    }

    .lms-home-module-item {
        padding: 20px;
    }

    .lms-home-product-section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .lms-home-title {
        font-size: 36px;
    }

    .lms-home-title-large {
        font-size: 40px;
    }

    .lms-home-product-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .lms-home-btn {
        width: 100%;
    }
}

/* =============================================
   VISUAL EFFECTS (toggled via settings)
   ============================================= */

/* --- FX: Scroll Fade-In Animations --- */
.lms-fx-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lms-fx-fade.lms-fx-visible {
    opacity: 1;
    transform: translateY(0);
}

.lms-fx-fade-delay-1 {
    transition-delay: 0.1s;
}

.lms-fx-fade-delay-2 {
    transition-delay: 0.2s;
}

.lms-fx-fade-delay-3 {
    transition-delay: 0.3s;
}

.lms-fx-fade-delay-4 {
    transition-delay: 0.4s;
}

/* --- FX: Floating Glow Orbs --- */
.lms-fx-orb-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.lms-fx-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: lms-orb-drift 15s ease-in-out infinite alternate;
}

.lms-fx-orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(160, 110, 255, 0.2);
    top: 10%;
    left: -5%;
    animation-duration: 18s;
}

.lms-fx-orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(100, 80, 220, 0.15);
    bottom: 10%;
    right: -5%;
    animation-duration: 22s;
    animation-delay: -5s;
}

.lms-fx-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(230, 230, 250, 0.12);
    top: 50%;
    left: 40%;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes lms-orb-drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 30px) scale(0.95);
    }

    100% {
        transform: translate(15px, 15px) scale(1.05);
    }
}

/* --- FX: Product Card Tilt --- */
.lms-fx-tilt-active .lms-home-product-card {
    transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    transform-style: preserve-3d;
    will-change: transform;
}

.lms-fx-tilt-active .lms-home-product-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

/* --- FX: Sticky CTA Button --- */
.lms-fx-sticky-cta {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.4s ease,
        visibility 0.4s ease;
    pointer-events: none;
}

.lms-fx-sticky-cta.lms-fx-sticky-visible {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lms-fx-sticky-cta a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #a06eff 0%, #7c3aed 100%);
    color: #ffffff;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 600;
    border-radius: 100px;
    text-decoration: none;
    box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.lms-fx-sticky-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.55);
}

.lms-fx-sticky-cta svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 480px) {
    .lms-fx-sticky-cta {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }

    .lms-fx-sticky-cta a {
        width: 100%;
        justify-content: center;
    }
}