/* =====================================================
   INDEX PAGE - Homepage Premium Edition
   ===================================================== */

/* ── Hero Section ─────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, #3d0507 0%, #54090c 40%, #7a1318 100%);
    padding: 72px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 48px rgba(84, 9, 12, 0.25);
}

/* Grid pattern */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}
/* Watermark text */
.hero-section::after {
    content: 'PTIT';
    position: absolute;
    right: -30px;
    bottom: -50px;
    font-size: 280px;
    font-weight: 900;
    color: rgba(255,255,255,.035);
    line-height: 1;
    pointer-events: none;
    letter-spacing: -10px;
    user-select: none;
}

/* Glowing orb */
.hero-section .hero-orb {
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,100,100,.12) 0%, transparent 70%);
    right: -100px;
    top: -100px;
    pointer-events: none;
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 36px;
    align-items: center;
    position: relative;
    z-index: 2;
}
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

.hero-inner {
    position: relative;
    z-index: 2;
    animation: fadeUp .7s ease both;
}

/* ── Hero Image Slider ────────────────────────────── */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 380px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.18);
    background: #111;
}
.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}
.hero-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: scale(1.05);
}
.hero-slider .slide.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.hero-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.hero-slider .slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 24px 16px;
    background: linear-gradient(0deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}
.slider-btn:hover {
    background: rgba(122, 19, 24, 0.9);
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}
.slider-btn.prev-btn { left: 12px; }
.slider-btn.next-btn { right: 12px; }

.slider-dots {
    position: absolute;
    bottom: 14px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: all 0.3s ease;
}
.slider-dot.active {
    width: 22px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255,255,255,0.6);
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.18);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.9);
    margin-bottom: 24px;
    backdrop-filter: blur(8px);
    letter-spacing: .8px;
    text-transform: uppercase;
}
.hero-eyebrow-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-ring 2s ease-in-out infinite;
    flex-shrink: 0;
}

.hero-h1 {
    font-size: 60px;
    font-weight: 900;
    line-height: 1.08;
    margin-bottom: 22px;
    letter-spacing: -2px;
}
.hero-h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #fcd34d, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-p {
    font-size: 18px;
    line-height: 1.75;
    color: rgba(255,255,255,.78);
    margin-bottom: 40px;
    max-width: 560px;
}

.hero-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.btn-hero-primary {
    background: #fff;
    color: var(--primary);
    font-size: 15px;
    padding: 15px 32px;
    border-radius: var(--radius);
    font-weight: 800;
    border: none;
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    letter-spacing: -.01em;
}
.btn-hero-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0,0,0,.3);
    color: var(--primary);
    background: #fff;
}
.btn-hero-primary:active { transform: translateY(-1px); }

.btn-hero-ghost {
    color: rgba(255,255,255,.88);
    font-size: 15px;
    padding: 15px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    border: 1.5px solid rgba(255,255,255,.28);
    cursor: pointer;
    transition: all .25s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}
.btn-hero-ghost:hover {
    background: rgba(255,255,255,.12);
    color: #fff;
    border-color: rgba(255,255,255,.55);
    transform: translateY(-2px);
}

/* Hero stats row */
.hero-stats-row {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-top: 44px;
    padding-top: 36px;
    border-top: 1px solid rgba(255,255,255,.12);
}
.hero-stat { text-align: center; }
.hero-stat-num {
    font-size: 26px;
    font-weight: 900;
    color: #fcd34d;
    line-height: 1;
    letter-spacing: -1px;
}
.hero-stat-lbl {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    margin-top: 3px;
    font-weight: 500;
}
.hero-stats-divider {
    width: 1px;
    height: 36px;
    background: rgba(255,255,255,.15);
}

/* ── Stats Bar ─────────────────────────────────────── */
.stats-bar {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.stats-inner {
    display: flex;
    justify-content: center;
    align-items: stretch;
}
.stat-item {
    flex: 1;
    padding: 32px 20px;
    text-align: center;
    border-right: 1px solid var(--border);
    position: relative;
    transition: background var(--transition);
}
.stat-item:last-child { border-right: none; }
.stat-item:hover { background: var(--primary-light); }
.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}
.stat-item:hover::after { width: 60%; }

.stat-number {
    font-size: 34px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -1.5px;
}
.stat-label { font-size: 13px; color: var(--text-3); font-weight: 600; letter-spacing: .02em; }

/* ── Why Cards ─────────────────────────────────────── */
.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.why-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeUp .6s ease both;
}
.why-card:nth-child(2) { animation-delay: .1s; }
.why-card:nth-child(3) { animation-delay: .2s; }
.why-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #e83e3e);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}
.why-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(193,32,38,.15);
}
.why-card:hover::before { transform: scaleX(1); }

.card-icon-box {
    width: 64px;
    height: 64px;
    background: #fdf4f4;
    border: 1px solid rgba(122, 19, 24, 0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: all var(--transition);
}
.cat-card:hover .card-icon-box,
.why-card:hover .card-icon-box {
    background: #54090c;
    border-color: var(--primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 16px rgba(122, 19, 24, 0.2);
}
.cat-card:hover .card-icon-box svg,
.why-card:hover .card-icon-box svg {
    stroke: #ffffff;
}
.cat-card:hover .card-icon-box svg circle[fill="#7a1318"],
.why-card:hover .card-icon-box svg circle[fill="#7a1318"] {
    fill: #ffffff;
}

.why-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    margin: 0 auto 18px;
    border: 1px solid rgba(122, 19, 24, 0.2);
    text-transform: uppercase;
    transition: all var(--transition);
}
.why-card:hover .why-label {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
}
.why-title { font-size: 17px; font-weight: 800; color: var(--text-1); margin-bottom: 12px; letter-spacing: -.2px; text-align: center; }
.why-desc  { font-size: 14px; color: var(--text-3); line-height: 1.7; text-align: justify; text-justify: inter-word; margin: 0; width: 100%; }

/* ── Section header row ────────────────────────────── */
.section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 32px;
}

