html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    min-height: 100%;
}

.loading-overlay{
    position: fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.6);
    z-index:9999;
    display:flex;
    justify-content:center;
    align-items:center;
}

main {
    flex: 1;
}


.home-sentence{
    text-align: justify;
    text-indent: 7%;
}

/* Remove number input arrows */
#student_num::-webkit-inner-spin-button,
#student_num::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#student_num {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Remove number input arrows */
#rfid_id::-webkit-inner-spin-button,
#rfid_id::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#rfid_id {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Remove number input arrows */
#faculty_num::-webkit-inner-spin-button,
#faculty_num::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#faculty_num {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* Remove number input arrows */
#book_id::-webkit-inner-spin-button,
#book_id::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#book_id {
  -moz-appearance: textfield;
  appearance: textfield;
}

.library-info {
    text-align: center;
    font-weight: bold;
    text-transform: uppercase;
}

.library-image {
    width: 85%;
    height: 600px;
    object-fit: cover;
    border-radius: 12px;
    margin: 0 auto;
   
}

.carousel-item {
    padding: 0 30px;
}

.carousel-control-prev {
    left: 5%;
}

.carousel-control-next {
    right: 5%;
}

.footer {
    text-align: center;
    padding: 1rem;
}

.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown:hover > .btn {
    color: #ffc107 !important; 
}

.dropdown-item:hover {
    background-color: #198754; 
    color: white;
}

