/* ============================================================================
   iSchool — Trang giới thiệu nền tảng (landing page)
   File độc lập, không phụ thuộc theme.css của khu vực đã đăng nhập: trang này
   được phục vụ như file tĩnh (xem .htaccess — file/thư mục có thật thì bỏ qua
   router PHP), nên biến màu thương hiệu được khai báo lại ở đây cho gọn,
   thay vì kéo theo toàn bộ CSS của khu quản trị (sidebar, bảng, form...).
   Bảng màu khớp với public/assets/css/theme.css để giữ đồng bộ nhận diện.
   ========================================================================== */

:root {
    --isc-primary: #15803d;
    --isc-primary-hover: #166534;
    --isc-primary-dark: #14532d;
    --isc-primary-rgb: 21, 128, 61;
    --isc-accent: #0f766e;
    --isc-bg: #f8faf9;
    --isc-surface: #ffffff;
    --isc-border: #e2e8f0;
    --isc-text: #1e293b;
    --isc-muted: #64748b;
    --isc-radius: .75rem;
    --isc-radius-lg: 1.25rem;
    --isc-shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);
    --isc-shadow-lg: 0 20px 40px -12px rgba(20, 83, 45, .18);
    --header-h: 72px;
}

* { box-sizing: border-box; }
html {
    scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px);
    /* Menu di động là off-canvas: position:fixed + translateX(100%) đẩy nó ra ngoài
       khung nhìn khi đóng. Trình duyệt vẫn tính hình học của phần tử fixed đó vào
       chiều rộng cuộn của trang dù mắt không thấy — không chặn overflow-x thì trang
       luôn có thanh cuộn ngang ẩn dù không phần tử nào "nhìn thấy được" bị tràn. */
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    color: var(--isc-text);
    background: var(--isc-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { max-width: 1200px; margin-inline: auto; padding-inline: 1.25rem; }

h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin: 0; }

.skip-link {
    position: absolute; left: -999px; top: 0; z-index: 2000;
    background: #fff; color: var(--isc-primary); padding: .75rem 1.25rem; border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; }

/* ============================================================================
   Header — luôn cố định trên đầu khi cuộn (position: sticky)
   ========================================================================== */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease;
    height: var(--header-h);
    display: flex; align-items: center;
}
.site-header.is-scrolled { border-color: var(--isc-border); box-shadow: 0 2px 12px rgba(15, 23, 42, .06); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }

.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; color: var(--isc-primary-dark); flex-shrink: 0; }

.main-nav { display: flex; align-items: center; gap: 1.75rem; margin-inline: auto; }
.main-nav a { font-weight: 500; font-size: .95rem; color: var(--isc-text); padding: .4rem 0; position: relative; }
.main-nav a:hover { color: var(--isc-primary); }
.main-nav a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: var(--isc-primary); transform: scaleX(0); transition: transform .2s ease;
}
.main-nav a:hover::after { transform: scaleX(1); }
.nav-login-mobile { display: none; }

.header-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

.nav-toggle {
    display: none; background: none; border: 1px solid var(--isc-border); border-radius: .5rem;
    width: 40px; height: 40px; font-size: 1.25rem; color: var(--isc-primary-dark); cursor: pointer;
}

/* ============================================================================
   Nút bấm dùng chung
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .6rem 1.15rem; border-radius: .55rem; font-weight: 600; font-size: .95rem;
    border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--isc-primary); color: #fff; box-shadow: 0 4px 14px rgba(var(--isc-primary-rgb), .3); }
.btn-primary:hover { background: var(--isc-primary-hover); color: #fff; }
.btn-outline { background: #fff; color: var(--isc-primary-dark); border-color: var(--isc-border); }
.btn-outline:hover { border-color: var(--isc-primary); color: var(--isc-primary); }
.btn-ghost { background: transparent; color: var(--isc-primary-dark); }
.btn-ghost:hover { color: var(--isc-primary); }
.btn-light { background: #fff; color: var(--isc-primary-dark); }
.btn-ghost-light { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; }

/* ============================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative; overflow: hidden;
    min-height: 620px; display: flex; align-items: center; padding: 3.5rem 0;
}

/* ----- Ảnh nền hero: thật, nằm dưới chữ, mờ dần trái → phải -----
   Bản thân hero.jpg vốn đã sáng/mờ bên trái (bokeh) và rõ chủ thể bên phải, nên lớp
   gradient chỉ cần đẩy nốt phần còn lại về màu nền để hoà liền mạch dưới khối chữ. */
