:root {
    --light-yellow: #fff9c4;
    --dark-blue: #0d47a1;
    --white: #ffffff;
    --black: #212121;
    --green: #2e7d32;
}

/* Box Loader Styles */
.loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--light-yellow);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader-wrapper.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    display: inline-block;
    width: 30px;
    height: 30px;
    position: relative;
    border: 4px solid var(--dark-blue);
    animation: loader 2s infinite ease;
}

.loader-inner {
    vertical-align: top;
    display: inline-block;
    width: 100%;
    background-color: var(--dark-blue);
    animation: loader-inner 2s infinite ease-in;
}

@keyframes loader {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(180deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(360deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loader-inner {
    0% { height: 0%; }
    25% { height: 0%; }
    50% { height: 100%; }
    75% { height: 100%; }
    100% { height: 0%; }
}

/* Enhanced Box Loader */
.loader {
    position: relative;
    width: 60px;
    height: 60px;
}

.loader-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.loader-line-wrap {
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.loader-line-wrap:nth-child(1) { transform: rotate(0deg); }
.loader-line-wrap:nth-child(2) { transform: rotate(90deg); }
.loader-line-wrap:nth-child(3) { transform: rotate(180deg); }
.loader-line-wrap:nth-child(4) { transform: rotate(270deg); }

.loader-line {
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--dark-blue);
    animation: loader-line 1.5s linear infinite;
}

.loader-line-wrap:nth-child(1) .loader-line { animation-delay: 0s; }
.loader-line-wrap:nth-child(2) .loader-line { animation-delay: 0.1s; }
.loader-line-wrap:nth-child(3) .loader-line { animation-delay: 0.2s; }
.loader-line-wrap:nth-child(4) .loader-line { animation-delay: 0.3s; }

@keyframes loader-line {
    0% {
        transform: scaleY(0);
        opacity: 1;
    }
    50% {
        transform: scaleY(1);
        opacity: 1;
    }
    100% {
        transform: scaleY(0);
        opacity: 0;
    }
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--dark-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.scroll-to-top:hover {
    background-color: var(--green);
    transform: translateY(-3px);
}

.scroll-to-top.show {
    display: block;
}

/* Enhanced Navbar with Hover Dropdowns */
.custom-navbar {
    background-color: var(--dark-blue) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

.custom-navbar.navbar-scrolled {
    padding: 0.3rem 0;
    background-color: rgba(13, 71, 161, 0.98) !important;
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.brand-text {
    color: var(--white);
    font-weight: bold;
    margin-left: 10px;
    font-size: 1.2rem;
}

/* Navbar Toggler */
#navbarToggle {
    border: 1px solid rgba(255,255,255,0.5);
    padding: 0.25rem 0.5rem;
    background: none;
    cursor: pointer;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 30px;
    height: 30px;
    display: inline-block;
}

/* Navbar Links */
.custom-navbar .navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    padding: 0.8rem 1rem !important;
    transition: all 0.3s;
    border-bottom: 2px solid transparent;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-navbar .navbar-nav .nav-link:hover,
.custom-navbar .navbar-nav .nav-link.active {
    color: var(--light-yellow) !important;
    border-bottom: 2px solid var(--light-yellow);
}

/* Dropdown Icon */
.dropdown-icon {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Hover Dropdown Menu - Desktop */
@media (min-width: 992px) {
    .dropdown {
        position: relative;
    }
    
    .dropdown-menu {
        position: absolute;
        background-color: var(--dark-blue);
        border: none;
        border-radius: 0 0 8px 8px;
        margin-top: 0;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        min-width: 220px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 1000;
        display: block !important;
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .dropdown:hover .dropdown-icon {
        transform: rotate(180deg);
    }
}

.dropdown-item {
    color: var(--white);
    padding: 0.8rem 1.5rem;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    text-decoration: none;
    display: block;
}

.dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--light-yellow);
    border-left: 3px solid var(--light-yellow);
}

/* Mobile-specific Styles */
@media (max-width: 991px) {
    .navbar-collapse {
        display: none;
        background-color: var(--dark-blue);
        margin-top: 0.5rem;
        border-radius: 8px;
        padding: 1rem;
    }
    
    .navbar-collapse.show {
        display: block;
    }
    
    .custom-navbar .navbar-nav {
        width: 100%;
    }
    
    .dropdown-menu {
        position: static;
        background-color: rgba(255,255,255,0.05);
        border: none;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        margin-left: 1rem;
    }
    
    .dropdown-menu.show {
        display: block;
    }
    
    .dropdown-item {
        padding: 0.6rem 1.5rem;
        border-left: 2px solid transparent;
    }
    
    .nav-link {
        justify-content: flex-start !important;
    }
    
    .dropdown-icon {
        margin-left: auto;
        transition: transform 0.3s ease;
    }
    
    .dropdown.active .dropdown-icon {
        transform: rotate(180deg);
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    background-color: rgba(13, 71, 161, 0.8);
    padding: 2rem;
    border-radius: 10px;
    max-width: 80%;
    backdrop-filter: blur(5px);
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.hero-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 1rem;
}

.hero-prev, .hero-next {
    background-color: rgba(255, 255, 255, 0.3);
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.hero-prev:hover, .hero-next:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

.hero-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s;
}

.hero-indicator.active {
    background-color: var(--white);
}

/* Main Content */
.section-title {
    color: var(--dark-blue);
    border-bottom: 2px solid var(--light-yellow);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
}

/* Notices Card */
.notices-card {
    border: 1px solid var(--light-yellow);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.notices-card .card-header {
    background-color: var(--dark-blue);
    color: var(--white);
    border-bottom: 3px solid var(--light-yellow);
    padding: 1rem 1.5rem;
}

.notice-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-left: 4px solid transparent;
    transition: all 0.3s;
}

.notice-item:hover {
    border-left: 4px solid var(--green);
    background-color: rgba(255, 249, 196, 0.2);
}

.notice-item:last-child {
    margin-bottom: 0;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid var(--light-yellow);
    border-radius: 10px;
    overflow: hidden;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.service-card .card-title {
    color: var(--dark-blue);
    font-weight: bold;
}

.service-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Event Cards */
.event-card {
    border-left: 4px solid var(--green);
    transition: transform 0.3s;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.event-card:hover {
    transform: translateX(5px);
}

.event-card .card-title {
    color: var(--dark-blue);
    font-weight: bold;
}

/* Footer */
.custom-footer {
    background-color: var(--dark-blue);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.custom-footer h5 {
    color: var(--light-yellow);
    margin-bottom: 1rem;
    font-weight: bold;
}

.custom-footer a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.custom-footer a:hover {
    color: var(--light-yellow);
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    margin-right: 1rem;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--light-yellow);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--light-yellow) 0%, #e6ee9c 100%);
    padding: 3rem 0;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--dark-blue);
}

.page-header h1 {
    color: var(--dark-blue);
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item.active {
    color: var(--dark-blue);
    font-weight: bold;
}

/* Content Cards */
.content-card {
    border: 1px solid var(--light-yellow);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    background: var(--white);
}

.contact-info {
    list-style: none;
    padding: 0;
}

.contact-info li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.contact-info li i {
    color: var(--dark-blue);
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

/* Form Styles */
.contact-form .form-control {
    border: 1px solid var(--light-yellow);
    border-radius: 5px;
    padding: 0.8rem;
    margin-bottom: 1rem;
}

.contact-form .form-control:focus {
    border-color: var(--dark-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 71, 161, 0.25);
}

/* Map Styles */
.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

.map-info {
    background: var(--light-yellow);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1rem;
}

.map-info h4 {
    color: var(--dark-blue);
    margin-bottom: 1rem;
}

.map-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.map-info i {
    color: var(--dark-blue);
    margin-right: 10px;
    width: 20px;
}

/* Gallery Styles */
.gallery-item {
    margin-bottom: 2rem;
}

.gallery-item img {
    border-radius: 8px;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

/* Table Styles */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.info-table th,
.info-table td {
    padding: 1rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.info-table th {
    background-color: var(--dark-blue);
    color: var(--white);
}

.info-table tr:nth-child(even) {
    background-color: rgba(255, 249, 196, 0.3);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-content {
        padding: 1rem;
        max-width: 90%;
    }
    
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .page-header {
        padding: 2rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .map-container iframe {
        height: 300px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        height: 50vh;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .custom-footer {
        padding: 2rem 0 1rem;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .map-container iframe {
        height: 250px;
    }
}