/* style.css */
:root {
    /* Color Palette */
    --primary-color: #D32F2F; /* Deep tech red */
    --primary-light: #FFEBEE;
    --primary-hover: #B71C1C;
    --text-main: #1A1A1B;
    --text-muted: #5F6368;
    --bg-main: #FAFAFC;
    --bg-white: #FFFFFF;
    --border-color: #E2E8F0;
    --success: #10B981;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.1);
    
    /* Typography */
    --font-main: 'Plus Jakarta Sans', sans-serif;
    
    /* Spacing & Borders */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-max: 50px;
    
    /* Transitions */
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    /* Blend the solid color with the faint watercolor background using a 40% white overlay for even bolder visibility */
    background-color: var(--bg-main);
    background-image: linear-gradient(rgba(250, 250, 252, 0.40), rgba(250, 250, 252, 0.40)), url('./bg_watercolor.png');
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
    position: relative;
}

/* Decorative element in top-left */
body::after {
    content: "";
    position: fixed;
    top: -40px;
    left: -40px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(211, 47, 47, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography elements */
h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 16px;
}
h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 24px;
}
h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}
p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.highlight {
    color: var(--primary-color);
}

/* Navigation */
.navbar {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 95px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}
.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
}

/* Buttons */
button {
    font-family: var(--font-main);
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 14px 28px;
    border-radius: var(--radius-max);
    font-weight: 600;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(211, 47, 47, 0.2);
}

.btn-secondary {
    background-color: var(--bg-main);
    color: var(--text-main);
    padding: 14px 28px;
    border-radius: var(--radius-max);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: #F1F5F9;
}

.btn-primary-outline {
    background-color: transparent;
    color: var(--primary-color);
    padding: 12px 24px;
    border-radius: var(--radius-max);
    font-weight: 600;
    border: 2px solid var(--primary-color);
    text-decoration: none;
}
.btn-primary-outline:hover {
    background-color: var(--primary-light);
}

/* Layout helpers */
.space-between { justify-content: space-between; }
.right { justify-content: flex-end; }
.btn-group { display: flex; gap: 16px; margin-top: 32px; }

/* Wizard Section */
.wizard-container {
    max-width: 800px;
    margin: 80px auto;
}

.wizard-header {
    text-align: center;
    margin-bottom: 48px;
}

.steps-indicator {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 40px;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-weight: 500;
    opacity: 0.5;
    transition: var(--transition);
}

.step.active {
    opacity: 1;
    color: var(--primary-color);
}

.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 600;
}

.step.active .step-num {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Forms */
.form-step {
    display: none;
    background: var(--bg-white);
    padding: 48px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.4s ease;
}

.form-step.active {
    display: block;
}

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

.full-width {
    grid-column: 1 / -1;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-main);
}

input, select {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-main);
    font-size: 1rem;
    background-color: var(--bg-main);
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Custom Chips (Checkboxes) */
.chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.chip {
    padding: 12px 20px;
    border-radius: var(--radius-max);
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    user-select: none;
    font-size: 0.95rem;
}

.chip input {
    display: none;
}

