/* ===================================================================
   Trường Tiểu học Phú Long — CSS của TRANG CHỦ (chỉ Default.aspx nạp)

   Bám bản thiết kế yeucau-tieuhocphulong/home-ui.jpg. Markup do Default.aspx.cs sinh ra:
   TÊN CLASS Ở ĐÂY LÀ HỢP ĐỒNG VỚI Default.aspx.cs — sửa một bên phải sửa bên kia
   (xem CLAUDE.md quy tắc 13). Kiểm bằng document.querySelectorAll('<selector>').length.

   Quy ước còn nguyên giá trị:
   - Không hard-code mã màu. Dùng biến trong tokens.css.
   - Sửa file này xong phải tăng ?v=N ở Default.aspx.
   - Giãn cách đặt `gap` ở cha, không `margin` ở con.
   =================================================================== */

/* ---------- Hero + 4 thẻ truy cập nhanh ---------- */
.home-hero {position: relative;margin-bottom: 0;}

/* Slide ảnh đầu trang: KHÔNG giới hạn chiều cao — ảnh rộng 100% khung và cao theo đúng tỉ lệ của nó
   (không height cố định, không object-fit/cắt). Swiper autoHeight (home.js) co/giãn khung theo ảnh đang hiện. */
.home-hero-slider { position: relative; overflow: hidden; background: var(--c-primary-mist); }
/* components.css đệm 6px 4px 10px cho MỌI .js-swiper (chừa chỗ bóng đổ của thẻ) — slide ảnh tràn viền thì bỏ. */
.home-hero-slider.js-swiper { padding: 0; }
.home-hero-slider img { display: block; width: 100%; height: auto; }
.home-hero-slider .swiper-slide { height: auto; }
/* Trước khi Swiper khởi tạo xong, các slide xếp chồng dọc -> chỉ hiện slide đầu để trang không nhảy. */
.home-hero-slider.swiper:not(.swiper-initialized) .swiper-slide:not(:first-child) { display: none; }
.home-hero-empty { height: clamp(210px, 30vw, 380px); background: linear-gradient(120deg, var(--c-sky) 0%, var(--c-primary) 100%); }

.home-hero-slider .swiper-pagination {
    position: absolute;
    left: 0; right: 0; bottom: 70px;
    margin: 0;
    z-index: 2;
}
.home-hero-slider .swiper-pagination-bullet { background: var(--c-white); opacity: .7; }
.home-hero-slider .swiper-pagination-bullet-active { background: var(--c-accent); opacity: 1; }

/* Mũi tên: luôn hiện (responsive.css ẩn mũi tên của .js-swiper từ 1199px trở xuống nên phải ghi đè ở đây). */
.home-hero-slider .swiper-button-prev,
.home-hero-slider .swiper-button-next {
    display: inline-flex;
    top: calc(50% - 30px);
    width: 46px; height: 46px;
    margin-top: 0;
    background: rgba(255, 255, 255, .85);
    border: 0;
    z-index: 3;
}
.home-hero-slider .swiper-button-prev { left: 18px; }
.home-hero-slider .swiper-button-next { right: 18px; }
.home-hero-slider .swiper-button-prev::after, .home-hero-slider .swiper-button-next::after { font-size: 16px; }
.home-quick { position: relative; z-index: 3; margin-top: -54px; }
.quick-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}
.quick-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 15px;
    background: var(--c-white);
    border-radius: var(--radius-lg);
    transition: transform var(--t), box-shadow var(--t);
    box-shadow: 1.364px 2.729px 4.093px 0 rgba(36, 174, 245, 0.50);
}
a.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.quick-card .item-icon {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 0;
}
.quick-card .item-icon img {width: 80px;height: 80px;object-fit: contain;}
.quick-card-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.quick-card-text strong {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    color: #092D91;
}
.quick-card-text span {margin-top: 2px;font-size: 15px;color: #092D91;display: block;width: 86%;}

/* ---------- Giới thiệu trường ---------- */
.home-intro {
    padding: 30px 0 clamp(90px, 11vw, 170px);
    background: var(--c-white) url("../images/bg-gioithieu.jpg") center top / cover no-repeat;
    background-size: cover;
    background-position: center bottom;
    margin-top: -53px;
    padding-top: 90px;
}
.home-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 52px);
    align-items: center;
}

