/* Public school website (resources/views/website/home.blade.php).
   --site-primary / --site-primary-rgb come from Admin → Website → Main colour. */
html {
    scroll-padding-top: 80px;
}

body {
    color: #2b2f36;
}

.text-site {
    color: var(--site-primary) !important;
}

.btn-site {
    background: var(--site-primary);
    border-color: var(--site-primary);
    color: #fff;
}

.btn-site:hover,
.btn-site:focus,
.btn-site.show {
    background: var(--site-primary);
    border-color: var(--site-primary);
    color: #fff;
    filter: brightness(.9);
}

.topbar {
    background: #13265e;
    color: #c9d3f0;
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--site-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.hero {
    background-color: #13265e;
    background-image: linear-gradient(135deg, rgba(19, 38, 94, .95), rgba(var(--site-primary-rgb), .85));
    background-size: cover;
    background-position: center;
}

.hero .opacity-90,
.admissions .opacity-90 {
    opacity: .9;
}

/* Image banner (Admin → Website → Banner slides) */
.banner .carousel-item {
    position: relative;
    height: clamp(380px, 62vh, 620px);
    background: #13265e;
}

.banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10, 20, 50, .82) 0%, rgba(10, 20, 50, .45) 55%, rgba(10, 20, 50, .1) 100%);
}

