/* ===== Global / Layout ===== */
@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
}

@font-face {
  font-family: "Montserrat";
  src: url("../assets/fonts/Montserrat-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-style: italic;
}

@font-face {
  font-family: "ABC Diatype Regular";
  src: url("https://db.onlinewebfonts.com/t/7b1afea76a3ef8f4dbe5a216aa857eb8.eot");
  src: url("https://db.onlinewebfonts.com/t/7b1afea76a3ef8f4dbe5a216aa857eb8.eot?#iefix") format("embedded-opentype"),
       url("https://db.onlinewebfonts.com/t/7b1afea76a3ef8f4dbe5a216aa857eb8.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/7b1afea76a3ef8f4dbe5a216aa857eb8.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/7b1afea76a3ef8f4dbe5a216aa857eb8.ttf") format("truetype"),
       url("https://db.onlinewebfonts.com/t/7b1afea76a3ef8f4dbe5a216aa857eb8.svg#ABC Diatype Regular") format("svg");
}

body {
  font-family: "Montserrat", "ABC Diatype Regular", sans-serif;
  font-size: 3.8rem;
}

@media (max-width: 768px) {
  .custom-padding {
    padding: 0.31rem !important;
  }
}

@media (min-width: 768px) {
  .custom-padding {
    padding: 2.5rem !important;
  }
}

/* ===== Header ===== */
.navbar-brand img {
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.03);
}

.navbar-nav .nav-link,
.list-inline-item a {
  color: black;
  transition: color 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover,
.list-inline-item a:hover {
  color: #5700ff;
}

.list-inline-item a i {
  transition: color 0.3s ease-in-out;
  font-size: 45px;
}

.list-inline-item a:hover i {
  color: #5700ff;
}

@media (max-width: 768px) {
  .mobile-header .navbar-nav {
    display: block;
    width: 100%;
    text-align: left;
    margin-top: 0.5rem;
  }

  .mobile-header .navbar-nav .nav-link {
    padding: 0;
    margin: 0;
  }

  .mobile-header .logo-and-socials {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .mobile-header .navbar-brand {
    margin-bottom: 0;
  }

  .desktop-header {
    display: none;
  }

  .mobile-header .social-icons {
    display: flex;
    gap: 5px;
  }

  .mobile-header .social-icons a {
    color: black;
    transition: color 0.3s ease-in-out;
  }

  .mobile-header .social-icons a:hover {
    color: #5700ff;
  }

  .mobile-header .social-icons a i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    width: 2rem;
    font-size: 2rem;
    line-height: 1;
  }

  .mobile-header .navbar-brand img {
    height: 1.7rem;
    width: auto;
  }
}

@media (min-width: 769px) {
  .mobile-header {
    display: none;
  }

  .desktop-header .list-inline-item {
    margin-left: 15px;
  }

  .desktop-header .navbar-brand img {
    height: 3.0rem;
    width: auto;
  }
}

.api-error {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #ffebee;
  color: #c62828;
  padding: 10px 15px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ===== HomeScreen ===== */
#homescreen-root .container-fluid {
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.homescreen-container {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  position: relative;
  background: #000;
  border-radius: inherit;
}

.media-container {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: inherit;
}

.styled-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.youtube-preview {
  position: relative;
  cursor: pointer;
}

.youtube-thumb {
  filter: brightness(0.85);
  transition: filter 0.3s ease;
}

.youtube-preview:hover .youtube-thumb {
  filter: brightness(1);
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: transform 0.3s ease;
}

.youtube-preview:hover .play-button {
  transform: translate(-50%, -50%) scale(1.1);
}

@media (max-width: 768px) {
  #homescreen-root .container-fluid {
    border-radius: 1rem;
  }

  .homescreen-container {
    height: 80vh;
  }

  .styled-media {
    object-fit: contain;
  }
}

/* ===== Projects Grid ===== */
.project-card {
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 0 1rem white;
}

.project-card-img-container {
  width: 100%;
  height: 35rem;
  border-radius: 1.5rem;
  overflow: hidden;
  position: relative;
}

@media (max-width: 768px) {
  .project-card-img-container {
    height: 250px;
  }
}

.project-card img {
  display: block;
  width: 100%;
  height: 35rem;
  object-fit: cover;
  transition: opacity 0.3s ease-in-out;
  background-color: #f0f0f0;
}

@media (max-width: 768px) {
  .project-card img {
    height: 250px;
  }
}

.project-card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.project-card:hover .project-card-overlay {
  opacity: 1;
}

.project-card:hover img {
  opacity: 0.8;
}

.project-card h5 {
  font-size: 1.5rem;
  text-align: center;
  margin: 0;
}

.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 5px;
  border: 1px solid #f5c6cb;
}

/* ===== About ===== */
.project-image {
  border-radius: 1.5rem;
  width: 550px;
  height: 675px;
  object-fit: cover;
}

@media (max-width: 576px) {
  .project-image {
    width: 388.16px;
    height: 476.13px;
  }
}

.contact-links a {
  display: block;
  color: black;
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 1.7rem;
}

.contact-links a:hover {
  text-decoration: underline;
}

.about-text p {
  font-size: 1.7rem;
}

/* ===== Project Detail / Sections ===== */
.project-container {
  padding: 2rem 0;
}

.project-container h1 {
  font-size: 3rem;
  margin-bottom: 2rem;
  text-align: center;
}

.project-container .media-container {
  margin: 2rem 0;
  border-radius: 1.5rem;
  overflow: hidden;
}

.project-container .no-media {
  text-align: center;
  padding: 2rem;
  background: #f5f5f5;
  border-radius: 8px;
}

.project-container .project-content {
  max-width: 800px;
  margin: 0 auto;
}

.project-container .project-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.section-content {
  margin-bottom: 3rem;
}

.section-content h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.section-content h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #666;
}

.section-content p {
  font-size: 1.7rem;
  line-height: 1.6;
}

.project-presentation {
  margin: 2rem 0;
  font-size: 1.5rem;
}

.loading-spinner,
.error-message {
  text-align: center;
  padding: 2rem;
  font-size: 1.5rem;
}

.error-message {
  color: #d32f2f;
  background: #ffebee;
  border-radius: 4px;
  margin: 1rem 0;
}

/* ===== Navigation ===== */
.text-link {
  color: black;
  transition: color 0.3s ease-in-out;
  cursor: pointer;
}

.text-link:hover {
  color: #5700ff;
}

/* ===== Images Block / Lightbox ===== */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-modal.show {
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-modal .modal-content {
  display: block;
  max-width: 90%;
  max-height: 90vh;
  width: auto;
  height: auto;
  object-fit: contain;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@media only screen and (max-width: 768px) {
  .lightbox-modal .modal-content {
    max-width: 95%;
    max-height: 80vh;
  }

  .project-container h1 {
    font-size: 2rem;
  }

  .project-container .media-container iframe,
  .project-container .media-container video {
    height: 400px;
  }
}

@keyframes zoom {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  z-index: 1001;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: #bbb;
  text-decoration: none;
}

/* ===== Skeleton Loaders ===== */
.skeleton-box {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
  width: 100%;
  height: 35rem;
  border-radius: 1.5rem;
}

@media (max-width: 768px) {
  .skeleton-box {
    height: 250px;
  }
}

.skeleton-box::after {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.5s infinite;
  content: "";
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 1.5rem;
}

.project-presentation .skeleton-box {
  height: 60vh;
}

.image-block .skeleton-box {
  height: 25rem;
  cursor: pointer;
}

.image-block img {
  cursor: pointer;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 1.5rem;
}
