/* Optimized font loading with font-display: swap */
@import url('https://fonts.cdnfonts.com/css/nero?display=swap');

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

body,
html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  touch-action: manipulation; /* Improves touch response */
}

.section {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-bottom: 1px solid #f8f8f8;
}

.bg {
  position: absolute;
  inset: 0;
  background: url("Hero Section/Background.jpg") no-repeat center center/cover;
  transform: scale(1.1);
  z-index: -2;
}

/* ADD THIS CSS TO CREATE A DARK OVERLAY */
.bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.6); /* Adjust the 0.6 value to control darkness (0.0 to 1.0) */
}

/* NEW RULE FOR THE CANVAS */
#cometCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1; /* Place it between the bg image (-2) and the content (z-index 6+) */
  pointer-events: none; /* Allows clicks to pass through to elements behind it */
}

/* Title */
.title {
  font-family: 'Nero', sans-serif;
  font-size: 10vw;
  color: #e0f7fa; /* Light cyan color for better visibility */
  text-shadow: 0 0 10px rgba(0, 231, 255, 0.5); /* Cyan glow effect */
  text-align: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  transition-delay: 0.8s;
}

/* Remove glow effect on logo for mobile devices */
@media screen and (max-width: 768px) {
  .title {
    text-shadow: none; /* Remove glow effect on mobile */
  }
}

/* Optimized floating animations with hardware acceleration */
@keyframes float-big {
  0% { transform: translate3d(0, 0, 0) rotate(30deg); }
  50% { transform: translate3d(0, -25px, 0) rotate(30deg); }
  100% { transform: translate3d(0, 0, 0) rotate(30deg); }
}

@keyframes float-big-right {
  0% { transform: translate3d(0, 0, 0) rotate(-30deg); }
  50% { transform: translate3d(0, -25px, 0) rotate(-30deg); }
  100% { transform: translate3d(0, 0, 0) rotate(-30deg); }
}

@keyframes float {
  0% { transform: translate3d(0, 0, 0) rotate(-5deg); }
  50% { transform: translate3d(0, -15px, 0) rotate(-5deg); }
  100% { transform: translate3d(0, 0, 0) rotate(-5deg); }
}

