/**
 * Homepage — uses design tokens from theme.css
 */

body.eman-home {
    background-color: var(--eman-bg);
}

.eman-home h1,
.eman-home h2,
.eman-home h3,
.eman-home h4 {
    font-weight: var(--font-weight-bold);
    color: var(--eman-purple);
}

.eman-home h2 { font-size: 2.5rem; margin-bottom: var(--space-3); }
.eman-home h3 { font-size: 1.75rem; margin-bottom: var(--space-2); }
.eman-home p { color: var(--eman-text-light); margin-bottom: var(--space-3); }

/* Preloader */
.eman-home .preloader.js-preloader .preloader__bg {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--eman-purple);
}

.eman-home .logo-loading-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eman-home .loading-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: var(--space-2) solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: home-spin 1.5s linear infinite;
}

@keyframes home-spin { to { transform: rotate(360deg); } }

.eman-home .platform-logo { max-width: 80px; height: auto; }

/* Hero */
.hero-section {
    background-color: var(--eman-bg-light);
    padding: 40px 0 var(--space-section-y);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e9eaf2' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.2;
    font-weight: var(--font-weight-bold);
    color: var(--eman-purple);
    margin-bottom: var(--space-4);
}

.hero-title .highlight { color: var(--eman-accent); }

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--eman-text-light);
    margin-bottom: var(--space-4);
    max-width: 600px;
}

.hero-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.hero-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px var(--space-3);
    background: var(--eman-bg);
    border: 1px solid var(--eman-border-light);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: var(--font-weight-semibold);
    color: var(--eman-text-dark);
    box-shadow: var(--shadow-card);
}

.hero-trust-badge .lucide-icon {
    width: 16px;
    height: 16px;
    color: var(--eman-purple);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}

.hero-image { position: relative; text-align: center; }

.hero-image img {
    max-width: 100%;
    height: auto;
    animation: home-float 6s ease-in-out infinite;
}

@keyframes home-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* Levels preview */
.levels-preview-section {
    padding: var(--space-section-y) 0;
    background: var(--eman-bg);
}

.level-preview-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-3);
}

.level-preview-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4) var(--space-3);
    background: var(--eman-bg-light);
    border: 1px solid var(--eman-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.level-preview-card:hover {
    transform: translateY(calc(-1 * var(--space-2)));
    box-shadow: var(--shadow-elevated);
    border-color: var(--eman-purple-light);
    color: inherit;
}

.level-preview-card__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(106, 27, 154, 0.1);
    color: var(--eman-purple);
    margin-bottom: var(--space-3);
}

.level-preview-card__icon .lucide-icon { width: 28px; height: 28px; }

.level-preview-card__title {
    font-size: 0.95rem;
    font-weight: var(--font-weight-semibold);
    color: var(--eman-purple);
    margin-bottom: var(--space-1);
    line-height: 1.35;
}

.level-preview-card__count {
    font-size: 0.85rem;
    color: var(--eman-text-muted);
}

/* Features */
.eman-home .features-section { padding: var(--space-section-y) 0; }

.eman-home .features-section .row.justify-center.text-center p { text-align: center; }

.eman-home .feature-card {
    text-align: center;
    padding: var(--space-4) var(--space-3);
    border-radius: var(--radius-md);
    background: var(--eman-bg);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--eman-border-light);
    height: 100%;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.eman-home .feature-card:hover {
    transform: translateY(calc(-1 * var(--space-2)));
    box-shadow: var(--shadow-elevated);
    border-color: var(--eman-purple-light);
}

.eman-home .feature-icon {
    color: var(--eman-purple);
    background: rgba(106, 27, 154, 0.1);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.eman-home .feature-icon .lucide-icon {
    width: 36px;
    height: 36px;
}

.eman-home .feature-title {
    color: var(--eman-purple);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-semibold);
}

.eman-home .feature-text { font-size: 0.95rem; }

/* About */
.about-section {
    padding: var(--space-section-y) 0;
    background-color: var(--eman-bg-light);
}

.about-section img { border-radius: 0; box-shadow: none; }
.about-content h2 { margin-bottom: var(--space-4); }
.about-content p { margin-bottom: var(--space-4); }

/* How it works */
.how-it-works-section { padding: var(--space-section-y) 0; }

.step-item { text-align: center; position: relative; }

html[dir="ltr"] .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    left: calc(50% + 50px);
    width: calc(100% - 100px);
    border-top: 2px dashed var(--eman-border-light);
    z-index: 1;
}

html[dir="rtl"] .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: calc(50% + 50px);
    width: calc(100% - 100px);
    border-top: 2px dashed var(--eman-border-light);
    z-index: 1;
}

.step-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--eman-purple);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--space-3);
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-card);
}

.step-title {
    color: var(--eman-purple);
    margin-bottom: var(--space-2);
    font-weight: var(--font-weight-semibold);
}

.step-text { font-size: 0.95rem; }

