/* Hera Academy — Homepage styles (WRS branding) */
:root {
    --ha-primary: #0B3C2A;       /* Deep Teal Emerald */
    --ha-accent: #13583F;        /* Hover / supporting green */
    --ha-secondary: #F5EFE6;     /* Warm Ivory / Beige */
    --ha-white: #ffffff;
    --ha-text: #2c3e50;
    --ha-muted: #6c757d;
    --ha-border: #e8e4dc;
    --ha-shadow: 0 8px 24px rgba(11, 60, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--ha-text);
    background-color: var(--ha-white);
    overflow-x: hidden;
}

a {
    transition: color 0.2s ease, background-color 0.2s ease;
}

/* ---------- Top Announcement Ribbon ---------- */
.top-ribbon {
    background-color: var(--ha-primary);
    color: var(--ha-white);
    font-size: 0.875rem;
}

.top-ribbon .badge-notices {
    background: var(--ha-secondary);
    color: var(--ha-primary);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.top-ribbon a {
    color: var(--ha-secondary);
    text-decoration: none;
    white-space: nowrap;
}

.top-ribbon a:hover {
    color: var(--ha-white);
    text-decoration: underline;
}

.top-ribbon marquee {
    flex: 1;
}

/* ---------- Header / Navigation ---------- */
.site-header {
    background: var(--ha-white);
    border-bottom: 1px solid var(--ha-border);
    z-index: 1030;
}

.navbar-brand img {
    height: 52px;
    width: auto;
}

.navbar-brand .brand-name {
    letter-spacing: -0.5px;
    color: var(--ha-primary);
    font-size: 1.25rem;
    line-height: 1.1;
}

.navbar-brand .brand-tag {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--ha-muted);
    letter-spacing: 0.02em;
}

.nav-link {
    font-weight: 500;
    color: var(--ha-text) !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.92rem;
}

.nav-link:hover,
.nav-link.active,
.dropdown-item:hover {
    color: var(--ha-primary) !important;
}

.dropdown-menu {
    border: 1px solid var(--ha-border);
    box-shadow: var(--ha-shadow);
    border-radius: 8px;
    padding: 0.5rem 0;
}

.dropdown-menu .dropdown-item {
    font-size: 14px; /* 2px less than default 16px */
}

.dropdown-header {
    color: var(--ha-primary);
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Hide dropdown caret / arrow icons */
.navbar .dropdown-toggle::after,
.login-dropdown .dropdown-toggle::after {
    display: none !important;
}

/* Desktop: open submenu on hover */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu,
    .login-dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: dropdownFade 0.15s ease;
    }

    .navbar .nav-item.dropdown > .dropdown-menu {
        margin-top: 0;
    }

    .login-dropdown:hover > .dropdown-menu {
        margin-top: 0.25rem;
    }
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-ha-login {
    background-color: var(--ha-primary);
    color: var(--ha-white);
    border-radius: 4px;
    font-weight: 500;
    padding: 0.45rem 1.15rem;
    border: none;
}

.btn-ha-login:hover,
.btn-ha-login:focus {
    background-color: var(--ha-accent);
    color: var(--ha-white);
}

.login-dropdown .dropdown-item {
    font-size: 14px;
    padding: 0.45rem 1rem;
}

/* ---------- Hero Banner / Slider ---------- */
.hero-carousel #heroSlider {
    position: relative;
}

.hero-carousel .carousel-inner {
    height: 480px;
}

