/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --body-color: hsl(220, 100%, 97%);
  --body-font: "Montserrat", sans-serif;
  --normal-font-size: .938rem;
  --font-regular: 400;
  --font-semi-bold: 600;
}

/*========== Responsive typography ==========*/
@media screen and (min-width: 1024px) {
  :root {
    --normal-font-size: 1rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/*=============== CAROUSEL ===============*/
.carousel-item img {
  height: 80vh;
  object-fit: cover;
}

@media (max-width: 768px) {
  .carousel-item img {
    height: 60vh;
  }
}

/* FIXED: Removed problematic margin that was causing layout issues */
/* @media (max-width: 768px) {
  .carousel-inner {
    margin-top: 55px !important;
  }
} */

/*=============== IMAGE SCROLLING ===============*/
.scrolling-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.image-track {
  width: max-content;
  display: flex;
  white-space: nowrap;
}

.track {
  display: flex;
  animation: scroll-left 20s linear infinite;
  gap: 20px;
}

.image-track img {
  width: 300px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.paused .track {
  animation-play-state: paused !important;
}

@keyframes scroll-left {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 768px) {
  .image-track img {
    width: 250px;
    height: 160px;
  }

  h2 {
    font-size: 1.75rem;
  }
}

/*=============== CALL AND UP ARROW BUTTON ===============*/
@keyframes blinkSpread {
  0%, 100% {
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.6);
  }
  50% {
    box-shadow: 0 0 20px rgba(0, 123, 255, 1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0;
  }
}

/* REMOVED problematic button style that could affect navbar */
/* @media (max-width: 576px) {
  button {
    width: 100% !important;
  }
} */

/*=============== ANIMATIONS ===============*/
@keyframes fadeInLeft {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  0% {
    opacity: 0;
    transform: translateX(20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 768px) {
  section div {
    flex: 100% !important;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#apply h2 {
  animation: fadeIn 1s;
}

/* Responsive adjustments for apply section */
@media screen and (max-width: 768px) {
  #apply h2 {
    font-size: 1.6rem;
  }
  #apply h3 {
    font-size: 1.2rem;
  }
  #apply p {
    font-size: 0.95rem;
  }
}

/*=============== ANNOUNCEMENT BOX ===============*/
.announcement-container {
  background-color: #ffffff;
  border: 1px solid #000000;
  border-radius: 10px;
  box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
  padding: 5px;
  height: 545px;
}




@media (max-width: 767px) {
  .announcement-container {
    height: auto;
    margin-top: 15px;
  }
}

/* Fixed navbar compatibility */
@media (min-width: 992px) {
  .container-fluid.py-3 {
    margin-top: 58px;
  }
}

/* Mobile view - ensure proper spacing for fixed navbar */
@media (max-width: 576px) {
  .container-fluid.py-3 {
    margin-top: 80px; /* Increased to account for fixed navbar */
    padding: 0px;
    border-radius: 0px;
  }
}

/*=============== CAROUSEL CONTROLS ===============*/
@media (max-width: 768px) {
  .carousel-control-prev,
  .carousel-control-next {
    top: 50% !important;
    transform: translateY(-50%);
    bottom: auto;
    width: 6% !important;
    height: 50px;
    align-items: center;
    justify-content: center;
    display: flex;
  }
}

/*=============== SLIDER RESPONSIVE ===============*/
@media (max-width: 768px) {
  #mainCarousel img {
    height: 260px !important;
  }
  #mainCarousel h1 {
    font-size: 22px !important;
  }
  #mainCarousel p {
    font-size: 14px !important;
  }
  #mainCarousel .carousel-caption {
    padding: 15px !important;
  }
  .col-md-4 div {
    height: auto !important;
  }
}

/* Slider margin top */
@media (min-width: 992px) {
  .row.m-0.align-items-stretch {
    margin-top: 88px !important;
  }
}

/*=============== ANNOUNCEMENT RESPONSIVE ===============*/
@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 auto;
    width: 25.333333% !important;
  }
  .col-md-8 {
    flex: 0 0 auto;
    width: 74.666667%;
  }
}

