body {
    font-family: Arial, sans-serif;
}

header, nav, main, footer {
    padding: 20px;
    text-align: center;
}

@media (max-width: 480px) {
    .gallery-wrapper {
        flex: 0 1 calc(100% - 20px);
    }

    .header-text h1 {
        font-size: 1.2rem;
    }

    .header-content {
        padding: 10px;
        width: 90%;
    }

    .header-logo {
        width: 80px;
        margin-top: 10px;
        position: static;
        transform: none;
    }

    .clock-container {
        flex-direction: column;
        margin: 10px auto;
        padding: 15px;
    }

    .lightbox-content {
        width: 95vw;
        height: 85vh;
    }
}






@media (max-width: 768px) {
    .hero-header {
        height: auto; /* flexible height */
        padding: 10px;
    }
  
    .header-content {
        width: 90%; /* better fit on smaller screens */
        flex-direction: column;
        padding: 10px;
    }
    
    .header-text h1 {
        font-size: 1.2rem;
    }
    
    .header-text h2, .header-text h3 {
        font-size: 0.9rem;
    }
    
    .logo-container {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin-top: 10px;
    }
    
    .header-logo {
        width: 60px;
    }
}


@media (max-width: 1024px) {
    .gallery-wrapper {
        flex: 0 1 calc(33.3% - 20px); /* clearly 3 per row on tablets */
    }
}

@media (max-width: 768px) {
    .gallery-wrapper {
        flex: 0 1 calc(50% - 20px); /* 2 per row clearly on small screens */
    }
}

@media (max-width: 480px) {
    .gallery-wrapper {
        flex: 0 1 100%; /* clearly 1 per row on mobile */
    }
}

@media (max-width: 900px) {
    footer {
        flex-direction: column; /* stacks vertically on small screens */
        text-align: center;
    }
    .contact-info, .map, .clock-container {
        width: 100%;
        margin-bottom: 15px;
    }
    .clock-container {
        transform: none;
        width: 100%;
    }
    .map iframe {
        width: 90%;
        height: 200px;
    }
}

/* Ensure clock fits responsively clearly */
@media (max-width: 825px) {
    .clock-container {
        flex-direction: column;
        padding: 15px;
        width: 100%;
    }
}

@media (max-width: 600px) {
    .sidenav {
        width: 200px; /* Narrower on mobile clearly */
    }
}

@media (max-width: 768px) {
    .lightbox-content {
        width: 95vw; /* clearly better for smaller screens */
        height: 70vh;
    }
}






/* Add more styles as needed */
/****************************************header section **********************************************************/
.hero-header {
    background: url('gallery.jpg') no-repeat center center;
    background-size: cover; /* Keeps it covering fully */
    /*background-position: top center; /* Adjust to keep the focus area */
    color: white;
    padding: 0;
    width: 100%;
    height: 30vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 0;
    z-index:1000000;
    transition: height 0.5s ease-in-out; /* Slower transition for smooth effect */
}


/* Header Content Box */
.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70%;
    height: 12vh;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent overlay */
    padding: 15px;
    border-radius: 10px;
    transition: padding 1.5s ease-in-out; /* Smooth shrinking effect */

}

/* Ensure smooth centering of h1 */
.header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 1.2s ease-in-out;
}

.header-text h1 {
    margin: 0;
    font-size: 1.8rem;
    transition: font-size 1s ease-in-out, transform 1s ease-in-out;
    transform: translateY(0);
}

/* h2 and h3 initial styles */
.header-text h2, .header-text h3 {
    margin: 5px 0;
    font-size: 1.2rem;
    opacity: 1;
    visibility: visible;
    transition: opacity 1.2s ease-in-out, visibility 1.2s ease-in-out;
}


/* Logo Container (Outside the Overlay) */
.logo-container {
    position: absolute;
    right: 55px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%); /* Keeps logo vertically centered */
    transition: opacity 1.5s ease-in-out; /* Smooth fade-out */
}

/* Initial Styles */
.logo-snmg {
    position: absolute;
    right: 77%;
    top: 50%;
    transform: translateY(-50%);
    height: 14vh;
    opacity: 0.85;
    display: flex;
    align-items: center;
    transition: height 1.2s ease-in-out, right 1.2s ease-in-out;
}

