/* Home Page (index.html) Styles */

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Theme-aware variables */
:root {
    --hero-bg-start: #0d9488;
    --hero-bg-end: #0f766e;
    --hero-text: white;
    --section-bg: #fafafa;
    --card-bg: white;
    --card-text: #1f2937;
    --card-text-muted: #6b7280;
    --card-border: #e5e7eb;
    --navbar-bg: white;
    --navbar-text: #1f2937;
    --footer-bg: #f9fafb;
    --footer-text: #1f2937;
}

[data-theme="dark"] {
    --hero-text: white;
    --section-bg: #0f172a;
    --card-bg: #1e293b;
    --card-text: #f1f5f9;
    --card-text-muted: #cbd5e1;
    --card-border: #334155;
    --navbar-bg: #1e293b;
    --navbar-text: #f1f5f9;
    --footer-bg: #0f172a;
    --footer-text: #f1f5f9;
}

.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
}

/* Animated Gradient Background */
.hero-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        #0d9488,
        #14b8a6,
        #2dd4bf,
        #5eead4,
        #0f766e,
        #134e4a,
        #115e59
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Animated Particles */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: particleFloat 20s infinite;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 35%;
    animation-delay: 4s;
    animation-duration: 20s;
}

.particle:nth-child(4) {
    left: 50%;
    animation-delay: 1s;
    animation-duration: 16s;
}

.particle:nth-child(5) {
    left: 65%;
    animation-delay: 3s;
    animation-duration: 19s;
}

.particle:nth-child(6) {
    left: 75%;
    animation-delay: 5s;
    animation-duration: 17s;
}

.particle:nth-child(7) {
    left: 85%;
    animation-delay: 2.5s;
    animation-duration: 21s;
}

.particle:nth-child(8) {
    left: 95%;
    animation-delay: 4.5s;
    animation-duration: 14s;
}

@keyframes particleFloat {
    0% {
        top: 110%;
        opacity: 0;
        transform: scale(0.5);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        top: -10%;
        opacity: 0;
        transform: scale(1.5);
    }
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
}

.hero-illustration {
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 3;
}

/* Question Cards Animation */
.question-cards-container {
    position: relative;
    height: 400px;
    perspective: 1000px;
}

.question-card {
    position: absolute;
    width: 280px;
    height: 160px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-card i {
    font-size: 3rem;
    color: #0d9488;
    align-self: flex-start;
}

.card-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.line {
    height: 8px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    border-radius: 4px;
    opacity: 0.6;
}

.line:first-child {
    width: 80%;
}

.line:last-child {
    width: 60%;
}

.card-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotateY(-10deg);
    animation: cardFloat1 3s ease-in-out infinite;
    z-index: 3;
}

.card-2 {
    top: 80px;
    left: 40%;
    transform: translateX(-50%) rotateY(5deg);
    animation: cardFloat2 3.5s ease-in-out infinite;
    z-index: 2;
    opacity: 0.9;
}

.card-3 {
    top: 160px;
    left: 60%;
    transform: translateX(-50%) rotateY(-5deg);
    animation: cardFloat3 4s ease-in-out infinite;
    z-index: 1;
    opacity: 0.85;
}

@keyframes cardFloat1 {
    0%, 100% {
        transform: translateX(-50%) translateY(0) rotateY(-10deg);
    }
    50% {
        transform: translateX(-50%) translateY(-20px) rotateY(-15deg);
    }
}

@keyframes cardFloat2 {
    0%, 100% {
        transform: translateX(-50%) translateY(0) rotateY(5deg);
    }
    50% {
        transform: translateX(-50%) translateY(-15px) rotateY(10deg);
    }
}

@keyframes cardFloat3 {
    0%, 100% {
        transform: translateX(-50%) translateY(0) rotateY(-5deg);
    }
    50% {
        transform: translateX(-50%) translateY(-25px) rotateY(-10deg);
    }
}

/* Floating Icons */
.floating-icons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.floating-icons i {
    position: absolute;
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.4);
    animation: iconFloat 2s ease-in-out infinite;
}

.icon-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.icon-2 {
    bottom: 15%;
    left: 5%;
    animation-delay: 0.5s;
}

.icon-3 {
    top: 50%;
    right: 5%;
    animation-delay: 1s;
}

.icon-4 {
    top: 25%;
    left: 10%;
    animation-delay: 1.5s;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(180deg);
    }
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--hero-text);
    margin-bottom: 0.75rem;
    letter-spacing: -0.05em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--hero-text);
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
}

