@import url("fonts.css");

:root {
  /* Fuentes cargadas previamente: “Montserrat-Bold” y “Poppins-Regular” */
  --color-titles: #333333;
  --color-texto: #444;
}

/* ——— PROJECT SECTION ——— */
.project-section {
  background: white;
  width: 100%;
  max-width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: fit-content;
  margin: 0;
  padding: 0px;
}
.project-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}
.project-content-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 80%;
  margin-top: 40px;
}
.project-text-block {
  padding-left: 40px;
  padding-right: 15px;
}
.project-text-block .project-headline {
  font-family: "Montserrat-Bold";
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 0.4rem;
  color: var(--color-titles);
}
.project-stats {
  display: flex;
  gap: 20px;
  width: 100%;
  margin-bottom: 0.2rem;
  position: relative;
  left: -10px;
  padding-right: 20%;
}
.project-stats div {
  text-align: center;
  padding: 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 0.2rem;
}
.project-stat-value {
  font-size: 1.3rem;
  font-weight: bold;
  color: black;
  line-height: 1.2;
}

.project-description {
  line-height: 1.6;
  padding-bottom: 0.5rem;
  font-family: "Poppins-Regular";
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-texto);
  padding-right: 15px;
}
.project-image-block {
  position: relative;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  height: 450px;
}
.project-image-disclaimer {
  padding: 1rem;
  background: #d4d4d4;
  font-family: "Roboto-Regular";
  color: var(--color-texto);
  font-size: 0.9rem;
}
.project-carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: grab;
  overflow: visible;
}
.project-carousel-slides {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  transition: transform 0.5s ease;
}
.project-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  padding: 0px;
}
.project-slide.active {
  opacity: 1;
  z-index: 1;
}
.project-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.project-carousel-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4;
}
.expanded .project-carousel-indicators {
  display: none !important;
}
.project-carousel-container:not(.expanded) .project-carousel-indicators {
  display: flex;
}
.project-indicator {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(20, 61, 165, 0.3);
  transition: all 0.3s ease;
  z-index: 5;
  cursor: pointer;
  position: relative;
}
.project-indicator.active {
  background: #143da5;
}
/* ImageExpandButton and its children are NOT renamed */
.ImageExpandButton {
  position: absolute;
  background-color: #143da5;
  display: flex;
  height: 45px;
  width: 45px;
  border: none;
  border-radius: 0.8rem;
  margin: 20px;
  z-index: 3;
  cursor: pointer;
  transition: 0.5s;
}

.ContainerExpandBtn {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  cursor: pointer;
  z-index: 2;
}

.ContainerExpandBtn svg {
  fill: white;
  width: 30px;
  height: 30px;
}

.ImageExpandButton:hover {
  transform: scale(1.3);
  cursor: pointer;
}

.project-features {
  width: 100%;
  padding: 0 10vw;
  margin-top: 3rem;
  margin-bottom: 2rem;
  position: relative;
}

.swiper {
  width: 100%;
  height: 100%;
  cursor: grab;
}

.swiper:active {
  cursor: grabbing;
}

/* SOLUCIÓN PRINCIPAL: Centrar el contenido del slide */
.swiper-slide {
  display: flex;
  justify-content: center; /* Centrado horizontal */
  align-items: center; /* Centrado vertical opcional */
  height: auto;
}