.intro-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.intro-photo {
    display: block;
    overflow: hidden;
    border: 3px solid var(--c-white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    background: var(--c-primary-mist);
}
.intro-photo img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.intro-photo-main { grid-column: 1 / -1; }
.intro-photo-main img { aspect-ratio: 1.85 / 1; }

.intro-kicker {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 1.8vw, 1.4rem);
    font-weight: 500;
    color: var(--c-primary);
}
.intro-title {
    margin: 0 0 6px;
    font-size: clamp(1.6rem, 3.1vw, 2.4rem);
    font-weight: 800;
    text-transform: uppercase;
    color: var(--c-primary);
    line-height: 1.1;
}
.intro-body {color: var(--c-body);font-size: .9375rem;line-height: 1.75;text-align: justify;}
.intro-body .home-intro-slogan {
    position: relative;
    margin: 0 0 22px;
    padding-bottom: 14px;
    font-family: var(--font-script);
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 700;
    color: var(--c-red);
    line-height: 1.3;
}
.intro-body .home-intro-slogan::after {
    content: "";
    position: absolute;
    left: 0; bottom: 0;
    width: 86px; height: var(--rule);
    border-radius: var(--rule);
    background: var(--c-accent);
}
.intro-more { margin-top: 22px; padding-left: 28px; padding-right: 28px; }

/* ---------- Tin tức + thông báo mới ---------- */
.home-news {padding: clamp(30px, 4vw, 44px) 0 clamp(26px, 3vw, 36px);/* background-color: var(--c-white); */background-image: url(../images/bg-tintuc.png);background-position: top center;background-size: cover;margin-top: -125px;padding-top: 140px;}

.news-top {
    display: grid;
    grid-template-columns: minmax(0, 2.75fr) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.news-thumb {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--c-primary-mist);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 2/1.25;
}
.news-thumb img {display: block;width: 100%;height: 100%;object-fit: cover;transition: transform .6s var(--ease);image-rendering: -webkit-optimize-contrast;image-rendering: auto;transform: translateZ(0);backface-visibility: hidden;perspective: 1000px;}
.news-thumb:hover img { transform: scale(1.04); }
.news-thumb-empty {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 4 / 3;
    color: var(--c-sky);
    font-size: 2rem;
}

.news-feature .news-thumb img { aspect-ratio: 1.66 / 1; }
.news-feature-title {
    margin: 14px 0 0;
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 1.7vw, 1.4rem);
    font-weight: 600;
    line-height: 1.35;
}
.news-feature-title a { color: var(--c-red); }
.news-feature-title a:hover { color: var(--c-primary); }

.news-side .news-thumb img {}
.news-side-title, .news-mini-title {
    margin: 12px 0 0;
    font-family: var(--font-base);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    text-align: justify;
}
.news-side-title a, .news-mini-title a { color: var(--c-primary); }
.news-side-title a:hover, .news-mini-title a:hover { color: var(--c-sky-deep); }
.news-side-desc, .news-mini-desc {
    margin: 6px 0 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--c-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}
.news-side-desc {-webkit-line-clamp: 8;text-align: justify;}
.news-mini-desc { -webkit-line-clamp: 3; }
.news-mini-title {overflow: hidden;display: -webkit-box;-webkit-line-clamp: 2;-webkit-box-orient: vertical;margin-bottom: 10px;}

.news-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 26px;
}
.news-mini .news-thumb img {
}

/* Khung "Thông báo mới" */
.notice-panel {
    padding: 18px 16px 20px;
    border-radius: 30px;
    border-radius: 20px;
    background: #FEF1D5;
    box-shadow: 2px 2px 13px 0 rgba(252, 113, 4, 0.29) inset;
}
.notice-panel-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 16px;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 700;
    text-transform: uppercase;
    color: var(--c-orange);
}
.notice-panel-bell {
    width: 50px; height: 50px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--c-orange);
    color: var(--c-white);
    font-size: 1.5rem;
}
.notice-panel .notice-list { display: flex; flex-direction: column; gap: 10px; }
/* Khung trang chủ: tiêu đề 1 dòng (cắt bằng dấu …) như bản thiết kế, để cột thông báo không dài hơn cột tin tức. */
.notice-panel .notice-item-title { -webkit-line-clamp: 1; }
.notice-panel-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--c-primary);
}
.notice-panel-more:hover { color: var(--c-sky-deep); }

