/* ==========================================================================
   HITS UI enhancements — animations & new sections
   ========================================================================== */

:root {
    --hits-orange: #ea6645;
    --hits-blue: #011529;
    --hits-blue-2: #0a2a4a;
}

/* ---- Scroll reveal ---- */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity .7s cubic-bezier(.22,.61,.36,1), transform .7s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
.reveal.in-view { opacity: 1; transform: none; }
.reveal.from-left  { transform: translateX(-40px); }
.reveal.from-right { transform: translateX(40px); }
.reveal.zoom       { transform: scale(.92); }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal[data-delay="2"] { transition-delay: .24s; }
.reveal[data-delay="3"] { transition-delay: .36s; }
.reveal[data-delay="4"] { transition-delay: .48s; }
.reveal[data-delay="5"] { transition-delay: .60s; }

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1 !important; transform: none !important; transition: none; }
}

/* ---- Animated stats band ---- */
.hits-stats {
    background: linear-gradient(120deg, var(--hits-blue) 0%, var(--hits-blue-2) 60%, #123a63 100%);
    background-size: 200% 200%;
    animation: hitsGradient 12s ease infinite;
    padding: 46px 0;
    color: #fff;
    position: relative;
    overflow: hidden;
}
@keyframes hitsGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hits-stats .stat { text-align: center; padding: 14px 8px; }
.hits-stats .stat .num {
    font-size: 44px; font-weight: 800; line-height: 1;
    color: #fff; letter-spacing: -1px;
    display: inline-block;
}
.hits-stats .stat .plus { color: var(--hits-orange); font-weight: 800; }
.hits-stats .stat .label {
    margin-top: 10px; font-size: 14px; text-transform: uppercase;
    letter-spacing: 1px; color: #b9c6d6;
}
.hits-stats .stat .ico { font-size: 26px; color: var(--hits-orange); margin-bottom: 8px; display: block; }

/* ---- Section heading accent ---- */
.hits-section-title { text-align: center; margin-bottom: 34px; }
.hits-section-title h2 { font-weight: 800; color: var(--hits-blue); margin: 0 0 8px; }
.hits-section-title .rule {
    width: 70px; height: 4px; border-radius: 4px; margin: 0 auto;
    background: var(--hits-orange);
}
.hits-section-title p { color: #6b7785; margin-top: 12px; }

/* ---- International collaborations ---- */
.hits-collab { padding: 60px 0; background: #f6f8fb; }
.collab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 991px) { .collab-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { .collab-grid { grid-template-columns: 1fr; } }
.collab-card {
    background: #fff; border-radius: 12px; padding: 22px;
    border: 1px solid #e7ecf3;
    box-shadow: 0 6px 18px rgba(1,21,41,.05);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
    position: relative; overflow: hidden;
}
.collab-card::before {
    content: ""; position: absolute; left: 0; top: 0; height: 4px; width: 100%;
    background: linear-gradient(90deg, var(--hits-orange), #f7a072);
    transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.collab-card:hover { transform: translateY(-8px); box-shadow: 0 16px 34px rgba(1,21,41,.14); border-color: #dfe7f1; }
.collab-card:hover::before { transform: scaleX(1); }
.collab-card .flag { font-size: 34px; line-height: 1; }
.collab-card .cname { font-weight: 700; color: var(--hits-blue); margin: 10px 0 2px; font-size: 16px; }
.collab-card .cmeta { font-size: 12px; color: #8a95a3; text-transform: uppercase; letter-spacing: .5px; }
.collab-card .cdesc { font-size: 13.5px; color: #566370; margin-top: 10px; }
.collab-card .ctag {
    display: inline-block; margin-top: 12px; font-size: 11px; font-weight: 700;
    padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: .5px;
}
.ctag.University { background: #e8f1ff; color: #1a63c4; }
.ctag.Industry   { background: #fff0e9; color: #d3572f; }
.ctag.Research   { background: #eaf7ee; color: #2e8b52; }
.collab-regions { text-align:center; margin-bottom: 30px; }
.collab-regions .chip {
    display:inline-block; margin:4px; padding:7px 16px; border-radius:24px;
    background:#fff; border:1px solid #e2e8f1; color:var(--hits-blue); font-weight:600; font-size:13px;
}
.collab-regions .chip i { color: var(--hits-orange); margin-right:6px; }

/* ---- Card hover lift for events / gallery ---- */
.hits-lift { transition: transform .3s ease, box-shadow .3s ease; }
.hits-lift:hover { transform: translateY(-4px); box-shadow: 0 12px 26px rgba(0,0,0,.12); }

/* ---- Marquee for partners strip ---- */
.hits-marquee { overflow: hidden; }
.hits-marquee .track { display: inline-flex; gap: 44px; align-items: center; animation: hitsMarquee 26s linear infinite; }
.hits-marquee:hover .track { animation-play-state: paused; }
@keyframes hitsMarquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ==========================================================================
   Speak sections — Students Speak / Industry Speak
   Tall, light-background-image bands with elevated quote cards.
   ========================================================================== */
.speak-section {
    position: relative;
    min-height: 480px;
    padding: 72px 0 84px;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
}
.speak-section::before {
    content: "";
    position: absolute; inset: 0;
    background-position: center; background-size: cover; background-repeat: no-repeat;
    filter: saturate(.85);
    z-index: -2;
}
.speak-section::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.90) 45%, rgba(255,255,255,.96) 100%);
    z-index: -1;
}
.speak-section.student-speak::before  { background-image: url('../img/hits/gallery/holylab5.jpg'); }
.speak-section.industry-speak::before { background-image: url('../img/microsoft-campus.jpg'); }
.speak-section .container { position: relative; width: 100%; }

.speak-kicker {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    margin-bottom: 6px;
}
.speak-kicker .line { width: 34px; height: 3px; border-radius: 3px; background: var(--hits-orange); }
.speak-kicker span {
    text-transform: uppercase; letter-spacing: 2px; font-size: 12px; font-weight: 800; color: var(--hits-orange);
}
.speak-section > .block > .container > header,
.speak-section header { text-align: center; margin-bottom: 8px; }
.speak-section header h2 { font-weight: 800; color: var(--hits-blue); font-size: 30px; }

.speak-badge {
    display: inline-block; margin: 0 auto 30px; padding: 5px 16px;
    border-radius: 20px; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase;
}
.student-speak .speak-badge  { background: #e8f1ff; color: #1a63c4; }
.industry-speak .speak-badge { background: #fff0e9; color: #d3572f; }

.industry-carousel, .students-carousel {
    width: 100%; margin: 0 auto; padding: 0 64px; position: relative; box-sizing: border-box;
}
.speak-track-viewport { overflow: hidden; border-radius: 16px; }
.speak-track {
    display: flex;
    transition: transform .55s cubic-bezier(.4,0,.2,1);
}
.industry_testimonial, .student_testimonial {
    flex: 0 0 100%; max-width: 100%; box-sizing: border-box; padding: 4px 8px;
}

.quote-card {
    background: #fff;
    border-radius: 16px;
    padding: 56px 56px 40px;
    box-shadow: 0 20px 50px rgba(1,21,41,.12);
    border: 1px solid #eef1f6;
    position: relative;
    text-align: center;
    min-height: 280px;
    width: 100%; box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.quote-card .quote-ico {
    position: absolute; top: -26px; left: 50%; transform: translateX(-50%);
    width: 52px; height: 52px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--hits-orange), #f7a072);
    color: #fff; font-size: 20px;
    box-shadow: 0 8px 18px rgba(234,102,69,.4);
}
.quote-card blockquote { border: none; margin: 0; padding: 0; width: 100%; }
.quote-card article.paragraph-wrapper .inner header {
    font-size: 20px; line-height: 1.75; color: #3a4552; font-style: italic; font-weight: 400;
    border: none; margin: 0 auto; max-width: 780px;
}
.quote-card .avatar-row {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    margin-top: 24px; padding-top: 18px; border-top: 1px dashed #e5e9ef; width: 100%;
}
.quote-card .avatar-circle {
    width: 44px; height: 44px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--hits-blue); color: #fff; font-weight: 800; font-size: 16px;
    flex-shrink: 0;
}
.industry-speak .quote-card .avatar-circle { background: var(--hits-orange); }
.quote-card article.paragraph-wrapper .inner footer {
    font-weight: 700; color: var(--hits-blue); font-size: 14px; border: none; margin: 0; text-align: left;
}

/* speak-carousel nav arrows — positioned either side of the quote card */
.speak-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 50%;
    background: #fff; box-shadow: 0 6px 16px rgba(1,21,41,.18);
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .25s ease, transform .25s ease;
    z-index: 2;
}
.speak-nav:hover { background: var(--hits-orange); transform: translateY(-50%) scale(1.08); }
.speak-nav::after {
    font-family: 'FontAwesome'; font-size: 15px; color: var(--hits-blue);
}
.speak-nav:hover::after { color: #fff; }
.speak-prev { left: 0; }
.speak-next { right: 0; }
.speak-prev::after { content: "\f104"; }
.speak-next::after { content: "\f105"; }

@media (max-width: 767px) {
    .industry-carousel, .students-carousel { padding: 0 4px; }
    .speak-nav { position: static; transform: none; display: inline-flex; margin: 18px 6px 0; }
    .speak-prev, .speak-next { top: auto; }
}

/* ==========================================================================
   Academic Life & Research / Campus Life / Student Life tiles
   ========================================================================== */
.life-tile {
    position: relative;
    border-radius: 14px;
    padding: 30px 26px 26px;
    min-height: 340px;
    overflow: hidden;
    isolation: isolate;
    transition: transform .35s ease, box-shadow .35s ease;
    box-shadow: 0 4px 16px rgba(1,21,41,.06);
}
.life-tile:hover { transform: translateY(-6px); box-shadow: 0 20px 40px rgba(1,21,41,.14); }
.life-tile::before {
    content: ""; position: absolute; inset: 0;
    background-position: center; background-size: cover; z-index: -2;
}
.life-tile::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,.95), rgba(255,255,255,.88));
    z-index: -1;
}
.life-tile.tile-academic::before { background-image: url('../img/hits/gallery/himplab10.jpg'); }
.life-tile.tile-campus::before   { background-image: url('../img/hits/gallery/sports.jpg'); }
.life-tile.tile-student::before  { background-image: url('../img/hits/gallery/holylab2.jpg'); }

.life-tile .tile-icon {
    width: 56px; height: 56px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: var(--hits-blue); color: #fff; font-size: 22px;
    margin-bottom: 16px;
    box-shadow: 0 8px 18px rgba(1,21,41,.25);
}
.life-tile.tile-campus .tile-icon  { background: var(--hits-orange); box-shadow: 0 8px 18px rgba(234,102,69,.32); }
.life-tile.tile-student .tile-icon { background: #2e8b52; box-shadow: 0 8px 18px rgba(46,139,82,.3); }

.life-tile header h2 { font-size: 19px; font-weight: 800; color: var(--hits-blue); margin: 0 0 14px; }
.life-tile .list-links { list-style: none; margin: 0; padding: 0; }
.life-tile .list-links li { border: none; padding: 0; }
.life-tile .list-links li a {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; color: #4a5666; font-size: 13.5px; font-weight: 600;
    border-bottom: 1px solid rgba(1,21,41,.06);
    transition: color .2s ease, padding-left .2s ease;
}
.life-tile .list-links li:last-child a { border-bottom: none; }
.life-tile .list-links li a i { color: var(--hits-orange); width: 16px; text-align: center; flex-shrink: 0; }
.life-tile .list-links li a:hover { color: var(--hits-orange); padding-left: 6px; }
.life-tile .tile-video { border-radius: 10px; overflow: hidden; box-shadow: 0 8px 20px rgba(0,0,0,.15); }

/* ==========================================================================
   Gallery — creative hover-zoom masonry tiles
   ========================================================================== */
.hits-gallery-section { padding: 64px 0 70px; background: #f7f9fc; }

/* Deliberately its own class (not the legacy .gallery-list) — the theme's
   .gallery-list li a rule sets left:100%;margin-left:-200%, which shoves the
   image link a full box-width outside its overflow:hidden parent, making
   every thumbnail invisible. Isolating avoids inheriting that (and its fixed
   100x100 li size) instead of fighting it property-by-property. */
.hits-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr);
    grid-auto-rows: 210px;
    gap: 16px;
    list-style: none; margin: 0 0 28px; padding: 0;
}
.hits-gallery-grid li:nth-child(5n+1) { grid-row: span 2; grid-column: span 2; }
.hits-gallery-grid li:nth-child(5n+4) { grid-column: span 2; }
@media (max-width: 991px) {
    .hits-gallery-grid { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 180px; }
    .hits-gallery-grid li:nth-child(5n+1) { grid-column: span 1; grid-row: span 1; }
}
@media (max-width: 560px) {
    .hits-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }
}
.hits-gallery-grid li {
    position: relative; overflow: hidden; border-radius: 12px;
    box-shadow: 0 6px 16px rgba(1,21,41,.08);
    margin: 0; padding: 0; height: auto; width: auto; float: none;
}
.hits-gallery-grid li a {
    display: block; width: 100%; height: 100%;
    position: static; left: auto; margin-left: 0;
}
.hits-gallery-grid li img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .55s cubic-bezier(.22,.61,.36,1);
}
.hits-gallery-grid li:hover img { transform: scale(1.14) rotate(.5deg); }
.hits-gallery-grid li .zoom-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(0deg, rgba(1,21,41,.72) 0%, rgba(1,21,41,0) 55%);
    opacity: 0; transition: opacity .35s ease;
    display: flex; align-items: flex-end; justify-content: flex-start; padding: 12px;
}
.hits-gallery-grid li:hover .zoom-overlay { opacity: 1; }
.hits-gallery-grid li .zoom-overlay i {
    width: 34px; height: 34px; border-radius: 50%; background: var(--hits-orange); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 14px;
    transform: translateY(8px); transition: transform .35s ease .05s;
}
.hits-gallery-grid li:hover .zoom-overlay i { transform: translateY(0); }

/* ---- Floating CTA pulse ---- */
@keyframes hitsPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(234,102,69,.5); } 50% { box-shadow: 0 0 0 14px rgba(234,102,69,0); } }
.hits-pulse { animation: hitsPulse 2.4s infinite; }

/* ==========================================================================
   Home info grid — About / News & Events / Notice Board
   Built with flexbox columns (not the theme's .stick-to-bottom absolute
   positioning) so the "Read More"/"View More" link is pushed to the bottom
   via margin-top:auto instead of being pinned at a fixed offset — it can
   never overlap the content above it, however long that content gets.
   ========================================================================== */
.home-info-grid {
    display: flex; flex-wrap: wrap; gap: 26px; align-items: stretch;
    margin-bottom: 8px;
}
.info-card {
    flex: 1 1 320px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(1,21,41,.07);
    border: 1px solid #eef1f6;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.info-card-header {
    display: flex; align-items: center; gap: 12px;
    padding: 22px 24px 16px;
}
.info-card-header .info-icon {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--hits-blue); color: #fff; font-size: 17px;
}
.events-card .info-card-header .info-icon { background: var(--hits-orange); }
.notice-card .info-card-header .info-icon { background: #2e8b52; }
.info-card-header h3 { margin: 0; font-size: 18px; font-weight: 800; color: var(--hits-blue); }
.info-card-body { padding: 0 24px; flex: 1 1 auto; }
.info-card-empty { color: #8a95a3; font-size: 13.5px; padding: 10px 0 20px; margin: 0; }

.info-card-link {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    margin-top: auto;
    padding: 14px 20px;
    font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .4px;
    color: var(--hits-orange);
    border-top: 1px solid #f0f2f5;
    background: #fafbfd;
    transition: background .2s ease, color .2s ease, gap .2s ease;
}
.info-card-link:hover { background: var(--hits-orange); color: #fff; gap: 10px; text-decoration: none; }

/* About card */
.about-thumb { width: 100%; border-radius: 10px; margin-bottom: 14px; display: block; }
.about-card .info-card-body p {
    font-size: 15px; line-height: 1.7; color: #4a5666; margin: 0 0 20px;
    display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
}

/* Events card */
.event-row {
    display: flex; align-items: flex-start; gap: 14px;
    padding: 14px 0; border-bottom: 1px solid #f0f2f5;
}
.info-card-body .event-row:last-child { border-bottom: none; padding-bottom: 20px; }
.event-date {
    flex-shrink: 0; width: 52px; text-align: center;
    background: var(--hits-blue); color: #fff; border-radius: 8px; padding: 6px 0;
}
.event-date .month { display: block; font-size: 10px; font-weight: 700; letter-spacing: .5px; opacity: .85; }
.event-date .day { display: block; font-size: 19px; font-weight: 800; line-height: 1.1; }
.event-info a {
    display: block; font-weight: 700; font-size: 14.5px; color: var(--hits-blue); line-height: 1.4;
}
.event-info a:hover { color: var(--hits-orange); }
.event-loc { font-size: 12.5px; color: #8a95a3; margin-top: 4px; }
.event-loc i { color: var(--hits-orange); margin-right: 4px; }

/* Notice board card */
.notice-card { background: linear-gradient(180deg, #fff8f3 0%, #fff 60%); }
.notice-row { padding: 14px 0; border-bottom: 1px solid #f3e9e0; }
.info-card-body .notice-row:last-child { border-bottom: none; padding-bottom: 20px; }
.notice-meta {
    font-size: 11.5px; color: #a08a78; display: flex; align-items: center; gap: 6px; margin-bottom: 4px;
}
.notice-view { margin-left: auto; color: var(--hits-orange); }
.notice-title { display: block; font-weight: 700; font-size: 14.5px; color: var(--hits-blue); line-height: 1.4; }
.notice-title:hover { color: var(--hits-orange); }
.notice-sub { font-size: 12.5px; color: #8a7c70; margin: 4px 0 0; }

@media (max-width: 991px) {
    .home-info-grid { flex-direction: column; }
    .info-card { flex-basis: auto; }
}