/* Latest lessons */
.latest-lessons-section {
    padding: var(--space-section-y) 0;
    background-color: var(--eman-purple);
}

.latest-lessons-section .sectionTitle__title,
.latest-lessons-section .sectionTitle__text { color: #fff; }

.latest-lessons-section .button.-icon {
    background-color: #fff;
    color: var(--eman-purple);
}

.latest-lessons-section .button.-icon:hover {
    background-color: var(--eman-accent);
    color: #fff;
}

.latest-lessons-section .button .lucide-icon {
    margin-inline-start: 10px;
    width: 18px;
    height: 18px;
    margin-bottom: 3px;
}

.lesson-card {
    border: 1px solid var(--eman-border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--eman-bg);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.lesson-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
    color: inherit;
}

.lesson-card-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid var(--eman-border-light);
}

.lesson-card-content {
    padding: var(--space-3);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.lesson-card-title {
    font-size: 1.15rem;
    font-weight: var(--font-weight-semibold);
    color: var(--eman-purple);
    margin-bottom: var(--space-2);
    min-height: 58px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.lesson-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--eman-text-muted);
    margin-bottom: var(--space-3);
    gap: var(--space-2);
}

.lesson-card-meta span { display: flex; align-items: center; gap: 4px; }

.lesson-card-meta .lucide-icon {
    width: 16px;
    height: 16px;
    color: var(--eman-accent);
}

.lesson-card-footer {
    border-top: 1px solid var(--eman-border-light);
    padding-top: var(--space-3);
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-2);
}

.lesson-card-price {
    font-size: 1.2rem;
    font-weight: var(--font-weight-bold);
    color: var(--eman-purple);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.lesson-card-price .original-price {
    text-decoration: line-through;
    color: var(--eman-text-muted);
    font-size: 0.9rem;
    font-weight: 400;
}

.lesson-card-price .badge-free {
    background-color: var(--eman-accent);
    color: #fff;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}

.lesson-card-level {
    background-color: var(--eman-purple-light);
    color: #fff;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    white-space: nowrap;
}

.lesson-card-badges {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    display: flex;
    gap: var(--space-2);
    z-index: 1;
}

.lesson-card-badges .badge {
    color: #fff;
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: var(--font-weight-medium);
}

.lesson-card-badges .badge.badge-new { background-color: #ff9800; }
.lesson-card-badges .badge.badge-sale { background-color: #e91e63; }

/* Stats */
.stats-section {
    padding: var(--space-section-y) 0;
    background-color: var(--eman-bg-light);
}

.counter.-type-1 .lucide-icon {
    width: 45px;
    height: 45px;
    color: var(--eman-purple);
    margin-bottom: var(--space-3);
}

.counter__number { color: var(--eman-purple); font-size: 2.75rem; }
.counter__title { color: var(--eman-text-light); }

/* Footer (homepage) */
.eman-home .footer.-type-1 {
    background-color: var(--eman-bg);
    color: var(--eman-text-dark);
    border-top: 1px solid var(--eman-border-light);
}

.eman-home .footer h5 { color: var(--eman-purple); }
.eman-home .footer a { color: var(--eman-text-light); }
.eman-home .footer a:hover { color: var(--eman-purple); }
.eman-home .footer .button.-purple-1 {
    background-color: var(--eman-accent);
    border-color: var(--eman-accent);
}

.eman-home .footer .button.-purple-1:hover {
    background-color: #00d9f4;
    border-color: #00d9f4;
}

/* Responsive */
@media (max-width: 1199px) {
    .level-preview-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .eman-home h2 { font-size: 2rem; }
    .hero-section { padding-top: 32px; }
    .hero-image { margin-top: var(--space-5); }
    .about-section .row { flex-direction: column-reverse; }
    .about-section img { margin-bottom: var(--space-4); }
    .step-item:not(:last-child)::after { display: none; }
    .level-preview-grid { grid-template-columns: repeat(2, 1fr); }
    .eman-home .features-section .col-lg-3,
    .eman-home .how-it-works-section .col-lg-4,
    .eman-home .latest-lessons-section .col-lg-4 { flex: 0 0 50%; max-width: 50%; }
    .eman-home .stats-section .col-lg-3 { flex: 0 0 50%; max-width: 50%; }
}

@media (max-width: 767px) {
    .eman-home h2 { font-size: 1.8rem; }
    .hero-section,
    .levels-preview-section,
    .features-section,
    .about-section,
    .how-it-works-section,
    .latest-lessons-section,
    .stats-section { padding: var(--space-section-y-sm) 0; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .button { width: 100%; justify-content: center; }
    .level-preview-grid { grid-template-columns: 1fr; }
    .eman-home .features-section .col-lg-3,
    .eman-home .how-it-works-section .col-lg-4,
    .eman-home .latest-lessons-section .col-lg-4,
    .eman-home .stats-section .col-lg-3 { flex: 0 0 100%; max-width: 100%; }
}