.chip.selected {
    background-color: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.summary-box {
    background-color: #F8FAFC;
    border-left: 4px solid var(--success);
    padding: 16px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin-top: 24px;
}

/* Loading Section */
.loader-container {
    text-align: center;
    margin: 80px auto;
    max-width: 600px;
}

.radar-box {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 40px;
    background: radial-gradient(circle, rgba(211, 47, 47, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.radar-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(211, 47, 47, 0.1);
    border-radius: 50%;
}

.radar-circle::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 66%; height: 66%;
    border: 1px solid rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-circle::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 33%; height: 33%;
    border: 1px solid rgba(211, 47, 47, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.radar-sweep {
    position: absolute;
    width: 50%;
    height: 50%;
    top: 0;
    left: 50%;
    background: linear-gradient(45deg, rgba(211, 47, 47, 0.2) 0%, transparent 80%);
    transform-origin: bottom left;
    border-radius: 100% 0 0 0;
    animation: radarSweep 3s linear infinite;
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-dots .dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    filter: blur(1px);
}

.d1 { top: 30%; left: 40%; animation: dotPulse 2s infinite 0.5s; }
.d2 { top: 60%; left: 70%; animation: dotPulse 2s infinite 1.2s; }
.d3 { top: 20%; left: 80%; animation: dotPulse 2s infinite 0.1s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0; transform: scale(0.5); }
    50% { opacity: 0.8; transform: scale(1.2); }
}

.analysis-card {
    background: var(--bg-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    margin-bottom: 24px;
}

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

.analysis-title {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1.1rem;
}

.analysis-percentage {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.progress-bar-container {
    height: 12px;
    background: #F1F5F9;
    border-radius: var(--radius-max);
    overflow: hidden;
    margin-bottom: 20px;
    border: 1px solid #E2E8F0;
}

.progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), #ff6b6b);
    border-radius: var(--radius-max);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: barShine 1.5s infinite;
}

@keyframes barShine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.analysis-status {
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    min-height: 1.5em;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.loading-notice-mini {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--primary-light);
    padding: 12px 20px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--primary-color);
    line-height: 1.5;
}

/* Results Section */
.results-layout {
    margin: 60px 0;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    max-width: 960px;
    margin: 0 auto;
}

.uni-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    width: 100%;
}

.uni-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    height: 200px;
    background-color: #E2E8F0;
    background-size: cover;
    background-position: center;
    position: relative;
}

.card-rank {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,0.9);
    padding: 6px 12px;
    border-radius: var(--radius-max);
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
}

.card-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-strengths {
    margin-bottom: 24px;
}

.card-strengths span {
    display: inline-block;
    background: var(--bg-main);
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-main);
    margin: 0 4px 4px 0;
}

.card-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}

.modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--bg-white);
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: var(--transition);
}

.modal.show .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,0.5);
    color: white;
    font-size: 24px;
    display: flex; justify-content: center; align-items: center;
    z-index: 10;
}
.close-modal:hover { background: rgba(0,0,0,0.8); }

.modal-hero {
    position: relative;
    height: 300px;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.modal-hero::after {
    content: '';
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
}

#modal-image {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
}

.modal-hero-text {
    position: relative;
    z-index: 1;
    color: white;
}

.modal-hero-text h2 { margin-bottom: 8px; color: white; }
.badge { background: var(--primary-color); padding: 4px 12px; border-radius: var(--radius-max); font-size: 0.9rem; font-weight: 600; display: inline-block; margin-bottom: 12px;}

.modal-body-wrapper {
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow-y: auto;
}

.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    padding: 0 40px;
}

.tab-btn {
    background: none;
    padding: 20px 0;
    margin-right: 32px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.modal-sections {
    padding: 40px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

.strength-box, .timeline-box {
    background: var(--bg-main);
    padding: 24px;
    border-radius: var(--radius-md);
    margin-top: 24px;
}

.styled-list li, .checklist li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.styled-list li::before {
    content: '🎓';
    position: absolute;
    left: 0;
}

.checklist li::before {
    content: '✅';
    position: absolute;
    left: 0;
}

.timeline {
    border-left: 2px solid var(--primary-light);
    margin-left: 12px;
    padding-left: 24px;
}

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 4px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
}

.steps-vertical {
    margin-top: 24px;
}
.apply-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.step-number {
    width: 32px; height: 32px; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary-color);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-weight: bold;
}
.step-details h5 { font-size: 1.1rem; margin-bottom: 4px; }
.step-details p { font-size: 0.95rem; }

.apply-cta {
    margin-top: 32px;
    text-align: center;
}

.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Page Sections --- */
.page-section {
    padding: 60px 0;
    animation: fadeIn 0.4s ease;
}

.page-header {
    text-align: center;
    margin-bottom: 48px;
}

.page-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.page-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Scholarship Styles --- */
.scholarship-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Top row: 2 cards centered */
.scholarship-card:nth-child(1),
.scholarship-card:nth-child(2) {
    grid-column: auto;
}

