/* School Management System - Custom Styles (Bootstrap 5 Extensions Only) */

/* No :root block here – let theme-dynamic.php define variables */

/* Adjust fixed element heights */
:root {
    --top-bar-height: 45px;
    --navbar-height: 70px;
    --body-padding: calc(var(--top-bar-height) + var(--navbar-height));
}

body {
    font-family: "Segoe UI", sans-serif;
    background: #f5f7fb;
    padding-top: var(--body-padding);
    top: 0px !important;
    /* Remove body top offset that Google adds for translate menu */
    position: relative !important;
}

/* Scroll Progress Bar */
.scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.top-bar {
    height: var(--top-bar-height);
}

.top-bar {
    background-color: var(--primary-dark);
    color: #cbd5e1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1030;
    font-size: 0.8rem;
}

/* Language dropdown – select styling */
.top-bar-lang select {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid #475569;
    color: #cbd5e1;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    /* Ensure dropdown arrow uses theme colour */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cbd5e1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    appearance: none;
    padding-right: 28px;
}

.top-bar-lang select:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--primary-light);
}

.top-bar-lang select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.3);
}

.top-bar-lang select option {
    background-color: var(--primary-dark);
    color: #cbd5e1;
    padding: 10px 12px;
    font-size: 0.8rem;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-lang select option:checked {
    background-color: var(--primary-light);
    color: white;
}

/* Firefox hover (partial support) */
.top-bar-lang select option:hover,
.top-bar-lang select option:focus {
    background-color: var(--primary-light) !important;
    color: white !important;
}

/* For modern browsers (Chrome, Edge) – style the dropdown list itself */
.top-bar-lang select::-webkit-listbox,
.top-bar-lang select::-webkit-scrollbar {
    background-color: var(--primary-dark);
    border-radius: 8px;
}

.top-bar-lang select::-webkit-scrollbar-thumb {
    background-color: #475569;
    border-radius: 4px;
}

#mainNavbar {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    width: 100%;
    z-index: 1020;
}

/* Transitions for smooth sliding */
.top-bar,
#mainNavbar {
    transition: transform 0.3s cubic-bezier(0.25, 0.9, 0.35, 1);
}

.navbar-brand {
    font-size: 1.5rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 45%;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

/* Ensure toggler is always visible */
.navbar-toggler {
    flex-shrink: 0;
}

/* Ensure navbar doesn't hide content */
.sticky-top {
    z-index: 1020;
}

.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
    padding: 80px 5%;
    margin: -2.5rem 0 2.5rem 0;
    border-radius: 0 0 2rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    color: white;
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    flex-wrap: wrap;
}

.hero-badge {
    display: inline-block;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    backdrop-filter: blur(10px);
}

.hero-left {
    flex: 1;
    min-width: 300px;
    color: white;
    text-align: left;
}

.hero-left h1 {
    font-size: 70px;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-line {
    width: 100px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 20px;
    margin-bottom: 30px;
}

.hero-left p {
    font-size: 24px;
    line-height: 1.8;
    max-width: 650px;
    color: var(--text-color, #e5e7eb);
    margin-bottom: 40px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.hero-urgency {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    display: inline-block;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 1rem;
    margin-bottom: 25px;
    border-left: 3px solid var(--secondary-color);
    font-weight: 500;
}

.hero-urgency i {
    color: var(--secondary-color);
}

.text-primary-light {
    color: var(--primary-light);
}

.btn-primary-custom,
.btn-secondary-custom,
.btn-outline-custom {
    text-decoration: none;
    padding: 16px 24px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    transition: var(--transition, 0.3s ease);
}

.btn-primary-custom {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

.btn-secondary-custom {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--dark-color, #0f172a);
}

.btn-secondary-custom:hover {
    background-color: var(--secondary-dark, var(--primary-dark));
    transform: translateY(-3px);
}

.btn-outline-custom {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.btn-outline-custom:hover {
    background: white;
    color: var(--primary-color);
}

.hero-right {
    flex: 1;
    min-width: 300px;
}

/* crossfade apple-style */
.crossfade-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 3/2;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: var(--shadow-lg, 0 20px 50px rgba(0, 0, 0, 0.15));
    background: #000;
}

.crossfade-gallery img {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;
    object-fit: cover;

    opacity: 0;
    transition: opacity 1.8s ease-in-out;
    transform: scale(1.02);
    animation: subtleZoom 8s ease-in-out infinite alternate;
}

.crossfade-gallery img.active {
    opacity: 1;
    position: relative;
}

@keyframes subtleZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.05);
    }
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5), transparent);
    z-index: 2;
    pointer-events: none;
    border-radius: 0 0 20px 20px;
}