.hero-carousel .carousel-item {
    height: 480px;
    color: var(--ha-white);
    background-color: var(--ha-primary);
    background-image:
        linear-gradient(135deg, rgba(11, 60, 42, 0.28) 0%, rgba(11, 60, 42, 0.18) 50%, rgba(11, 60, 42, 0.32) 100%),
        url("../images/hero-img.jpg");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-carousel .carousel-item.hero-slide-1 {
    background-image:
        linear-gradient(135deg, rgba(11, 60, 42, 0.28) 0%, rgba(11, 60, 42, 0.18) 50%, rgba(11, 60, 42, 0.32) 100%),
        url("../images/hero-img.jpg");
}

.hero-carousel .carousel-item.hero-slide-2 {
    background-image:
        linear-gradient(135deg, rgba(11, 60, 42, 0.28) 0%, rgba(11, 60, 42, 0.18) 50%, rgba(11, 60, 42, 0.32) 100%),
        url("../images/slider2.webp");
}

.hero-carousel .carousel-item .hero-inner {
    height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
}

.hero-badge {
    display: inline-block;
    background: var(--ha-secondary);
    color: var(--ha-primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.hero-carousel h1 {
    font-weight: 700;
    font-size: clamp(1.85rem, 4vw, 3rem);
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.55), 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-carousel .lead {
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 300;
    max-width: 640px;
    margin: 0 auto 1.5rem;
    opacity: 0.95;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55), 0 1px 2px rgba(0, 0, 0, 0.65);
}

.btn-hero {
    background: var(--ha-white);
    color: var(--ha-primary);
    font-weight: 600;
    padding: 0.7rem 1.6rem;
    border-radius: 4px;
    border: none;
    text-decoration: none;
    display: inline-block;
}

.btn-hero:hover {
    background: var(--ha-secondary);
    color: var(--ha-primary);
}

.hero-carousel .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    border: none;
    opacity: 1;
}

.hero-carousel .carousel-indicators .active {
    background-color: var(--ha-secondary);
    width: 28px;
    border-radius: 6px;
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 8%;
}

/* ---------- Section commons ---------- */
.section-block {
    padding: 3.5rem 0;
}

.section-block.alt {
    background: var(--ha-secondary);
}

.section-title {
    position: relative;
    font-weight: 700;
    color: var(--ha-primary);
    margin-bottom: 1.75rem;
    font-size: 1.5rem;
}

.section-title::after {
    content: '';
    width: 56px;
    height: 3px;
    background-color: var(--ha-primary);
    position: absolute;
    bottom: -8px;
    left: 0;
}

.section-title.center {
    text-align: center;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-sub {
    color: var(--ha-muted);
    max-width: 620px;
    margin-bottom: 2rem;
}

/* ---------- Results & Achievements ---------- */
.stat-card {
    background: var(--ha-white);
    border: 1px solid var(--ha-border);
    border-radius: 10px;
    padding: 1.35rem 1rem;
    text-align: center;
    height: 100%;
    box-shadow: var(--ha-shadow);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--ha-primary);
    margin-bottom: 0.25rem;
    line-height: 1.1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--ha-muted);
}

.card-custom {
    border: 1px solid var(--ha-border);
    border-radius: 10px;
    background: var(--ha-white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    overflow: hidden;
}

.card-custom:hover {
    transform: translateY(-4px);
    box-shadow: var(--ha-shadow);
}

.achievement-thumb {
    height: 150px;
    overflow: hidden;
    background: var(--ha-secondary);
}

.achievement-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.achievement-card:hover .achievement-thumb img {
    transform: scale(1.05);
}

/* Achiever photo cards */
.achiever-card {
    background: var(--ha-white);
    border: 1px solid var(--ha-border);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
    box-shadow: var(--ha-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-align: center;
}

.achiever-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 60, 42, 0.12);
}

