/* ============================================================
   MINH DUONG MATH — Trang Chủ (index.html)
   Chỉ load tại trang chủ.
   ============================================================ */

/* ── HERO TEXT ───────────────────────────────────────────────── */
.hero-text {
    background: var(--cream);
    padding: 80px 48px 20px;
    text-align: center;
}

.hero-text__body {
    max-width: 700px;
    margin: 0 auto 56px;
}

.hero-text__label {
    display: inline-block;
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--primary-light);
    margin-bottom: 20px;
}

.hero-text__title {
    color: var(--primary-dark);
    margin-bottom: 10px;
}

.hero-text__subtitle {
    font-size: 17px;
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-text__subtitle-note {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--text-gray);
    opacity: 0.8;
    font-style: italic;
    line-height: 1.7;
}

/* ── GALLERY SECTION (mini gallery trang chủ) ────────────────── */
.gallery-section { background: var(--white); padding: 80px 40px; }

.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 1000px;
    margin: 0 auto;
    grid-auto-rows: 340px;
}

.gallery__item {
    position: relative;
    overflow: hidden;
    background: var(--cream);
    border-radius: var(--radius-sm);
    animation: none; /* handled by scroll reveal */
}

.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; cursor: zoom-in; }
.gallery__item:hover img { transform: scale(1.05); }

.gallery__caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 32px 16px 14px;
    background: linear-gradient(to top, rgba(30,78,110,0.84) 0%, transparent 100%);
    color: rgba(255,255,255,0.96);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
.gallery__item:hover .gallery__caption {
    opacity: 1;
    transform: none;
}

/* ── CLASSES SECTION ─────────────────────────────────────────── */
.classes-section { background: var(--cream); padding: 80px 40px; }

.classes-container { max-width: 900px; margin: 0 auto; }

.class-block {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: 28px 32px;
    margin-bottom: 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.06);
    animation: none; /* handled by scroll reveal */
}

.class-block__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-light);
}

.class-block__grade {
    font-family: 'Cormorant Garamond', serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--primary-dark);
    letter-spacing: 0.02em;
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.schedule-col__label {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-light);
    margin-bottom: 10px;
}

.schedule-pill {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    font-weight: 500;
    background: var(--primary-dark);
    color: var(--white);
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.schedule-pill--link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.schedule-pill--link:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(42, 96, 128, 0.28);
}

.schedule-pill__cta {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity var(--transition), transform var(--transition);
    white-space: nowrap;
    margin-left: 12px;
}

.schedule-pill--link:hover .schedule-pill__cta {
    opacity: 1;
    transform: translateX(0);
}

.btn-register {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
    text-decoration: none;
    padding: 9px 22px;
    border: 2px solid var(--primary-light);
    border-radius: 50px;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn-register:hover { background: var(--primary-light); color: var(--white); }

/* ── FEEDBACK SECTION ────────────────────────────────────────── */
.feedback-section {
    background: var(--primary-pale);
    padding: 80px 0;
    overflow: hidden;
}

.feedback-section__header {
    text-align: center;
    margin-bottom: 52px;
    padding: 0 40px;
}

.feedback-section__header .section-title { margin-bottom: 10px; }

.feedback-section__sub {
    font-size: 15px;
    color: var(--text-gray);
    font-family: 'Be Vietnam Pro', sans-serif;
}

.feedback-stage {
    position: relative;
    overflow: hidden;
}

.feedback-stage::before,
.feedback-stage::after {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    width: 48px;
    z-index: 2;
    pointer-events: none;
}
.feedback-stage::before {
    left: 0;
    background: linear-gradient(to right, var(--primary-pale) 0%, transparent 100%);
}
.feedback-stage::after {
    right: 0;
    background: linear-gradient(to left, var(--primary-pale) 0%, transparent 100%);
}

.feedback-cards {
    display: flex;
    gap: 20px;
    padding: 16px 24px 28px;
    overflow-x: scroll;
    scrollbar-width: none;
    user-select: none;
    cursor: grab;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.feedback-cards::-webkit-scrollbar { display: none; }
.feedback-cards.is-dragging { cursor: grabbing; scroll-snap-type: none; }

.feedback-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 20px;
    padding: 32px 28px 28px;
    width: calc((100% - 40px) / 3);
    min-width: 260px;
    flex-shrink: 0;
    box-shadow: 0 2px 16px rgba(30, 78, 110, 0.08);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
    scroll-snap-align: start;
}

.feedback-card--featured {
    box-shadow: 0 12px 48px rgba(30, 78, 110, 0.18);
    transform: translateY(-8px);
}

.feedback-card:hover {
    box-shadow: 0 16px 52px rgba(30, 78, 110, 0.2);
    transform: translateY(-10px);
}

.feedback-card--featured:hover {
    transform: translateY(-12px);
}

.feedback-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.feedback-card__title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 700;
    font-style: normal;
    color: var(--primary-dark);
    line-height: 1.3;
    margin: 0;
}