.hero-photo-wrap { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-photo { width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero-fade {
    position: absolute; inset: 0;
    /* Điểm dừng đo thực tế trên khung 1440px: hàng nút CTA (nút rỗng "Khám phá tính
       năng" không có nền riêng nên cần chữ tương phản) kéo dài tới ~53% chiều rộng
       hero — mốc 54% dưới đây giữ nền còn đặc ~60% ngay tại đó, đủ tương phản để đọc
       chữ, rồi mới nhường hẳn cho ảnh ở phần bên phải không có chữ. */
    background: linear-gradient(90deg,
        var(--isc-bg) 0%, var(--isc-bg) 22%,
        rgba(248, 250, 249, .9) 38%,
        rgba(248, 250, 249, .6) 54%,
        rgba(248, 250, 249, .2) 70%,
        transparent 88%);
}

/* width:100% BẮT BUỘC ở đây: .hero là flex container (để canh giữa dọc theo chiều
   cao ảnh), mà .wrap vốn dùng chung ở mọi nơi khác lại không đặt width. Một flex
   item không có width sẽ co theo đúng khít nội dung bên trong (giống inline-block)
   thay vì lấp đầy rồi mới bị max-width chặn lại như trong luồng block bình thường
   — hậu quả là toàn bộ khối .hero-copy bị đẩy dạt vào GIỮA thay vì nằm sát trái,
   đúng ngay vùng ảnh đã lộ rõ nên khó đọc chữ. */
.hero-inner { position: relative; z-index: 1; width: 100%; }
.hero-copy { max-width: 620px; }

.eyebrow {
    display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; font-weight: 700;
    color: var(--isc-primary-dark); background: #dcfce7; padding: .4rem .85rem; border-radius: 999px;
    margin-bottom: 1.1rem;
}

.hero-copy h1 { font-size: clamp(1.9rem, 3.4vw, 2.85rem); }
.text-accent { color: var(--isc-primary); }
.hero-desc { margin: 1.25rem 0 1.75rem; font-size: 1.08rem; color: var(--isc-muted); max-width: 46ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .85rem; }

.level-badges {
    list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2rem 0 0;
}
.level-badges li {
    font-size: .82rem; font-weight: 600; color: var(--isc-primary-dark);
    background: #fff; border: 1px solid var(--isc-border); padding: .35rem .8rem; border-radius: 999px;
}

/* ============================================================================
   Bố cục section dùng chung
   ========================================================================== */
.section { padding: 4.5rem 0; }
.section-alt { background: var(--isc-surface); border-top: 1px solid var(--isc-border); border-bottom: 1px solid var(--isc-border); }
.section-head { max-width: 640px; margin: 0 auto 2.75rem; text-align: center; }
.section-head h2 { font-size: clamp(1.55rem, 2.6vw, 2.1rem); }
.section-head p { margin: .75rem 0 0; color: var(--isc-muted); font-size: 1.05rem; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.25rem; }

/* ----- Vì sao chọn iSchool: thẻ trước/sau ----- */
.pain-card {
    background: #fff; border: 1px solid var(--isc-border); border-radius: var(--isc-radius);
    padding: 1.5rem; box-shadow: var(--isc-shadow);
}
.pain-before, .pain-after { display: flex; gap: .85rem; align-items: flex-start; }
.pain-before i { color: #ef4444; font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.pain-after i { color: var(--isc-primary); font-size: 1.3rem; flex-shrink: 0; margin-top: .1rem; }
.pain-before p, .pain-after p { margin: 0; font-size: .94rem; }
.pain-before p { color: var(--isc-muted); }
.pain-arrow { text-align: center; color: #cbd5e1; margin: .6rem 0; font-size: 1.1rem; }

/* ----- Thẻ tính năng ----- */
.feature-card {
    background: #fff; border: 1px solid var(--isc-border); border-radius: var(--isc-radius);
    padding: 1.6rem 1.4rem; transition: transform .18s ease, box-shadow .18s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--isc-shadow-lg); border-color: transparent; }
.feature-icon {
    width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    background: #dcfce7; color: var(--isc-primary-dark); font-size: 1.3rem; margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.05rem; margin-bottom: .5rem; }
.feature-card p { margin: 0; font-size: .9rem; color: var(--isc-muted); }

/* ----- Cấp học ----- */
.level-card {
    text-align: center; background: #fff; border: 1px solid var(--isc-border); border-radius: var(--isc-radius);
    padding: 1.75rem 1.1rem;
}
.level-card i { font-size: 1.8rem; color: var(--isc-primary); margin-bottom: .75rem; display: block; }
.level-card h3 { font-size: 1.02rem; margin-bottom: .5rem; }
.level-card p { margin: 0; font-size: .85rem; color: var(--isc-muted); }

/* ----- Vai trò ----- */
.role-card {
    background: #fff; border: 1px solid var(--isc-border); border-radius: var(--isc-radius);
    padding: 1.75rem 1.4rem; text-align: left;
}
.role-icon {
    width: 50px; height: 50px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--isc-primary), var(--isc-primary-dark)); color: #fff; font-size: 1.4rem;
    margin-bottom: 1.1rem;
}
.role-card h3 { font-size: 1.08rem; margin-bottom: .55rem; }
.role-card p { margin: 0; font-size: .9rem; color: var(--isc-muted); }

/* ----- Bảo mật ----- */
.security-wrap { display: grid; grid-template-columns: .85fr 1.15fr; gap: 3rem; align-items: start; }
.security-head { text-align: left; margin: 0; max-width: none; }
.security-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.security-list li { display: flex; gap: 1rem; align-items: flex-start; }
.security-list i { font-size: 1.35rem; color: var(--isc-primary); flex-shrink: 0; margin-top: .2rem; }
.security-list strong { display: block; font-size: .98rem; margin-bottom: .2rem; }
.security-list span { font-size: .88rem; color: var(--isc-muted); }

/* ----- Gói dịch vụ ----- */
.plan-grid { max-width: 900px; margin: 0 auto; }
.plan-card {
    background: #fff; border: 1px solid var(--isc-border); border-radius: var(--isc-radius-lg);
    padding: 2rem; text-align: center;
}
.plan-icon {
    width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 1.1rem; display: flex; align-items: center;
    justify-content: center; background: #dcfce7; color: var(--isc-primary-dark); font-size: 1.6rem;
}
.plan-card h3 { font-size: 1.2rem; margin-bottom: .6rem; }
.plan-card p { color: var(--isc-muted); font-size: .92rem; margin-bottom: 1.4rem; }

/* ----- CTA cuối trang ----- */
.cta-final {
    background: linear-gradient(135deg, #14532d 0%, #15803d 55%, #16a34a 100%);
    color: #fff; text-align: center; padding: 4.5rem 0;
}
.cta-final h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
.cta-final p { margin: .85rem 0 1.75rem; opacity: .85; font-size: 1.05rem; }
.cta-final .hero-cta { justify-content: center; }

/* ============================================================================
   Footer
   ========================================================================== */
.site-footer { background: #0f2818; color: #cbd5e1; padding-top: 3rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr .8fr .8fr; gap: 2.5rem; padding-bottom: 2.5rem; }
.footer-brand p { margin: .9rem 0 0; font-size: .88rem; color: #94a3b8; max-width: 32ch; }
.brand-footer { color: #fff; }

/* Nút gọi hotline — bấm là gọi thẳng trên điện thoại (thẻ tel:), nên phải trông
   RÕ RÀNG là nút bấm được (nền đặc + viền bo tròn), khác hẳn các link chữ thường
   liệt kê ở hai cột bên cạnh. */
.footer-hotline {
    display: inline-flex; align-items: center; gap: .55rem; margin-top: 1.1rem;
    background: var(--isc-primary); color: #fff; font-weight: 700; font-size: .95rem;
    padding: .6rem 1.1rem; border-radius: 999px; transition: background-color .15s ease, transform .15s ease;
}
.footer-hotline i { font-size: 1.05rem; }
.footer-hotline:hover { background: var(--isc-primary-hover); color: #fff; transform: translateY(-1px); }
.footer-col h4 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.footer-col { display: flex; flex-direction: column; gap: .65rem; }
.footer-col a { font-size: .9rem; color: #cbd5e1; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1); padding: 1.25rem 1.25rem;
    display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center;
    font-size: .82rem; color: #94a3b8;
}
.footer-back-link { color: #a7f3d0; font-weight: 600; display: inline-flex; align-items: center; gap: .35rem; }
.footer-back-link:hover { color: #fff; }

/* ============================================================================
   Responsive — thu gọn dần, cuối cùng là menu ẩn dạng ngăn kéo cho di động
   ========================================================================== */
@media (max-width: 991px) {
    /* Tablet: ảnh vẫn hiện nhưng thu hẹp vùng lộ rõ để chữ luôn đủ chỗ thoáng đãng. */
    .hero-fade {
        /* Đo thực tế ở 900px: hàng nút CTA kéo tới ~72% chiều rộng hero (chữ chiếm tỷ lệ
           lớn hơn desktop vì .hero-copy giữ nguyên 620px trong khi hero hẹp lại). Dời
           các điểm dừng sang phải để vẫn còn nền đủ đặc ngay tại đó. */
        background: linear-gradient(90deg,
            var(--isc-bg) 0%, var(--isc-bg) 34%,
            rgba(248, 250, 249, .9) 50%,
            rgba(248, 250, 249, .6) 68%,
            rgba(248, 250, 249, .2) 82%,
            transparent 94%);
    }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-5 { grid-template-columns: repeat(3, 1fr); }
    .security-wrap { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
    :root { --header-h: 64px; }
    .main-nav {
        position: fixed; top: var(--header-h); right: 0; height: calc(100vh - var(--header-h));
        width: min(300px, 80vw); background: #fff; flex-direction: column; align-items: flex-start;
        padding: 1.5rem; gap: .25rem; margin: 0; box-shadow: -8px 0 24px rgba(15, 23, 42, .12);
        transform: translateX(100%); transition: transform .25s ease; z-index: 999;
    }
    .main-nav.is-open { transform: translateX(0); }
    .main-nav a { width: 100%; padding: .75rem 0; border-bottom: 1px solid var(--isc-border); }
    .nav-login-mobile { display: inline-flex; margin-top: .75rem; width: 100%; justify-content: center; }
    .nav-backdrop {
        display: none; position: fixed; inset: 0; top: var(--header-h); background: rgba(15, 23, 42, .35); z-index: 998;
    }
    .nav-backdrop.is-open { display: block; }
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .header-actions .btn-outline { display: none; }
    .header-actions .btn-primary { padding: .55rem .9rem; font-size: .88rem; }

    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
    .grid-5 { grid-template-columns: 1fr 1fr; }
    .section { padding: 3rem 0; }
    /* Ẩn hẳn ảnh nền trên di động — màn hẹp không đủ chỗ cho cả chữ lẫn ảnh mà vẫn
       đọc thoải mái, nên ưu tiên chữ, giữ hero sạch và nhẹ. */
    .hero { padding: 3rem 0; min-height: 0; }
    .hero-photo-wrap { display: none; }
    .hero-copy { max-width: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .grid-4, .grid-5 { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; align-items: stretch; }
    .hero-cta .btn { width: 100%; }
}

/* Tôn trọng người dùng tắt hiệu ứng chuyển động */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn, .feature-card, .main-nav { transition: none; }
}
