:root {
    --font-main: 'Plus Jakarta Sans', sans-serif;
    --bg-body: #f8f9fa;
    --bg-card: #ffffff;
    --bg-modal: rgba(255, 255, 255, 0.98);
    --text-dark: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --teacher-primary: #0ea5e9;
    --teacher-gradient: linear-gradient(135deg, #0ea5e9 0%, #3b82f6 100%);
    --student-primary: #8b5cf6;
    --student-gradient: linear-gradient(135deg, #8b5cf6 0%, #d946ef 100%);
    --radius-xl: 1.5rem;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-hover: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-card: #1e293b;
    --bg-modal: rgba(15, 23, 42, 0.98);
    --text-dark: #f1f5f9;
    --text-light: #94a3b8;
    --border-color: #334155;
}

body { font-family: var(--font-main); background-color: var(--bg-body); color: var(--text-dark); margin: 0; padding: 0; line-height: 1.6; overflow-x: hidden; }

/* HERO */
.welcome-hero { text-align: center; padding: 4rem 1rem 1rem; background: radial-gradient(circle at top, rgba(14,165,233,0.1), transparent); }
.welcome-hero h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; margin-bottom: 1rem; line-height: 1.1; }
.hero-gradient-text { background: linear-gradient(to right, var(--teacher-primary), var(--student-primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.welcome-hero p.lead { font-size: 1.25rem; color: var(--text-light); max-width: 800px; margin: 0 auto 3rem; font-weight: 500; }

/* TABS */
.tabs-container { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; position: relative; z-index: 2; }
.tab-btn { padding: 1rem 2.5rem; font-size: 1.1rem; font-weight: 700; border-radius: 99px; border: 2px solid var(--border-color); background: var(--bg-card); color: var(--text-light); cursor: pointer; transition: var(--transition); display: flex; align-items: center; gap: 0.75rem; }
.tab-btn:hover { transform: translateY(-3px); color: var(--text-dark); border-color: var(--text-light); }
.tab-btn.active.teacher { background: var(--teacher-gradient); color: white; border-color: transparent; box-shadow: 0 10px 25px -5px rgba(14, 165, 233, 0.5); }
.tab-btn.active.student { background: var(--student-gradient); color: white; border-color: transparent; box-shadow: 0 10px 25px -5px rgba(139, 92, 246, 0.5); }

/* GRID */
.tab-content { display: none; max-width: 1400px; margin: 0 auto; padding: 0 1.5rem 5rem; animation: fadeIn 0.5s ease; }
.tab-content.active { display: block; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

.card { background: var(--bg-card); border-radius: var(--radius-xl); overflow: hidden; box-shadow: var(--shadow-md); transition: var(--transition); border: 2px solid transparent; border-color: var(--border-color); display: flex; flex-direction: column; cursor: pointer; position: relative; opacity: 0; animation: fadeInUp 0.6s forwards; }

/* Auto-Focus / Hover */
.card.auto-focus { transform: scale(1.03) translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15); z-index: 2; }
.card:hover { transform: translateY(-8px) scale(1.02); box-shadow: var(--shadow-hover); border-color: var(--text-light) !important; z-index: 3; }
.teacher-view .card.auto-focus { border-color: var(--teacher-primary); }
.student-view .card.auto-focus { border-color: var(--student-primary); }

.card-image-header { height: 180px; position: relative; overflow: hidden; }
.card-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.card:hover .card-image, .card.auto-focus .card-image { transform: scale(1.05); }
.card-overlay { position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.2) 100%); }

.card-content-wrapper { padding: 1.75rem; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 1.35rem; font-weight: 700; margin: 0; line-height: 1.3; color: var(--text-dark); }
.card-subtitle { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; margin-bottom: 0.5rem; display: block; }
.teacher-view .card-subtitle { color: var(--teacher-primary); }
.student-view .card-subtitle { color: var(--student-primary); }
.card-teaser { color: var(--text-light); font-size: 0.95rem; flex-grow: 1; margin-top: 0.5rem; }

.card-read-more { margin-top: 1.5rem; font-weight: 700; font-size: 0.9rem; display: flex; align-items: center; gap: 0.5rem; opacity: 0.7; transition: opacity 0.3s; }
.card.auto-focus .card-read-more, .card:hover .card-read-more { opacity: 1; }
.teacher-view .card-read-more { color: var(--teacher-primary); }
.student-view .card-read-more { color: var(--student-primary); }

.card-icon-float { position: absolute; top: 1rem; right: 1rem; background: rgba(255, 255, 255, 0.9); width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: 0 4px 10px rgba(0,0,0,0.1); backdrop-filter: blur(4px); z-index: 2; transition: transform 0.3s; }
.card.auto-focus .card-icon-float { transform: scale(1.1) rotate(5deg); }
.teacher-view .card-icon-float { color: var(--teacher-primary); }
.student-view .card-icon-float { color: var(--student-primary); }

.card.featured { grid-column: 1 / -1; flex-direction: row; min-height: 300px; }
.card.featured .card-image-header { width: 45%; height: auto; }
.card.featured .card-content-wrapper { width: 55%; justify-content: center; }

/* CTA */
.cta-box { grid-column: 1 / -1; text-align: center; padding: 4rem 2rem; border-radius: var(--radius-xl); color: white; margin-top: 4rem; position: relative; overflow: hidden; box-shadow: var(--shadow-md); }
.cta-bg-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-20deg); font-size: 25rem; opacity: 0.05; pointer-events: none; }
.cta-btn { display: inline-block; background: #45b544; padding: 1rem 3.5rem; border-radius: 99px; text-decoration: none; font-weight: 800; font-size: 1.1rem; margin-top: 2.5rem; transition: var(--transition); box-shadow: var(--shadow-md); }
.cta-btn:hover { transform: translateY(-5px); }

/* FAQ */
.faq-section { max-width: 900px; margin: 4rem auto; padding: 0 1.5rem; }
.section-header { font-size: 2rem; font-weight: 800; margin-bottom: 2rem; color: var(--text-dark); display: flex; align-items: center; gap: 0.5rem; }
.faq-group { display: none; animation: fadeIn 0.5s ease; }
.faq-group.active { display: block; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border-color); margin-bottom: 1rem; border-radius: 1rem; overflow: hidden; transition: var(--transition); }
.faq-item:hover { border-color: var(--text-light); }
.faq-item summary { padding: 1.5rem; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; color: var(--text-dark); }
.faq-item summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; transition: transform 0.3s; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-answer { padding: 0 1.5rem 1.5rem; color: var(--text-light); border-top: 1px solid var(--border-color); font-size: 1rem; line-height: 1.7; }
.calc-trigger { color: var(--teacher-primary); text-decoration: underline; cursor: pointer; font-weight: 700; }

