/* Color Variables */
:root {
    --primary-color: #FFFFFF; /* White - Navbar background */
    --secondary-color: #2E4169; /* Dark Blue - Uniform shirts/dresses */
    --accent-color: #101511; /* Dark Grey - Text */
    --neutral-color: #4B5EAA; /* Medium Grey - Borders */
    --highlight-color: #4169E1; /* Blue - Active states */
    --text-color: #191616; /* Dark Brown - Fallback text */
    --red-color: #D32F2F; /* Soft Red for borders/fill */
}

/* Navbar General */
.navbar {
    background-color: var(--primary-color);
    padding: 10px 0; /* Added vertical padding */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Navbar Container */
.navbar-container {
    display: grid;
    grid-template-columns: auto 1fr; /* First column for logo, second for navigation (at least 65%) */
    grid-template-areas:
        "logo divider nav"
        ". . nav";
    align-items: center; /* Corrected from 'right' to 'center' */
    width: 100%;
    padding: 0 1rem;
    gap: 1rem; /* Space between columns */
}

/* Logo Styling */
.navbar-brand {
    grid-area: logo;
    display: flex;
    align-items: center; /* Corrected from 'right' to 'center' */
    color: var(--accent-color) !important;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    padding: 10px 0; /* Added vertical padding */
}
.navbar-logo {
    height: 90px;
    width: auto;
    margin-right: 0.25rem;
    vertical-align: middle;
}
.navbar-brand span {
    color: var(--accent-color);
    margin-left: 0.25rem;
}

/* Vertical Divider */
.navbar-divider {
    grid-area: divider;
    width: 1px;
    height: 60px; /* Matches the tallest row height */
    background-color: var(--neutral-color); /* Medium Grey border */
    margin: 0;
}

/* Navigation Grid */
.navbar-nav-grid {
    grid-area: nav;
    display: grid;
    grid-template-rows: auto auto; /* Two rows for top and main navigation */
    width: 65%; /* Ensure at least 65% width */
    min-width: 65%;
    padding: 10px 0; /* Added vertical padding */
}

/* Top Row (Secondary Links) */
.navbar-top-row {
    padding: 10px 0; /* Added vertical padding */
    display: flex;
    justify-content: flex-end; /* Maintain right justification */
    align-items: center; /* Corrected from 'right' to 'center' */
    min-height: 40px;
    background-color: var(--primary-color);
}
.navbar-top-row .nav-link {
    color: var(--accent-color) !important;
    font-size: 0.9rem;
    padding: 0.25rem 0.75rem;
    transition: color 0.3s ease;
    text-decoration: none; /* Remove underline */
}
.navbar-top-row .nav-link:hover {
    color: var(--secondary-color) !important; /* Dark Blue hover */
}

/* Boxed Styles for Top Row Links */
.link-boxed-red {
    border: 2px solid var(--red-color); /* Red border */
    border-radius: 4px;
}
.link-boxed-blue {
    border: 2px solid var(--highlight-color); /* Bluish border */
    border-radius: 4px;
}
.link-filled {
    background-color: var(--secondary-color); /* Dark Blue fill */
    color: var(--accent-color) !important; /* Ensure text visibility */
    border-radius: 4px;
    padding: 0.25rem 0.75rem; /* Adjust padding for filled style */
}
.link-filled:hover {
    background-color: var(--highlight-color); /* Blue hover for filled */
    color: var(--accent-color) !important;
}
.navbar-top-row .bi-search {
    font-size: 1rem;
    padding: 0.25rem;
}

/* Main Row (Primary Navigation) */
.navbar-main-row {
    padding: 10px 0; /* Added vertical padding */
}
.navbar-nav {
    justify-content: flex-end; /* Maintain right justification */
    width: 100%;
}
.nav-link {
    color: var(--accent-color) !important;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 2.5rem; /* Adjusted padding for better spacing */
    transition: color 0.3s ease;
}
.nav-link:hover, .nav-link.active {
    color: var(--secondary-color) !important; /* Dark Blue hover */
}
.navbar-nav .dropdown-toggle::after {
    border-color: var(--accent-color);
    vertical-align: middle;
}

/* Dropdown Menus */
.dropdown-menu {
    background-color: var(--secondary-color); /* Dark Blue background */
    border: 1px solid var(--neutral-color); /* Medium Grey border */
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 12rem;
}
.dropdown-item {
    color: var(--primary-color); /* White text */
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
}
.dropdown-item:hover {
    background-color: var(--highlight-color); /* Blue hover */
    color: var(--accent-color); /* Dark Grey text on hover */
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .navbar-container {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0; /* Added vertical padding for mobile */
    }
    .navbar-nav-grid {
        width: 100%;
        min-width: 100%;
        padding: 10px 0; /* Added vertical padding for mobile */
    }
    .navbar-divider {
        display: none; /* Hide divider on mobile */
    }
    .navbar-top-row {
        display: none; /* Hide top row on mobile */
        width: 100%;
        justify-content: flex-end; /* Maintain right justification */
        padding: 10px 0; /* Added vertical padding for mobile */
    }
    .navbar-nav {
        width: 100% !important;
        text-align: right; /* Maintain right alignment */
    }
    .nav-link {
        padding: 0.5rem 1rem;
    }
    .dropdown-menu {
        text-align: right;
        border-radius: 0;
    }
    .navbar-brand {
        margin: 0 auto 0 0;
        padding: 10px 0; /* Added vertical padding for mobile */
    }
    .link-boxed-red, .link-boxed-blue, .link-filled {
        border: none; /* Remove borders on mobile */
        background-color: transparent; /* Reset fill on mobile */
        padding: 0.25rem 0.75rem; /* Reset padding */
        color: var(--accent-color) !important;
    }
}

/* Ensure 65% Width for Main Nav */
@media (min-width: 992px) {
    .navbar-nav-grid {
        min-width: 65%;
    }
    .navbar-brand {
        margin-right: 0;
    }
    .navbar-top-row {
        display: flex;
    }
    .navbar-divider {
        display: block;
    }
}

/* Custom Container (Slightly Wider than Bootstrap Container) */
.custom-container {
    max-width: 1320px; /* Slightly wider than Bootstrap's lg container (1140px) */
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Hero Section */
.hero-section {
    min-height: 80vh;
    display: flex;
    align-items: center; /* Removed justify-content-center to allow left alignment */
    position: relative;
    overflow: hidden;
    padding: 20px 0; /* Added vertical padding */
}

.hero-left-bg {
    position: relative;
    height: 100%;
    padding: 0;
}

.hero-left-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* opacity: 0.3; Lower opacity as requested */
    z-index: 1;
}

.loading-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    z-index: 2;
    background: rgba(46, 65, 105, 0.7);
    padding: 10px 20px;
    border-radius: 5px;
    display: none; /* Hidden by default, shown during loading */
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 20px; /* Space between left image and content */
}

