:root {
    --ink: #172a3a;
    --muted: #64717c;
    --gold: #c79b42;
    --gold-dark: #a97c27;
    --cream: #f7f5ef;
    --line: #e8e4da;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 82px;
}

body {
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
}

.school-nav {
    min-height: 82px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 3px 24px rgba(17, 35, 49, .08);
}

.navbar-brand {
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 750;
    letter-spacing: -.025em;
}

.navbar-brand img {
    object-fit: contain;
}

.navbar-brand small {
    margin-top: 2px;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.school-nav .nav-link {
    color: var(--ink);
    font-size: .91rem;
    font-weight: 600;
}

.school-nav .nav-link:hover,
.text-link:hover,
.school-footer a:hover {
    color: var(--gold-dark);
}

.btn-school-primary {
    border: 1px solid var(--gold);
    background: var(--gold);
    color: #fff;
    font-weight: 650;
}

.btn-school-primary:hover {
    border-color: var(--gold-dark);
    background: var(--gold-dark);
    color: #fff;
}

.hero {
    position: relative;
    display: flex;
    min-height: 680px;
    height: min(840px, 100svh);
    align-items: center;
    overflow: hidden;
    background: #172a3a;
}

.hero .carousel,
.hero .carousel-inner,
.hero .carousel-item,
.hero-image,
.hero-shade {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-image {
    object-fit: cover;
    object-position: center 42%;
}

.hero-shade {
    z-index: 1;
    background: linear-gradient(90deg, rgba(13, 30, 43, .83) 0%, rgba(13, 30, 43, .59) 47%, rgba(13, 30, 43, .17) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 82px;
    color: #fff;
}

.eyebrow {
    margin-bottom: 1rem;
    color: var(--gold-dark);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .19em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #f0cc7d;
}

.hero h1 {
    max-width: 760px;
    margin-bottom: 1.25rem;
    font-size: clamp(3.3rem, 8vw, 6.7rem);
    font-weight: 750;
    letter-spacing: -.065em;
    line-height: .98;
}

.hero h1 span,
.section-title span {
    color: var(--gold);
}

.hero-description {
    max-width: 540px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, .85);
    font-size: clamp(1.05rem, 2vw, 1.28rem);
    line-height: 1.7;
}

.hero .carousel-indicators {
    z-index: 3;
    justify-content: flex-start;
    width: min(100% - 24px, 1320px);
    margin: 0 auto 2.2rem;
    padding: 0 12px;
}

.hero .carousel-indicators [data-bs-target] {
    width: 30px;
    height: 3px;
    border: 0;
}

.scroll-cue {
    position: absolute;
    z-index: 2;
    right: max(calc((100vw - 1320px) / 2 + 24px), 24px);
    bottom: 38px;
    width: 25px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 20px;
}

.scroll-cue span {
    position: absolute;
    top: 8px;
    left: 10px;
    width: 3px;
    height: 8px;
    border-radius: 3px;
    background: #fff;
    animation: scroll-down 1.4s infinite;
}

@keyframes scroll-down {
    to { transform: translateY(12px); opacity: 0; }
}

.section-space {
    padding: 108px 0;
}

.section-title {
    margin-bottom: 1.35rem;
    color: var(--ink);
    
    font-weight: 730;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.body-copy {
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.85;
}

.text-link {
    display: inline-flex;
    gap: .65rem;
    margin-top: .5rem;
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.school-photo {
    position: relative;
    min-height: 390px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--cream);
}

.school-photo img {
    width: 100%;
    height: 440px;
    object-fit: cover;
}

.photo-caption {
    position: absolute;
    right: 20px;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 8px;
    background: rgba(17, 35, 49, .83);
    color: #fff;
    backdrop-filter: blur(8px);
}

.photo-caption strong {
    color: #f0cc7d;
    font-size: 1.25rem;
}

.photo-caption span {
    color: rgba(255, 255, 255, .8);
    font-size: .9rem;
}

.stat-card {
    display: flex;
    min-height: 110px;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.stat-card strong {
    color: var(--ink);
    font-size: 1.65rem;
}

.stat-card span {
    margin-top: .2rem;
    color: var(--muted);
    font-size: .9rem;
}

.notice-section {
    background: var(--cream);
}

.home-notice-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.home-notice-item + .home-notice-item {
    margin-top: .75rem;
}

.home-notice-item time {
    display: flex;
    min-width: 66px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gold-dark);
    text-align: center;
    text-transform: uppercase;
}

.home-notice-item time strong {
    font-size: 1.5rem;
    line-height: 1;
}

.home-notice-item time span {
    margin-top: .25rem;
    font-size: .72rem;
    letter-spacing: .04em;
}

.home-notice-item h3 {
    margin: 0 0 .35rem;
    font-size: 1.1rem;
}

.home-notice-item h3 a {
    color: var(--ink);
    text-decoration: none;
}

.home-notice-item h3 a:hover {
    color: var(--gold-dark);
}

.home-notice-item p {
    margin: 0;
    color: var(--muted);
}

.motto-panel {
    padding: clamp(40px, 8vw, 82px) 24px;
    border-radius: 12px;
    background: var(--ink);
    color: #fff;
}

.motto-panel .eyebrow {
    color: #f0cc7d;
}

.motto-sinhala {
    margin: 1.8rem 0 .6rem;
    font-size: clamp(2.3rem, 6vw, 4.2rem);
    font-weight: 600;
}

.motto-translation {
    color: rgba(255, 255, 255, .78);
    font-size: clamp(1.2rem, 3vw, 1.75rem);
}

.motto-english {
    margin: 1.5rem 0 .8rem;
    color: #f0cc7d;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-style: italic;
}

.gold-rule {
    display: inline-block;
    width: 52px;
    height: 2px;
    margin: .4rem 0 1rem;
    background: var(--gold);
}

.motto-caption {
    margin: 0 auto;
    color: rgba(255, 255, 255, .72);
}

.anthem-section {
    background: #fbfaf7;
}

.audio-card {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 16px 45px rgba(17, 35, 49, .06);
}

.audio-credit {
    margin: .75rem 0 0;
    color: var(--muted);
    font-size: .83rem;
}

.audio-credit a {
    color: var(--gold-dark);
    text-decoration: none;
}

.achievement-card {
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    transition: transform .2s ease, box-shadow .2s ease;
}

.achievement-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(17, 35, 49, .08);
}

.achievement-card img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.achievement-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
}

.achievement-photo img {
    width: auto;
    max-width: 100%;
    max-height: 70vh;
    aspect-ratio: auto;
    object-fit: contain;
}

.achievement-body {
    padding: 20px 22px 24px;
}

.achievement-card .carousel-control-prev,
.achievement-card .carousel-control-next {
    z-index: 2;
}

.achievement-body h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.achievement-body p {
    margin: 0;
    color: #5b6770;
}

.section-heading {
    max-width: 650px;
    margin: 0 auto;
}

.resource-card {
    position: relative;
    display: block;
    height: 100%;
    min-height: 235px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--ink);
    text-decoration: none;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.resource-card:hover {
    transform: translateY(-5px);
    border-color: rgba(199, 155, 66, .7);
    box-shadow: 0 18px 40px rgba(17, 35, 49, .08);
    color: var(--ink);
}

.resource-number {
    color: var(--gold-dark);
    font-size: .78rem;
    font-weight: 750;
    letter-spacing: .12em;
}

.resource-card h3 {
    margin: 1.4rem 0 .65rem;
    font-size: 1.28rem;
    font-weight: 700;
}

.resource-card p {
    max-width: 290px;
    color: var(--muted);
    line-height: 1.7;
}

.resource-arrow {
    position: absolute;
    right: 28px;
    bottom: 24px;
    color: var(--gold-dark);
    font-size: 1.4rem;
}

.school-footer {
    padding: 28px 0;
    background: #122534;
    color: rgba(255, 255, 255, .72);
    font-size: .9rem;
}

.school-footer a {
    color: #fff;
    text-decoration: none;
}

.footer-brand {
    font-size: 1rem;
    font-weight: 700;
}

.footer-brand span {
    color: rgba(255, 255, 255, .6);
    font-weight: 400;
}

.footer-contact {
    line-height: 1.6;
}

@media (max-width: 767.98px) {
    .school-nav {
        min-height: 72px;
    }

    .hero {
        min-height: 620px;
        height: 88svh;
    }

    .hero-content {
        padding-top: 72px;
    }

    .hero-shade {
        background: linear-gradient(90deg, rgba(13, 30, 43, .82), rgba(13, 30, 43, .39));
    }

    .section-space {
        padding: 76px 0;
    }

    .school-photo,
    .school-photo img {
        min-height: 300px;
        height: 340px;
    }

    .audio-card {
        padding: 14px;
    }

    .home-notice-item {
        gap: .75rem;
        padding: 1rem;
    }

    .home-notice-item time {
        min-width: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}
