/**
 * KalviYogi - Module Pages Styles
 * Premium design for public-facing module landing pages
 */

/* ============================================
   Module Hero Section
   ============================================ */
.module-hero {
    min-height: 100vh;
    background: linear-gradient(180deg, #0a0f14 0%, #141a21 100%);
    padding: var(--space-4);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.module-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(var(--module-color-rgb, 74, 144, 217), 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.1) 0%, transparent 40%);
    z-index: 0;
}

/* Floating Orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 8s ease-in-out infinite;
    z-index: 0;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: linear-gradient(135deg, #d4af37, #ffd700);
    top: 10%;
    left: -10%;
}

.orb-2 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #4a90d9, #00bcd4);
    bottom: 20%;
    right: -5%;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-30px) rotate(10deg);
    }
}

/* Navigation */
.module-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4) 0;
    position: relative;
    z-index: 10;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: var(--space-3);
}

/* Hero Content */
.module-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: var(--space-8) 0;
}

.module-badge {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-full);
    color: var(--color-accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-4);
}

.module-title {
    font-size: clamp(2rem, 6vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.gradient-text {
    background: linear-gradient(90deg, #d4af37, #ffd700, #d4af37);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.module-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.module-cta {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

/* Module Preview Cards */
.module-preview {
    position: relative;
    z-index: 1;
    max-width: 400px;
    margin: var(--space-8) auto 0;
}

.preview-card {
    background: rgba(20, 26, 33, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-header {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-4);
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
}

.preview-dot:nth-child(1) {
    background: #ef4444;
}

.preview-dot:nth-child(2) {
    background: #f59e0b;
}

.preview-dot:nth-child(3) {
    background: #22c55e;
}

.preview-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.preview-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.preview-item.active {
    background: rgba(212, 175, 55, 0.1);
    color: var(--color-text);
}

.preview-check {
    color: var(--color-success);
    font-weight: 600;
}

.preview-circle {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.preview-exam {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3);
    background: linear-gradient(135deg, rgba(241, 196, 15, 0.1), rgba(241, 196, 15, 0.05));
    border: 1px solid rgba(241, 196, 15, 0.2);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--color-text);
}

.exam-days {
    color: var(--color-accent);
    font-weight: 600;
}

/* Timer Preview */
.timer-preview {
    text-align: center;
}

.timer-display {
    margin-bottom: var(--space-4);
}

.timer-circle {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
}

.timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 8;
}

.timer-progress {
    fill: none;
    stroke: var(--color-accent);
    stroke-width: 8;
    stroke-linecap: round;
    stroke-dasharray: 283;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(212, 175, 55, 0.8));
    }
}

.timer-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.timer-minutes {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.timer-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.timer-modes {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.mode-active {
    color: var(--color-accent);
    font-weight: 500;
}

/* Goals Preview */
.goals-preview {
    text-align: left;
}

.goals-header {
    margin-bottom: var(--space-4);
}

.streak-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(249, 115, 22, 0.2));
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.goals-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.goal-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.goal-item.completed {
    color: var(--color-text);
}

.goal-check {
    width: 20px;
    height: 20px;
    background: var(--color-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: white;
}

.goal-circle {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.goals-progress {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.goals-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-success), #a3e635);
    border-radius: var(--radius-full);
}

.goals-footer {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
}

/* Roadmap Preview */
.roadmap-preview {
    text-align: left;
}

.roadmap-title {
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.roadmap-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.roadmap-step {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.roadmap-step.completed .step-dot,
.roadmap-step.active .step-dot {
    background: var(--color-accent);
}

.roadmap-step.completed,
.roadmap-step.active {
    color: var(--color-text);
}

.step-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.roadmap-line {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.1);
}

.roadmap-line.completed {
    background: var(--color-accent);
}

/* Analytics Preview */
.analytics-preview {
    text-align: left;
}

.analytics-header {
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: var(--color-text);
}

.analytics-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-4);
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-accent);
}

.stat-label {
    font-size: 0.625rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.analytics-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
    height: 80px;
    padding: var(--space-2);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
}

.chart-bar {
    flex: 1;
    background: rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all 0.3s ease;
}

.chart-bar.active {
    background: var(--color-accent);
}

/* ============================================
   Module Sections
   ============================================ */
.module-section {
    padding: var(--space-12) var(--space-4);
    background: #0a0f14;
}

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-badge {
    text-align: center;
    color: var(--color-accent);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-2);
    letter-spacing: 0.1em;
}

.section-heading {
    text-align: center;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: var(--space-8);
    color: var(--color-text);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-6);
}

.feature-card {
    background: rgba(20, 26, 33, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--space-4);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.feature-card p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Advantages Grid */
.advantages-section {
    background: linear-gradient(180deg, rgba(10, 15, 20, 0.9), #0a0f14);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-6);
}

.advantage-item {
    display: flex;
    gap: var(--space-4);
    padding: var(--space-5);
    background: rgba(20, 26, 33, 0.6);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.advantage-item:hover {
    border-color: rgba(212, 175, 55, 0.2);
}

.advantage-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
    opacity: 0.5;
}

.advantage-content h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-1);
    color: var(--color-text);
}

.advantage-content p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Careers Grid */
.careers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-4);
}

.career-card {
    background: rgba(20, 26, 33, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    text-align: center;
    transition: all 0.3s ease;
}

.career-card:hover {
    border-color: rgba(212, 175, 55, 0.3);
    transform: scale(1.02);
}

.career-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: var(--space-3);
}

.career-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-text);
}

.career-card p {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(180deg, #0a0f14, #141a21);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .module-hero {
        padding: var(--space-4);
    }

    .module-nav {
        padding: var(--space-2) 0;
    }

    .module-cta {
        flex-direction: column;
        width: 100%;
    }

    .module-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .module-preview {
        margin-top: var(--space-6);
    }

    .analytics-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }

    .roadmap-steps {
        flex-direction: column;
        align-items: flex-start;
    }

    .roadmap-line {
        width: 2px;
        height: 20px;
        margin-left: 5px;
    }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: 1rem;
}

.btn-accent {
    background: var(--color-accent);
    color: #000;
}

.btn-accent:hover {
    background: #e5c043;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--color-text);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}