/* ── Categories ────────────────────────────────────── */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}
.cat-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    display: block;
    position: relative;
    overflow: hidden;
}
.cat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-light);
    opacity: 0;
    transition: opacity var(--transition);
}
.cat-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.cat-card:hover::after { opacity: 0.5; }

.cat-label-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 14px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    margin: 0 auto 16px;
    text-transform: uppercase;
    border: 1px solid rgba(122, 19, 24, 0.2);
    transition: all var(--transition);
}
.cat-card:hover .cat-label-tag {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary-dark);
}
.cat-name  { font-size: 15px; font-weight: 700; color: var(--text-1); margin-bottom: 6px; }
.cat-count { font-size: 12px; color: var(--text-3); font-weight: 500; }

/* ── CTA Banner ─────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, #3d0507 0%, #54090c 40%, #7a1318 100%);
    border-radius: var(--radius-xl);
    padding: 64px 48px;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin: 0 0 60px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 16px 48px rgba(84,9,12,.2);
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255,200,0,.07) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(255,100,100,.08) 0%, transparent 50%);
}
.cta-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 48px 48px;
}
.cta-title {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 14px;
    position: relative;
    z-index: 2;
    letter-spacing: -.8px;
}
.cta-desc {
    font-size: 17px;
    opacity: .75;
    margin-bottom: 36px;
    position: relative;
    z-index: 2;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 1024px) {
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hero-section { padding: 56px 28px; border-radius: 16px; }
    .hero-h1 { font-size: 38px; letter-spacing: -1px; }
    .hero-p  { font-size: 16px; }
    .why-grid { grid-template-columns: 1fr; }
    .cat-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-inner { flex-wrap: wrap; }
    .stat-item { flex: 1 1 50%; border-bottom: 1px solid var(--border); }
    .stat-item:nth-child(2n) { border-right: none; }
    .stat-item:nth-child(3), .stat-item:nth-child(4) { border-bottom: none; }
    .cta-section { padding: 48px 28px; border-radius: 16px; }
    .cta-title { font-size: 28px; }
    .section-header-row { flex-direction: column; align-items: flex-start; gap: 12px; }
    .hero-stats-row { flex-wrap: wrap; gap: 16px; }
}
@media (max-width: 480px) {
    .hero-h1 { font-size: 30px; }
    .cat-grid { grid-template-columns: 1fr; }
}

/* ── Banner Hero Box ──────────────────────────────── */
.hero-banner-wrapper {
    margin: 24px 0 40px;
}
.hero-banner-card {
    background: linear-gradient(135deg, #54090c 0%, #7a1318 50%, #9b181d 100%);
    border-radius: 20px;
    padding: 44px 56px;
    color: #fff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 16px 40px rgba(122, 19, 24, 0.25);
}
.hero-banner-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}
.hero-banner-content {
    max-width: 680px;
    position: relative;
    z-index: 2;
}
.hero-banner-greeting {
    font-size: 38px;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: -1px;
}
.hero-banner-subtext {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.65;
    margin: 0;
}
.hero-banner-illustration {
    width: 155px;
    height: 155px;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.05));
    border: 2.5px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35), inset 0 0 20px rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
    animation: robotFloat 4s ease-in-out infinite;
}
.ai-robot-tutor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.4s ease;
}
.hero-banner-illustration:hover {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 18px 45px rgba(255, 255, 255, 0.25), inset 0 0 25px rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.7);
}
@keyframes robotFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* ── Section Title ───────────────────────────────── */
.system-section-title {
    font-size: 32px;
    font-weight: 900;
    text-align: center;
    color: var(--text-1);
    margin-bottom: 36px;
    letter-spacing: -.5px;
}

/* ── System Cards Grid (6 Cards Layout) ───────────── */
.system-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}
.system-card {
    background: #fdf4f4;
    border: 1px solid rgba(122, 19, 24, 0.1);
    border-radius: 20px;
    padding: 32px 28px;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 16px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    box-sizing: border-box;
}
.system-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(122, 19, 24, 0.15);
    border-color: rgba(122, 19, 24, 0.25);
    background: #fcf0f0;
}
.system-card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    height: 100%;
}
.system-card-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-1);
    margin-bottom: 10px;
    letter-spacing: -.3px;
    line-height: 1.3;
}
.system-card-desc {
    font-size: 13.5px;
    color: var(--text-3);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}
.btn-system-access {
    background: #7a1318;
    color: #fff;
    padding: 11px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    margin-top: auto;
    transition: all var(--transition);
    border: none;
}
.btn-system-access:hover {
    background: #54090c;
    color: #fff;
    transform: translateX(3px);
    box-shadow: 0 4px 14px rgba(122, 19, 24, 0.3);
}
.system-card-icon {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    filter: drop-shadow(0 10px 22px rgba(122, 19, 24, 0.18));
    transition: transform var(--transition), filter var(--transition);
}
.system-card-icon svg {
    width: 135px;
    height: 135px;
}
.system-card:hover .system-card-icon {
    transform: scale(1.1) rotate(-3deg);
    filter: drop-shadow(0 14px 28px rgba(122, 19, 24, 0.25));
}

@media (max-width: 992px) {
    .system-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-banner-card { padding: 36px 32px; flex-direction: column; text-align: center; }
    .hero-banner-illustration { margin-top: 20px; }
}
@media (max-width: 640px) {
    .system-grid { grid-template-columns: 1fr; }
    .hero-banner-greeting { font-size: 28px; }
}