@media (max-width: 768px) {
  .col-md-4 div[style*="flex-direction: column"] {
    height: auto !important;
    padding: 14px !important;
  }
  .col-md-4 h4 {
    font-size: 19px !important;
    padding: 8px !important;
  }

  /* Force columns to stack on tablets */
  .col-md-8, .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===== Custom Navbar Styling (Final Polished Version) ===== */
.custom-navbar {
    /* background-color: #87ceeb; */
    background: linear-gradient(135deg, #b0e0e6, #87ceeb, #66b2ff);
    /* Skyblue background */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    padding: 0.6rem 1rem;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
}

/* ===== Logo ===== */
.navbar-logo {
    height: 45px;
    width: auto;
}

.logo-text {
    color: #003366;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
}

.logo-text .sub-text {
    display: block;
    font-size: 0.85rem;
    font-weight: 400;
    color: #003366;
}

/* ===== Nav Links ===== */
.navbar-nav .nav-link {
  color: #003366 !important;
  padding: 0.6rem 1rem;
  margin-right: 20px;
  font-weight: 600;
  transition: all 0.3s ease;
}

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

@media (min-width: 769px) {

  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link.active {
   
    border-bottom: 2px solid #003366;
    /* dark navy underline */
    transition: 0.3s ease;
  }
}

/* ===== Dropdown Menu ===== */
.dropdown-menu {
    background-color: #ffffff;
    border: none;
    border-radius: 10px;
    margin-top: 10px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
    padding: 0.5rem 0;
}

.dropdown-item {
    color: #011c35 !important;
    font-weight: 500;
    transition: background 0.3s, color 0.3s;
}

.dropdown-item:hover {
    background-color: #e0f3ff;
    color: #063970 !important;
}

/* ===== Perfected Navbar Toggle (Custom Animated Icon) ===== */
.navbar-toggler {
    border: none !important;
    background: transparent !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    /* align with logo */
    cursor: pointer;
    /* Fixed positioning - stays on right */
    position: relative;
    z-index: 1002;
}

/* Hamburger icon (3 bars) */
.navbar-toggler-icon {
    width: 26px;
    height: 2px;
    background-color: #011c35;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease-in-out;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    width: 26px;
    height: 2px;
    background-color: #011c35;
    left: 0;
    transition: all 0.3s ease-in-out;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    top: 8px;
}
/* Transform into "X" when menu is expanded */
.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
  background: transparent !important;
  box-shadow: none !important;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
    transform: rotate(45deg);
    top: 0;
}

.navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ===== Responsive (Mobile + Tablet) ===== */
@media (max-width: 991px) {
    .navbar-brand {
        display: flex;
        align-items: center;
        flex-shrink: 1;
        overflow: hidden;
    }

    .logo-text {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 150px;
        /* Prevents overflow on very small screens */
    }

    /* Fixed toggle button positioning for small screens */
    .navbar-toggler {
        position: absolute;
        right: 1rem;
        z-index: 1002;
    }

    /* Navbar collapse area - Full width in mobile */
    .navbar-collapse {
        background-color: #87ceeb;
        padding: 1rem 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        width: 100vw; /* Full viewport width */
        margin-left: calc(-50vw + 50%); /* Center relative to viewport */
    }

    /* Center nav links vertically and horizontally on mobile */
    .navbar-nav .nav-link {
        text-align: center;
        padding: 0.8rem;
        width: 100%; /* Full width for each link */
    }

    /* Mobile dropdown menu styling */
    .dropdown-menu {
        background-color: #2ba6d9;
        box-shadow: none;
        border-radius: 0;
        margin-top: 0;
        width: 100%; /* Full width dropdown */
        position: static; /* Don't position absolutely */
        transform: none !important; /* Override Bootstrap transform */
    }

    .dropdown-item {
        text-align: center;
        padding: 0.8rem 1rem;
    }
    main{
      margin-top: 80px;
    }

}

/* Extra small screens */
@media (max-width: 575px) {
    .navbar-toggler {
        right: 0.5rem;
    }

    .navbar-collapse {
        margin-left: calc(-50vw + 50%);
    }
}

/* Main content padding to account for fixed navbar */


/* FIXED: Override problematic carousel margin */
.carousel-inner {
    margin-top: 0 !important;
}
/*sahaya dhana*/
     @media (max-width: 768px) {
       .donation-images img {
         width: 100% !important;
       }
     }


     /*Gallery*/
         .news {
           overflow: hidden;
           border-radius: 12px;
           box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
           cursor: pointer;
           transition: transform 0.3s ease, box-shadow 0.3s ease;
           display: flex;
           align-items: center;
           justify-content: center;
           height: 280px;
           /* uniform height for all */
         }
    
         .news img {
           width: 100%;
           height: 100%;
           object-fit: cover;
           /* ensures full fill without distortion */
           display: block;
           transition: transform 0.3s ease;
           border-radius: 12px;
         }
    
         .news:hover {
           transform: scale(1.03);
           box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
         }
    
         .news:hover img {
           transform: scale(1.08);
         }
    
         @media (max-width: 768px) {
           .news {
             height: 220px;
           }
         }
    
         @media (max-width: 480px) {
           .news {
             height: 180px;
           }
         }
         

         /*to enlarge*/
                 .enlarge-img {
                   cursor: pointer;
                   transition: transform 0.3s ease;
                 }
        
                 .enlarge-img:hover {
                   transform: scale(1.05);
                 }
        
                 /* Popup background */
                 .image-popup {
                   display: none;
                   position: fixed;
                   z-index: 9999;
                   left: 0;
                   top: 0;
                   width: 100%;
                   height: 100%;
                   background: rgba(0, 0, 0, 0.8);
                   justify-content: center;
                   align-items: center;
                 }
        
                 /* Show popup when active */
                 .image-popup.active {
                   display: flex;
                 }
        
                 /* Enlarged image */
                 .image-popup img {
                   max-width: 90%;
                   max-height: 90%;
                   border-radius: 10px;
                   box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
                   animation: zoomIn 0.3s ease;
                 }
        
                 /* Close icon */
                 .close-icon {
                   position: absolute;
                   top: 25px;
                   right: 35px;
                   font-size: 40px;
                   color: white;
                   cursor: pointer;
                   transition: 0.3s;
                 }
        
                 .close-icon:hover {
                   color: #ff5252;
                   transform: scale(1.1);
                 }
        
                 @keyframes zoomIn {
                   from {
                     transform: scale(0.8);
                     opacity: 0;
                   }
        
                   to {
                     transform: scale(1);
                     opacity: 1;
                   }
                 }