html {
  scroll-behavior: smooth; /* Enables smooth scrolling for all anchor links */
}
/* Basic CSS for the navigation bar */
/* --- Navbar Base Styles --- */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
  background-color: transparent; /* Initially transparent */
  box-shadow: none; /* Initially no shadow */
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  box-sizing: border-box;
  transition: background-color 0.4s ease, box-shadow 0.4s ease; /* Smooth transition for background and shadow */
  padding-right: 55px; /* Default padding for larger screens */
}
/* --- Scrolled State for Navbar --- */
.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.85); /* Translucent white when scrolled */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* Add shadow when scrolled */
}
/* --- Navbar Item Styles --- */
.navbar-logo {
  background: white;
  border-radius: 10%;
  max-height: 50px;
  width: auto;
  display: block;
  z-index: 1002; /* Ensure logo is above the mobile menu overlay */
  padding: 0.3rem;
}
.navbar-logo img {
  max-height: 50px;
  width: auto;
  display: block;
}

/* --- Navbar Menu Base Styles --- */
.navbar-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex; /* Default for desktop */
  gap: 25px;
  transition: all 0.3s ease-in-out; /* For smooth opening/closing on mobile */
}

/* Navbar Menu Item & Dropdown Positioning */
.navbar-menu li {
  position: relative; /* Crucial for positioning the dropdown */
  padding: 0; /* Ensure no extra padding on li that would push dropdown */
}

.navbar-menu li a {
  text-decoration: none;
  color: #333; /* Dark text color for transparent background */
  font-size: 1.1rem;
  font-weight: 500;
  padding: 5px 15px; /* Padding for the top-level link */
  transition: color 0.3s ease;
  display: block; /* Make the link a block for easier hover */
}
.navbar-menu li a:hover {
  color: #007bff;
}

/* --- Hamburger Toggler Styles --- */
.hamburger-toggler {
  display: none; /* Hidden by default on large screens */
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001; /* Ensure toggler is above other elements */
  position: relative; /* For the bar animation */
  width: 40px; /* Adjust size */
  height: 35px; /* Adjust size */
  flex-direction: column; /* For vertical stacking of bars */
  justify-content: space-between; /* Space out the bars */
}
.hamburger-toggler .bar {
  display: block;
  width: 100%;
  height: 3px;
  background-color: #333; /* Color of hamburger lines */
  border-radius: 5px;
  transition: all 0.3s ease; /* Smooth transition for bar animation */
}

/* Hamburger 'X' animation */
.hamburger-toggler.open .bar:nth-child(1) {
  transform: translateY(13.5px) rotate(45deg);
}
.hamburger-toggler.open .bar:nth-child(2) {
  opacity: 0; /* Hide middle bar */
}
.hamburger-toggler.open .bar:nth-child(3) {
  transform: translateY(-13.5px) rotate(-45deg);
}


/* --- Dropdown Menu Base Styles --- */
.dropdown-menu {
  list-style: none;
  margin: 0;
  padding: 10px 0; /* Padding inside the dropdown container */
  background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent white */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  position: absolute;
  top: 100%; /* Position below the parent nav item */
  left: 50%; /* Center horizontally */
  transform: translateX(-50%) translateY(10px); /* Start slightly below */
  min-width: 200px; /* Minimum width for dropdown */
  z-index: 1050; /* Higher than navbar, lower than mobile menu */
  line-height: 0.9; /* Line spacing */

  /* Hide by default and transition for smooth appearance */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Show dropdown on hover of the parent li */
.navbar-menu li:hover > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0); /* Slide into place */
}

/* Dropdown Menu Item Styles */
.dropdown-menu li {
  padding: 0; /* Remove padding from dropdown li if necessary */
}

.dropdown-menu li a {
  color: #333;
  padding: 10px 20px; /* Padding for individual dropdown links */
  text-decoration: none;
  display: block; /* Make link fill the space */
  font-size: 1rem;
  white-space: nowrap; /* Prevent text wrapping */
  transition: background-color 0.2s ease, color 0.2s ease;
  font-size: smaller;
}

