/* assets/css/style.css */

/* ===== VARIABLES ===== */
:root {
    --bg-main: #F8F3EA;
    --bg-soft: #FFF8F1;
    --bg-card: #FFFDFC;
    --primary: #1E3A5F;
    --primary-soft: #355C8A;
    --primary-light: #6F92B8;
    --accent: #C96A5A;
    --accent-soft: #E8B8A8;
    --gold: #D8B36A;
    --text-dark: #223046;
    --text-mid: #5F6672;
    --text-light: #8A9099;
    --border-soft: #E7DFD2;
    --white: #ffffff;
    --card-shadow: 0 10px 30px rgba(30, 58, 95, 0.08);
    --card-hover-shadow: 0 18px 45px rgba(30, 58, 95, 0.12);
    --radius: 22px;
    --radius-sm: 14px;
    --transition: all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== BASE ===== */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'DM Sans', sans-serif;
    background: linear-gradient(180deg, #F8F3EA 0%, #F6F0E5 100%);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.main-content { flex: 1; }

h1, h2, h3, h4 { font-family: 'Playfair Display', serif; }

/* ===== HEADER ===== */
.site-header {
    background: rgba(30, 58, 95, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 24px rgba(30,58,95,0.10);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar { padding: 14px 0; }

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon {
    font-size: 1.6rem;
    color: var(--yellow-mid);
    animation: spin-slow 8s linear infinite;
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.brand-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--white);
    letter-spacing: -0.5px;
}

.navbar-toggler {
    border: 2px solid rgba(255,255,255,0.4);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
}

.navbar-toggler .bi { color: white; font-size: 1.4rem; }

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: white !important;
    background: rgba(255,255,255,0.15);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 28px 0;
    margin-top: auto;
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 1px;
}

.footer-tagline {
    font-size: 0.9rem;
    opacity: 0.85;
    font-style: italic;
}

.footer-copy { font-size: 0.85rem; opacity: 0.75; }

/* ===== PAGE HEADER ===== */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
    color: white;
    padding: 52px 0 42px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 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='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='20'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.page-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 1rem;
    opacity: 0.88;
    margin: 0;
    color: rgba(255,255,255,0.88);
}

.breadcrumb-trail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    opacity: 0.8;
}

.breadcrumb-trail a { color: var(--yellow-mid); text-decoration: none; }
.breadcrumb-trail a:hover { color: white; }
.breadcrumb-trail span { opacity: 0.6; }

/* ===== HOME PAGE ===== */
.home-scene {
    padding: 60px 0 40px;
    text-align: center;
}

.home-intro {
    max-width: 600px;
    margin: 0 auto 50px;
}

.home-intro h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--blue-header);
    line-height: 1.15;
    margin-bottom: 16px;
}

.home-intro h1 em {
    font-style: normal;
    color: var(--red-footer);
}

.home-intro p {
    font-size: 1.1rem;
    color: var(--text-mid);
    line-height: 1.7;
}

/* Illustration */
.illustration-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
}

.thinking-person {
    position: relative;
    width: 160px;
    height: 180px;
    margin: 0 auto;
}

.person-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 8px 24px rgba(30,58,95,0.15));
}

/* Floating category orbs */
.orbs-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 0 16px;
}

/* CATEGORY CIRCLES (home page) */
.category-orb {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    animation: float 3s ease-in-out infinite;
}

.category-orb:nth-child(1) { animation-delay: 0s; }
.category-orb:nth-child(2) { animation-delay: 0.4s; }
.category-orb:nth-child(3) { animation-delay: 0.8s; }
.category-orb:nth-child(4) { animation-delay: 1.2s; }
.category-orb:nth-child(5) { animation-delay: 1.6s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.category-orb:hover {
    transform: translateY(-16px) scale(1.08) !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.20);
    animation-play-state: paused;
}

.category-orb::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    opacity: 0;
    transition: var(--transition);
}

.category-orb:hover::before { opacity: 1; }