@keyframes float2 {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -20px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

@keyframes float3 {
  0% { transform: translate3d(0, 0, 0) rotate(17deg); }
  50% { transform: translate3d(0, -15px, 0) rotate(17deg); }
  100% { transform: translate3d(0, 0, 0) rotate(17deg); }
}

@keyframes float4 {
  0% { transform: translate3d(0, 0, 0) rotate(-120deg); }
  50% { transform: translate3d(-30px, 0, 0) rotate(-120deg); }
  100% { transform: translate3d(0, 0, 0) rotate(-120deg); }
}
/* Astroid Left - Optimized */
.astroid-left {
  position: absolute;
  bottom: -15%;
  left: -15%;
  width: 1200px;
  max-width: 90vw;
  transform: rotate(30deg);
  animation: float-big 6s ease-in-out infinite;
  will-change: transform; /* Hardware acceleration hint */
}

/* Astroid Right - Optimized */
.astroid-right {
  position: absolute;
  bottom: -15%;
  right: -15%;
  width: 1200px;
  max-width: 90vw;
  transform: rotate(-30deg);
  animation: float-big-right 6s ease-in-out infinite;
  will-change: transform;
}

/* Astronaut - Optimized */
.astronaut {
  position: absolute;
  bottom: -4%;
  left: -4%;
  transform: rotate(70deg);
  width: 600px;
  max-width: 90vw;
  animation: float 4s ease-in-out infinite;
  will-change: transform;
}

/* Astroid-1 - Optimized */
.astroid1 {
  position: absolute;
  top: 40%;
  left: 60%;
  width: 350px;
  max-width: 50vw;
  animation: float2 5s ease-in-out infinite;
  will-change: transform;
}

/* Event names styling */
.event-name {
  display: block;
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: #e0f7fa; /* Light cyan color for better visibility */
  text-shadow: 0 0 10px rgba(0, 231, 255, 0.8), 0 0 20px rgba(0, 231, 255, 0.4); /* Enhanced cyan glow effect */
  font-family: 'Nero', sans-serif;
  font-size: 1rem;
  text-align: center;
  white-space: nowrap;
  z-index: 20;
  font-weight: 600;
  letter-spacing: 0.5px;
  opacity: 1;
  transition: transform 0.3s ease, text-shadow 0.3s ease;
}

.grid-container a:hover .event-name {
  transform: translateX(-50%) translateY(-5px);
  text-shadow: 0 0 15px rgba(0, 231, 255, 1), 0 0 25px rgba(0, 231, 255, 0.6);
}

/* Grid container and items styling */
.grid-container {
  position: relative;
  z-index: 10;
}

.grid-row-1, .grid-row-2, .grid-row-3, .grid-row-4 {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 0px;
}

.grid-container a {
  position: relative;
  display: inline-block;
  margin: 0 10px;
  transition: transform 0.3s ease;
}

.grid-container a:hover {
  transform: translateY(-5px);
}

.grid-item {
  border-radius: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(12, 10, 10, 0.914);
}

.grid-container a:hover .grid-item {
  box-shadow: 0 0 3px rgb(252, 252, 252);
}

/* --- Enhanced Responsive Tweaks --- */
@media (max-width: 1024px) {
  .title { 
    font-size: 12vw; 
  }
  .astronaut { 
    width: 70vw; bottom: 35%; left: -20%; 
  }
  .astroid1 { 
    width: 40vw; top: 55%; left: 65%; 
  }
  .astroid-left { 
    width: 80vw; bottom: -5%; right: -50%; 
  }
  .astroid-right { 
    width: 80vw; bottom: 5%; right: -50%; 
  }
  
  /* Reduce animation complexity on mid-size screens */
  .astronaut, .astroid1, .astroid-left, .astroid-right {
    animation-duration: 8s; /* Slower animations for better performance */
  }
}

/* Enhanced mobile responsiveness, especially for Android */
@media (max-width: 600px) {
  .title { 
    font-size: 16vw;
  }
  .astronaut { 
    width: 76vw; bottom: -4%; left: -15%; 
  }
  .astroid1 { 
    width: 50vw; top: 20%; left: 55%; 
  }
  .astroid-left { 
    width: 0; bottom: 2%; left: -30%; 
    display: none; /* Hide on mobile for better performance */
  }
  .astroid-right { 
    width: 100vw; bottom: -10%; right: -10%;
  }
  
  /* Further reduce animation complexity on small screens */
  .astronaut, .astroid1, .astroid-right {
    animation-duration: 10s; /* Even slower animations for mobile */
  }
  
  /* Improve touch targets for mobile */
  .grid-item {
    min-width: 80px;
    min-height: 80px;
  }
  
  /* Adjust grid layout for mobile */
  .grid-container {
    padding: 10px;
  }
  
  .grid-row-1, .grid-row-2 {
    gap: 10px;
  }
}

/* Specific Android fixes */
@media screen and (-webkit-min-device-pixel-ratio: 2) {
  body {
    -webkit-text-size-adjust: none;
  }
  
  /* Fix for Android Chrome rendering issues */
  .section {
    backface-visibility: hidden;
    perspective: 1000;
  }
}

/* ---------- Optimized Animation Wrappers for Scroll ---------- */
.left-group,
.right-group {
  position: absolute;
  inset: 0;
  pointer-events: none;
  /* Optimized transitions with hardware acceleration */
  transition: transform 1.2s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 1.2s ease-in-out;
  will-change: transform, opacity;
  z-index: 6;
  opacity: 0;
  transform-style: preserve-3d; /* Enable hardware acceleration */
}

/* starting off-screen with hardware acceleration */
.left-group  { transform: translate3d(-120%, 0, 0); }
.right-group { transform: translate3d(120%, 0, 0); }

/* when hero is loaded (on page load / scroll back) - optimized */
.hero.loaded .left-group,
.hero.loaded .right-group {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* Optimized return animation */
.hero.loaded:not(.scrolled) .left-group,
.hero.loaded:not(.scrolled) .right-group {
    transition: transform 0.4s cubic-bezier(0.215, 0.61, 0.355, 1), opacity 0.4s ease-in-out;
}

/* slide out when scrolled to next section - optimized */
.hero.scrolled .left-group  { transform: translate3d(-120%, 0, 0); opacity: 0; }
.hero.scrolled .right-group { transform: translate3d(120%, 0, 0);  opacity: 0; }

/* Images stagger (entrance) */
.hero.loaded .astroid-left  { transition-delay: 0.2s; }
.hero.loaded .astronaut     { transition-delay: 0.4s; }
.hero.loaded .astroid-right { transition-delay: 0.6s; }
.hero.loaded .astroid1      { transition-delay: 0.8s; }

/* Images stagger (exit) */
.hero.scrolled .astroid-left  { transition-delay: 0.8s; }
.hero.scrolled .astronaut     { transition-delay: 0.6s; }
.hero.scrolled .astroid-right { transition-delay: 0.4s; }
.hero.scrolled .astroid1      { transition-delay: 0.2s; }

/* Title stays simple (no stagger) */
.hero.loaded .title {
  opacity: 1;
  transform: translateY(0);
}

.hero.scrolled .title {
  opacity: 0;
  transform: translateY(0);
}

/* Mouse Scroll Indicator */
.scroll-indicator.mouse-scroll {
    position: absolute;
    bottom: 30px; /* Position it 30px from the bottom of its parent container */
    left: 50%; /* Start at the horizontal center */
    transform: translateX(-50%); /* Shift it back by half its own width */
    z-index: 10;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    width: 30px;
    height: 50px;
}

/* Make it visible when its section is loaded */
.hero.loaded .scroll-indicator,
.second.loaded .scroll-indicator {
    opacity: 1;
}

.mouse-shell {
    width: 80%;
    height: 80%;
    border: 2px solid white;
    border-radius: 50px;
    position: relative;
}

.mouse-thumb {
    width: 30%;
    height: 15%;
    background-color: #A9A9A9;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 20px;
    animation: scroll-thumb-animation 2s infinite ease-in-out;
}

@keyframes scroll-thumb-animation {
    0% { top: 10px; }
    50% { top: 50%; } /* Moves thumb to the bottom of the track */
    100% { top: 10px; }
}

/* --- Section Two Styles --- */
.second {
  position: relative;
  background-color: #0d0d0d;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* Use min-height for better flexibility on different screen sizes */
  min-height: 100vh;
  /* UPDATED: Removed overflow-y: auto from here */
  overflow-y: hidden;
}



#skyCanvas {
  position: absolute;
  inset: 0;
  top: -30%;
  height: 90%;
  z-index: 0;
}

.bg-second {
  position: absolute;
  inset: 0;
  background: url("Dep_Select/background.webp") no-repeat center center/cover;
  transform: scale(1.1);
  opacity: 0.8;
  z-index: 0;
}

/* Container for scroll-in animation */
.left-group-2,
.right-group-2 {
  position: absolute;
  top: 0;
  bottom: 0;
  pointer-events: none;
  transition: transform 0.4s ease-in-out, opacity 1.5s ease-in-out;
  will-change: transform, opacity;
  opacity: 0;
  z-index: 0;
}

/* Starting positions off-screen */
.left-group-2 {
  left: 0;
  top: 60%;
  transform: translateX(-120%);
}

.right-group-2 {
  right: -10%;
  top: 5%;
  transform: translateX(120%);
}

/* When the 'second' section is visible, they slide into place */
.second.loaded .left-group-2,
.second.loaded .right-group-2 {
  transform: translateX(0);
  opacity: 1;
}

/* NEW: Slide out when scrolling to the next section */
.second.scrolled-out .left-group-2 {
  transform: translateX(-120%);
  opacity: 0;
}

.second.scrolled-out .right-group-2 {
  transform: translateX(120%);
  opacity: 0;
}

/* Individual element styles and floating animations - optimized */
.astronaut-second {
  width: 700px;
  max-width: 90vw;
  z-index: 10;
  transform: rotate(20deg);
  animation: float3 4s ease-in-out infinite;
  will-change: transform;
}

.comet {
  width: 400px;
  max-width: 80vw;
  z-index: 10;
  transform: rotate(-120deg);
  animation: float4 4s ease-in-out infinite;
  will-change: transform;
}

/* Reduce animation complexity on mobile */
@media (max-width: 768px) {
  .astronaut-second {
    width: 500px;
    animation-duration: 8s;
  }
  
  .comet {
    width: 300px;
    animation-duration: 8s;
  }
}

/* Animation keyframes for floating effect */
@keyframes float3 {
  0% { transform: translateY(0) rotate(20deg); }
  50% { transform: translateY(-15px) rotate(20deg); }
  100% { transform: translateY(0) rotate(20deg); }
}

@keyframes float4 {
  0% { transform: translateY(0) rotate(-120deg); }
  50% { transform: translateY(-20px) rotate(-120deg); }
  100% { transform: translateY(0) rotate(-120deg); }
}

/* New CSS to make grid images visible after side elements arrive */
.grid-row-1, .grid-row-2 {
  display: grid;
  gap: 20px;
  justify-content: center;
  align-items: center;
  padding: 20px;
  /* UPDATED: Increased z-index to be sure it's on top */
  z-index: 20; 
  
  /* Start invisible */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
}

/* Set the initial grid layouts for larger screens */
.grid-row-1 {
  /* UPDATED: Changed from a 4-column grid to a centered flexbox layout to align with grid-row-2 */
  display: flex;
  justify-content: center;
  gap: 20px;
  transition-delay: 0.4s;
}

/* Removed previous grid-column rule for grid-row-1 a:first-child */

.grid-row-2 {
  grid-template-columns: repeat(3, 1fr);
  transition-delay: 0.4s;
}

/* When the section is "loaded", make the grids visible */
.second.loaded .grid-row-1, .second.loaded .grid-row-2 {
  opacity: 1;
  transform: translateY(0);
}

.grid-item {
  width: 100%;
  max-width: 350px;
  height: auto;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
  filter: drop-shadow(0 0 10px rgba(7, 7, 7, 0.2));
  border-radius: 10%;
}

.grid-item:hover {
  transform: translateY(-10px) scale(1.05);
  filter: drop-shadow(0 0 15px rgba(54, 34, 34, 0.5));
}

/* Responsive adjustments for section 2 */
@media (max-width: 1024px) {
  .astronaut-second {
    width: 150px;
    /* UPDATED: Adjust left position to not overlap the grid */
    left: 0;
  }
  .comet {
    width: 200px;
    /* UPDATED: Adjust right position to not overlap the grid */
    right: 0;
  }
  /* NEW: Style for the single scrollable container */
  .grid-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* UPDATED: Use scroll instead of auto to always show the scrollbar */
    overflow-y: scroll;
    max-height: 60vh;
    padding: 20px 0;
    width: 90%;
    margin: 0 auto;
    /* UPDATED: Removed padding-right as it is no longer needed with custom scrollbars */
  }
    
    /* ADDED: Custom scrollbar styling for the grid container */
    .grid-container::-webkit-scrollbar {
        width: 8px;
    }
    .grid-container::-webkit-scrollbar-track {
        background: rgba(192, 91, 8, 0.871);
        border-radius: 10px;
    }
    .grid-container::-webkit-scrollbar-thumb {
        background-color: #c1b2b2;
        border-radius: 10px;
    }
    .grid-container::-webkit-scrollbar-thumb:hover {
        background-color: #F59E0B;
    }
  
  /* UPDATED: On mobile, grid-row-1 and grid-row-2 are no longer grids */
  .grid-row-1,
  .grid-row-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0;
    /* ADDED: Added a margin-bottom to create spacing between the two grids */
    margin-bottom: 20px;
  }
}