.achiever-photo {
    height: 220px;
    overflow: hidden;
    background: var(--ha-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.achiever-photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

@media (max-width: 575.98px) {
    .achiever-photo {
        height: 180px;
    }
}

.achiever-info {
    padding: 0.85rem 0.75rem 1rem;
}

.achiever-badge {
    display: inline-block;
    background: rgba(11, 60, 42, 0.1);
    color: var(--ha-primary);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
}

.achiever-badge.neet { background: rgba(26, 95, 158, 0.12); color: #1a5f9e; }
.achiever-badge.scholarship { background: rgba(139, 90, 43, 0.12); color: #8b5a2b; }
.achiever-badge.clat { background: rgba(107, 63, 160, 0.12); color: #6b3fa0; }

.achiever-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--ha-text);
    margin: 0.25rem 0 0.15rem;
}

.achiever-rank {
    font-size: 0.8rem;
    color: var(--ha-muted);
    margin: 0;
}

/* Results & Achievements — fly up on scroll */
#results .fly-up {
    opacity: 0;
    transform: translateY(56px);
    transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    will-change: opacity, transform;
}

#results .fly-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

#results .achiever-card.fly-up {
    transition-delay: var(--fly-delay, 0s);
}

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

.card-custom .badge-ha {
    background: rgba(11, 60, 42, 0.1);
    color: var(--ha-primary);
    font-weight: 600;
}

.card-custom .card-link {
    color: var(--ha-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.card-custom .card-link:hover {
    text-decoration: underline;
}

/* ---------- Announcements Notice Board ---------- */
.notice-board {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--ha-shadow);
    height: auto;
}

.notice-board .card-header {
    background: var(--ha-primary) !important;
    color: var(--ha-white);
    font-weight: 700;
    padding: 1rem 1.15rem;
    border: none;
}

.notice-board .list-group-item {
    border-color: var(--ha-border);
    padding: 1rem 1.15rem;
}

.notice-board .list-group-item:hover {
    background: var(--ha-secondary);
}

/* Vertical sliding announcements */
.announce-viewport {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.announce-track {
    transition: transform 0.55s ease;
}

.announce-item {
    display: block;
    border-bottom: 1px solid var(--ha-border);
    text-decoration: none;
    color: inherit;
    min-height: 93px;
    box-sizing: border-box;
}

.announce-item:last-child {
    border-bottom: 1px solid var(--ha-border);
}

.notice-type {
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 0.25rem;
}

.notice-type.deadline { color: #c0392b; }
.notice-type.circular { color: #1a5f9e; }
.notice-type.admit { color: var(--ha-primary); }
.notice-type.update { color: #555; }

.notice-board .card-footer {
    background: var(--ha-white);
    border-top: 1px solid var(--ha-border);
    text-align: center;
}

.notice-board .card-footer a {
    color: var(--ha-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.notice-board .card-footer a:hover {
    text-decoration: underline;
}

/* Notices board (distinct from Announcements) */
.notice-board-alt .card-header {
    background: #8b5a2b !important;
}

.notice-list .list-group-item {
    padding: 0.85rem 1.15rem;
    border-color: var(--ha-border);
}

.notice-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    text-decoration: none;
    color: inherit;
}

.notice-link:hover .notice-text {
    color: var(--ha-primary);
}

.notice-date {
    font-size: 0.72rem;
    font-weight: 600;
    color: #8b5a2b;
    letter-spacing: 0.02em;
}

.notice-text {
    font-size: 0.875rem;
    color: var(--ha-text);
    line-height: 1.45;
    transition: color 0.2s ease;
}

/* ---------- Vision & Mission ---------- */
.vision-mission-stack .vm-card {
    background: var(--ha-white);
    border: 1px solid var(--ha-border);
    border-radius: 10px;
    padding: 1.25rem 1.15rem;
    box-shadow: var(--ha-shadow);
}

.vm-card .vm-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(11, 60, 42, 0.1);
    color: var(--ha-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.vm-card.vm-mission .vm-icon {
    background: rgba(139, 90, 43, 0.12);
    color: #8b5a2b;
}

.vm-card .vm-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ha-primary);
    margin-bottom: 0.5rem;
}

.vm-card.vm-mission .vm-title {
    color: #8b5a2b;
}

.vm-card .vm-text {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--ha-muted);
    margin-bottom: 0;
}

/* ---------- Gallery (single sliding box) ---------- */
.gallery-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--ha-shadow);
    border: 1px solid var(--ha-border);
    background: #111;
}

.gallery-box .carousel-inner {
    height: 420px;
}

.gallery-box .carousel-item {
    height: 420px;
    position: relative;
}

.gallery-slide-img {
    width: 100%;
    height: 420px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.gallery-slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(transparent, rgba(11, 60, 42, 0.85));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    pointer-events: none;
}

/* Gallery lightbox modal */
.gallery-modal-content {
    background: transparent;
    border: none;
    position: relative;
}

.gallery-modal-img {
    max-width: 100%;
    max-height: 82vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.gallery-modal-caption {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 0.85rem !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.gallery-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 5;
    background: #fff;
    opacity: 1;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    padding: 0.65rem;
}

.gallery-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(11, 60, 42, 0.75);
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.gallery-modal-prev { left: 8px; }
.gallery-modal-next { right: 8px; }

.gallery-modal-nav:hover {
    background: var(--ha-primary);
}

#galleryModal .modal-dialog {
    max-width: 960px;
}

.gallery-box .carousel-indicators {
    margin-bottom: 0.75rem;
}

.gallery-box .carousel-indicators [data-bs-target] {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    opacity: 1;
}

.gallery-box .carousel-indicators .active {
    background-color: var(--ha-secondary);
    width: 24px;
    border-radius: 6px;
}

.gallery-box .carousel-control-prev,
.gallery-box .carousel-control-next {
    width: 10%;
}

@media (max-width: 767.98px) {
    .gallery-box .carousel-inner,
    .gallery-box .carousel-item,
    .gallery-slide-img {
        height: 260px;
    }
}

/* ---------- News & Events ---------- */
.news-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-bottom: 1px solid var(--ha-border);
    padding: 1.15rem 0;
}

.news-item:last-child {
    border-bottom: none;
}

.news-thumb {
    flex-shrink: 0;
    width: 120px;
    height: 88px;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    background: var(--ha-secondary);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.news-item:hover .news-thumb img {
    transform: scale(1.06);
}

.news-body {
    flex: 1;
    min-width: 0;
}

.news-item .news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
    gap: 0.75rem;
}

.news-item h6 a {
    color: var(--ha-text);
    text-decoration: none;
    font-weight: 700;
    line-height: 1.45;
}

.news-item h6 a:hover {
    color: var(--ha-primary);
}

.badge-event {
    background: var(--ha-primary);
    color: var(--ha-white);
    font-weight: 500;
    font-size: 0.72rem;
}

.badge-event.workshop { background: #1a5f9e; }
.badge-event.initiative { background: #8b5a2b; }
.badge-event.mtq { background: #6b3fa0; }
.badge-event.meet { background: #0a6e5c; }

@media (max-width: 575.98px) {
    .news-thumb {
        width: 88px;
        height: 72px;
    }
}

/* ---------- Programme quick links strip ---------- */
.programme-strip {
    background: var(--ha-white);
    border-bottom: 1px solid var(--ha-border);
    padding: 1.25rem 0;
}

.programme-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border: 1px solid var(--ha-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--ha-text);
    font-weight: 500;
    font-size: 0.9rem;
    height: 100%;
    background: var(--ha-white);
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.programme-chip i {
    color: var(--ha-primary);
    font-size: 1.15rem;
}

.programme-chip:hover {
    border-color: var(--ha-primary);
    background: var(--ha-secondary);
    color: var(--ha-primary);
}

/* ---------- Footer ---------- */
footer {
    background-color: var(--ha-primary);
    color: var(--ha-white);
}

footer .footer-heading {
    color: var(--ha-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

footer a {
    color: var(--ha-secondary);
    text-decoration: none;
}

footer a:hover {
    color: var(--ha-white);
    text-decoration: underline;
}

footer .text-soft {
    color: rgba(255, 255, 255, 0.65);
}

footer .social-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 239, 230, 0.4);
    border-radius: 4px;
    color: var(--ha-secondary);
    text-decoration: none;
}

footer .social-btn:hover {
    background: var(--ha-secondary);
    color: var(--ha-primary);
    text-decoration: none;
}

footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ---------- Blog ---------- */
.blog-card {
    border: 1px solid var(--ha-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--ha-white);
    box-shadow: var(--ha-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(11, 60, 42, 0.12);
}

.blog-thumb {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--ha-secondary);
}

.blog-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-thumb img {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    left: 0.85rem;
    bottom: 0.85rem;
    background: var(--ha-secondary);
    color: var(--ha-primary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
}

.blog-title {
    line-height: 1.55;
}

.blog-title a {
    color: var(--ha-text);
    text-decoration: none;
}

.blog-title a:hover {
    color: var(--ha-primary);
}

.blog-card .card-link {
    color: var(--ha-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
}

.blog-card .card-link:hover {
    text-decoration: underline;
}

/* ---------- Floating WhatsApp ---------- */
.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1050;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float img {
    width: 58px;
    height: 58px;
    display: block;
    border-radius: 50%;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.55);
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .hero-carousel .carousel-inner,
    .hero-carousel .carousel-item,
    .hero-carousel .carousel-item .hero-inner {
        height: 420px;
    }

    .navbar-nav {
        padding: 0.75rem 0;
    }

    .btn-ha-login {
        margin-top: 0.5rem;
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .top-ribbon .badge-notices {
        display: none;
    }

    .stat-card .stat-value {
        font-size: 1.6rem;
    }
}