.orb-0 { background: linear-gradient(135deg, #6F92B8, #355C8A); }
.orb-1 { background: linear-gradient(135deg, #8BB7A2, #5B8F77); }
.orb-2 { background: linear-gradient(135deg, #D8A6A0, #C96A5A); }
.orb-3 { background: linear-gradient(135deg, #E2C27A, #C89B46); }
.orb-4 { background: linear-gradient(135deg, #B5A7D8, #8F79BA); }
.orb-5 { background: linear-gradient(135deg, #A9C9D9, #6F9BB5); }
.orb-6 { background: linear-gradient(135deg, #E7D5AF, #D8B36A); }

.orb-icon {
    font-size: 2rem;
    margin-bottom: 6px;
    line-height: 1;
}

.orb-label {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
    color: white;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
    text-align: center;
    padding: 0 8px;
    line-height: 1.2;
}

/* ===== SITUATIONS PAGE ===== */
.situations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 50px 0;
}

.situation-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px 26px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid var(--border-soft);
}

.situation-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-light), var(--blue-mid));
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.situation-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-hover-shadow);
    border-color: rgba(74,144,217,0.2);
    color: var(--text-dark);
}

.situation-card:hover::before { transform: scaleX(1); }

.situation-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--blue-light);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.situation-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.4;
    color: var(--blue-header);
}

.situation-arrow {
    margin-top: auto;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--blue-light), var(--blue-mid));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    transition: var(--transition);
    align-self: flex-end;
}

.situation-card:hover .situation-arrow {
    transform: translateX(5px);
}

/* ===== QUESTION PAGE ===== */
.question-section {
    padding: 50px 0;
}

.wizard-wrapper {
    max-width: 720px;
    margin: 0 auto;
}

/* Progress bar */
.wizard-progress {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px 30px;
    box-shadow: var(--card-shadow);
    margin-bottom: 30px;
    border: 1px solid var(--border-soft);
}

.wizard-steps {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.wizard-steps::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    height: 3px;
    background: #e8e8e8;
    z-index: 0;
}

.wizard-progress-fill {
    position: absolute;
    top: 18px;
    left: 18px;
    height: 3px;
    background: linear-gradient(90deg, var(--blue-light), var(--blue-mid));
    z-index: 1;
    transition: width 0.5s ease;
}

.wizard-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 2;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    border: 3px solid #e8e8e8;
}

.step-dot.active {
    background: var(--blue-mid);
    color: white;
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 4px rgba(74,144,217,0.2);
}

.step-dot.done {
    background: #00b894;
    color: white;
    border-color: #00b894;
}

.step-label {
    font-size: 0.72rem;
    color: var(--text-light);
    font-weight: 500;
}

.step-label.active { color: var(--blue-mid); font-weight: 700; }

/* Question card */
.question-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--card-shadow);
    margin-bottom: 24px;
    animation: slideUp 0.4s ease;
    border: 1px solid var(--border-soft);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.question-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.q-number {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--blue-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: rgba(74,144,217,0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.q-type-badge {
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.q-type-badge.text { background: rgba(0,184,148,0.1); color: #00b894; }
.q-type-badge.number { background: rgba(253,203,110,0.2); color: #e17055; }
.q-type-badge.scale { background: rgba(162,155,254,0.15); color: #6c5ce7; }
.q-type-badge.mcq { background: rgba(232,67,147,0.1); color: #e84393; }

.question-text {
    font-family: 'Playfair Display', serif;
    font-size: 1.28rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.55;
    margin-bottom: 22px;
}

/* Form controls */
.form-control, .form-select {
    border: 1.5px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.98rem;
    transition: var(--transition);
    background: #FFFCF8;
}

.form-control:focus, .form-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(201,106,90,0.10);
    background: white;
    outline: none;
}

textarea.form-control { resize: vertical; min-height: 110px; }

/* MCQ options */
.mcq-options { display: flex; flex-direction: column; gap: 12px; }

.mcq-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1.5px solid var(--border-soft);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    background: #FFFCF8;
}

.mcq-option:hover {
    border-color: var(--accent-soft);
    background: rgba(201,106,90,0.05);
}

.mcq-option input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue-mid); cursor: pointer; }
.mcq-option label { cursor: pointer; font-weight: 500; margin: 0; flex: 1; }

.mcq-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(201,106,90,0.08);
}

/* Scale slider */
.scale-wrapper { padding: 8px 0; }

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--blue-light) var(--value-percent, 50%), #e8e8e8 var(--value-percent, 50%));
    outline: none;
    cursor: pointer;
    border: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--blue-mid);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(46,95,158,0.4);
    transition: var(--transition);
}

.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }

.scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-top: 8px;
}

.scale-value-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blue-mid);
    font-family: 'Playfair Display', serif;
    margin-top: 10px;
}

/* Wizard buttons */
.wizard-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 30px;
}

.btn-wizard {
    padding: 14px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    font-family: 'DM Sans', sans-serif;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-next {
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    color: white;
    box-shadow: 0 8px 24px rgba(30,58,95,0.18);
}

.btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(46,95,158,0.4);
    color: white;
}

.btn-prev {
    background: white;
    color: var(--blue-mid);
    border: 2px solid #e8e8e8;
}

.btn-prev:hover {
    border-color: var(--blue-light);
    background: rgba(74,144,217,0.05);
    color: var(--blue-mid);
}

.btn-submit {
    background: linear-gradient(135deg, var(--accent), #B85C4D);
    color: white;
    box-shadow: 0 8px 24px rgba(201,106,90,0.22);
    padding: 16px 44px;
    font-size: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0,184,148,0.4);
    color: white;
}

/* ===== USER FORM ===== */
.user-form-section {
    padding: 60px 0;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 44px;
    box-shadow: var(--card-shadow);
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
}

.form-card h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.form-card p { color: var(--text-light); margin-bottom: 30px; }

.form-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-mid);
    margin-bottom: 8px;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-soft), var(--primary));
    color: white;
    border: none;
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    box-shadow: 0 8px 24px rgba(30,58,95,0.18);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(46,95,158,0.35);
}

/* ===== CONFIRM PAGE ===== */
.confirm-section { padding: 50px 0; }

.confirm-wrapper { max-width: 760px; margin: 0 auto; }

.confirm-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--card-shadow);
    margin-bottom: 20px;
    border: 1px solid var(--border-soft);
}

.confirm-header {
    background: linear-gradient(135deg, var(--blue-header), var(--blue-mid));
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 28px 36px;
    color: white;
    margin: -36px -36px 30px;
}

.confirm-header h3 { font-size: 1.5rem; margin: 0; }
.confirm-header p { opacity: 0.8; margin: 6px 0 0; font-size: 0.9rem; }

.qa-item {
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.qa-item:last-child { border-bottom: none; }

.qa-question {
    font-weight: 600;
    color: var(--blue-header);
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.qa-answer {
    color: var(--text-mid);
    font-size: 0.95rem;
    background: rgba(255,249,230,0.8);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 3px solid var(--yellow-mid);
}

/* ===== SUCCESS PAGE ===== */
.success-section {
    padding: 80px 0;
    text-align: center;
}

.success-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 60px 40px;
    box-shadow: var(--card-shadow);
    max-width: 500px;
    margin: 0 auto;
    border: 1px solid var(--border-soft);
}

.success-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #55efc4, #00b894);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.5rem;
    color: white;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.success-card h2 { color: var(--blue-header); margin-bottom: 12px; }
.success-card p { color: var(--text-light); line-height: 1.7; }

/* ===== ALERTS ===== */
.alert { border-radius: var(--radius-sm); border: none; font-weight: 500; }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.empty-state i { font-size: 4rem; margin-bottom: 16px; opacity: 0.4; }
.empty-state h3 { color: var(--blue-header); margin-bottom: 8px; }

/* ===== UTILITIES ===== */
.section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--blue-light);
    display: block;
    margin-bottom: 8px;
}

.divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-light), var(--red-footer));
    border-radius: 2px;
    margin: 16px auto 40px;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .category-orb { width: 110px; height: 110px; }
    .orb-icon { font-size: 1.6rem; }
    .orb-label { font-size: 0.72rem; }
    .situations-grid { grid-template-columns: 1fr; }
    .form-card { padding: 28px 20px; }
    .question-card { padding: 24px 20px; }
    .confirm-card { padding: 24px 20px; }
    .confirm-header { margin: -24px -20px 24px; padding: 20px; }
    .wizard-nav { flex-direction: column-reverse; }
    .btn-wizard { width: 100%; justify-content: center; }
    .wizard-step .step-label { display: none; }
}

@media (max-width: 480px) {
    .orbs-container { gap: 14px; }
    .category-orb { width: 95px; height: 95px; }
}
