body {
  margin: 0;
  padding: 0;
  padding-top: 56px;
  background-color: #222d52;
  background-image: url(./Images/backgroundIdea1.jpg);
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: #fdffff;
  font-family: "Roboto", sans-serif;
}

/* Nav Settings */
.nav-link {
  color: #fdffff;
}

.navbar-custom {
  background-color: black;
}

.nav-item:hover {
  background-color: #222d52;
  border-radius: 10px;
}

.nav-link:hover {
  color: #d2b68a;
}

/* Forces the hamburger icon color to be visible (using your gold color) */
.navbar-custom .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23D2B68A' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* -------------------- DESKTOP-ONLY FIXES (min-width 992px) -------------------- */
@media (min-width: 992px) {
  /* Preserve original Centered Look on Desktop */
  #navbarSupportedContent .navbar-nav:nth-child(1) {
    /* This overrides the me-auto on desktop and centers the element */
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Balances the centered links on desktop (matches toggler button size) */
  .d-none.d-lg-block {
    width: 48px;
    height: 38px;
  }
}
/* -------------------- MOBILE-ONLY FIXES (max-width 991.98px) -------------------- */
@media (max-width: 991.98px) {
  /* Custom CSS to force social icons side-by-side in the mobile dropdown, aligned to the left */
  .collapse .navbar-nav:last-child {
    display: flex;
    flex-direction: row;
    /* Ensure there is no stray padding to cause misalignment */
    padding-left: 0 !important;
  }

  /* Apply spacing to the right of the first icon only in mobile view */
  .collapse .navbar-nav:last-child .nav-item:first-child {
    margin-right: 15px !important;
  }

  /* Ensure the second icon has no extra margin */
  .collapse .navbar-nav:last-child .nav-item:last-child {
    margin-right: 0 !important;
  }
}

/* Header Settings */
h1 {
  text-align: center;
  font-size: 4rem;
  margin-top: 2rem;
}

h2 {
  text-align: center;
  font-size: 3rem;
  margin-top: 2rem;
}

#period {
  color: #d2b68a;
}

/* Skills Section Settings */
.skills-container {
  border-radius: 10px;
  margin: 50px;
  padding: 50px;
}

/* 1. Wrap the Desktop limits in a Media Query so they don't crush Mobile */
@media (min-width: 992px) {
  .skills-container p {
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
  }

  .skills-container .row.mx-auto {
    max-width: 500px;
    width: 100%;
  }
}

.skills-inner-container {
  max-width: 1500px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* 2. Fix the image "squeeze" globally */
.project-img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  width: 100%;
  max-width: 400px; /* This is fine for desktop */
  display: block;
  margin: 0 auto; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  transition: transform 0.2s ease-in-out;
}

/* 3. Force images to be full-width on Mobile */
@media (max-width: 991px) {
  .project-img {
    max-width: 100% !important; 
    width: 100% !important;
  }
  
  /* This removes the 50px margins on the sides of the homepage on mobile */
  .skills-container {
    margin: 20px 10px !important;
    padding: 20px 10px !important;
  }

  /* Adds spacing between the second skill section and the demo reel on mobile */
  .skills-container .row-cols-1 > .col:last-child {
    margin-bottom: 50px !important;
  }
}

/* Subtle hover effect */
.project-img:hover {
  transform: scale(1.03);
}

/* Subtle hover effect for extra polish */
.project-img:hover {
  transform: scale(1.02);
}

.icon {
  width: 50px;
}

/* Demo Reel Settings */
#demo-reel {
  margin-top: 25px;
  margin-bottom: 75px;
}

.overview {
  position: absolute;
  border-radius: 10px;
  height: 100%;
  width: 100%;
  left: 0;
}

/* Production Page Settings */

/* Main video player container */
#main-video-container {
  margin-bottom: 2rem;
}

/* Aspect ratio container for videos */
.aspect-ratio-container {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 aspect ratio */
}

.aspect-ratio-container iframe,
.aspect-ratio-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
}

.video-thumbnail {
  border-radius: 10px;
}

/* Thumbnail hover effect */
.video-thumbnail:hover {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

/* Tooltip container */
.video-thumbnail-container {
  position: relative;
}

/* Tooltip styling */
.video-thumbnail-container::after {
  content: attr(
    data-title
  ); /* Use the data-title attribute for the tooltip text */
  position: absolute;
  top: 5px; /* Position near the top of the thumbnail */
  left: 5px; /* Position near the left of the thumbnail */
  background-color: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  z-index: 10; /* Ensure the tooltip appears above other elements */
}

/* Show tooltip on hover */
.video-thumbnail-container:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Engineering Page Settings */
.engineering-text p {
  text-align: left !important;
  max-width: 100% !important;
  line-height: 1.8;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Style for the bridge line */
.italic-text {
  font-style: italic;
  opacity: 0.9;
  color: #fdffff;
}

/* Mobile alignment and background box */
@media (max-width: 991px) {
  .engineering-text {
    text-align: center !important;
    background-color: rgba(
      44,
      44,
      44,
      0.7
    ); /* A slightly darker gray/blue looks great on your background */
    padding: 30px; /* Adds space inside the box so text doesn't touch the edges */
    border-radius: 15px; /* Rounds the corners of the box */
    margin-top: 20px; /* Space between the image above and this box */
  }

  /* Remove the background from the individual paragraphs */
  .engineering-text p {
    background-color: transparent !important;
    margin-bottom: 1.5rem;
  }
}

/* Contact Page Settings */
/* Center the icons in the middle of the screen, stacked vertically */
.contact-icons-container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 50vh;
  gap: 125px; /* The space between icons */
}

/* Style the icons */
.contact-icon {
  font-size: 10rem;
  color: #fff;
  text-decoration: none; /* Remove underline */
  transition:
    transform 0.3s ease,
    color 0.3s ease; /* Smooth hover effect */
}

/* Hover effect for icons */
.contact-icon:hover {
  color: #d2b68a;
  transform: scale(1.2); /* Slightly enlarge on hover */
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .contact-icon {
    font-size: 8rem; /* Slightly smaller icons on smaller screens */
  }
}

@media (max-width: 480px) {
  .contact-icon {
    font-size: 5rem; /* Smaller icons for very small screens */
  }
}

/* -------------------- SKILLS BREAKPOINT (865px) -------------------- */
@media (min-width: 865px) {
  .skills-inner-container > .row > .col {
    flex: 0 0 auto;
    width: 50%; /* Skills snap to 2-columns here */
  }
}

/* -------------------- VIDEO BREAKPOINT (991px) -------------------- */
@media (min-width: 991px) {
  .custom-video-row > .col-12 {
    flex: 0 0 auto;
    width: 33.3333%; /* Videos snap to 3-columns here */
  }
}

/* 2. Fix the "Switch" at 660px */
@media (max-width: 660px) {
  .contact-icons-container {
    flex-direction: column; /* Stack them vertically when the screen is too narrow */
    gap: 10px; /* Reduce gap so they don't fly off the screen */
    height: auto; /* Allow the container to grow vertically */
    margin-top: 40px;
  }

  .contact-icon {
    font-size: 6rem !important; /* Make icons a bit smaller for mobile */
  }
}

/* This allows us to center the box ONLY when we want to */
.center-box {
  text-align: center !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-left: auto;
  margin-right: auto;
}

.center-box p {
  text-align: center !important;
}

/* Ensure Engineering page stays Left Aligned */
.engineering-text p {
  text-align: left;
}