.crossfade-caption {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 3;
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    padding: 8px 20px;
    border-radius: 40px;
    pointer-events: none;
}

@media (max-width: 768px) {
    .crossfade-caption {
        font-size: 0.85rem;
        bottom: 12px;
        left: 12px;
        padding: 5px 12px;
    }

    .crossfade-gallery {
        border-radius: 16px;
    }

    .gallery-overlay {
        border-radius: 0 0 16px 16px;
    }
}

.features-section {
    margin-top: -70px;
    padding: 0 5% 80px;
    position: relative;
    z-index: 20;
}

.features-wrapper {
    background: white;
    border-radius: 25px;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    box-shadow: var(--shadow-lg, 0 20px 50px rgba(0, 0, 0, 0.15));
}

.feature-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: rgba(0, 71, 204, 0.08);
    font-size: 32px;
    color: var(--primary-color);
}

.feature-box h4 {
    font-size: 24px;
    line-height: 1.5;
    color: var(--dark-color, #0f172a);
}

/* Stats section */
.stats-section {
    background: linear-gradient(120deg, #f8fafc, #ffffff);
    padding: 3rem;
    border-radius: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.02);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.card {
    border-radius: 1.5rem;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #eef2ff !important;
    transition: var(--transition, 0.3s ease);
}

.card:hover {
    border-color: var(--primary-light) !important;
    transform: translateY(-8px);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.12);
}

/* Page header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 4rem 0 3rem;
    margin-top: -2.5rem;
    /* to align with navbar */
    border-radius: 0 0 2rem 2rem;
    position: relative;
    z-index: 1;
}

