/* Header Improvements for Lubega University Website */

/* Combined Header */
.bg-top {
    background: #0a2e5c;
    /* padding: 8px 0; */
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.bg-top .container {
    max-width: 1400px;
}

.bg-top .row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100%;
    margin: 0;
    flex-wrap: nowrap !important;
}

/* Left Section - Logo (handle both col-md-4 and col-md-10) */
.bg-top .col-md-4,
.bg-top .col-md-10 {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    max-width: 30% !important;
    width: auto !important;
}

/* Right Section - Contacts and Actions (handle both col-lg-8 and col-lg-9) */
.bg-top .col-lg-8,
.bg-top .col-lg-9 {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    max-width: 70% !important;
    width: auto !important;
}

.bg-top .col-lg-8 .row,
.bg-top .col-lg-9 .row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto;
    margin: 0;
    flex-wrap: nowrap !important;
}

/* Logo Section */
.bg-top .navbar-brand img {
    height: 80px !important;
    max-width: 100%;
    object-fit: contain;
}

.bg-top .navbar-brand {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin-left: 10px;
    text-decoration: none;
}

.bg-top .navbar-brand span {
    color: #f4c430;
}

/* Contact Info Section */
.topper {
    /* padding: 2px 6px !important; */
    /* margin: 0 2px; */
    /* background: rgba(255,255,255,0.08); */
    /* border-radius: 3px; */
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center !important;
    margin: 0 5px;
}

.topper:hover {
    /* background: rgba(255,255,255,0.15); */
    transform: translateY(-1px);
}

.topper .icon {
    width: 35px;
    height: 25px;
    background: #f4c430;
    border-radius: 50%;
    margin-right: 5px;
    color: #0a2e5c;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topper .text {
    color: #fff;
    display: flex;
    flex-direction: column;
}

.topper .text span:first-child {
    font-size: 0.55rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    line-height: 1;
}

.topper .text span:last-child {
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

/* Apply Button */
.btn-primary {
    background: #8e3408 !important;
    /* border: none !important; */
    color: #e8ebef !important;
    font-weight: 600;
    /* padding: 4px 12px !important; */
    /* border-radius: 15px; */
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.75rem;
}

.btn-primary:hover {
    background: #e6b528 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(244,196,48,0.4);
}

/* Navigation Bar - Combined with Header */
/* .ftco-navbar-light {
    background: transparent !important;
    padding: 0;
    box-shadow: none;
    position: static;
    z-index: 1000;
} */

.ftco-navbar-light .container {
    max-width: 1400px;
    padding: 0;
}

.ftco-navbar-light .nav-link {
    color: #fff !important;
    font-weight: 500;
    padding: 4px 10px !important;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.85rem;
}

.ftco-navbar-light .nav-link:hover,
.ftco-navbar-light .nav-link.active {
    color: #f4c430 !important;
}

.ftco-navbar-light .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #f4c430;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.ftco-navbar-light .nav-link:hover::after,
.ftco-navbar-light .nav-link.active::after {
    width: 70%;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 8px 0;
    margin-top: 8px;
    border-top: 3px solid #f4c430;
    background: #fff;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    display: block;
    visibility: hidden;
}

.show > .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.dropdown-item {
    padding: 8px 18px;
    color: #0a2e5c;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #f4c430;
    padding-left: 22px;
}

/* Search Form */
.searchform {
    margin-left: 8px;
    display: block !important;
}

/* .searchform .form-group {
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 3px 8px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
} */

.searchform .form-group:focus-within {
    border-color: #f4c430;
    box-shadow: 0 0 0 3px rgba(244,196,48,0.1);
}

.searchform .form-control {
    border: none;
    background: transparent;
    font-size: 0.75rem;
    color: #fff;
    padding: 0;
}

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

.searchform .search {
    background: #f4c430;
    border: none;
    color: #0a2e5c;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.searchform .search:hover {
    background: #e6b528;
    transform: scale(1.1);
}

/* Mobile Menu */
.navbar-toggler {
    border: none;
    padding: 4px 8px;
    background: #f4c430;
    color: #0a2e5c;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 10px;
}

.navbar-toggler:hover {
    background: #e6b528;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.3);
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .bg-top .container {
        flex-direction: column;
        padding: 10px 0;
    }
    
    .bg-top .row {
        flex-direction: column;
        align-items: center;
    }
    
    .bg-top .col-md-10,
    .bg-top .col-lg-9 {
        width: 100%;
        text-align: center;
        margin-bottom: 8px;
    }
    
    .bg-top .navbar-brand {
        margin: 0 10px;
    }
    
    .topper {
        justify-content: center !important;
        margin: 2px;
        width: auto;
    }
    
    .searchform {
        display: block !important;
        margin: 5px 0;
    }
    
    .ftco-navbar-light {
        background: #fff !important;
        padding: 8px 0;
        box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    }
    
    .ftco-navbar-light .nav-link {
        color: #0a2e5c !important;
    }
}

@media (max-width: 767px) {
    .bg-top .navbar-brand img {
        height: 45px !important;
    }
    
    .bg-top .navbar-brand {
        font-size: 1.1rem;
    }
    
    .topper {
        padding: 6px 10px !important;
    }
    
    .topper .icon {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }
    
    .topper .text span:first-child {
        font-size: 0.6rem;
    }
    
    .topper .text span:last-child {
        font-size: 0.7rem;
    }
}



/* Remove extra spacing */
.py-md-6 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.px-9 {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
}

/* Ensure all elements are visible */
.bg-top,
.bg-top * {
    visibility: visible !important;
    opacity: 1 !important;
}

.bg-top .col-md-10,
.bg-top .col-lg-9 {
    display: block !important;
}

/* Uniform Height for Content Boxes */
.blog-entry,
.card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
}

