/********** ZSH additions on top of the template **********/
.brand-text { font-size: 1.5rem; }
.notice-bar { background: var(--primary); }
.topbar { font-size: 14px; min-height: 42px; }
.topbar .col-lg-7, .topbar .col-lg-5 { min-height: 42px; }
.topbar a:hover { color: var(--primary) !important; }

/* ---------- Images shown in full (no cropping) ----------
   The image keeps its natural aspect ratio (object-fit: contain) and a blurred copy
   of the same picture fills any empty space behind it. */
.fit-media {
    position: relative;
    overflow: hidden;
    background: #11152b;
    display: block;
}
.fit-media::before {
    content: "";
    position: absolute;
    inset: -30px;
    background-image: var(--fit-bg);
    background-size: cover;
    background-position: center;
    filter: blur(22px) brightness(.75);
    transform: scale(1.1);
}
.fit-media > img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
    transition: .5s;
}
.fit-media.light { background: var(--light); }
.fit-media.light::before { filter: blur(22px) brightness(1.05) saturate(.8); opacity: .55; }

/* Override template rules that cropped pictures */
.course-item .fit-media { height: 320px; border-radius: .5rem .5rem 0 0; }
.course-item .fit-media > img { height: 100%; border-radius: 0; }
.course-item:hover .fit-media > img, .category a:hover .fit-media > img { transform: scale(1.05); }

/* Hero slider: full picture on the right, blurred version as backdrop */
.hero-slide {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--dark);
}
.hero-slide .hero-bg {
    position: absolute;
    inset: -40px;
    background-size: cover;
    background-position: center;
    filter: blur(18px);
    transform: scale(1.1);
}
.hero-slide .hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(24, 29, 56, .92) 0%, rgba(24, 29, 56, .75) 55%, rgba(24, 29, 56, .45) 100%);
}
.hero-slide .container { position: relative; z-index: 2; padding-top: 3rem; padding-bottom: 3rem; }
.header-carousel .owl-carousel-item .hero-photo {
    position: static;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border: 6px solid rgba(255, 255, 255, .9);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .45);
    background: #fff;
}
@media (max-width: 991.98px) {
    .hero-slide { min-height: 0; }
    .header-carousel .owl-carousel-item .hero-photo { max-height: 300px; margin-bottom: 1.5rem; }
    .hero-slide h1.display-3 { font-size: 2.1rem; }
}
.header-carousel .owl-nav { z-index: 5; }

.about-photo { width: 100%; height: auto; max-height: 560px; object-fit: contain; display: block; margin: 0 auto; }

/* Category tiles */
.category .fit-media { height: 260px; }
.category .cat-big .fit-media { height: 100%; min-height: 535px; }
.category .cat-label { z-index: 2; }
@media (max-width: 991.98px) { .category .cat-big .fit-media { min-height: 320px; } }

/* Stats */
.stats-section { background: linear-gradient(rgba(24, 29, 56, .92), rgba(24, 29, 56, .92)), var(--stats-bg) center/cover; }
.stat-item i { width: 70px; height: 70px; line-height: 70px; border-radius: 50%; background: var(--primary); }

