/* ===== Root Variables ===== */
:root {
    --navy-blue: #002B5B;
    --teal: #0096C7;
    --white: #ffffff;
    --light-gray: #f9f8fa;
}

/* ===== Global Styles ===== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* ===== Preloader ===== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}
.preloader.fade-out {
    opacity: 0;
}
.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--light-gray);
    border-top: 5px solid var(--teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Navigation ===== */
.logo-wrapper {
    text-decoration: none;
    line-height: 1;
    padding: 0;
}
.logo-img {
    max-height: 100px;
    height: auto;
}
@media (max-width: 576px) {
    .logo-img { max-height: 70px; }
}
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(205, 245, 248, 0.1);
    transition: all 0.3s ease;
    height: 80px;
}
.navbar.scrolled { padding: 5px 0; }
.navbar-brand {
    font-weight: 700;
    color: var(--navy-blue);
    font-size: 1.8rem;
}
.navbar-brand span { color: var(--teal); }
.nav-link {
    color: var(--navy-blue);
    font-weight: 500;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}
.nav-link:hover { color: var(--teal); }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--teal);
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}
.nav-link:hover::after { width: 100%; }

.dropdown-submenu { position: relative; }
.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
}

/* ===== Dropdown Hover (Desktop) ===== */
@media (min-width: 800px) {
  .navbar .dropdown:hover > .dropdown-menu {
    display: block;
    margin-top: 0;
  }
  .dropdown-submenu:hover > .dropdown-menu {
    display: block;
  }
}

/* Optional: smooth fade-in effect */
.dropdown-menu {
  display: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.navbar .dropdown:hover > .dropdown-menu,
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
  opacity: 1;
}

/* Align second-level dropdown (submenu) to the LEFT side */
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: auto;
  right: 100%;
  margin-top: 0;
  margin-left: 0;
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

/* ===== Hamburger to Close Animation ===== */
.navbar-toggler {
  border: 2px solid var(--white);
  border-radius: 8px;
  padding: 8px;
  transition: all 0.3s ease-in-out;
}
.navbar-toggler-icon {
  position: relative;
  width: 24px;
  height: 2px;
  background: var(--white);
  display: block;
  transition: all 0.3s ease-in-out;
}
.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s ease-in-out;
}
.navbar-toggler-icon::before {
  top: -7px;
}
.navbar-toggler-icon::after {
  top: 7px;
}
.navbar-toggler.active .navbar-toggler-icon {
  background: transparent;
}
.navbar-toggler.active .navbar-toggler-icon::before {
  transform: rotate(45deg);
  top: 0;
}
.navbar-toggler.active .navbar-toggler-icon::after {
  transform: rotate(-45deg);
  top: 0;
}

/* ===== Section Styling ===== */
section { padding: 100px 0; }
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy-blue);
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}
.section-title h2::after {
    content: '';
    position: absolute;
    width: 70px;
    height: 3px;
    background-color: var(--teal);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}
.section-title p {
    color: #6c757d;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== Services Section ===== */
#services {
    background-color: #f8f9fa;
    padding: 60px 0;
}
#services .section-header h2 {
    font-weight: 700;
    font-size: 2.5rem;
}
#services .section-header p {
    color: #666;
    max-width: 600px;
    margin: 10px auto 0;
}
#services .facility-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.3s ease-in-out;
    height: 100%;
}
#services .facility-card:hover {
    transform: translateY(-8px);
}
#services .icon-box {
    width: 70px;
    height: 70px;
    background-color: #007bff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
}
#services .facility-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
    font-weight: 600;
}
#services .facility-card p {
    color: black;
    font-size: 0.95rem;
}