.dropdown-menu li a:hover {
  background-color: #f0f0f0;
  color: #007bff;
}

/* Specific adjustments for scrolled navbar */
.navbar.scrolled .navbar-menu li a {
    color: #333; /* Ensure text remains dark on scrolled background */
}
.navbar.scrolled .navbar-menu li a:hover {
    color: #007bff; /* Consistent hover color */
}


/* --- Media Queries for Mobile Responsiveness --- */
@media (max-width: 780px) { /* Adjust this breakpoint as needed */
  .navbar {
    padding-right: 10px; /* Adjust padding for smaller screens */
  }

  .hamburger-toggler {
    display: flex; /* Show hamburger on small screens */
  }

  .navbar-menu {
    display: flex; /* Always flex so transition works */
    flex-direction: column; /* Vertical alignment */
    position: fixed; /* Fixed to viewport */
    top: 0;
    right: 0;
    width: 100%; /* Full width */
    height: 100vh; /* Full height */
    background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent background when open */
    justify-content: center; /* Center items vertically */
    align-items: center; /* Center items horizontally */
    gap: 30px; /* More space between items */
    transform: translateX(100%); /* Start off-screen to the right */
    opacity: 0; /* Initially invisible */
    pointer-events: none; /* Do not block clicks when hidden */
    z-index: 999; /* Below toggler but above other content */
  }

/* When navbar-menu itself has 'active' class */
.navbar-menu.active { /* CORRECTED! */
  transform: translateX(0); /* Slide into view */
  opacity: 1; /* Fully visible */
  pointer-events: auto; /* Allow clicks */
}

  .navbar-menu li a {
    font-family: 'Avenir','Montserrat', sans-serif; /* Avenir font */
    font-size: 2rem; /* Big text */
    color: #333; /* Darker color for readability on light background */
    padding: 15px 0; /* More padding for bigger touch targets */
    width: 100%; /* Make links take full width for easier clicking */
    text-align: center; /* Center text */
  }

  /* Hide dropdowns entirely on mobile */
  .dropdown-menu {
    display: none;
  }
}


/* --- Animation Controls (New) --- */
.animation-controls {
  position: absolute;
  bottom: 50px; /* Adjust vertical position as needed, maybe top: 50px; right: 20px; to match old button position */
  right: 20px; /* Keeps it on the right side */
  z-index: 10; /* Ensures it's above canvases */
  display: flex;
  align-items: center; /* Vertically align items */
  gap: 15px; /* Space between buttons and dots */
}

.animation-nav-btn {
  padding: 8px 15px;
  background-color: rgba(0, 123, 182, 0.8); /* Slightly transparent background */
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.5rem; /* Larger arrows */
  font-weight: bold;
  line-height: 1; /* Ensure good alignment */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.animation-nav-btn:hover {
    background-color: #0090e0;
    transform: translateY(-2px);
}

.animation-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.animation-dots {
  display: flex;
  gap: 8px; /* Space between dots */
}

.dot {
  width: 12px; /* Size of the dot */
  height: 12px; /* Size of the dot */
  background-color: rgba(255, 255, 255, 0.5); /* Grey/transparent background */
  border: 1px solid rgba(255, 255, 255, 0.8); /* Slight border for visibility */
  border-radius: 50%;
  transition: background-color 0.3s ease, border-color 0.3s ease;
  cursor: pointer; /* Indicate it's clickable */
}

.dot.active {
  background-color: #007bb6; /* Illuminated color */
  border-color: #007bb6; /* Match border to background */
}

/* Responsive adjustments for the new controls */
@media (max-width: 768px) {
  .animation-controls {
    bottom: 20px; /* Adjust for smaller screens */
    right: 10px;
    gap: 10px;
  }

  .animation-nav-btn {
    padding: 6px 12px;
    font-size: 1.2rem;
  }

  .dot {
    width: 10px;
    height: 10px;
  }
}

/* Color Palette */
:root {
  --hover-particle-color: #00FFFF; /* Bright blue for attracted particles */
  --particle-color: rgba(255, 255, 255, 0.8); /* Default particle color */
  --line-color: rgba(0, 0, 0, 0.2);     /* Default line color */
  /* NEW: Boid colors for the separate section */
  --flocking-particle-color: rgba(0, 100, 255, 0.8); /* Blue for the new section */
  --flocking-line-color: rgba(0, 100, 255, 0.2);
  --flocking-hover-color: #FF69B4; /* Hot pink on hover for new section */
}

/* Specific text color for hero section content when flocking is active */
body.theme-flocking-active #network-animation-section .container {
    color: #e0e0e0; /* Lighter text for hero content */
}