.logo-snmg img.logo {
    height: 100%;
    width: auto;
    border-radius: 10px;
    object-fit: contain;
    transition: height 1.2s ease-in-out;
}


.header-logo {
    max-height: auto; /* Adjust based on logo size */
    width: 120px;
}


/* Shrinking Header */
.hero-header.shrink-header {
    height: 10vh; /* Shrinks header when scrolled */
    background-size: cover; /* Keeps background responsive */
}

/* When scrolling, reduce the padding */
.hero-header.shrink-header .header-content {
    padding: 5px;
    height: 8vh;
}

/* Header Text */
.header-text {
    text-align: center;
    transition: opacity 1.5s ease-in-out, transform 1.5s ease-in-out;
}

/* Shrink text size when scrolling */
.hero-header.shrink-header .header-text h1 {
    font-size: 1.2rem; /* Reduce size */
    transform: translateY(27px); /* Adjust slightly down for visual centering */
    position: relative;
    
}

/* Center main text vertically clearly when scrolled */
.hero-header.shrink-header .header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


/* Hide the logo when scrolling */
.hero-header.shrink-header .logo-container {
    opacity: 0;
}

.hero-header.shrink-header .header-text h2,
.hero-header.shrink-header .header-text h3 {
    opacity: 0;
    visibility: hidden;
    
}

/* Hide the logo when scrolling */
.hero-header.shrink-header .logo-snmg {
    height: 8vh;
    right: 79%;
}


/************************************header section end**********************************************************/




/*********************************** Style the navigation menu ****************************************************/
/* Style the top navigation */
.topnav {
    background-color: #ffffff; /* Dark background */
    overflow: visible;
    position: fixed; /* Stay on top */
    width: 98.9%;
    top: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: top 0s ease; /* Smooth transition for any top value adjustments */
}

.topnav a, .dropdown-btn {
    padding: 14px 16px;
    color: rgb(0, 0, 0);
    text-decoration: none;
    display: block;
    transition: background-color 0.00003s;
    z-index: 1000000;
    border-radius: 10px;
    margin-top: 5px;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(112, 109, 109, 0.689);
}

.topnav a:hover, .dropdown-content a:hover {
    background-color: #825732;
    color: rgb(255, 255, 255);
}

/* Dropdown styles */
.dropdown {
    position: relative; /* Necessary for absolute positioning of dropdown content */
}

.menuPanel {
    opacity: 0;
    top: 100%;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 200px;
    pointer-events: none;
    box-shadow: 0px 8px 16px 0 rgba(0, 0, 0, 0.2);
    z-index: 1000001;
}

.menuPanel a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    z-index: 1000001;
}

/* Slide down animation */
.menuPanel.slide-down {
    animation: slideDown 0.4s forwards ease;
    pointer-events: auto;
    opacity: 1;
}
  
/* Slide up animation */
.menuPanel.slide-up {
    animation: slideUp 0.4s forwards ease;
    pointer-events: none;
    opacity: 0;
}
  
@keyframes slideDown {
    0% {
      height: 0;
      opacity: 0;
    }
    100% {
      height: 200px;
      opacity: 1;
    }
}
  
@keyframes slideUp {
    0% {
      height: 200px;
      opacity: 1;
    }
    100% {
      height: 0;
      opacity: 0;
    }
}


.dropdown-icon {
    font-size: 0.75em;
    transition: transform 0.4s ease;
    display: inline-block;   /* Important for transform to work */
    
}



.dropdown-icon.rotate {
    transform: rotate(180deg);
}




/************************************************navigation end************************************************/



/**********************************************scroll to top button************************************************/

#back-to-top-btn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 26px;
    width: 50px;
    height: 50px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    outline: none;
    border: 3px solid #333;
    border-radius: 50%;
    transition: all 0.3s ease-in-out;
    z-index: 999;
}

#back-to-top-btn:hover {
    background-color: #333;
    color: #fff;
}

/* Entrance Animation */
.btnEntrance {
    animation: fadeInUp 0.5s ease-in-out;
}