/* MODALS */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); z-index: 1000; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.modal-backdrop.active { opacity: 1; pointer-events: all; }
.modal-content { background: var(--bg-card); width: 90%; max-width: 700px; max-height: 85vh; overflow-y: auto; border-radius: var(--radius-xl); box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); transform: translateY(20px); transition: transform 0.3s; position: relative; border: 1px solid var(--border-color); }
.modal-backdrop.active .modal-content { transform: translateY(0); }

.modal-close-btn { position: absolute; top: 1.5rem; right: 1.5rem; background: var(--bg-body); border: 1px solid var(--border-color); width: 44px; height: 44px; border-radius: 50%; font-size: 1.2rem; color: var(--text-light); cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; z-index: 10; }
.modal-close-btn:hover { background: var(--border-color); color: var(--text-dark); transform: rotate(90deg); }

.modal-header { padding: 2.5rem 2.5rem 1rem; }
.modal-body { padding: 0 2.5rem 2.5rem; color: var(--text-dark); font-size: 1.1rem; line-height: 1.7; }
.full-content ul { padding-left: 1.5rem; margin-top: 1rem; }
.full-content li { margin-bottom: 0.75rem; }
.full-content strong { font-weight: 700; }
.teacher-view .full-content strong { color: var(--teacher-primary); }
.student-view .full-content strong { color: var(--student-primary); }

/* CALCULATOR STYLES - FIXED BOX */
.calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1rem; }
.calc-row { margin-bottom: 1.5rem; }
.calc-row label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-light); }
.range-wrap { display: flex; align-items: center; gap: 1rem; }
.range-val { font-weight: 700; color: var(--teacher-primary); min-width: 80px; text-align: right; }
input[type="range"] { flex: 1; accent-color: var(--teacher-primary); cursor: pointer; }

/* FIX: Changed height to auto and added min-height/padding */
.calc-result-box { 
    background: var(--bg-body); 
    padding: 1.5rem; 
    border-radius: 1rem; 
    text-align: center; 
    border: 1px solid var(--border-color); 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    height: auto; 
    min-height: 130px; /* Minimum height ensures consistency */
    gap: 0.5rem;
}
.calc-val { font-size: 1.5rem; font-weight: 800; display: block; margin-top: 0.2rem; }
.val-solo { color: #ef4444; } .val-mentor { color: #22c55e; }

@media (max-width: 1024px) { .grid { grid-template-columns: 1fr 1fr; } .calc-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .hero { padding-top: 3rem; } .tabs-container { flex-direction: column; padding: 0 2rem; } .grid { grid-template-columns: 1fr; } .card.featured { flex-direction: column; } .card.featured .card-image-header, .card.featured .card-content-wrapper { width: 100%; } }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.grid .card:nth-child(1) { animation-delay: 0.1s; } .grid .card:nth-child(2) { animation-delay: 0.15s; } .grid .card:nth-child(3) { animation-delay: 0.2s; } .grid .card:nth-child(4) { animation-delay: 0.25s; } .grid .card:nth-child(5) { animation-delay: 0.3s; }