.feedback-card__text {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 14px;
    line-height: 1.75;
    color: var(--text-gray);
    margin: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    line-clamp: 5;
    overflow: hidden;
}

.feedback-card__footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.feedback-card__avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-dark);
    color: var(--white);
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feedback-card__meta { display: flex; flex-direction: column; gap: 3px; }

.feedback-card__name {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.feedback-card__role {
    font-family: 'Be Vietnam Pro', sans-serif;
    font-size: 12px;
    color: var(--text-gray);
}

.feedback-card__tag {
    color: var(--primary-light);
    font-weight: 500;
}

.feedback-hint { display: none; }

/* ── CONTACT SECTION ─────────────────────────────────────────── */
.contact-section {
    background: var(--primary-dark);
    color: var(--white);
    padding: 80px 40px;
    text-align: center;
}

.contact-section h2 { color: var(--white); margin-bottom: 50px; }

.contact-content {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.social-links { text-align: left; }

.social-item {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 16px;
    cursor: pointer;
    transition: transform var(--transition);
    text-decoration: none;
}

.social-item:hover { transform: translateX(8px); }

.social-item__icon {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    border: 2px solid var(--primary-light);
    color: var(--white);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.social-item:hover .social-item__icon {
    background: rgba(255,255,255,0.18);
    border-color: var(--gold);
    color: var(--gold);
    box-shadow: 0 0 22px rgba(200,168,107,0.25);
}

.social-item__text h4 { color: var(--white); margin-bottom: 4px; }
.social-item__text p  { color: rgba(255,255,255,0.8); font-size: 13px; }

.contact-form { text-align: left; }

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

.form-group label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    color: rgba(255,255,255,0.8);
}

.form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--primary-light);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition);
}

.form-group input::placeholder { color: rgba(255,255,255,0.45); }

.form-group input:focus {
    outline: none;
    background: rgba(255,255,255,0.15);
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(200,168,107,0.15);
}

.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--primary-light);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 14px;
    transition: all var(--transition);
    resize: vertical;
    min-height: 80px;
}
.form-group textarea::placeholder { color: rgba(255,255,255,0.45); }
.form-group textarea:focus { outline: none; background: rgba(255,255,255,0.15); }

.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(91, 163, 184, 0.2);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: rgba(255,255,255,0.9);
    display: none;
    border-left: 3px solid transparent;
}

.form-message--visible { display: block; }

.form-message--success {
    background: rgba(74, 163, 100, 0.18) !important;
    border-left-color: rgba(74, 163, 100, 0.8);
}