.hero-buttons {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.hero-buttons .btn {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 0.75rem;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
}

.btn-hero-primary {
    background: #0f766e;
    color: white;
    border: none;
}

.btn-hero-primary:hover {
    background: #0d9488;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    color: white;
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 0.5rem 1.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.btn-hero-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.features-section {
    padding: 3rem 0 6rem;
    background: var(--section-bg);
}

.feature-card {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2.5rem;
    height: 100%;
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #0d9488;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1rem;
    color: var(--card-text-muted);
    line-height: 1.75;
}

.stats-section {
    background: linear-gradient(135deg, var(--hero-bg-start) 0%, var(--hero-bg-end) 100%);
    padding: 4rem 0;
    color: var(--hero-text);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.125rem;
    opacity: 0.9;
    font-weight: 500;
}

.cta-section {
    padding: 3rem 0;
    background: var(--card-bg);
    text-align: center;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--card-text);
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    color: var(--card-text-muted);
    margin-bottom: 3rem;
}

.navbar-modern {
    background: var(--navbar-bg) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    padding: 1rem 0;
}

.navbar-brand-modern {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hero-bg-start) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-separator {
    width: 1px;
    height: 1.5rem;
    background: var(--card-border);
    margin: 0 0.75rem;
    display: none;
}

@media (min-width: 992px) {
    .navbar-separator {
        display: inline-block;
    }
}

.navbar-nav-left {
    gap: 0.25rem;
}

.navbar-modern .nav-link {
    color: var(--navbar-text) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.2s ease;
}

.navbar-modern .nav-link:hover {
    color: var(--hero-bg-start) !important;
}

.nav-controls-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--card-border);
    border-radius: 0.5rem;
    padding: 0.2rem 0.35rem;
}

.nav-control-btn {
    color: var(--navbar-text) !important;
    font-size: 1.1rem;
    padding: 0.3rem 0.5rem;
    border-radius: 0.4rem;
    text-decoration: none;
    transition: all 0.2s ease;
    line-height: 1;
}

.nav-control-btn:hover {
    background: var(--card-bg);
    color: var(--hero-bg-start) !important;
}

.nav-control-btn.dropdown-toggle::after {
    display: none;
}

.navbar-modern .btn-outline-primary {
    border: 2px solid #0d9488;
    color: #0d9488;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
}

.navbar-modern .btn-outline-primary:hover {
    background: #0d9488;
    color: white !important;
    border-color: #0d9488;
}

.navbar-modern .btn-primary {
    background: #0d9488;
    border: none;
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
}

.navbar-modern .btn-primary:hover {
    background: #0f766e;
    color: white !important;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--card-text);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--card-text-muted);
}

.footer-section {
    background: linear-gradient(-45deg, #0d9488, #14b8a6, #2dd4bf, #5eead4, #0f766e, #134e4a, #115e59);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: white;
    padding: 3rem 0;
}

.footer-link {
    color: white;
    opacity: 0.8;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-link:hover {
    opacity: 1;
    color: white;
}

.footer-divider {
    border-color: var(--card-border);
    opacity: 0.2;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.125rem;
    }
}

/* Floating animation for hero icons */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Courses Ribbon Section */
.courses-ribbon-section {
    padding: 3rem 0 0;
    background: var(--section-bg);
}

.courses-ribbon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.courses-ribbon {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 1rem 0.5rem;
    flex: 1;
}

.courses-ribbon::-webkit-scrollbar {
    display: none;
}

.ribbon-arrow {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--card-border);
    background: var(--card-bg);
    color: var(--card-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 2;
}

.ribbon-arrow:hover {
    background: #0d9488;
    color: white;
    border-color: #0d9488;
}

.course-ribbon-card {
    flex: 0 0 240px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.course-ribbon-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: #0d9488;
}

.course-ribbon-card .course-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.course-ribbon-card .course-ribbon-img {
    width: calc(100% + 3rem);
    height: 120px;
    object-fit: cover;
    border-radius: 1rem 1rem 0 0;
    margin: -1.5rem -1.5rem 1rem;
}

.course-ribbon-card .course-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--card-text);
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.course-ribbon-card .course-questions-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(13, 148, 136, 0.1);
    color: #0d9488;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    border-radius: 2rem;
}

.course-ribbon-card .course-lock-overlay {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    color: var(--card-text-muted);
    font-size: 0.9rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .course-ribbon-card {
        flex: 0 0 200px;
    }
    .ribbon-arrow {
        display: none;
    }
}