/* Departments */
.dept-card { background: var(--light); transition: .4s; border-bottom: 3px solid transparent; height: 100%; }
.dept-card:hover { transform: translateY(-6px); border-bottom-color: var(--primary); box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .08); }
.dept-card .dept-icon { width: 64px; height: 64px; display: inline-flex; align-items: center; justify-content: center; background: #fff; border-radius: 50%; }

/* News */
.news-card { background: #fff; box-shadow: 0 0 30px rgba(0, 0, 0, .07); height: 100%; transition: .4s; }
.news-card:hover { transform: translateY(-5px); }
.news-card .fit-media { height: 230px; }
.news-card .badge-type { position: absolute; top: 12px; left: 12px; z-index: 2; }
.event-date { min-width: 76px; background: var(--primary); color: #fff; text-align: center; padding: 10px 6px; }
.event-date strong { display: block; font-size: 28px; line-height: 1; font-family: 'Nunito', sans-serif; }

/* Team */
.team-item .fit-media { height: 300px; }

/* Page header (template referenced a missing image) */
.page-header { background-position: center; background-size: cover; }

/* Content typography */
.rich-content img { max-width: 100%; height: auto; }
.rich-content table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.rich-content table td, .rich-content table th { border: 1px solid #dee2e6; padding: .5rem; }
.rich-content blockquote { border-left: 4px solid var(--primary); padding: .5rem 1rem; background: var(--light); }
.sidebar-box { background: var(--light); padding: 1.5rem; margin-bottom: 1.5rem; }
.sidebar-box a { color: var(--dark); }
.sidebar-box a:hover { color: var(--primary); }

/* Gallery */
.gallery-item { display: block; position: relative; }
.gallery-item .fit-media { height: 240px; }
.gallery-item .caption { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; background: linear-gradient(transparent, rgba(0, 0, 0, .75)); color: #fff; padding: 1.5rem .75rem .5rem; font-size: 14px; }
.lightbox-img { max-height: 85vh; width: auto; max-width: 100%; margin: 0 auto; display: block; }

/* CTA */
.cta-section { background: linear-gradient(rgba(218, 0, 0, .92), rgba(218, 0, 0, .92)), var(--cta-bg) center/cover; }

/* Partner logos */
.partner-logo { height: 80px; width: auto; max-width: 160px; object-fit: contain; filter: grayscale(100%); opacity: .75; transition: .3s; }
.partner-logo:hover { filter: none; opacity: 1; }

/* ---------- Footer visitor counter ---------- */
.visitor-counter { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); padding: 12px; border-radius: 6px; }
.vc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.vc-item { background: rgba(255, 255, 255, .06); padding: 6px 8px; border-radius: 4px; display: flex; flex-direction: column; position: relative; }
.vc-item small { color: rgba(255, 255, 255, .6); font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
.vc-item strong { color: #fff; font-family: 'Nunito', sans-serif; font-size: 17px; }
.vc-total { grid-column: span 2; background: var(--primary); }
.vc-total small { color: rgba(255, 255, 255, .85); }
.vc-dot { position: absolute; top: 9px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46, 204, 113, .7); animation: vcPulse 1.8s infinite; }
@keyframes vcPulse { 0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, .7); } 70% { box-shadow: 0 0 0 8px rgba(46, 204, 113, 0); } 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); } }

/* ---------- Floating buttons ---------- */
.back-to-top { right: 30px; bottom: 30px; }
.whatsapp-float { position: fixed; left: 24px; bottom: 24px; z-index: 98; width: 54px; height: 54px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.whatsapp-float:hover { color: #fff; transform: scale(1.06); }

/* ---------- Live chat widget ---------- */
.zsh-chat { position: fixed; right: 30px; bottom: 92px; z-index: 1050; font-family: 'Heebo', sans-serif; }
.zsh-chat-toggle { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--primary); color: #fff; font-size: 24px; box-shadow: 0 6px 20px rgba(218, 0, 0, .4); position: relative; }
.zsh-chat-toggle .zsh-chat-icon-close, .zsh-chat.open .zsh-chat-icon-open { display: none; }
.zsh-chat.open .zsh-chat-icon-close { display: inline; }
.zsh-chat-badge { position: absolute; top: -4px; right: -4px; background: #ffc107; color: #000; border-radius: 12px; min-width: 22px; height: 22px; font-size: 12px; line-height: 22px; font-weight: 700; }
.zsh-chat-panel { position: absolute; right: 0; bottom: 74px; width: 360px; max-width: calc(100vw - 32px); height: 520px; max-height: calc(100vh - 140px); background: #fff; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); display: flex; flex-direction: column; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(16px); transition: .25s; }
.zsh-chat.open .zsh-chat-panel { opacity: 1; visibility: visible; transform: none; }
.zsh-chat-header { background: var(--dark); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 10px; }
.zsh-chat-header img { width: 38px; height: 38px; object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; }
.zsh-chat-header small { color: rgba(255, 255, 255, .7); font-size: 12px; }
.zsh-chat-status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; margin-right: 5px; }
.zsh-chat-min { background: none; border: 0; color: #fff; }
.zsh-chat-start { padding: 18px; }
.zsh-chat-body { flex: 1; overflow-y: auto; padding: 14px; background: #f5f6fa; }
.zsh-msg { margin-bottom: 10px; display: flex; flex-direction: column; align-items: flex-start; }
.zsh-msg small { font-size: 11px; color: #888; margin-top: 2px; }
.zsh-bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); font-size: 14px; word-wrap: break-word; overflow-wrap: anywhere; }
.zsh-bubble a { color: var(--primary); text-decoration: underline; }
.zsh-msg-visitor { align-items: flex-end; }
.zsh-msg-visitor .zsh-bubble { background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; }
.zsh-msg-visitor .zsh-bubble a { color: #fff; }
.zsh-msg-admin .zsh-bubble { background: #e8f0fe; border: 1px solid #c9dafc; }
.zsh-msg-visitor[data-temp] { opacity: .6; }
.zsh-msg-system { text-align: center; font-size: 12px; color: #999; margin: 8px 0; }
.zsh-chat-quick { padding: 8px 10px 0; display: flex; flex-wrap: wrap; gap: 6px; background: #fff; border-top: 1px solid #eee; }
.zsh-chat-quick button { border: 1px solid var(--primary); color: var(--primary); background: #fff; border-radius: 16px; font-size: 12px; padding: 3px 10px; }
.zsh-chat-quick button:hover { background: var(--primary); color: #fff; }
.zsh-chat-form { display: flex; gap: 6px; padding: 10px; background: #fff; }
.zsh-chat-form .form-control { border-radius: 20px; }
.zsh-chat-form .btn { border-radius: 50%; width: 40px; height: 40px; padding: 0; flex-shrink: 0; }
@media (max-width: 575.98px) {
    .zsh-chat { right: 16px; bottom: 84px; }
    .back-to-top { right: 16px; bottom: 20px; }
    .zsh-chat-panel { right: -6px; }
}

/* Navbar fit (extra menu items) */
@media (min-width: 992px) and (max-width: 1599.98px) {
    .navbar-light .navbar-nav .nav-link { margin-right: 18px; font-size: 14px; }
    .brand-text { font-size: 1.15rem; }
    .navbar .navbar-brand { padding-left: 1.25rem !important; padding-right: 1rem !important; }
    .navbar .btn.btn-primary.py-4 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) { .brand-text { display: none !important; } }

/* Carousel arrows sit at the screen edge so they never cover the photo */
.header-carousel .owl-nav { right: 15px; }
@media (max-width: 991.98px) { .header-carousel .owl-nav { top: auto; bottom: 10px; transform: none; flex-direction: row; gap: 8px; } }

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wow, .animated { visibility: visible !important; animation: none !important; }
    #spinner { display: none !important; }
}

/* ---------- Graduation timetable ---------- */
.grad-group-banner { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding: 18px 22px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--primary, #DA0000), #263E59); }
.grad-group-banner small { opacity: .8; letter-spacing: .05em; }
.grad-table thead th { background: #263E59; color: #fff; }
.grad-table tbody tr:nth-child(even) { background: #f8f9fb; }
.grad-timeline { position: relative; padding-left: 18px; border-left: 3px solid #03989E; }
.grad-item { position: relative; margin-bottom: 16px; padding: 12px 14px; background: #fff; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }
.grad-item::before { content: ''; position: absolute; left: -27px; top: 16px; width: 14px; height: 14px; border-radius: 50%; background: #DA0000; border: 3px solid #fff; box-shadow: 0 0 0 2px #03989E; }
.grad-time { display: inline-block; margin-bottom: 4px; padding: 2px 10px; border-radius: 20px; background: rgba(3, 152, 158, .12); color: #03989E; font-weight: 700; font-size: .85rem; }
.grad-motto { color: #263E59; font-weight: 800; letter-spacing: .02em; }
@media print {
    .navbar, .topbar, footer, .footer, .page-header, .back-to-top, .whatsapp-float, .chat-launcher, #chatWidget, [data-print], .grad-group-banner .btn { display: none !important; }
    .grad-timeline { display: none !important; }
    .table-responsive.d-none { display: block !important; }
}

/* ---------- Alumni ---------- */
.alumni-stat { display: flex; align-items: center; gap: 16px; padding: 20px; border-radius: 14px; background: #fff; box-shadow: 0 4px 18px rgba(0, 0, 0, .06); }
.alumni-stat i { font-size: 2rem; color: #03989E; }
.alumni-stat span { color: #6b7a90; }
.alumni-cta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; padding: 26px 30px; border-radius: 16px; color: rgba(255, 255, 255, .85); background: linear-gradient(135deg, var(--primary, #DA0000), #263E59); }
.alumni-card { background: #fff; border-radius: 14px; box-shadow: 0 2px 12px rgba(0, 0, 0, .06); overflow: hidden; }
.alumni-card .alumni-photo { height: 220px; }
.alumni-card.featured { border-top: 4px solid #03989E; }
.alumni-avatar { width: 64px; height: 64px; flex: 0 0 64px; border-radius: 50%; object-fit: cover; }
.alumni-avatar.initials { display: flex; align-items: center; justify-content: center; background: rgba(3, 152, 158, .12); color: #03989E; font-weight: 800; font-size: 1.2rem; }
.min-w-0 { min-width: 0; }
.alumni-photo-initials { display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, rgba(3, 152, 158, .15), rgba(38, 62, 89, .12)); color: #03989E; font-size: 3rem; font-weight: 800; }