.form-message--error {
    background: rgba(200, 70, 70, 0.18) !important;
    border-left-color: rgba(200, 70, 70, 0.8);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Trang Chủ
   ═══════════════════════════════════════════════════════════════ */

/* ── Tablet (≤1024px) ───────────────────────────────────────── */
@media (max-width: 1024px) {
    .gallery-section,
    .classes-section,
    .contact-section,
    .feedback-section { padding: 64px 32px; }
}

/* ── Feedback: 2 cards on tablet ────────────────────────────── */
@media (max-width: 900px) {
    .feedback-cards { padding: 16px 16px 24px; cursor: grab; }
    .feedback-card { width: calc((100% - 20px) / 2); min-width: 240px; }
    .feedback-hint { display: none; }
}

@media (max-width: 600px) {
    .feedback-card { width: calc(100% - 32px); min-width: 0; }
}

/* ── Tablet portrait (≤768px) ───────────────────────────────── */
@media (max-width: 768px) {
    .hero-text { padding: 38px 18px 24px; }
    .hero-text__body { margin-bottom: 24px; }
    .hero-text__label { font-size: 9px; letter-spacing: 1.8px; margin-bottom: 12px; }
    .hero-text__subtitle { font-size: 13px; }

    .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; gap: 8px; }
    .gallery__item { grid-column: span 1 !important; grid-row: span 1 !important; }
    .gallery-section { padding: 40px 14px; }

    .schedule-grid { grid-template-columns: 1fr; }
    .class-block { padding: 17px 16px; margin-bottom: 12px; }
    .class-block__grade { font-size: 19px; }
    .schedule-pill { font-size: 12px; padding: 8px 12px; }
    .classes-section { padding: 40px 14px; }

    .contact-section { padding: 36px 14px; }
    .contact-content { grid-template-columns: 1fr; gap: 22px; }
    .contact-section h2 { margin-bottom: 28px; }
    .social-item { margin-bottom: 14px; gap: 12px; }
    .social-item__icon { width: 38px; height: 38px; font-size: 13px; }
    .social-item__text h4 { font-size: 13px; }
    .social-item__text p  { font-size: 11px; }
    .form-group { margin-bottom: 11px; }
    .form-group label { font-size: 10px; }
    .form-group input, .form-group textarea { padding: 9px 11px; font-size: 13px; }

    .feedback-section { padding: 20px 0; }
    .feedback-section .section-title { font-size: 17px; }
    .feedback-section__header { padding: 0 16px; margin-bottom: 12px; }
    .feedback-section__sub { font-size: 10.5px; }
    .feedback-card { padding: 12px 11px; border-radius: 14px; }
    .feedback-card__title { font-size: 12px; }
    .feedback-card__text { font-size: 11px; -webkit-line-clamp: 4; line-clamp: 4; }
    .feedback-card__name { font-size: 10px; }
    .feedback-card__role { font-size: 9px; }
    .feedback-card__avatar { width: 26px; height: 26px; font-size: 10px; }
    .feedback-card__footer { padding-top: 8px; gap: 7px; }
    .feedback-card__body { gap: 6px; margin-bottom: 8px; }
}

/* ── Mobile portrait (≤469px) ───────────────────────────────── */
@media (max-width: 469px) {
    .hero-text { padding: 28px 12px 18px; }
    .hero-text__label { font-size: 8px; letter-spacing: 1.2px; margin-bottom: 8px; }
    .hero-text__subtitle { font-size: 12px; line-height: 1.6; }
    .hero-text__subtitle-note { font-size: 10px; }
    .hero-text__body { margin-bottom: 18px; }

    .gallery-section { padding: 30px 12px; }
    .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 130px; gap: 6px; }

    .classes-section { padding: 30px 12px; }
    .class-block { padding: 13px 12px; margin-bottom: 8px; }
    .class-block__header { margin-bottom: 11px; padding-bottom: 10px; }
    .class-block__grade { font-size: 17px; }
    .schedule-pill { font-size: 11px; padding: 7px 10px; }
    .btn-register { font-size: 11px; padding: 6px 13px; }
    .classes-section .btn--pill-lg { width: 92%; margin-top: 22px; text-align: center; }

    .contact-section { padding: 28px 12px; }
    .contact-section h2 { margin-bottom: 20px; }
    .contact-content { gap: 18px; }
    .social-item { margin-bottom: 12px; gap: 10px; }
    .social-item__icon { width: 32px; height: 32px; font-size: 11px; }
    .social-item__text h4 { font-size: 12px; }
    .social-item__text p  { font-size: 10px; }
    .form-group { margin-bottom: 9px; }
    .form-group label { font-size: 9px; }
    .form-group input, .form-group textarea { padding: 8px 10px; font-size: 12px; }
    .form-group textarea { min-height: 60px; }

    .feedback-section { padding: 16px 0; }
    .feedback-section .section-title { font-size: 14px; }
    .feedback-section__header { padding: 0 10px; margin-bottom: 10px; }
    .feedback-section__sub { font-size: 10px; }
    .feedback-card { padding: 10px 9px; border-radius: 12px; }
    .feedback-card__title { font-size: 10px; }
    .feedback-card__text { font-size: 10px; -webkit-line-clamp: 3; line-clamp: 3; }
    .feedback-card__name { font-size: 9px; }
    .feedback-card__role { font-size: 8px; }
    .feedback-card__avatar { width: 22px; height: 22px; font-size: 8px; }
    .feedback-card__footer { padding-top: 7px; gap: 6px; }
    .feedback-card__body { gap: 5px; margin-bottom: 7px; }
}
