/**
 * Landing Page Styles
 */

.landing-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* === Welcome Section === */
.welcome-section {
    text-align: center;
    margin-bottom: 60px;
    animation: slideIn 0.6s ease-out;
}

.welcome-image {
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 30px;
    box-shadow: var(--shadow-lg);
    border: 5px solid var(--primary-color);
    animation: pulse 2s ease-in-out infinite;
}

.welcome-section h1 {
    font-size: 3.5rem;
    color: var(--text-on-surface);
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.tagline {
    font-size: 1.3rem;
    color: var(--text-on-surface);
    margin-bottom: 20px;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

/* === Statistics Section === */
.stats-section {
    background: var(--bg-surface);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.7s ease-out 0.2s both;
}

.stats-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.1));
    padding: 30px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: default;
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    display: block;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.questionnaire-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    /* Multi-line truncation */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    /* Max 3 lines */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4em;
    max-height: 4.2em;
    /* 3 lines * 1.4em */
    min-height: 4.2em;
    /* Ensure consistent spacing */
}

.stat-card .stat-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* === Questionnaires Section === */
.questionnaires-section {
    background: var(--bg-surface);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.8s ease-out 0.4s both;
}

.questionnaires-section h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 2rem;
}

.questionnaires-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* === Questionnaire Cards === */
.questionnaire-card {
    background: var(--bg-surface);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    cursor: pointer;
    animation: slideIn 0.5s ease-out;
    height: 280px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

[data-theme="dark"] .questionnaire-card {
    background: rgba(55, 48, 107, 0.5);
}

.questionnaire-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.card-header h3 {
    flex: 1;
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 0;
}

.completion-badge {
    background: linear-gradient(45deg, var(--success-color), #16a34a);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.card-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.score-info {
    display: flex;
    gap: 15px;
    margin-top: auto;
}

.best-score,
.last-completed {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-style: italic;
    white-space: nowrap;
}

.start-quiz-btn {
    width: 100%;
    flex-shrink: 0;
    margin-top: 15px;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* === Footer === */
.landing-footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-on-surface);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.landing-footer a {
    color: var(--text-on-surface);
    text-decoration: underline;
    margin-left: 20px;
    transition: var(--transition);
}

.landing-footer a:hover {
    color: var(--primary-color);
}

/* === Responsive === */
@media (max-width: 768px) {
    .landing-container {
        padding: 20px 10px;
    }

    .welcome-section h1 {
        font-size: 2.5rem;
    }

    .welcome-image {
        width: 150px;
        height: 150px;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .stats-section,
    .questionnaires-section {
        padding: 25px 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .questionnaires-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-header {
        flex-direction: column;
        gap: 10px;
    }

    .completion-badge {
        align-self: flex-start;
    }
}