.hero-title {
    font-size: 3.5rem;
    color: var(--primary-color);
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-family: 'Open Sans', sans-serif;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.custom-btn {
    background-color: var(--highlight-color);
    color: var(--primary-color);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 5px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.custom-btn:hover {
    background-color: var(--neutral-color);
    transform: translateY(-2px);
}

/* Floating Card with Carousel */
.floating-card {
    position: absolute;
    top: 20%;
    right: 10%;
    width: 400px;
    background-color: var(--primary-color);
    border: 2px solid var(--neutral-color);
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
    z-index: 10;
    /* Four-sided figure using clip-path (trapezoid shape) */
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    transform-origin: bottom left;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

#heroCarousel .carousel-item img {
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

#heroCarousel .carousel-caption {
    background-color: rgba(46, 65, 105, 0.7);
    color: var(--primary-color);
    padding: 10px;
    border-radius: 5px;
}

#heroCarousel .carousel-caption h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#heroCarousel .carousel-caption p {
    font-size: 0.9rem;
    margin: 0;
}

.carousel-control-prev,
.carousel-control-next {
    filter: invert(1); /* White icons for contrast */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}
/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.section-title:hover {
    color: var(--highlight-color);
}

/* About Section */
.about-text {
    background-color: var(--primary-color);
    border: 1px solid var(--neutral-color);
    border-radius: 10px;
    padding: 20px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.about-text:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.img-fluid {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.img-fluid:hover {
    opacity: 0.9;
}

/* Programs Section */
.custom-block {
    background-color: var(--primary-color);
    border: 1px solid var(--neutral-color);
    border-radius: 10px;
    padding: 20px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.custom-block:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.hover-effect {
    transition: all 0.3s ease;
}

.hover-effect:hover {
    background-color: rgba(255, 255, 255, 0.95);
}

.program-title {
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--secondary-color);
}

.custom-block-image {
    margin-top: 15px;
    border: 1px solid var(--neutral-color);
    padding: 5px;
}

/* General Section Enhancements */
.section-padding {
    padding: 60px 0;
    background-color: var(--primary-color); /* Ensure white background */
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.section-title:hover {
    color: var(--highlight-color);
}

/* Lead Text */
.lead {
    font-size: 1.1rem;
    color: var(--neutral-color);
}

/* Uniform Card */
.uniform-card {
    background-color: var(--primary-color);
    border: 1px solid var(--neutral-color);
    border-radius: 10px;
    padding: 20px; /* Internal padding for content */
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    height: 100%; /* Equal height cards */
    display: flex;
    flex-direction: column;
}

.uniform-card:hover, .hover-effect:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

/* Card Title and Sub-Title */
.card-title {
    font-size: 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.sub-title {
    font-size: 1.2rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--highlight-color);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--neutral-color);
    padding-bottom: 5px;
}

/* Requirements List */
.requirements-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.requirements-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Uniform Description */
.uniform-card p {
    font-size: 0.95rem;
    color: var(--accent-color);
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Note Alert */
.alert-info {
    background-color: rgba(65, 105, 225, 0.1); /* Light blue tint */
    border: 1px solid var(--highlight-color);
    color: var(--secondary-color);
    font-size: 1rem;
}

/* Responsive Adjustments for Uniform Section */
@media (max-width: 991px) {
    .section-padding {
        padding: 40px 0;
    }

    .uniform-card {
        padding: 15px;
        margin-bottom: 20px;
    }

    .card-title {
        font-size: 1.3rem;
    }

    .sub-title {
        font-size: 1.1rem;
    }

    .requirements-list {
        padding-left: 15px;
    }

    .requirements-list li {
        font-size: 0.9rem;
    }

    .alert-info {
        font-size: 0.95rem;
        padding: 10px;
    }
}

@media (max-width: 576px) {
    .col-lg-4 {
        margin-bottom: 20px;
    }
}
/* Image Wrapper (Overlay Card) */
.cmp-homepage-hero__image-wrapper {
    position: relative;
    z-index: 4;
    text-align: center;
    margin-bottom: 20px;
}

.cmp-homepage-hero__image {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
    .cmp-homepage-hero__image {
        max-height: 70vh;
        object-fit: cover;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .cmp-homepage-hero__image {
        max-height: 50vh;
        object-fit: cover;
    }
}

/* Floating Card (Overlay Card with Carousel) */
.floating-card {
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    background-color: var(--primary-color);
    border: 2px solid var(--neutral-color);
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: float 3s ease-in-out infinite;
    z-index: 5;
    clip-path: polygon(10% 0%, 90% 0%, 100% 100%, 0% 100%);
    transform-origin: bottom left;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

#heroCarousel .carousel-item img {
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

#heroCarousel .carousel-caption {
    background-color: rgba(46, 65, 105, 0.7);
    color: var(--primary-color);
    padding: 10px;
    border-radius: 5px;
}

#heroCarousel .carousel-caption h5 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

#heroCarousel .carousel-caption p {
    font-size: 0.9rem;
    margin: 0;
}

.carousel-control-prev,
.carousel-control-next {
    filter: invert(1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero-section {
        min-height: 60vh;
    }

    .hero-content {
        text-align: center;
        padding-right: 0;
        padding-top: 2rem;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-red-shape {
        width: 250px;
        clip-path: polygon(0 0, 100% 0, 80% 100%, 0% 100%);
    }

    .hero-background {
        background: linear-gradient(to bottom, rgba(46, 65, 105, 0.9), rgba(46, 65, 105, 0.3)), url("images/landing/land3.png") center center / cover no-repeat;
    }

    .floating-card {
        position: static;
        width: 100%;
        margin-top: 20px;
        animation: none;
    }

    .cmp-homepage-hero__image-wrapper {
        margin-bottom: 0;
    }
}