/* Exit Animation */
.btnExit {
    animation: fadeOutDown 0.3s ease-in-out;
}

/* Keyframes for Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/*******************************************************************gallery section**********************************************************/


  
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    background-color: rgb(172, 225, 245);
    width: 100%;
    margin: 50px auto 0 auto;  /* Top margin = 50px, center horizontally */
    padding: 10px;
    box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.3);
}

/* Wrapper to keep image and caption together */
.gallery-wrapper {
    flex: 0 1 calc(33.33% - 20px); /* Ensure 4 items per row */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Ensures uniform height */
    margin: 10px;
    box-sizing: border-box; /* clearly prevents overflow issues */
}

/* Image box is now a fixed height */
.gallery-item {
    background: #fff;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 95%;
    height: 300px; /* Set uniform height for all */
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px;
}


.gallery-item:hover {
    transform: scale(1.05); /* Slight zoom effect */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
   
}

.gallery-item {
    position: relative; /* Needed for absolute positioning of icon */
    transition: transform 0.6s ease-in-out, box-shadow 0.6s ease-in-out; /* Apply transition to base state */
}


/* Ensure images maintain their aspect ratio */

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensures no cropping */
    border-radius: 10px;
}

/* Dark overlay effect */
.gallery-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.375); /* Dark overlay */
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}


/* Zoom icon overlay */
.gallery-item::after {
    content: "\f002"; /* FontAwesome magnifying glass icon */
    font-family: "FontAwesome"; /* Make sure FontAwesome is included */
    font-size: 2rem;
    color: white;
    background: rgba(0, 0, 0, 0.533); /* Dark semi-transparent background */
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%; /* Circular icon */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0); /* Initially hidden */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
}

/* Show overlay and icon on hover */
.gallery-item:hover::before {
    opacity: 1; /* Darkens the image */
}

/* Show icon on hover */
.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1); /* Smooth zoom-in */
    opacity: 1;
}


.overlay {
    position: fixed; /* covers entire screen */
    display: none; /* Initially hidden */
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6); /* Instant dark overlay */
    z-index: 9998; /* Below the lightbox but above everything else */
    cursor: pointer;
}



/*lightbox*/

.lightbox {
    position: fixed;  /* Ensures it stays in place even when scrolling */
    display: none;
    overflow: auto;
    
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 9999; /* Higher than your header */
    
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.2); /* Initial zoom-out effect */
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}


/* When active, lightbox smoothly appears */
.lightbox.show {
    opacity: 1;
    transform: scale(1); /* Zoom-in effect */
    /*transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out; /* Fade-in effect for lightbox */
    
}

.lightbox-content {
    position: relative;
    width: 80vw;                /* Wider (covers ~70% of the page width) */
    height: 80vh;               /* Taller (covers ~70% of the viewport height) */
    max-width: 1200px;
    max-height: 800px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1919e3;
    border-radius: 12px;
    overflow: hidden;
    top: 50%;                 /* Slight shift upwards */
    left: 40%;
    transform: translate(-50%, -50%);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    z-index: 9999;
    
}

/* Smooth Appearance for Lightbox */
.lightbox.show {
    opacity: 1;
    transform: scale(1);
}



.lightbox-content img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    transition: opacity 0.4s ease-in-out; /* Smooth fade effect */
    cursor: zoom-in;
    user-select: none;
    z-index: 1;
}




.lightbox-prev, .lightbox-next{

    position: absolute;
    background-color: rgb(227, 111, 111);
    color: white;
    padding: 9px;
    top: 45%;
    cursor: pointer;

}

.lightbox-prev{

    left: 0;
}

.lightbox-next{

    right: 0;
}


@media (max-width: 1024px) {
    .gallery-item {
        flex: 1 1 calc(50% - 20px); /* 2 images per row on smaller screens */
    }
}

@media (max-width: 600px) {
    .gallery-item {
        flex: 1 1 calc(100% - 20px); /* 1 image per row on very small screens */
    }
}

/* Caption remains at bottom and aligned properly */
.caption {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 8px;
    margin-top: 10px;
    border-radius: 8px;
    font-size: 14px;
    width: 95%; /* Matches image width */
    max-width: none; /* Remove limit */
}





