html {
    scroll-padding-top: 140px;
}

/* Skip link styling */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 8px 16px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    top: 10px;
    left: 10px;
    z-index: 9999;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

body {
    margin: 0;
}

.staff, #carouselPhotos, #levels, #levelh1, #programmes, #banner {
    background-color: rgb(221, 236, 221);
}

nav {
    background-color: rgb(3, 59, 3) !important;
    box-shadow: -8px -7px 12px 18px rgba(0, 7, 3, 4);
}

nav .nav-link:hover {
    color: rgb(221, 236, 221) !important;
}

.card, #carouselInner img {
    box-shadow: -3px 3px 2px -2px rgba(0, 7, 3, 4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 7, 3, 0.3);
}

.btn {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#navbar {
    position: fixed;
    top: 0;
    z-index: 1050;
    width: 100%;
}

.gutter {
  height: 140px;  
}

.space {
    height: 150px;
}

.butn {
    justify-self: center;
    background-color: rgb(4, 44, 3);
    color: white;
    border-radius: 20px;
    font-size: 26px;
    padding: 10px 20px;
}

.butn a {
    color: white;
    text-decoration: none;
    display: inline-block;
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background-color: rgb(3, 59, 3);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
}

#back-to-top:hover {
    background-color: rgb(4, 44, 3);
}

/* Image loading animations */
img {
    transition: opacity 0.3s ease-in-out;
}

img[loading] {
    opacity: 0;
}

img[loading="lazy"] {
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Loading spinner for images */
.image-loading {
    position: relative;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Enhanced loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Page load animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

/* Enhanced button animations */
.btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Card hover enhancements */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    border-radius: 12px;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Improved accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus {
    outline: 3px solid #007bff;
    outline-offset: 2px;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    nav {
        background-color: #000 !important;
        border-bottom: 3px solid #fff;
    }
}

/* Enhanced mobile responsiveness */
@media (max-width: 768px) {
    .navbar-brand img {
        width: 80px !important;
        height: 70px !important;
    }
    
    .card {
        margin-bottom: 20px;
        border-radius: 8px;
    }
    
    #back-to-top {
        width: 45px;
        height: 45px;
        font-size: 18px;
        bottom: 15px;
        right: 15px;
    }
    
    .btn {
        font-size: 16px;
        padding: 12px 24px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Enhanced typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Improved form styling */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Newsletter form enhancement */
footer .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

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

footer .form-control:focus {
    background-color: white;
    color: #333;
    border-color: #007bff;
}

/* Smooth page transitions */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Enhanced carousel */
.carousel-item {
    transition: transform 0.6s ease-in-out;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
}

/* Back to top button enhancement */
#back-to-top {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgb(3, 59, 3), rgb(4, 44, 3));
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