/* --- FLOCKING ANIMATION SECTION STYLES --- */
#flockingCanvas {
  background: linear-gradient(180deg,#4c9be5 0%, rgb(226, 137, 28) 90%, rgb(10, 11, 55) 100%);
  text-align: center;
  overflow: hidden; /* Crucial for containing canvas if it's larger */
  z-index: -3; /* Place behind other content */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  pointer-events: auto; /* Enable pointer events for interaction */
}

/* Keyframes for bounce animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
  }
  40% {
      transform: translateY(-10px);
  }
  60% {
      transform: translateY(-5px);
  }
}


/* General Layout */
body {
  margin: 0;
  font-family: 'Avenir', 'Montserrat', 'Century Gothic', 'Helvetica Neue', sans-serif;
  color: #111;
  background-color: #ffffff57;
  scroll-behavior: smooth;
}

.container {
  width: 90%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

h2 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 2rem;
  text-align: center;
}

/* Hero Section Styling */
#networkCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%; /* Set width to 100% of parent */
  height: 100%; /* Set height to 100% of parent */
  display: block; /* Ensures it's rendered */
  z-index: -1; /* Puts the canvas behind other content */
  pointer-events: auto; /* Enable pointer events on the canvas itself */
}

.hero-section {
  background: #e3dac916;
  background-size: cover;
  height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  margin-top: 0rem;
  z-index: 0;
  pointer-events: none; /* Keep this here for the .hero-section itself */
}

.hero-section .container {
  max-width: 800px; /* Constrain content width */
  padding: 20px;
  pointer-events: auto; /* Re-enable pointer events for content within this container */
  z-index: 2; /* Ensure text content is above canvases */
  position: relative; /* z-index only works on positioned elements */
}

.main-title {
  font-family: 'Avenir', 'Montserrat', sans-serif;
  font-size: 5.5rem; /* Large and impactful */
  color:#000000;
  text-shadow: 0 0 15px rgba(0, 27, 27, 0.35), 0 0 5px rgba(1, 29, 29, 0.2);
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.tagline {
  font-family: 'Avenir', 'Montserrat', 'Open Sans', sans-serif; /* Another clean font */
  font-size: 1.9rem;
  color:#212121;
  margin-top: 0;
  margin-bottom: 1.5rem;
}

.description {
  font-family: Avenir, 'Lato', sans-serif; /* Readable body font */
  font-size: 1.2rem;
  line-height: 1.6;
  color:#232323d6;
  text-shadow: 0 0 15px rgba(0, 27, 27, 0.15), 0 0 5px rgba(1, 29, 29, 0.15);
  max-width: 600px;
  margin: 0 auto;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
  .main-title {
      font-size: 3rem; /* Smaller on tablets */
  }
  .tagline {
      font-size: 1.4rem;
  }
  .description {
      font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .main-title {
      font-size: 2.2rem; /* Even smaller on phones */
  }
  .tagline {
      font-size: 1.1rem;
  }
  .hero-section .container {
      padding: 15px;
  }
}

/*About us section*/
#about-us p {
  text-align: justify;
  line-height: 1.75;
  font-size: 16px;
}

/* Research areas Section */

/*Research areas menu*/
.research-menu {
  list-style: none;
  padding: 0;
  margin-bottom: 3rem; /* Increased spacing for a cleaner look */
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem; /* Slightly increased gap for more breathing room */
  justify-content: center;
}

.research-menu li {
  /* Remove fixed width/height for a more flexible, content-driven size */
  background-color: #ffffff; /* Clean white background */
  border-radius: 8px; /* Softer, more modern rounded corners */
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Softer, diffused shadow */
  border: 1px solid #e0e0e0; /* Very subtle, light gray border */
  cursor: pointer;
  display: flex; /* Use flexbox for content centering within the li */
  align-items: center; /* Vertically center content */
  justify-content: center; /* Horizontally center content */
  min-width: 220px; /* Ensure a minimum width, but allow it to grow */
  flex-grow: 1; /* Allow items to grow to fill space */
  max-width: calc(33.333% - 1rem); /* Roughly 3 items per row on larger screens, adjust gap accordingly */
}

.research-menu li:hover {
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.2); /* Subtle blue glow for a professional touch */
  transform: translateY(-2px); /* Gentle lift on hover */
  border-color: #007bff; /* Accent border color on hover */
}