@media (max-width: 600px) {
  /* NEW: Style for the single scrollable container */
  .grid-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    /* UPDATED: Use scroll instead of auto to always show the scrollbar */
    overflow-y: scroll;
    max-height: 80vh;
    padding: 20px 0;
    width: 60%;
    margin: 0 auto;
    /* UPDATED: Removed padding-right as it is no longer needed with custom scrollbars */
  }
    
    /* ADDED: Custom scrollbar styling for the grid container */
    .grid-container::-webkit-scrollbar {
        width: 2px;
    }
    .grid-container::-webkit-scrollbar-track {
        background: rgba(192, 100, 8, 0.268);
        border-radius: 10px;
       
    }
    .grid-container::-webkit-scrollbar-thumb {
        background-color: #c1b2b2;
        border-radius: 10px;
      
    }
    .grid-container::-webkit-scrollbar-thumb:hover {
        background-color: #F59E0B;
       
    }
  /* UPDATED: On mobile, grid-row-1 and grid-row-2 are no longer grids */
  .grid-row-1,
  .grid-row-2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 0;
    /* ADDED: Added a margin-bottom to create spacing between the two grids */
    margin-bottom: 20px;
  }
  .astronaut-second {
    width: 400px;
  }

  .comet {
    width: 300px;
    
  }

  .left-group-2 {
   top: 75%;
  }

  .right-group-2 {
    right: -30%;
    top: 4%;
  }

  
}
/* --- Section Three Styles --- */
.third {
  position: relative;
  background-color: #0d0d0d;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.bg-third {
  position: absolute;
  inset: 0;
  background: url("Time/background.webp") no-repeat center center/cover;
  transform: scale(1.1);
  opacity: 0.8;
  z-index: 0;
}

#thirdCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.content-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
}

.astronaut-third,
.lines-left,
.line-right,
.big-star-top-left,
.big-star-bottom-right,
.stone-top-right,
.stone-bottom-left,
.saturn,
.first-event-grid,
.second-event-grid {
  position: absolute;
  /* Add transition for scroll-based animation */
  transition: transform 1s ease-in-out, opacity 1s ease-in-out;
  will-change: transform, opacity;
}

/* --- Initial off-screen positions for Section 3 elements --- */
.astronaut-third,
.stone-top-right,
.stone-bottom-left,
.saturn {
  opacity: 0;
}

.astronaut-third {
  bottom: 0;
  left: -10%;
  width: 500px;
  animation: float-astronaut-third 5s ease-in-out infinite;
  transform: translateX(-120%) rotate(10deg); /* Starts off-screen to the left */
}

.lines-left {
  top: 40%;
  left: 15%;
  width: 600px;
  transform: translateY(-50%);
  opacity: 0;
  transform: rotate(90deg);
}

.line-right {
  top: 40%;
  right: 10%;
  width: 600px;
  opacity: 0;
  transform: rotate(90deg);
}


.stone-top-right {
  top: -2%;
  right: -4%;
  width: 250px;
  animation: float-astronaut-third 3s ease-in-out infinite;
  transform: translateY(-120%); /* Starts off-screen to the top */
}

