/* Social Navigation Positioning */
.social-nav {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  z-index: 50;
}
.social-container {
  display: flex;
  align-items: end;
  flex-direction: column;
  gap: 4px;
}
.social-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  padding: 0;
  gap: 4px;
  list-style: none;
}

/* icon styles */
.info-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  color:var(--primary, #1108BB);
  text-decoration: none;
  transition: all 0.3s ease;
}

.info-icon:hover {
  color: var(--secondary);
  transform: scale(1.05);
  cursor: pointer;
  border: var(--primary, #1108BB) 2px solid;
}

.i-icon {
  width: 20px;
  height: 20px;
  display: block;
  color: var(--secondary, #FFF9EE);
}

.info-icon:hover .i-icon {
  color: var(--primary, #1108BB);
}

.close-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 38px;
  height: 38px;
  background: var(--primary);
  border-radius: 50%;
  border: var(--primary) 2px solid;
  color: var(--secondary, #FFF9EE);
  transition: all 0.3s ease;
}

.close-button svg {
  width: 100%;
  height: 100%;
  display: block;
}

.close-button:hover {
  background: var(--secondary, #FFF9EE);
  color: var(--primary, #1108BB);
  border: var(--secondary, #FFF9EE) 2px solid;
  cursor: pointer;
  transform: scale(1.05);
}

.close-header {
  display: none;
}

.close-social {
  display: flex;
}
/* social icon styles */
.social-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary, #1108BB); 
  border-radius: 50%;
  background-color: var(--secondary, #FFF9EE);
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background-color: var(--primary);
  color: var(--secondary);
  transform: scale(1.05);
}

.social-link svg {
  width: 20px;
  height: 20px;
  display: block;
  color: inherit;
}

/* Ultramarine theme */
body.night-mode .social-link {
  border: var(--secondary, #FFF9EE) 2px solid;
  color: var(--secondary, #FFF9EE);
  background-color: var(--primary, #1108BB);
}

body.night-mode .social-link:hover {
  background-color: var(--secondary, #FFF9EE);
  color: var(--primary, #1108BB);
  transform: scale(1.05);
}

body.night-mode .info-icon{
  display: none;
  border: var(--secondary, #FFF9EE) 2px solid;
  background-color: var(--secondary);
  color: var(--secondary, #FFF9EE);
}

body.night-mode .i-icon{
  color: var(--primary, #1108BB);
  transition: all 0.2s ease;
}

body.night-mode .info-icon:hover {
  color: var(--primary, #1108BB); ;
  transform: scale(1.05);
}

body.night-mode .info-icon:hover .i-icon{
  color: var(--secondary, #FFF9EE);
}

@media (max-width: 768px) {
   .social-grid {
     grid-template-rows: 1fr;
     grid-template-columns: repeat(6, 1fr);
     gap: 8px;
   }  
   .social-container {
     flex-direction: row;
     gap: 8px;
   }  
   .social-list {
     flex-direction: row;
     gap: 5px;
   }  
   .social-link, .info-icon {
     width: 42px;
     height: 42px;
   }  
   .social-nav {
     align-items: center;
     flex-direction: column-reverse;
     gap: 10px;
   }
   .close-button {
    width: 44px;
    height: 44px;
   }
   .close-header {
     display: none;
   }

   .close-social {
     display: flex;
   }

   /* Optionally hide info icon on mobile */
   body.night-mode .info-icon {
     display: none;
   }
}

@media (max-width: 480px) {
    .social-nav {
      flex-wrap: wrap;
      justify-content: center;
      gap: 0;
      align-content: center;
    }

    .social-link, .info-icon {
      width: 36px;
      height: 36px;
    }  

    .close-button {
      width: 38px;
      height: 38px;
     }
}