/* Zoomed state styling */
.lightbox img.zoomed {
    cursor: zoom-out;
    transform: scale(3); /* Zooms image to 200% */
    
}

.lightbox-caption {
    position: absolute;
    bottom: 10px;
    left: 5%;
    transform: translateX(-50%);
    background-color: rgba(216, 43, 43, 0.96);
    color: #f5f1f1;
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 12px;
    margin-bottom: 15px;
    user-select: none;
    z-index: 2; /* ensures above other content */
    pointer-events: none; /* prevents interference with drag */
    max-width: 90%; /* ensures caption doesn't overflow */
    text-align: center; /* centers caption text clearly */
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}







/**********************************************************Footer section*******************************************************************/

/******************************************************* Footer Styling ************************************************************/
footer {
    background: linear-gradient(135deg, #595959, #323233,#060606); /* Gradient Background */
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between; /* Keeps contact, clock, and map in one row */
    align-items: center; /* Centers everything vertically */
    border-radius: 15px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

/* Contact Info */
.contact-info {
    flex: 1;
    text-align: left;
}












/* Right Section: Map */
.map {
    text-align: right;
}

.map iframe {
    width: 30vw;  /* Ensures it adapts inside the footer */
    height: 200px; /* Adjust this as needed */
    border-radius: 15px; /* Keeps rounded corners */
}


@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}




.map img {
    border-radius: 15px; /* Rounded corners for the map */
}

/* Styles for the digital clock are included in the body of the HTML */


.rounded-social-buttons {
    
    text-align: left;
}

.rounded-social-buttons .social-button {
    display: inline-block;
    position: relative;
    cursor: pointer;
    width: 3.125rem;
    height: 3.125rem;
    border: 0.125rem solid transparent;
    padding: 0;
    text-decoration: none;
    text-align: center;
    color: #fefefe;
    font-size: 1.5625rem;
    line-height: 2em;
    border-radius: 1.6875rem;
    transition: all 0.5s ease;
    margin-right: 0.25rem;
    margin-bottom: 0.25rem;
}

.rounded-social-buttons .social-button:hover, .rounded-social-buttons .social-button:focus {
    transform: rotate(360deg);
    color: #fefefe;
    background: transparent;
    border-color: #fefefe;
}

.rounded-social-buttons .fa-linkedin, .google-scholar img {
    font-size: 25px;
}

.rounded-social-buttons .social-button.linkedin {
    background: #007bb5;
}

.rounded-social-buttons .social-button.linkedin:hover, .rounded-social-buttons .social-button.linkedin:focus {
    color: #007bb5;
    background: #fefefe;
    border-color: #007bb5;
}

.rounded-social-buttons .social-button.google-scholar {
    background: black;
}

.rounded-social-buttons .social-button.google-scholar:hover, .rounded-social-buttons .social-button.google-scholar:focus {
    color: black;
    background: #fefefe;
    border-color: black;
}

.clock-container {
    margin-top: 30px;
    background-color: #080808;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 1px 1px 5px rgba(255,255,255,0.15),
                0 15px 90px 30px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-family: 'Montserrat', sans-serif;
    transform: translateX(-100px);
}
  
  .clock-col {
    text-align: center;
    margin: 0 8px;
    min-width: 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
  
  .clock-col:not(:last-child)::after {
    content: ':';
    color: rgba(255,255,255,0.5);
    font-size: 2rem;
    position: absolute;
    top: 20%;
    right: -14px;
    transform: translateY(-50%);
  }
  
  .clock-timer {
    font-size: 2rem;
    margin: 0;
    line-height: 1;
  }
  
  .clock-label {
    color: rgba(255,255,255,0.5);
    font-size: 0.9rem;
    margin-top: 6px;
  }
  
  .clock-col:last-child::after {
    display: none;
  }
  

.site-footer {
    width: 100%;
    background-color: #2f0aa000; /* Dark footer background */
    color: #ffffff;            /* White text */
    text-align: center;
    padding: 15px 10px;
    font-size: 0.9rem;
    position: relative;
    bottom: 0;
    margin-top: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}






  