.stone-bottom-left {
  bottom: -10%;
  right: 2%;
  width: 250px;
  animation: float-astronaut-third 7s ease-in-out infinite;
  transform: translateY(120%); /* Starts off-screen to the bottom */
}

.saturn {
  top: -5%;
  left: 0%;
  width: 400px;
  transform: translateY(-120%) rotate(30deg); /* Starts off-screen to the top */
}

/* When the third section is loaded, they all slide in */
.third.loaded .astronaut-third {
  transform: translateX(0) rotate(10deg);
  opacity: 1;
}

.third.loaded .saturn {
  transform: translateY(0) rotate(30deg);
  opacity: 1;
}

.third.loaded .stone-top-right {
  transform: translateY(0);
  opacity: 1;
}

.third.loaded .stone-bottom-left {
  transform: translateY(0);
  opacity: 1;
}

/* NEW: Staggered animation for lines and grids */
.third.loaded .lines-left,
.third.loaded .line-right {
  opacity: 1;
  transition-delay: 0.8s;
}

.third.loaded .first-event-grid,
.third.loaded .second-event-grid {
  opacity: 1;
  transition-delay: 1.2s;
}

/* Floating Animations (retained from your code) */
@keyframes float-astronaut-third {
  0% { transform: translateY(0) rotate(-10deg); }
  50% { transform: translateY(-15px) rotate(-10deg); }
  100% { transform: translateY(0) rotate(-10deg);}
}

/* --- New Title for Section 3 --- */
.title-third {
  font-family: 'Nero', sans-serif;
  font-size: 6vw; /* Adjust the size as needed */
  color: #e0f7fa;
  text-shadow: 0 0 10px rgba(0, 231, 255, 0.5);
  text-align: center;
  z-index: 10;
  position: absolute; /* Position it correctly */
  top: 3%; /* Adjust vertical position */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0; /* Start invisible for the animation */
  transition: opacity 1.2s ease-in-out;
}