.banner-caption {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

.banner .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.stats-strip {
    background: var(--site-primary);
}

.stats-strip .col-6 + .col-6 {
    border-left: 1px solid rgba(255, 255, 255, .2);
}

@media (max-width: 575.98px) {
    .banner .display-5 {
        font-size: 1.8rem;
    }
}

.hero-stat {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 14px;
    padding: 1.25rem .5rem;
    backdrop-filter: blur(4px);
}

.login-card {
    transition: transform .15s ease, box-shadow .15s ease;
}

.login-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.5rem rgba(0, 0, 0, .1) !important;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

.principal-card {
    background: rgba(var(--site-primary-rgb), .06);
}

.feature-icon {
    flex: 0 0 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(var(--site-primary-rgb), .12);
    color: var(--site-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    inset: auto 0 0 0;
    padding: .4rem .6rem;
    font-size: .8rem;
    color: #fff;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(var(--site-primary-rgb), .15);
    color: var(--site-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.event-date {
    flex: 0 0 64px;
    background: var(--site-primary);
    color: #fff;
    border-radius: 12px;
    padding: .5rem 0;
}

.admissions {
    background: linear-gradient(135deg, var(--site-primary), #13265e);
}

.map-frame iframe {
    border: 0;
}


/* What's new news slider (Admin → Website → What's new) */
.news-section {
    background: #f6f5fb;
}

.news-heading {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
}

.news-slider {
    padding: 0 2.5rem;
}

.news-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -.9rem;
}

.news-track::-webkit-scrollbar {
    display: none;
}

.news-slide {
    flex: 0 0 100%;
    padding: 1.5rem .9rem 1rem;
    scroll-snap-align: start;
}

@media (min-width: 768px) {
    .news-slide { flex-basis: 50%; }
}

@media (min-width: 992px) {
    .news-slide { flex-basis: 33.3333%; }
}

.news-card {
    position: relative;
    height: 100%;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .07);
    transition: transform .15s ease, box-shadow .15s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .12);
}

.news-date {
    position: absolute;
    top: -1.4rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: nowrap;
    background: #3fbcd8;
    color: #fff;
    font-weight: 700;
    padding: .45rem 2.2rem;
    border-radius: 999px;
}

.news-img {
    margin: 0 1rem;
    transform: translateY(-.5rem);
    aspect-ratio: 3 / 2;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(var(--site-primary-rgb), .08);
    color: var(--site-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-title {
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-body {
    color: #444;
    text-align: justify;
    line-height: 1.75;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 6;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    border: 0;
    background: none;
    font-size: 2rem;
    color: #222;
    padding: .25rem;
}

.news-arrow:hover {
    color: var(--site-primary);
}

.news-prev { left: -.25rem; }
.news-next { right: -.25rem; }

/* Footer: main colour background with a soft pattern, raised "Get in touch" box */
.footer {
    position: relative;
    margin-top: 4rem;
    background-color: var(--site-primary);
    background-image:
        radial-gradient(ellipse at 70% 0%, rgba(255, 255, 255, .08), transparent 55%),
        repeating-linear-gradient(115deg, rgba(255, 255, 255, .03) 0 2px, transparent 2px 14px),
        linear-gradient(180deg, rgba(0, 0, 0, .04), rgba(0, 0, 0, .12));
}

.footer-main {
    padding-top: 1rem;
}

.footer-logo {
    background: #fff;
    padding: .8rem 1.4rem;
    border-radius: 0 0 10px 10px;
    margin-top: -1rem;
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .15);
}

.footer-heading {
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}

.footer-contact li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.footer-contact i {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.footer-links {
    columns: 2;
    column-gap: 1.5rem;
    padding-left: 1.1rem;
    list-style: square;
}

.footer-links li {
    margin-bottom: .75rem;
    break-inside: avoid;
}

.footer-links a,
.footer-social {
    color: #fff;
    text-decoration: none;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-social {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.footer-social:hover {
    background: rgba(255, 255, 255, .3);
    color: #fff;
}

.footer-form {
    background: rgba(255, 255, 255, .14);
    padding: 2.5rem 2rem 2rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, .15);
}

@media (min-width: 992px) {
    /* Box rises above the top edge of the footer, as in the design. */
    .footer-form {
        margin-top: -4rem;
        margin-bottom: -1.5rem;
        position: relative;
        z-index: 2;
        background-color: var(--site-primary);
        background-image: linear-gradient(rgba(255, 255, 255, .14), rgba(255, 255, 255, .14));
    }
}

.footer-form .form-control {
    background: rgba(0, 0, 0, .1);
    border: 0;
    border-radius: 0;
    color: #fff;
    padding: 1.4rem 1.5rem;
}

.footer-form .form-control::placeholder {
    color: rgba(255, 255, 255, .9);
}

.footer-form .form-control:focus {
    background: rgba(0, 0, 0, .18);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .6);
}

.footer-form .btn-light {
    border-radius: 0;
    letter-spacing: .03em;
}

.footer-bottom {
    background: rgba(0, 0, 0, .25);
}

/* Inter school achievements (Admin → Website → Achievements); reuses the news slider track and arrows */
@media (min-width: 1200px) {
    .achievement-slider .news-slide { flex-basis: 25%; }
}

.achievement-slider .news-slide {
    padding-top: 1rem;
}

.achievement-card {
    height: 100%;
    background: #fff;
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .1);
    transition: transform .15s ease, box-shadow .15s ease;
}

.achievement-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 .75rem 1.75rem rgba(0, 0, 0, .14);
}

.achievement-img {
    aspect-ratio: 9 / 8;
    border-radius: 14px;
    background: linear-gradient(180deg, #e8f5f8, #f9fcfd);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.achievement-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.achievement-title {
    text-align: center;
    text-transform: uppercase;
    padding: 1.25rem .25rem .5rem;
    line-height: 1.4;
}

/* "View all": every award in a wrapping grid instead of one scrolling row. */
.achievement-slider.show-all .news-track {
    flex-wrap: wrap;
    overflow: visible;
}

.achievement-slider.show-all .news-arrow {
    display: none;
}

/* School at a glance (Admin → Website → School at a glance): photo tabs, middle photo of each row larger */
.glance-section {
    background-color: #fbfbfb;
    background-image: radial-gradient(rgba(0, 0, 0, .035) 1px, transparent 1px);
    background-size: 6px 6px;
}

.glance-intro {
    max-width: 820px;
    line-height: 1.8;
}

.glance-eyebrow {
    color: #e8800c;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    font-weight: 600;
    text-transform: uppercase;
}

.glance-heading {
    font-family: 'Bodoni Moda', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    color: #0b2a5b;
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.glance-tabs {
    max-width: 920px;
    border-bottom: 2px solid #d5d5d5;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 1rem;
}

.glance-tabs .nav-link {
    color: #444;
    text-transform: uppercase;
    white-space: nowrap;
    padding: .4rem 0;
    margin-bottom: -2px;
    border-bottom: 3px solid transparent;
    border-radius: 0;
}

.glance-tabs .nav-link.active {
    color: #111;
    font-weight: 600;
    border-bottom-color: #e8800c;
}

.glance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-width: 1100px;
    margin: 0 auto;
}

.glance-photo {
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .08);
}

.glance-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.glance-photo:hover img {
    transform: scale(1.05);
}

@media (min-width: 768px) {
    .glance-grid {
        grid-template-columns: 1fr 1.5fr 1fr;
        align-items: center;
        gap: 1.25rem;
    }

    .glance-photo:nth-child(3n + 2) {
        aspect-ratio: 3 / 2.2;
    }
}

/* Frequently asked questions (Admin → Website → FAQs) */
.faq-section {
    background: #00235a;
}

.faq-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.faq-list {
    max-width: 1260px;
    --bs-accordion-bg: transparent;
    --bs-accordion-color: #fff;
    --bs-accordion-border-color: rgba(255, 255, 255, .85);
    --bs-accordion-btn-color: #fff;
    --bs-accordion-active-color: #fff;
    --bs-accordion-active-bg: transparent;
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(255, 255, 255, .25);
}

.faq-list .accordion-item {
    border: 1px solid var(--bs-accordion-border-color) !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.faq-list .accordion-item + .accordion-item {
    margin-top: 1.1rem;
}

.faq-list .accordion-button {
    font-weight: 600;
    font-size: 1.05rem;
    padding: 1.4rem 1.9rem;
    box-shadow: none;
}

/* Plus sign that turns into a minus when the answer is open. */
.faq-list .accordion-button::after {
    content: '+';
    background: none;
    width: auto;
    height: auto;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    transform: none;
    margin-left: 1rem;
}

.faq-list .accordion-button:not(.collapsed)::after {
    content: '\2212';
}

.faq-list .accordion-body {
    padding: 0 1.9rem 1.4rem;
    color: rgba(255, 255, 255, .85);
    line-height: 1.7;
}

/* Our leadership team (Admin → Website → Leadership team): portrait with an offset frame behind it */
.leader-photo {
    position: relative;
    margin: 0 1.25rem 1.25rem 0;
}

.leader-photo::before {
    content: '';
    position: absolute;
    inset: 1.25rem -1.25rem -1.25rem 1.25rem;
    border: 8px solid #c5d5d7;
    z-index: 0;
}

.leader-photo img {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 9 / 10;
    object-fit: cover;
    border: 3px solid #f1f1f1;
    background: #f1f1f1;
    transition: transform .2s ease;
}

a.leader-photo:hover img {
    transform: translate(-4px, -4px);
}

.leader-role {
    font-size: 1.05rem;
    color: #333;
}