.research-menu a {
  text-decoration: none;
  color: #343a40; /* Darker, more professional text color */
  font-weight: 500;
  font-size: 1.05rem; /* Slightly adjusted font size */
  letter-spacing: 0.3px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 1.2rem 1.8rem; /* More generous padding for a spacious feel */
  white-space: normal;
  word-break: break-word;
  transition: color 0.3s ease;
}

.research-menu a:hover {
  color: #007bff; /* Blue accent on text hover */
}

/* Styles for the "See all" button container */
.see-all-button-container {
  text-align: center;
  margin-top: 3rem; /* Consistent spacing */
  margin-bottom: 3rem;
}

/* --- Specific styles for the "See all / Hide all" button --- */
#showAllResearchAreasBtn {
  background-color: #007bff; /* Primary blue button */
  color: #ffffff;
  font-size: 1.1rem;
  padding: 0.9rem 2.5rem; /* More generous padding */
  border: none;
  border-radius: 30px; /* Slightly more pill-like for the button */
  letter-spacing: 0.5px;
  box-shadow: 0 6px 16px rgba(0, 123, 255, 0.25); /* Professional shadow for the button */
  transition: all 0.3s ease;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}

#showAllResearchAreasBtn:hover {
  background-color: #0069d9; /* Darker blue on hover */
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4); /* Enhanced shadow on hover */
  transform: translateY(-3px);
}

#showAllResearchAreasBtn:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .research-menu li {
    max-width: calc(50% - 0.75rem); /* 2 items per row on medium screens */
  }
}

@media (max-width: 480px) {
  .research-menu li {
    max-width: 100%; /* 1 item per row on small screens */
  }
  .research-menu a {
    padding: 1rem 1.5rem; /* Slightly less padding on smaller screens */
  }
  #showAllResearchAreasBtn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
  }
}



/* --- Research Area Layout --- */

.research-area {
  display: none; /* Hidden by default */
  flex-direction: row; /* Default: image on left, text on right */
  margin: 3.5rem 0; /* More vertical spacing between research areas */
  background-color: #fff;
  border-radius: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;

  /* Align items to the top if their heights are fixed/different */
  align-items: flex-start;
}


/* When a research area has the 'active' class, show it with animation */
.research-area.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}


.image-container {
  flex-shrink: 0; /* Prevents this item from shrinking */
  flex-grow: 0; /* Prevents this item from growing */
  width: 33.33%; /* Set a fixed width relative to parent or a fixed px value */
  
  /* **Fixed height for the image container - adjust as needed** */
  height: 350px; 
  overflow: hidden; /* Hides any content that extends beyond this fixed height */

  /* If you are using background-image as per your HTML: */
  background-size: cover; /* Image covers the container, cropping if needed */
  background-position: center;
  
  opacity: 1.0;
  padding: 3rem; /* Padding for the image container itself */
  
  display: flex; /* Make image container a flex container */
  justify-content: center; /* Center image horizontally */
  align-items: center; /* Center image vertically */
}