/* ===== About Section ===== */
.about-content {
    display: flex;
    align-items: center;
}
.about-image {
    border: 3px solid #007bff;
    border-radius: 15px;
    padding: 5px;
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.2);
    max-width: 90%;
    margin: auto;
    transition: all 0.3s ease-in-out;
}
.about-image:hover {
    box-shadow: 0 0 30px rgba(0, 123, 255, 0.4);
    transform: scale(1.01);
}
.about-text {
    padding-left: 30px;
}
.about-text h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy-blue);
    margin-bottom: 20px;
}
.about-text p {
    color: black;
    margin-bottom: 20px;
    line-height: 1.8;
}
.about .carousel-inner img {
    height: 350px;
    object-fit: cover;
}
.about .carousel-control-prev-icon,
.about .carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}

/* ===== Contact Section ===== */
.contact { background-color: var(--light-gray); }
.contact-info { margin-bottom: 30px; }
.contact-info-item { display: flex; margin-bottom: 20px; }
.contact-info-icon {
    font-size: 1.5rem;
    color: var(--teal);
    margin-right: 15px;
}
.contact-info-text h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--navy-blue);
    margin-bottom: 5px;
}
.contact-info-text p { color: #6c757d; margin-bottom: 0; }
.contact-form .form-control {
    border: none;
    border-radius: 0;
    border-bottom: 2px solid #ddd;
    padding: 15px 0;
    margin-bottom: 20px;
    background-color: transparent;
    transition: all 0.3s ease;
}
.contact-form .form-control:focus {
    box-shadow: none;
    border-color: var(--teal);
}
.contact-form .btn { width: 100%; padding: 15px; }

/* ===== WhatsApp Button ===== */
.whatsapp-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: all 0.3s ease;
}
.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ===== Footer ===== */
footer {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 50px 0 20px;
}
.footer-logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.footer-logo span { color: var(--teal); }
.footer-text {
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.7);
}
.footer-links h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}
.footer-links h4::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    background-color: var(--teal);
    bottom: 0;
    left: 0;
}
.footer-links ul { list-style: none; padding-left: 0; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s ease;
}
.footer-links ul li a:hover {
    color: var(--teal);
    padding-left: 5px;
}
.social-links {
    margin-top: 20px;
}
.social-links a {
    display: inline-block;
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-top: 10px;
}
.social-links a:hover {
    background-color: var(--teal);
    transform: translateY(-3px);
}
.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 50px;
    color: rgba(255, 255, 255, 0.7);
}

/* ===== Map ===== */
.map-container {
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .navbar {
        background-color: var(--navy-blue) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
        height: auto;
        padding: 10px 15px;
    }
    .navbar-collapse {
        background-color: var(--navy-blue);
        border-radius: 10px;
        padding: 15px;
        margin-top: 10px;
    }
    .nav-link {
        color: var(--white) !important;
        font-weight: 500;
        padding: 10px;
        display: block;
    }
    .nav-link:hover { color: var(--teal) !important; }
    .dropdown-menu {
        background-color: var(--navy-blue);
        border: none;
    }
    .dropdown-item {
        color: var(--white);
    }
    .dropdown-item:hover {
        background-color: var(--teal);
        color: var(--white);
    }
    .logo-img { max-height: 70px; }
    section { padding: 70px 0; }
    .about-content { flex-direction: column; }
    .about-text {
        padding-left: 0;
        margin-top: 30px;
        text-align: center;
    }
}

/* ===== Global Mobile Fixes ===== */
@media (max-width: 768px) {
    body, html {
        width: 100%;
        overflow-x: hidden !important;
    }
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
    .about-content {
        flex-direction: column !important;
        text-align: center;
    }
    .about-image {
        max-width: 100%;
        margin-bottom: 20px;
    }
    .about-text { padding-left: 0; }
    #services .facility-card {
        margin-bottom: 20px;
        padding: 20px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    }
}

/* ===== Footer Mobile Fixes ===== */
@media (max-width: 576px) {
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 18px;
        padding-top: 12px;
        margin-right: 5px;
    }
    footer {
        text-align: center;
    }
    .footer-links ul li a:hover {
        padding-left: 0;
    }
    .spinner {
        width: 45px;
        height: 45px;
        border-width: 4px;
    }
}