/* Force first 2 cards into a 2-col centered sub-row */
.scholarship-top-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.scholarship-bottom-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.scholarship-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

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

.scholarship-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--primary-color);
}

.sc-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-max);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.sc-csc { background: #fee2e2; color: #b91c1c; } /* Red */
.sc-cis { background: #e0e7ff; color: #4338ca; } /* Indigo */
.sc-provincial { background: #dcfce7; color: #15803d; } /* Green */
.sc-uni { background: #fef3c7; color: #b45309; } /* Amber */
.sc-silk { background: #fce7f3; color: #be185d; } /* Pink */

.scholarship-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
}

.sc-desc {
    font-style: italic;
    margin-bottom: 20px;
    min-height: 50px;
}

.sc-features {
    list-style: none;
}

.sc-features li {
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    font-size: 0.95rem;
    color: var(--text-main);
}

.sc-features li::before {
    content: '★';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    top: -2px;
}

/* --- Guide/Blog Styles --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.blog-img {
    height: 180px;
    background-size: cover;
    background-position: center;
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-main);
}

.blog-excerpt {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--text-muted);
    flex-grow: 1;
}

.blog-btn {
    align-self: flex-start;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
}

.blog-btn:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Article Modal Content */
.article-modal-body {
    padding: 40px;
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-y: auto;
    max-height: 70vh;
}

.article-modal-body h4 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 16px;
}

.article-modal-body .meta-details {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.article-modal-body p {
    color: var(--text-main);
    margin-bottom: 16px;
}

/* Responsiveness */
@media (max-width: 950px) {
    .cards-grid { gap: 20px; }
    .uni-card { width: calc(50% - 10px); max-width: 400px; }
    .grid-form { grid-template-columns: 1fr; }
    h1 { font-size: 2.8rem; }
}

@media (max-width: 650px) {
    .uni-card { width: 100%; max-width: 100%; }
    .form-step { padding: 24px; }
    h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
    .results-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .modal-hero { height: 200px; padding: 20px; }
    .modal-tabs { padding: 0 20px; overflow-x: auto; white-space: nowrap; display: flex; gap: 10px; }
    .modal-tabs button { min-width: 120px; padding: 12px 20px; }
    .modal-sections { padding: 20px; }
    .blog-grid { grid-template-columns: 1fr; }
    .scholarship-top-row, .scholarship-bottom-row { grid-template-columns: 1fr; }
}

/* ============================================
   FLOATING ACTION BUTTONS (FAB)
   ============================================ */
.fab-container {
    position: fixed;
    bottom: 28px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1500;
}

.fab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px 0 16px;
    height: 50px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.fab:hover {
    transform: translateY(-3px) scale(1.04);
    box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.fab:active {
    transform: translateY(0) scale(0.97);
}

.fab-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.fab-zalo {
    background: #0068ff;
    color: #fff;
}

.fab-donate {
    background: linear-gradient(135deg, #f97316, #ef4444);
    color: #fff;
}

/* Zalo popup specifics */
.zalo-popup-box {
    max-width: 400px;
}

.zalo-popup-box .sino-popup-title span {
    color: #0068ff;
}

.zalo-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.zalo-close-btn:hover {
    background: #e5e7eb;
    color: var(--text-dark);
}

.zalo-qr-wrapper {
    margin: 0 0 20px 0;
}

.zalo-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 16px;
    display: block;
    margin: 0 auto 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.zalo-name-tag {
    text-align: center;
}

.zalo-name-tag strong {
    display: block;
    font-size: 1rem;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.zalo-name-tag span {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.zalo-cta-row {
    margin-bottom: 16px;
}

.zalo-direct-btn {
    display: block;
    text-align: center;
    padding: 13px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    text-decoration: none;
    background: #0068ff;
    color: #fff;
    transition: var(--transition);
}

.zalo-direct-btn:hover {
    background: #0052cc;
}

/* Custom location input */
#location-custom {
    width: 100%;
    box-sizing: border-box;
}

/* ============================================
   BOOKING SECTION
   ============================================ */


/* Nav link highlight */
.nav-booking-link {
    background: var(--primary-color);
    color: #fff !important;
    padding: 6px 16px !important;
    border-radius: 20px;
    font-weight: 700 !important;
    transition: var(--transition);
}
.nav-booking-link:hover {
    background: var(--primary-hover);
    opacity: 1 !important;
}

/* Intro box */
.booking-intro-box {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.booking-intro-left h3 {
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.booking-intro-left p {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.booking-includes {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.booking-includes li {
    padding: 7px 0;
    font-size: 0.93rem;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-color);
}

.booking-includes li:last-child { border-bottom: none; }

.booking-fee-notice {
    background: linear-gradient(135deg, #fff7ed, #fffbeb);
    border: 1px solid #fed7aa;
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.booking-fee-badge {
    display: inline-block;
    background: #ea580c;
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.booking-fee-notice p {
    font-size: 0.87rem;
    color: #7c2d12;
    margin: 0;
    line-height: 1.6;
}

/* Steps preview widget */
.booking-steps-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f8f9ff;
    border: 1px solid #e8eaff;
    border-radius: var(--radius-md);
    padding: 24px;
    height: 100%;
    justify-content: center;
}

.bsp-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    transition: var(--transition);
}

.bsp-item span {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
    font-size: 0.85rem;
}

.bsp-item.active {
    background: var(--primary-light);
    color: var(--primary-hover);
}

.bsp-item.active span {
    background: var(--primary-color);
    color: white;
}

.bsp-item.done {
    color: #15803d;
}

.bsp-item.done span {
    background: #dcfce7;
    color: #15803d;
}

.bsp-arrow {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    margin: 0 0 0 20px;
}

/* Step panels */
.booking-step-panel {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.bsp-title {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--text-dark);
}

/* Date picker */
.date-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.date-row label {
    font-weight: 600;
    font-size: 0.93rem;
    color: var(--text-main);
}

.booking-date-input {
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    max-width: 280px;
    cursor: pointer;
    transition: var(--transition);
}

.booking-date-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Time slots */
.slots-label {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.slots-group {
    margin-bottom: 20px;
}

.slot-group-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 10px;
}

.slots-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.slot-btn {
    padding: 10px 18px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    background: #fff;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-main);
    transition: var(--transition);
}

.slot-btn:hover:not(.booked):not(.slot-selected) {
    border-color: var(--primary-color);
    background: var(--primary-light);
    color: var(--primary-hover);
}

.slot-btn.slot-selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.slot-btn.booked {
    background: #f3f4f6;
    color: #d1d5db;
    cursor: not-allowed;
    text-decoration: line-through;
    border-color: #e5e7eb;
}

.slots-loading-msg {
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.9rem;
}

.slots-error-msg {
    color: #dc2626;
    font-size: 0.9rem;
    padding: 10px 14px;
    background: #fef2f2;
    border-radius: var(--radius-md);
    border: 1px solid #fecaca;
}

/* Booking selected summary bar */
.booking-selected-summary {
    background: var(--primary-light);
    border: 1px solid var(--primary-hover);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-hover);
    margin-bottom: 24px;
}

/* Contact form */
.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}

.bf-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.bf-group.full-width {
    grid-column: 1 / -1;
}

.bf-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.bf-group input,
.bf-group textarea {
    padding: 12px 16px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    resize: none;
}

.bf-group input:focus,
.bf-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.required-star {
    color: #e53e3e;
    font-weight: 900;
}

.optional-label {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.82rem;
}

/* Step nav buttons */
.booking-nav-btns {
    display: flex;
    gap: 14px;
    align-items: center;
}

.booking-next-btn {
    padding: 13px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    min-width: 200px;
}

.booking-next-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.booking-back-btn {
    padding: 11px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-muted);
    font-family: inherit;
    transition: var(--transition);
}

.booking-back-btn:hover {
    background: #f5f5f5;
    border-color: #9ca3af;
    color: var(--text-main);
}

/* Search Timer Circle */
.search-timer-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
}

.search-timer-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    background: white;
    box-shadow: var(--shadow-md);
    letter-spacing: -1px;
}

.search-timer-circle::after {
    content: "";
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 4px solid var(--primary-light);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: rotateTimer 1s linear infinite;
    pointer-events: none;
}

@keyframes rotateTimer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Payment step */
.booking-final-layout {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 28px;
    margin-bottom: 24px;
    align-items: start;
}

.booking-summary-card {
    background: #f8faff;
    border: 1px dashed var(--primary-hover);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 20px;
    font-size: 0.93rem;
    color: var(--text-main);
    line-height: 1.8;
}

.booking-summary-card strong {
    color: var(--primary-hover);
}

.booking-payment-note {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}

.booking-payment-note h4 {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.booking-payment-note ol {
    padding-left: 18px;
    font-size: 0.88rem;
    color: var(--text-main);
    line-height: 1.9;
}

.qr-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}

.booking-qr-img {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    display: block;
    margin: 0 auto;
    object-fit: contain;
    background: white;
}

.booking-bank-details {
    text-align: center;
    margin-top: 12px;
    font-size: 0.83rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.booking-bank-details strong {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.booking-error-msg {
    color: #dc2626;
    font-size: 0.9rem;
    padding: 12px 16px;
    background: #fef2f2;
    border-radius: var(--radius-md);
    border: 1px solid #fecaca;
    margin-bottom: 16px;
}

/* Success screen */
.booking-success-box {
    text-align: center;
    padding: 40px 20px;
}

.success-icon-big {
    font-size: 4rem;
    margin-bottom: 16px;
}

.booking-success-box h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.booking-success-box > p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.success-next-steps {
    display: inline-block;
    text-align: left;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
}

.success-next-steps p {
    font-size: 0.93rem;
    color: #166534;
    margin: 0 0 8px 0;
}

.success-next-steps p:last-child { margin: 0; }

/* Responsive booking */
@media (max-width: 768px) {
    .booking-intro-box {
        grid-template-columns: 1fr;
    }
    .booking-form-grid {
        grid-template-columns: 1fr;
    }
    .booking-final-layout {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   POPUP SYSTEM (Welcome + Donate)
   ============================================ */

.sino-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: overlayIn 0.3s ease;
}

.sino-overlay.hidden {
    display: none;
}

@keyframes overlayIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sino-popup {
    background: #fff;
    border-radius: 24px;
    padding: 40px 36px 32px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 30px 80px rgba(0,0,0,0.25), 0 0 0 1px rgba(255,255,255,0.1);
    text-align: center;
    animation: popupIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.sino-popup::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), #ff6b6b, #ffd700);
}

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

.sino-popup-icon {
    font-size: 3rem;
    margin-bottom: 12px;
    line-height: 1;
}

.sino-popup-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.sino-popup-title span {
    color: var(--primary-color);
}

.sino-popup-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.6;
}

/* Welcome Perks */
.welcome-perks {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
    text-align: left;
}

.perk-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: #f8f9ff;
    border: 1px solid #e8eaff;
    border-radius: 14px;
    padding: 14px 16px;
}

.perk-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.perk-item strong {
    font-size: 0.95rem;
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

.perk-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

.welcome-donate-nudge {
    background: linear-gradient(135deg, #fffbeb, #fff7e6);
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
    text-align: left;
}

.welcome-donate-nudge p {
    font-size: 0.88rem;
    color: #92400e;
    margin: 0;
    line-height: 1.6;
}

.sino-popup-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 14px;
    margin-bottom: 12px;
    cursor: pointer;
}

.sino-popup-footnote {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* Donate Popup */
.donate-popup-box .sino-popup-title span {
    color: #e53e3e;
}

.donate-qr-box {
    display: flex;
    align-items: center;
    gap: 20px;
    background: #f8faff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.donate-qr-img {
    width: 140px;
    height: 140px;
    border-radius: 10px;
    border: 3px solid #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    flex-shrink: 0;
    object-fit: contain;
    background: white;
}

.donate-bank-info p {
    font-size: 0.88rem;
    color: var(--text-main);
    margin: 0 0 6px 0;
}

.donate-bank-info strong {
    color: var(--text-dark);
}

.donate-suggest {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1 !important;
    font-size: 0.82rem !important;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 4px !important;
    font-weight: 600;
}

.donate-thanks-msg {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 20px;
}

.donate-btn-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.donate-btn-group .btn-primary {
    padding: 13px 20px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    width: 100%;
}

.donate-btn-group .btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    font-size: 0.85rem;
    border-radius: 12px;
    cursor: pointer;
    font-family: inherit;
    transition: var(--transition);
}

.donate-btn-group .btn-secondary:hover {
    background: #f5f5f5;
    color: var(--text-main);
}

/* Search counter badge in navbar */
.search-counter-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-hover);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.search-counter-badge.low {
    background: #fff7ed;
    color: #c2410c;
    border-color: #fed7aa;
}

@media (max-width: 950px) {
    .cards-grid { gap: 20px; }
    .grid-form { grid-template-columns: 1fr; }
    h1 { font-size: 2.8rem; }
}


@media (max-width: 650px) {
    .cards-grid { grid-template-columns: 1fr; }
    .form-step { padding: 24px; }
    h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
    .results-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .modal-hero { height: 200px; padding: 20px; }
    .modal-tabs { padding: 0 20px; overflow-x: auto; white-space: nowrap; }
    .modal-sections { padding: 20px; }
}

/* ===== MODAL PROFESSIONAL COMPONENTS ===== */

/* Modal sections padding */
.modal-sections { padding: 32px 40px; }

/* Section block */
.modal-section {
    margin-bottom: 32px;
}
.modal-section:last-child { margin-bottom: 0; }

.modal-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0;
}

.modal-desc-text {
    font-size: 0.97rem;
    color: var(--text-main);
    line-height: 1.75;
    margin: 0;
}

/* Stats row */
.modal-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 28px;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1px solid var(--border-color);
}
.modal-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}
.stat-icon { font-size: 1.4rem; }
.modal-stat strong {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}
.modal-stat span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Tags */
.modal-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-tag {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid rgba(211,47,47,0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Scholarship cards */
.sc-cards-list { display: flex; flex-direction: column; gap: 12px; }
.sc-card-pro {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    border-left: 4px solid var(--primary-color);
}
.sc-card-header {
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    font-size: 1rem;
}
.sc-card-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
    align-items: flex-start;
    font-size: 0.9rem;
}
.sc-label { color: var(--text-muted); white-space: nowrap; font-weight: 500; min-width: 90px; }
.sc-val { color: var(--text-main); line-height: 1.5; }
.sc-deadline { color: var(--primary-color); font-weight: 600; }

/* Timeline Pro */
.timeline-pro {
    border-left: 2px solid var(--primary-light);
    margin-left: 10px;
    padding-left: 20px;
}
.timeline-item-pro {
    display: flex;
    gap: 14px;
    position: relative;
    margin-bottom: 20px;
}
.tl-dot {
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-light);
    flex-shrink: 0;
}
.tl-body { flex: 1; }
.tl-phase {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}
.tl-desc {
    font-size: 0.9rem;
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
}

/* Docs list */
.docs-list { display: flex; flex-direction: column; gap: 10px; }
.doc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-main);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}
.doc-num {
    background: var(--primary-color);
    color: white;
    width: 24px; height: 24px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    flex-shrink: 0;
}
.doc-text { font-size: 0.9rem; color: var(--text-main); line-height: 1.5; }

/* Apply steps pro */
.apply-steps-list { display: flex; flex-direction: column; gap: 12px; }
.apply-step-pro {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.apply-step-pro:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-color); }
.asp-num {
    width: 32px; height: 32px; flex-shrink: 0;
    background: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
}
.asp-body { flex: 1; }
.asp-title { font-size: 0.95rem; font-weight: 700; color: var(--text-main); display: block; margin-bottom: 4px; }
.asp-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0; line-height: 1.55; }