/* **IMPORTANT: If you use <img src="..."> tags inside .image-container** */
/* Uncomment and use these styles for the <img> tag: */
/* .image-container img {
  max-width: 100%;
  height: 100%; 
  object-fit: cover; 
  display: block;
  border-radius: 8px; 
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
} */


#foundations .image-container {
  background-position: center top; 
}


.text-container {
  flex: 2; /* This container will still grow to accommodate content horizontally */
  padding: 2.5rem; /* Slightly more padding for text container */
  position: relative;
  background-color: rgba(255, 255, 255, 0.95);
  z-index: 1;
  text-align: justify;

  /* **Crucial: Fixed height and scrollbars for text content** */
  height: 350px; /* **Matches the image container's height** */
  overflow-y: auto; /* Adds scrollbars if content exceeds height */
  -webkit-overflow-scrolling: touch; /* Improves scrolling on iOS */
}

.research-area h3 {
  font-size: 2rem; /* Slightly larger heading */
  margin-bottom: 0.75rem;
  color: #333; /* Darker color for headings */
}

.research-area h4 {
  font-size: 1.25rem; /* Consistent with h5 */
  color: #666; /* Softer color */
  margin-bottom: 1rem;
  font-weight: 400;
}

.research-area h5 {
  font-size: 1.25rem; /* Slightly larger for sub-headings */
  margin-bottom: 1rem;
  font-weight: 500; /* Slightly bolder for emphasis */
  color: #444;
}

.research-area h6 {
  font-size: 1rem;
  margin-bottom: 0rem;
  margin-block-end: 0;
  color: #555;
}

.research-area p {
  line-height: 1.7; /* Better readability */
  color: #333; /* Standard text color */
}

.references-content {
  display: none;
  padding: 1rem 0; /* Add padding for content */
  line-height: 1.7;
  color: #444;
}

.references-header {
  cursor: pointer;
  margin-top: 1.5rem; /* More space above references header */
  margin-bottom: 0.75rem;
  font-weight: 600; /* Bolder */
  color: #555; /* A subtle color */
  font-size: 1.1rem;
  display: flex; /* Make it a flex container to align text and arrow */
  align-items: center; /* Vertically center */
  gap: 8px; /* Space between text and arrow */
  transition: color 0.3s ease;
}

.references-header:hover {
  color: #007bb6; /* Change color on hover */
}

.references-header .down-arrow {
  display: inline-block; /* Ensure arrow is an inline block for transform */
  transition: transform 0.3s ease; /* Smooth rotation */
  font-size: 0.8em; /* Smaller arrow relative to text */
}

.references-header .down-arrow.open {
  transform: rotate(180deg); /* Rotate arrow when open */
}

.description {
  text-align: justify;
}

/* This is often defined globally, but let's assume one for research areas */
#research-areas .container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}


/*Media Queries*/

@media (max-width: 768px) {
  .research-area {
    flex-direction: column;
    padding: 0 1rem;
    align-items: center; /* Align to center when stacked vertically on mobile */
  }

  .image-container {
    padding: 0;
    /* **Fixed height for mobile image container** */
    height: 250px; 
    width: 100%;
    flex: none; /* No flex growth here either */
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    margin-bottom: 1rem;
    overflow: hidden; /* Hide overflow on mobile too */
  }

  /* If you use <img src="..."> tags inside .image-container on mobile */
  /* .image-container img {
      width: 100%;
      height: 100%; 
      max-width: 100%;
      display: block;
      object-fit: cover; 
      object-position: center center;
  } */

  .text-container {
    padding: 0;
    width: 100%;
    flex: none;

    /* **Crucial: Fixed height and scrollbars for text content on mobile** */
    height: 250px; /* **Matches the image container's height on mobile** */
    overflow-y: auto;
  }

  .research-area h3 {
    font-size: 1.5rem;
  }
  .research-area h4, .research-area h5 {
    font-size: 1.1rem;
  }
  .research-area p, .abstract-content p {
    font-size: 0.95rem;
  }
  .abstract-toggle-btn {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }
  .references-header {
    font-size: 1rem;
  }
}