/* Banner */
.home-banners {margin-top: clamp(26px, 3vw, 0px);--bs-gutter-y: 0rem;}
.home-banner { display: block; overflow: hidden; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.home-banner img { display: block; width: 100%; height: 112px; object-fit: cover; transition: transform .5s var(--ease); }
a.home-banner:hover img { transform: scale(1.03); }

/* ---------- Nền trời chung cho Hoạt động + Góc học sinh ---------- */
.home-sky {
    padding: clamp(60px, 8vw, 100px) 0 clamp(80px, 10vw, 150px);
    background: url("../images/bg-hoatdong.png") center top / 100% 100% no-repeat;
    margin-top: -100px;
    background-size: cover;
}

/* Hoạt động + Góc học sinh là slide Swiper (Default.aspx.cs: .act-slider / .stu-slider, cấu hình data-* trong home.js).
   Khung đệm chừa chỗ bóng đổ + nhấc thẻ khi hover; thẻ cao bằng nhau trong cùng hàng. */
.home-cards-slider.js-swiper { padding: 8px 8px 14px; margin: -8px -8px 0; }
.home-cards-slider .swiper-slide { height: auto; }
.home-cards-slider .act-card,
.home-cards-slider .stu-card { height: 100%; }
.home-cards-slider .swiper-pagination { margin-top: 14px; text-align: center; }
/* 3 bài tin tức dưới bài nổi bật: cách khối trên như .news-row cũ; thẻ .news-card tự cao 100% (components.css). */
.home-cards-slider.news-slider.js-swiper { margin-top: 18px; }
.news-slider .news-card { margin-bottom: 0; }

.act-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--c-white);
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition: transform var(--t), box-shadow var(--t);
}
.act-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.act-card-media { display: block; overflow: hidden; background: var(--c-primary-mist); }
.act-card-media img { display: block; width: 100%; aspect-ratio: 1.55 / 1; object-fit: cover; transition: transform .6s var(--ease); }
.act-card:hover .act-card-media img { transform: scale(1.05); }
.act-card-body { display: flex; align-items: flex-start; gap: 14px; padding: 14px 18px 18px; }
.act-card-body .item-icon {
    flex: 0 0 48px;
    width: 48px; height: 48px;
    border-radius: 14px;
    background: var(--c-primary-mist);
    color: var(--c-primary);
    font-size: 1.4rem;
}
.act-card-2 .item-icon { background: var(--c-success-soft); color: var(--c-leaf); }
.act-card-3 .item-icon { background: var(--c-orange-soft); color: var(--c-orange); }
.act-card-text { min-width: 0; }
.act-card-title {
    margin: 0 0 2px;
    font-size: 1.0625rem;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.25;
}
.act-card-title a { color: var(--c-primary); }
.act-card-title a:hover { color: var(--c-sky-deep); }
.act-card-text p { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--c-body); }

/* Góc học sinh */
.home-student {margin-top: clamp(40px, 5vw, 50px);}
.stu-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    background: var(--c-white);
    border-radius: 22px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform var(--t), box-shadow var(--t);
    border-radius: 10px;
    background: #FBFBF7;
    box-shadow: 1.364px 2.729px 4.093px 0 rgba(36, 174, 245, 0.50);
}
a.stu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.stu-card .item-icon {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    background: transparent;
    border-radius: 0;
}
.stu-card .item-icon img {width: 100px;height: 100px;object-fit: contain;}
.stu-card-text { display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.stu-card-text strong {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--c-primary);
}
.stu-card-text span {font-size: .875rem;color: var(--c-body);display: block;width: 80%;margin: 0px auto;font-size: 14px;}
/* ---------- Thư viện hình ảnh ---------- */
.home-gallery {padding: clamp(36px, 5vw, 56px) 0 clamp(60px, 8vw, 100px);background: url(../images/bg-thuvien.png) no-repeat top center;background-size: cover;margin-top: -70px;padding-top: 130px;padding-bottom: 215px;}
.gal-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.gal-item {
    display: block;
    overflow: hidden;
    border: 3px solid var(--c-white);
    border-radius: 16px;
    box-shadow: var(--shadow);
    background: var(--c-primary-mist);
}
.gal-item img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.2;
    object-fit: cover;
    transition: transform .6s var(--ease);
}
.gal-item:hover img { transform: scale(1.06); }
.news-mini{
    text-align: justify;
}
/* ---------- Responsive của trang chủ ---------- */
@media (max-width: 991.98px) {
    .home-hero { margin-bottom: 26px; }
    .home-quick {margin-top: 10px;}
    .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
    .home-hero-slider .swiper-pagination { bottom: 48px; }
    .home-hero-slider .swiper-button-prev, .home-hero-slider .swiper-button-next { width: 36px; height: 36px; }
    .home-intro-grid { grid-template-columns: 1fr; }
    .gal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .home-banner img {height: auto;max-height: 140px;margin-bottom: 10px;}
}
@media (max-width: 767.98px) {
    /* Sóng đầu .home-sky không được đè lên tiêu đề "Hoạt động giáo dục" khi section thấp lại. */
    .home-sky {margin-top: -50px;padding-top: 110px;padding-bottom: 40px;background-size: contain;background-position: bottom;}
}
@media (max-width: 575.98px) {
    .quick-card {padding: 10px;gap: 5px;}
    .quick-card .item-icon, .quick-card .item-icon img { width: 46px; height: 46px; flex-basis: 46px; }
    .quick-card-text strong {font-size: 12px;}
    .quick-card-text span { display: none; }
    .news-top { grid-template-columns: 1fr; }
    .news-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
    .gal-grid { gap: 10px; }
}