/* Exclude video area from uniform height */
/* .img-video,
.video {
    display: block !important;
    height: auto !important;
    min-height: auto !important;
    top: 65% !important;
} */

/* Increase video area height */
.img-video {
    min-height: 450px !important;
    width: 100% !important;
    position: relative !important;
}







/* Ensure uniform height in grid rows */
.ftco-section .row {
    align-items: stretch !important;
}

.ftco-section .row .col-md-4,
.ftco-section .row .col-md-6,
.ftco-section .row .col-lg-4,
.ftco-section .row .col-md-3 {
    display: flex !important;
    flex-direction: column !important;
}

/* Ensure department headers don't break alignment */
.ftco-section .row .col-md-12 {
    display: block !important;
}

/* Apply to all course cards specifically */
.course {
    display: flex !important;
    flex-direction: column !important;
    min-height: 520px !important;
    height: auto !important;
    position: relative !important;
}

.course .text {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 70px !important;
    position: relative !important;
    min-height: 250px !important;
}

.course .text h3 {
    flex-shrink: 0 !important;
    margin-bottom: 10px !important;
    min-height: 70px !important;
    line-height: 1.3 !important;
}

.course .text p:not(.meta) {
    flex-grow: 1 !important;
    margin-bottom: 10px !important;
    min-height: 90px !important;
}

.course .text .button-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 15px 0 0 0 !important;
}

/* Make blog-entry cards uniform height and align buttons */
.blog-entry {
    display: flex !important;
    flex-direction: column !important;
    min-height: 450px !important;
    height: 100% !important;
    position: relative !important;
}

.blog-entry .text {
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding-bottom: 70px !important;
    position: relative !important;
}

.blog-entry .text h3 {
    flex-shrink: 0 !important;
    margin-bottom: 10px !important;
    min-height: 60px !important;
}

.blog-entry .text p {
    flex-grow: 1 !important;
    margin-bottom: 10px !important;
}

.blog-entry .text .d-flex {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 15px 0 0 0 !important;
}