.page-header h1,
.page-header p {
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Milestones / stat cards */
.stat-card {
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.feature-card i,
.stat-card i {
    color: var(--primary-light);
}

.feature-card:hover i {
    transform: scale(1.1);
}

.cta-section {
    background: linear-gradient(105deg, var(--primary-light) 0%, var(--primary-color) 100%);
    padding: 3rem;
    border-radius: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section h2,
.cta-section .display-5 {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cta-section p,
.cta-section .lead {
    color: rgba(255, 255, 255, 0.9) !important;
}

.cta-section .btn-light {
    background-color: white;
    color: var(--primary-color);
    border: none;
}

.cta-section .btn-light:hover {
    background-color: var(--secondary-color);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.cta-section .btn-outline-light {
    border: 2px solid white;
    color: white;
}

.cta-section .btn-outline-light:hover {
    background-color: white;
    color: var(--primary-color);
}

footer {
    background-color: var(--primary-dark);
    color: #cbd5e1;
    border-top: 1px solid #334155;
}

footer h5 {
    color: white !important;
    font-weight: 700;
}

footer .text-muted,
.top-bar .text-muted {
    color: #cbd5e1 !important;
}

footer a.text-muted {
    color: #cbd5e1 !important;
    transition: all 0.2s ease;
}

footer a.text-muted:hover {
    color: var(--primary-light) !important;
    transform: translateX(4px);
}

footer .btn-primary {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

footer .btn-primary:hover {
    background-color: var(--primary-color);
}

footer .input-group .form-control {
    background-color: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

footer .input-group .form-control::placeholder {
    color: #94a3b8;
}

footer .input-group .form-control:focus {
    background-color: #0f172a;
    border-color: var(--primary-light);
    box-shadow: none;
}

.theme-option.active {
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
}

/* Gallery carousel controls */
.gallery-owl .gallery-item {
    padding: 10px;
}

.gallery-owl .owl-nav button {
    background: white !important;
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
}

.gallery-owl .owl-nav button span {
    font-size: 24px;
    line-height: 1;
}

.gallery-owl .owl-nav .owl-prev {
    left: -20px;
}

.gallery-owl .owl-nav .owl-next {
    right: -20px;
}

.gallery-owl .owl-dots .owl-dot.active span,
.gallery-owl .owl-dots .owl-dot:hover span {
    background: var(--primary-color) !important;
}

/* Floating Action Button Styles */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.fab-button {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.fab-button:hover {
    transform: scale(1.05);
    background-color: var(--primary-dark);
}

.fab-text {
    display: none;
    /* hidden by default, shows on desktop */
}

.fab-options {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    transform: scale(0);
    transform-origin: bottom right;
    opacity: 0;
    pointer-events: none;
}

.fab-options.show {
    transform: scale(1);
    opacity: 1;
    pointer-events: auto;
}

.fab-option {
    background-color: white;
    color: var(--primary-color);
    border-radius: 40px;
    padding: 8px 16px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.fab-option i {
    font-size: 18px;
}

.fab-option:hover {
    background-color: var(--primary-light);
    color: white;
    transform: translateX(-4px);
}

/* For desktop, make button wider with text */
@media (min-width: 768px) {
    .fab-button {
        width: auto;
        height: auto;
        border-radius: 40px;
        padding: 12px 20px;
        gap: 8px;
        font-size: 16px;
    }

    .fab-button i {
        font-size: 20px;
    }

    .fab-text {
        display: inline;
    }

    .fab-options {
        margin-bottom: 15px;
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero-left h1 {
        font-size: 52px;
    }

    .hero-left p {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    :root {
        --top-bar-height: 45px;
        --navbar-height: 60px;
    }

    .navbar-brand {
        font-size: 1.25rem;
        max-width: 75%;
    }

    .navbar-brand img {
        max-height: 35px;
    }

    .hero-content {
        flex-direction: column;
    }

    .hero-left h1 {
        font-size: 42px;
    }

    .hero-left p {
        font-size: 18px;
    }

    .btn-primary-custom,
    .btn-secondary-custom,
    .btn-outline-custom {
        padding: 12px 18px;
    }

    .features-section {
        margin-top: 40px;
    }

    .feature-box h4 {
        font-size: 20px;
    }

    #galleryCarousel .carousel-item img {
        height: 300px !important;
    }

    .gallery-owl .owl-nav button {
        width: 30px;
        height: 30px;
        top: 35%;
    }

    .gallery-owl .owl-nav .owl-prev {
        left: -10px;
    }

    .gallery-owl .owl-nav .owl-next {
        right: -10px;
    }

    [data-aos="fade-left"],
    [data-aos="fade-right"] {
        transform: translateX(0) !important;
        opacity: 1 !important;
    }
}

@media (max-width: 576px) {
    .feature-box h4 {
        font-size: 18px;
    }
}

/* For very small screens, adjust bottom margin */
@media (max-width: 480px) {
    .fab-container {
        bottom: 15px;
        right: 15px;
    }

    .fab-option {
        padding: 6px 12px;
        font-size: 12px;
    }
}


/* Hide Google Translate top bar and tooltip */
.goog-te-banner-frame.skiptranslate,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb-OEVmcd * {
    display: none !important;
    visibility: hidden !important;
}


/* Hide the translate tooltip that appears on hover */
.VIpgJd-ZVi9od-oaP3Md-ORHb,
.VIpgJd-ZVi9od-oaP3Md-ORHb * {
    display: none !important;
    visibility: hidden !important;
}

/* Hide Google Translate hover tooltip */
.VIpgJd-ZVi9od-LgbsSe,
.VIpgJd-ZVi9od-LgbsSe *,
.VIpgJd-ZVi9od-oaP3Md,
.VIpgJd-ZVi9od-oaP3Md *,
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-ORHb * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hide Google branding frame overflow */
.skiptranslate iframe {
    display: none !important;
}

/* Hide Google Translate hover popup */
#goog-gt-tt,
.goog-tooltip,
.goog-te-balloon-frame,
.goog-tooltip:hover,
.goog-text-highlight {
    display: none !important;
    background: none !important;
    box-shadow: none !important;
}

.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q {
    background: none !important;
    box-shadow: none !important;
}

/* Remove highlight */
font {
    background: transparent !important;
}

/* Hide tooltip iframe */
iframe.goog-te-balloon-frame {
    display: none !important;
}