.nav-custom:hover {
    color: #ffc107 !important; /* yellow */
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a,
.footer-contact a {
    color: white;
    text-decoration: none;
    font-size: 1.05rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-links a:hover {
    color: #ffcc00;
    padding-left: 6px;
}

.footer-links i,
.footer-contact i {
    color: #ffcc00;
    margin-right: 10px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer-contact a {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact i {
    margin: 4px 0 0;
    font-size: 1.25rem;
}

.footer-contact a:hover {
    color: #ffcc00;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-contact a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer-links {
    text-align: left;
    padding-left: 0;
    
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links li a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.footer-links li a i {
    width: 16px;
    flex: 0 0 16px;
    color: #ffcc00;
    margin: 0;
}


.sitemap-position {
    text-align: left;
    padding-left: 5px; 
}

.contact-position {
    text-align: left;
    padding-left: 5px; 
}


/* HEADER */
.site-header {
    width: 100%;
    background: #198754;
    position: relative;
    z-index: 1000;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    min-height: 90px;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 20px;
}

/* Responsive shared header branding */
.header-brand {
    display: inline-flex;
    flex: 0 1 auto;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    color: #fff;
    text-decoration: none;
}

.header-brand img {
    width: 60px;
    height: auto;
    display: block;
    flex: 0 0 auto;
}

.header-brand span {
    font-size: clamp(.95rem, 2vw, 1.25rem);
    font-weight: 700;
    line-height: 1.2;
}

/* MENU BUTTON*/
.menu-button {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 5px;
}

/* DESKTOP NAVIGATION */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.main-navigation > a,
.main-navigation > .dropdown > button {
    color: white;
    text-decoration: none;
    background: transparent;
    border: none;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
}

/*MOBILE */
@media (max-width: 991px) {

    /* Header remains white */
    .site-header {
        background: #198754;
    }
    .nav-container {
        min-height: 70px;
        padding: 8px 15px;
        background: #198754;
    }
    .header-brand {
        gap: .5rem;
    }

    .header-brand img {
        width: 45px;
    }

    .header-brand span {
        max-width: min(48vw, 13rem);
        font-size: clamp(.85rem, 3vw, 1rem);
    }

    /* MENU BUTTON*/
    .menu-button {
        display: block;
        color: white;
        background: transparent;
        border: none;
        font-size: 32px;
        line-height: 1;
        padding: 5px;
        cursor: pointer;
    }
    .menu-button:hover {
        color: #fff;
    }

    /*  MOBILE NAVIGATION PANEL*/
    .main-navigation {
        display: none;
        position: absolute;
        top: 70px;
        left: 4px;
        right: 4px;
        width: calc(100% - 8px);
        background: #198754;
        flex-direction: column;
        align-items: stretch;
        padding: 5px 0 10px;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
        z-index: 9999;
    }

    /* JS adds .show */
    .main-navigation.show {
        display: flex;
    }

    /* NORMAL LINKS */
    .main-navigation > a {
        color: white !important;
        text-decoration: none;
        background: transparent !important;
        border: none;
        padding: 13px 30px;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
    }
    .main-navigation > a:hover {
        background: #157347 !important;
        color: white !important;
    }

    /* BOOTSTRAP DROPDOWN BUTTONS */
    .main-navigation > .dropdown > button {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        color: white !important;
        background: transparent !important;
        border: none !important;
        padding: 13px 30px;
        font-size: 14px;
        font-weight: 500;
        text-align: left;
    }

    .main-navigation > .dropdown > button:hover,
    .main-navigation > .dropdown > button:focus {
        color: white !important;
        background: #157347 !important;
    }

    /* BOOTSTRAP DROPDOWN MENU*/
    .main-navigation .dropdown-menu {
        position: static !important;
        width: 100%;
        margin: 0 !important;
        padding: 0;
        border: none;
        border-radius: 0;
        background: #157347;
        box-shadow: none;
        transform: none !important;
    }

    .main-navigation .dropdown-menu .dropdown-item {
        color: white !important;
        background: transparent !important;
        padding: 11px 45px;
        font-size: 13px;
    }

    .main-navigation .dropdown-menu .dropdown-item:hover,
    .main-navigation .dropdown-menu .dropdown-item:focus {
        color: white !important;

        background: #12633d !important;
    }

    /*BOOTSTRAP DROPDOWN ARROW */
    .main-navigation .dropdown-toggle::after {
        color: white;
        margin-left: auto;
    }
}

/* TABLET */
@media (max-width: 991px) {
    .library-image {
        width: 100%;
        height: 400px;
        object-fit: contain;
    }

}

/* MOBILE */
@media (max-width: 576px) {
    .library-image {
        width: 100%;
        height: 250px;
        object-fit: contain;
    }
}

/* CAMPUS LIBRARY STAFF*/

.staff-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 50px;
    flex-wrap: wrap;
}

.staff-images img {
    width: 250px;
    height: auto;
    max-width: 100%;
    object-fit: contain;
}


/* Tablet */
@media (max-width: 991px) {
    .staff-images {
        gap: 30px;
    }
    .staff-images img {
        width: 220px;
    }

}

/* Mobile */
@media (max-width: 576px) {
    .staff-images {
        flex-direction: column;
        gap: 20px;
    }
    .staff-images img {
        width: 180px;
    }

}

/* FOOTER LOGO*/
.footer-logo {
    width: 180px;
    height: auto;}


/* Tablet */
@media (max-width: 991px) {
    .footer-logo {
        width: 150px;
    }

}

/* Mobile */
@media (max-width: 576px) {
    .footer-logo {
        width: 130px;
    }

}

/* Smaller text on phones */
@media (max-width: 576px) {
    footer {
        font-size: 12px;
    }
    footer h4 {
        font-size: 16px;
    }
    footer h6 {
        font-size: 12px;
    }
    footer .footer-links a,
    footer .footer-contact a {
        font-size: 12px;
    }
    footer .footer-contact i {
        font-size: 14px;
    }
}

/* ABOUT PAGE */

.org-chart-container {
    display: flex;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.org-chart-image {
    width: 100%;
    max-width: 1100px;
    height: auto;
    display: block;
    object-fit: contain;
}

.org-chart-container {
    padding: 0 clamp(.5rem, 3vw, 1.5rem);
}

.Aboutcard {
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    opacity: 0;
    transform: translateY(25px);
    transition: transform .3s ease, opacity .6s ease, box-shadow .3s ease;
}

.Aboutcard.Showcard {
    opacity: 1;
    transform: translateY(0);
}

.Aboutcard:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
}

.Aboutheading {
    position: relative;
    overflow: hidden;
    padding: 2rem 1rem 1rem;
    text-align: center;
}

.Aboutheading::before {
    position: absolute;
    inset: 0;
    background: url("image/cvsu_statue.jpg") center / cover;
    content: "";
    opacity: .35;
}

.Aboutheading h1,
.Aboutheading h3 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #36454f;
}

.Aboutheading h3 {
    margin-top: .5rem;
    color: #353935;
}

.Aboutcard p {
    flex: 0 0 auto;
    margin: 0;
    padding: 1rem 1.25rem;
    text-align: left;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {
    .nav-container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .library-image {
        height: auto;
        max-height: 250px;
    }

    .Aboutheading {
        padding: 1.5rem 1rem 1rem;
    }

    .Aboutcard p {
        padding: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .Aboutcard {
        opacity: 1;
        transform: none;
        transition: none;
    }
}