.project-feature {
  max-width: 70px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-feature svg {
  width: 100%;
  margin-bottom: 5px;
}

.project-feature span {
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.3;
  color: var(--color-texto);
  font-family: "Poppins-Regular";
}

/* Paginación personalizada */
.swiper-pagination {
  position: relative;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.swiper-pagination-bullet {
  width: 16px;
  height: 16px;
  background: rgba(20, 61, 165, 0.3);
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: #143da5;
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .project-features {
    padding: 0 5vw;
  }

  .project-feature span {
    font-size: 0.8rem;
  }
}

/* Botones SOLO en el overlay */
.project-overlay .project-carousel-btn {
  background: #fff;
  border: 2px solid #143da5;
  color: #143da5;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  z-index: 1;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
  opacity: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}
.project-overlay .project-carousel-btn:hover {
  background: #143da5;
  opacity: 1;
}

.project-overlay .project-carousel-btn:hover svg path {
  fill: #fff;
}

.project-overlay .project-carousel-btn.left {
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.project-overlay .project-carousel-btn.left svg {
  fill: #143da5;
  width: 28px;
}

.project-overlay .project-carousel-btn.right {
  right: 0;
  transform: translate(50%, -50%);
}

.project-overlay .project-carousel-btn.right svg {
  fill: #143da5;
  width: 28px;
}

.project-carousel-container:not(.expanded) .project-carousel-btn {
  display: none !important;
}

/* Overlay expandido */
.project-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 102;
  display: none;
  justify-content: center;
  align-items: center;
}
.project-overlay.active {
  display: flex;
}

.project-expanded-carousel {
  position: relative;
  width: auto;
  max-width: 1000px;
  max-height: 90vh;
  background: white;
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.project-expanded-carousel .project-slide {
  position: relative;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.project-expanded-carousel .project-slide.active {
  opacity: 1;
  display: flex;
}

.project-expanded-carousel .project-carousel-container {
  width: 100%;
  height: 100%;
}
.project-expanded-carousel img {
  border-radius: 15px;
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: auto;
}

/* Botón cerrar */
.project-close-btn {
  cursor: pointer;
  top: -50px;
  right: 0;
  width: 40px;
  height: 40px;
  position: absolute;
  border: none;
  border-radius: 0.8rem;
  background-color: #143da5;
}
.project-close-btn:before,
.project-close-btn:after {
  content: "";
  position: absolute;
  width: 80%;
  height: 2px;
  background-color: white;
  transition: 0.3s ease-out;
  left: 50%;
  top: 50%;
}
.project-close-btn:after {
  transform: translate(-50%, -50%) rotate(45deg);
}
.project-close-btn:before {
  transform: translate(-50%, -50%) rotate(-45deg);
}
.project-close-btn:hover,
.project-close-btn:focus {
  transform: scale(1.2);
}
.project-close-btn:hover:before,
.project-close-btn:hover:after,
.project-close-btn:focus:before,
.project-close-btn:focus:after {
  transform: translate(-50%, -50%) rotate(180deg);
}

/* Utilidades */
.CenterContainer {
  width: 100%;
  max-width: 1440px;
  height: fit-content;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Media Queries */
@media (max-width: 1024px) {
  .project-content-area {
    width: 90%;
  }
  .project-text-block {
    padding: 0 30px;
  }
  .project-features {
    gap: 2rem;
  }
  .project-expanded-carousel {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 0px;
  }

  .project-expanded-carousel img {
    border-radius: 0px;
  }

  .project-overlay .project-carousel-btn.left {
    left: 25px;
    transform: translate(-48%, -48%);
  }

  .project-overlay .project-carousel-btn.right {
    right: 25px;
    transform: translate(48%, -48%);
  }
}
@media (max-width: 768px) {
  .project-content-area {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 80vw;
  }
  .project-form {
    align-items: center;
  }
  .project-image-block {
    max-width: 80vw;
    margin-top: 20px;
  }
  .project-text-block {
    padding: 1rem 0 0.6rem;
    max-width: 80vw;
    order: -1;
  }
  .project-text-block .project-headline {
    font-size: 2rem;
  }
  .project-features {
    gap: 1.5rem;
    padding: 0 15px;
  }
  .project-close-btn {
    top: -45px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

  .project-overlay .project-carousel-btn {
    width: 40px;
    height: 40px;
  }
  .project-overlay .project-carousel-btn.right svg,
  .project-overlay .project-carousel-btn.left svg {
    width: 20px;
  }
}
@media (max-width: 480px) {
  /* ImageExpandButton is NOT renamed */

  .project-text-block {
    padding: 0;
    max-width: 90vw;
  }
  .project-features {
    gap: 1rem;
    padding: 0 10px;
    max-width: 80vw;
  }
  .project-feature {
    max-width: 55px;
    flex: 1 1 28%;
    text-align: center;
    margin-bottom: 1rem;
  }
  .project-feature span {
    font-size: 0.75rem;
    line-height: 1.2;
  }
  .project-feature-icon {
    height: 3.5rem;
    margin-bottom: 0.3rem;
  }

  .project-overlay .project-carousel-btn.left {
    left: 20px;
  }

  .project-overlay .project-carousel-btn.right {
    right: 20px;
  }

  .project-overlay .project-carousel-btn {
    width: 35px;
    height: 35px;
  }
  .project-overlay .project-carousel-btn.right svg,
  .project-overlay .project-carousel-btn.left svg {
    width: 18px;
  }
}