/* Life review grid */
.life-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.life-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
}
.life-card-icon { font-size: 1.5rem; margin-bottom: 8px; }
.life-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}
.life-card p { font-size: 0.88rem; color: var(--text-muted); margin: 0; line-height: 1.6; }
.life-card-highlight {
    background: var(--primary-light);
    border-color: rgba(211,47,47,0.2);
}
.life-card-highlight h4 { color: var(--primary-hover); }
.lc-divider {
    height: 1px;
    background: rgba(211,47,47,0.2);
    margin: 12px 0;
}
.lc-cost { color: var(--primary-color) !important; font-weight: 600; }

/* ===== BLOG / CẨM NANG SECTION ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.blog-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.blog-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: var(--radius-max);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
    color: var(--text-main);
}

.blog-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-read-more {
    margin-top: auto;
    background: none;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    width: fit-content;
}

.blog-read-more:hover {
    gap: 10px;
}

.article-modal-body {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.article-detail {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.article-detail-hero {
    height: 350px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 40px;
}

.article-detail-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
}

.article-detail-meta {
    position: relative;
    z-index: 2;
    color: white;
}

.article-detail-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 15px 0 10px;
    line-height: 1.2;
    color: white;
}

.article-detail-date {
    font-size: 0.95rem;
    opacity: 0.8;
}

.article-detail-body {
    padding: 40px;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-main);
}

.article-detail-body h4 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 30px 0 15px;
    color: var(--text-main);
}

.article-detail-body p {
    margin-bottom: 20px;
    color: #333;
}

.article-detail-body ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.article-detail-body li {
    margin-bottom: 12px;
}

/* --- COMPREHENSIVE RESPONSIVE DESIGN (MOBILE) --- */
@media (max-width: 650px) {
    /* Layout & Base */
    .container { padding: 0 16px; }
    h1 { font-size: 2.2rem; }
    .nav-links { display: none; }
    .cards-grid { grid-template-columns: 1fr; gap: 16px; }
    .form-step { padding: 24px; padding-bottom: 120px !important; }
    .wizard-container { padding-bottom: 80px; }

    /* Results Dashboard */
    .results-header { flex-direction: column; align-items: flex-start; gap: 16px; }
    .results-layout { padding: 10px; }
    .uni-card { width: 100%; max-width: 100%; }

    /* UNIVERSITY MODAL (CRITICAL FIX) */
    .modal-content { 
        height: 100%; 
        max-height: 100vh; 
        border-radius: 0; 
    }
    .modal-hero { 
        height: 200px; 
        padding: 20px; 
    }
    .modal-hero-text h2 { 
        font-size: 1.4rem; 
    }
    
    .modal-tabs { 
        display: flex !important; /* Ensure visibility */
        padding: 0 16px; 
        overflow-x: auto; 
        white-space: nowrap; 
        -webkit-overflow-scrolling: touch;
        background: #fff;
        position: sticky;
        top: 0;
        z-index: 10;
        border-bottom: 1px solid var(--border-color);
        min-height: 50px;
    }
    .tab-btn { 
        padding: 12px 0; 
        margin-right: 20px; 
        font-size: 0.9rem; 
        flex-shrink: 0;
    }
    .modal-sections { 
        padding: 16px; 
        flex-grow: 1;
    }
    .modal-stats-row { 
        grid-template-columns: repeat(2, 1fr); 
        padding: 14px; 
    }

    /* Scholarship & Review */
    .life-grid { grid-template-columns: 1fr; }
    .sc-card-pro { padding: 12px; }

    /* Blog */
    .blog-grid { grid-template-columns: 1fr; }
    .article-detail-hero { height: 250px; padding: 20px; }
    .article-detail-title { font-size: 1.5rem; }
    .article-detail-body { padding: 20px; }

    /* FAB Buttons */
    .fab-container { bottom: 15px; right: 15px; gap: 8px; }
    .fab { padding: 10px 14px; font-size: 0.85rem; }
    .fab span { display: none; }
    .fab::after { content: attr(data-mobile-label); display: inline; }

    /* Zalo Popup */
    .zalo-popup-box { padding: 24px; }
}