/* Make it visible when the section is loaded */
.third.loaded .title-third {
  opacity: 1;
}





/* Shared styles for grid items */
.event-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 8px;
  padding: 15px;
  
  border: 1px solid rgba(255, 255, 255, 0);
}

.event-name {
  font-family: sans-serif;
  font-size: 1vw;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .first-event-grid,
  .second-event-grid {
    position: static;
    transform: none;
    width: 90%;
    margin-bottom: 20px;
  }
  .content-wrapper {
    flex-direction: column;
    justify-content: flex-start;
  }
  .event-name {
    font-size: 2vw;
  }
}

@media (max-width: 600px) {
  .event-name {
    font-size: 5vw;
  }
  .event-time {
    font-size: 3vw;
  }
  .first-event-grid,
  .second-event-grid {
    padding: 15px;
  }
  .stone-top-right {
   width: 150px;
   top: 20%;
   right:-10%;
  }

  .stone-bottom-left {
    width: 130px;
    bottom: 5%;
  }

  .saturn {
    width: 100px;
    top: 3%;
  }
  .astronaut-third {
    width: 150px;
    left: -20%;
  }
  
.scrolling-container {
    display: flex;
    flex-direction: column;   /* stack vertically */
    align-items: flex-start;  /* align left */
    gap: 134px;               /* spacing between lines */
    margin-top: 30%;          /* push down from top */
    left: -5%;                /* shift slightly left */
    position: relative;
    max-height: 60vh;         /* limit height to viewport */
    overflow-y: auto;         /* scroll only if needed */
    scrollbar-width: thin;    /* nicer scroll for Firefox */
  }

  .scrolling-container::-webkit-scrollbar {
    width: 6px;               /* slim scrollbar for WebKit */
  }

  .scrolling-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 4px;
  }

  .lines-left,
  .line-right {
    position: relative;  
    top: auto; left: auto; right: auto;
    width: 300px;
    transform: rotate(90deg);
    opacity: 1;
    flex-shrink: 0;           /* prevent auto-resizing */
  }
  .title-third {
    
    top: 6%;
  }
}
/* ===== Footer Base ===== */
.footer {
  background-color: #0c121e;
  color: #d1d5db;
  padding: 30px 15px;
  border-top: 1px solid #4b5563;
  box-sizing: border-box;
  text-align: center;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ===== Logo Section ===== */
.footer-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 20px;
  position: relative;
}

/* --- Left Logo Group --- */
.existing-logos {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  margin-left: 10%;
}

.existing-logos img {
  height: 120px;
  width: auto;
  border-radius: 50%;
}

/* --- Right Sponsor Logo --- */
.sponsor-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  margin-right: 10%;
}

.sponsor-logo h3 {
  color: #1953f1;
  margin-bottom: 10px;
  font-size: 1.2em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sponsor-logo img {
  height: 120px;
  width: auto;
  border-radius: 50%;
}

/* ===== Footer Content Columns ===== */
.footer-content {
  display: flex;
  justify-content: space-around;
  width: 100%;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.footer-column {
  flex: 1;
  min-width: 220px;
  margin: 10px;
  text-align: left;
}

.footer-column h3 {
  color: #1953f1;
  margin-bottom: 10px;
  font-size: 1.2em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.footer-column p {
  margin: 5px 0;
  color: #9ca3af;
  font-size: 0.9em;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column li {
  margin: 5px 0;
}

.footer-column a {
  color: #9ca3af;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column a:hover {
  color: #f9fafb;
}

/* ===== Footer Bottom ===== */
.footer-bottom {
  text-align: center;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #4b5563;
  width: 100%;
}

.footer-bottom p {
  margin: 5px 0;
  font-size: 0.85em;
  color: #9ca3af;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .footer-logos {
    flex-direction: column;
    gap: 20px;
    align-items: center;
  }

  .existing-logos,
  .sponsor-logo {
    margin: 0;
    align-items: center;
    text-align: center;
  }

  .existing-logos img,
  .sponsor-logo img {
    width: 90px;
    height: 90px;
  }

  .footer-content {
    flex-direction: column;
    align-items: center;
  }

  .footer-column {
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
  }

  .footer-column h3 {
    font-size: 1.05em;
  }
}