/* Research Groups Section */
.group-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.group-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  width: 100%;
  max-width: 300px;
  background: rgb(255, 255, 255);
  border-radius: 16px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  position: relative;
  max-height: 300px; /* Initial height to show only image/title */
  transition: max-height 0.5s ease;
}

.group-card:hover {
  max-height: 1000px; /* Expands on hover to show full description */
}

.group-card img {
  width: 100%;
  height: auto;
  display: block;
}

.group-card h3 {
  font-size: 1.4rem;
  color: #111;
  padding: 1rem;
}

.group-desc {
  opacity: 0;
  transition: opacity 0.35s ease; /* Adjusted typo from 'ease' to 'ease' */
  height: 0;
  padding: 0 2rem;
  overflow: hidden;
  text-align: justify;
}

.group-card:hover .group-desc {
  opacity: 1;
  height: auto;
  padding: 1rem;
}

/* --- Contact Section --- */
#contact {
  background-color: rgba(169, 29, 29, 0.9);
  font-size: 1.1rem;
  color: #ffffff;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: flex-start;
  padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 2rem);
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.2);
}

#contact h2 {
  font-family: 'Avenir', 'Montserrat', sans-serif;
  font-size: clamp(1.8rem, 3.5vw, 2.2rem);
  margin-bottom: clamp(1rem, 2vw, 1.5rem);
  position: relative;
  padding-bottom: 0.5rem;
  color: #ffffff;
}

#contact h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 50px;
  height: 3px;
  background-color: #67b3ff;
}

#contact p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: #ffffff;
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

#contact strong {
  font-weight: 700;
}

#contact a {
  color: #67b3ff;
  text-decoration: none;
  transition: color 0.3s ease-in-out;
}

#contact a:hover {
  color: #a0d1ff;
  text-decoration: underline;
}

.contact-container {
  flex: 1 1 clamp(280px, 45%, 550px);
  padding: 1.5rem;
  background-color: rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.address-logo-group {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 3vw, 50px);
    margin-top: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: clamp(0.5rem, 1.5vw, 1rem);
    flex-wrap: wrap;
    justify-content: center;
}

.address-logo-group p {
    margin-bottom: 0;
    flex-shrink: 1;
    min-width: 170px;
}

.logoUB {
    max-width: clamp(80px, 15vw, 210px);
    height: auto;
    display: block;
    flex-shrink: 0;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 580px) {
    .address-logo-group {
        flex-direction: column;
        gap: clamp(0.5rem, 1.5vw, 10px);
    }
    .address-logo-group p {
        text-align: center;
    }
    .logoUB {
        margin-left: auto;
        margin-right: auto;
        max-width: clamp(120px, 12vw, 80px);
    }
}

.map {
  flex: 1 1 clamp(280px, 45%, 550px);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.map iframe {
  width: 100%;
  height: 100%;
  min-height: clamp(250px, 40vw, 400px);
  border: none;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  #contact {
    padding: clamp(1.5rem, 3vw, 2rem) clamp(0.8rem, 2vw, 1rem);
    gap: clamp(1rem, 2vw, 1.5rem);
  }
  #contact h2 {
    font-size: clamp(1.6rem, 3vw, 2rem);
    margin-bottom: clamp(0.8rem, 1.5vw, 1rem);
  }
  .contact-container, .map { flex: 1 1 100%; }
  .map iframe { min-height: clamp(200px, 30vw, 250px); }
}

/* Footer (existing) */
footer {
  text-align: center;
  background: #f2f2f2;
  padding: 2rem;
  font-size: 0.9rem;
  color: #888;
  margin-top: 3rem;
  transition: background 0.5s ease, color 0.5s ease;
}