@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

:root {
  --primary-color: #000000;
  --secondary-color: #e530e5;
  --text-dark: #0e0d16;
  --text-light: #767268;
  --extra-light: #f7f8fd;
  --white: #ffffff;
  --max-width: 1200px;
}

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

.btn {
  padding: 0.75rem 1.5rem;
  outline: none;
  border: none;
  font-size: 1rem;
  font-weight: 500;
  font-family: "Montserrat", sans-serif;
  white-space: nowrap;
  color: var(--white);
  background-color: var(--primary-color);
  border-radius: 5px;
  transition: 0.3s;
  cursor: pointer;
}

.btn:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

img {
  display: flex;
  width: 100%;
}

a {
  text-decoration: none;
  transition: 0.3s;
}

ul {
  list-style: none;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", sans-serif;
  padding-top: 5rem;
}

/* --- NAVIGATION BAR STYLES --- */

nav {
  isolation: isolate;
  z-index: 999;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  box-shadow: 0 2px 10px rgba(255, 255, 255, 0.485);
}

.nav__header {
  padding: 1rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--primary-color);
  z-index: 999;
}

.nav__logo a {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.5rem;
}

.nav__menu__btn {
  font-size: 1.5rem;
  color: var(--white);
  cursor: pointer;
}

.nav__links {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2rem;
  padding: 2rem;
  background-color: var(--primary-color);
  transition: transform 0.5s;
  z-index: -1;
}

.nav__links.open {
  transform: translateY(100%);
}

.nav__links a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  white-space: nowrap;
}

.nav__btns {
  display: none;
}

/* Language selector styles */
.language-selector {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 0 1rem;
  z-index: 999;
}

.language-selector .flag-icon {
  height: 20px;
  width: auto;
  object-fit: contain;
  cursor: pointer;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease-in-out;
}

.language-selector .flag-icon:hover {
  transform: scale(1.1);
}

/* Mobile WhatsApp Button */
.mobile-whatsapp-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  margin-left: 10px;
}

/* --- NON NAV CSS --- */

.section__container {
  max-width: var(--max-width);
  margin: auto;
  padding: 5rem 1rem;
}

.section__header {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-dark);
  text-align: center;
}

.section__description {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  line-height: 1.7rem;
  text-align: center;
}

.section__description1 {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-light);
  line-height: 1.55rem;
  text-align: start;
}

.section__description2 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  line-height: 1.35rem;
  text-align: start;
}

.header__container {
  display: grid;
  gap: 2rem;
  overflow: hidden;
}

.header__image img {
  max-width: 550px;
  margin-inline: auto;
  border-radius: 50px;
  -webkit-mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  mask-image: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 1) 70%,
    rgba(0, 0, 0, 0) 100%
  );
  display: block;
}

.header__content h1 {
  margin-bottom: 1rem;
  font-size: 4rem;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 4.75rem;
  text-align: center;
}

.header__content h1 span {
  color: var(--secondary-color);
}

.header__btns {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.header__btns a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-dark);
}

.header__btns a span {
  margin-right: 0.5rem;
  width: 2.5rem;
  aspect-ratio: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  border: 2px solid var(--text-dark);
  border-radius: 100%;
}

.service {
  background-color: var(--extra-light);
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.section__container.service__container {
  max-width: 1200px;
  width: 90%;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.service__grid {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  padding: 0 20px;
  margin-block: 4rem;
  width: 100%;
  flex-grow: 1;
}

.service__card {
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: var(--white);
  border-bottom: 2px solid transparent;
  transition: 0.3s;
  box-sizing: border-box;
  flex-shrink: 0;
  flex-grow: 1;
  flex-basis: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-align: left;
}

.service__card div {
  margin-bottom: 1rem;
  max-width: max-content;
  padding: 5px 8px;
  font-size: 1.75rem;
  border-radius: 5px;
  margin-inline: auto;
}

.service__card:hover {
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
}

.service__card:nth-child(1):hover {
  border-color: #e530e5;
}

.service__card:nth-child(2):hover {
  border-color: #000000;
}

.service__card:nth-child(3):hover {
  border-color: #e530e5;
}

.service__card:nth-child(4):hover {
  border-color: #000000;
}

.service__card:nth-child(5):hover {
  border-color: #e530e5;
}

.service__card div {
  margin-bottom: 1rem;
  max-width: max-content;
  padding: 5px 8px;
  font-size: 1.75rem;
  border-radius: 5px;
}

.service__card:nth-child(1) div {
  color: #e530e5;
  background-color: #ffffff;
}

.service__card:nth-child(2) div {
  color:black;
  background-color: white;
}

.service__card:nth-child(3) div {
  color: #e530e5;
  background-color: #ffffff;
}

.service__card:nth-child(4) div {
  color:black;
  background-color: white;
}

.service__card:nth-child(5) div {
  color: #e530e5;
  background-color: #ffffff;
}


.service__card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.service__card .section__description {
  text-align: left;
}

.service__btn {
  display: flex;
  justify-content: center;
}

.about__container {
  display: grid;
  gap: 2rem;
}

.about__image img {
  max-width: 2000px;
  margin-inline: auto;
}

.about__content .section__header {
  margin-bottom: 2rem;
  text-align: left;
}

.about__list {
  display: grid;
  gap: 2rem;
}

.about__list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.about__list li span {
  max-width: max-content;
  padding: 5px 8px;
  font-size: 1.75rem;
  border-radius: 5px;
}

.about__list li:nth-child(1) span {
  color: #e530e5;
  background-color: #ffffff;
}

.about__list li:nth-child(2) span {
  color: #e530e5;
  background-color: #ffffff;
}

.about__list li:nth-child(3) span {
  color: #e530e5;
  background-color: #ffffff;
}

.about__list h4 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
}

.about__list .section__description {
  text-align: left;
}

.portfolio {
  background-color: var(--extra-light);
  overflow: hidden;
}

.portfolio__header {
  margin-bottom: 4rem;
  display: grid;
  gap: 2rem;
}

.portfolio__image {
  position: relative;
  isolation: isolate;
}

.portfolio__image__content {
  position: absolute;
  top: 0;
  right: 2rem;
  transform: translateY(-50%);
  padding-block: 1.5rem;
  display: flex;
  align-items: center;
  background-color: var(--secondary-color);
  border-radius: 0.25rem;
  z-index: 1;
}

.portfolio__image__content div {
  padding-inline: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.portfolio__image__content div:nth-child(1) {
  border-right: 1px solid var(--extra-light);
}

.portfolio__image img {
  border-radius: 0.5rem;
}

.portfolio__image__content h4 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
}

.portfolio__image__content p {
  font-size: 0.9rem;
  color: var(--extra-light);
}

.portfolio__content {
  display: grid;
  gap: 2rem;
}

.portfolio__list {
  display: grid;
  gap: 2rem;
}

.portfolio__list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.portfolio__list li span {
  width: 5rem;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--white);
  background-color: var(--secondary-color);
  border-radius: 0.25rem;
}

.portfolio__list h4 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
}

.portfolio__list .section__description {
  text-align: left;
}

.feedback__container {
  padding-bottom: 3rem;
}

.swiper {
  padding-block: 4rem 2rem;
  width: 100%;
}

.swiper-slide {
  min-width: 375px;
}

.feedback__card {
  padding: 1.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: 0.3s;
}

.feedback__card:hover {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.feedback__card .section__description {
  text-align: left;
}

.feedback__details {
  margin-top: 1rem;
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.feedback__user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feedback__user img {
  max-width: 50px;
  border-radius: 100%;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.feedback__user h4 {
  margin-bottom: 0.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
}

.feedback__user h5 {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
}

.feedback__rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.feedback__rating span {
  font-size: 1rem;
  color: goldenrod;
}

.subscribe__content {
  padding: 5rem 1rem;
  border-radius: 1rem;
  background-color: var(--secondary-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.subscribe__content .section__header {
  margin-bottom: 2rem;
  max-width: 750px;
  margin-inline: auto;
  color: var(--white);
}

.subscribe__content form {
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  background-color: var(--white);
  border-radius: 0.5rem;
}

.subscribe__content input {
  width: 100%;
  padding-inline: 1rem;
  outline: none;
  border: none;
  font-size: 1rem;
  color: var(--text-dark);
}

.footer__container {
  display: grid;
  gap: 4rem 2rem;
}

.footer__logo {
  margin-bottom: 2rem;
}

.footer__logo a {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.footer__logo a span {
  color: var(--secondary-color);
}

.footer__col .section__description {
  margin-bottom: 2rem;
  text-align: left;
}

.footer__col h3 {
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.footer__socials {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer__socials a {
  padding: 4px 6px;
  font-size: 1.125rem;
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
  border-radius: 100%;
}

.footer__socials a:hover {
  color: var(--white);
  background-color: var(--secondary-color);
}

.footer__col h4 {
  margin-bottom: 2rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-dark);
}

.footer__links {
  display: grid;
  gap: 1rem;
}

.footer__links a {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
}

.footer__links a:hover {
  color: var(--secondary-color);
}

.footer__links a span {
  margin-right: 0.5rem;
  font-size: 1.2rem;
  color: var(--secondary-color);
}

.footer__bar {
  padding: 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-light);
  text-align: center;
}

/* SPECIFIC FOR CONTACT FORM */

.contact__container {
  background-color: white;
  border-radius: 1rem;
  padding: 3rem 2rem;
}

.contact__content {
  max-width: 700px;
  margin: auto;
  background-color: #e530e5;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.form__row label {
  width: 120px;
  font-weight: 600;
  color: white;
}

.form__row input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
}

.form__column {
  display: flex;
  flex-direction: column;
}

.form__column label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form__column textarea {
  resize: vertical;
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: "Montserrat", sans-serif;
}

.form__button {
  display: flex;
  justify-content: flex-end;
}

.contact__content .section__header {
  color: white;
}

.form__column label {
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

/* style the WhatsApp button */
.whatsapp-btn {
  background-color: #25D366; /* Fondo verde de WhatsApp */
  color: white; /* Texto blanco */
  display: inline-flex; /* Para alinear ícono y texto */
  align-items: center; /* Centrar verticalmente ícono y texto */
  gap: 8px; /* Espacio entre ícono y texto */
  text-decoration: none;
  border: none;
  padding: 10px 16px;
  border-radius: 5px;
  font-weight: 600;
  transition: background-color 0.3s ease;
  --text-light: white;
}

.whatsapp-btn:hover {
  background-color: #1ebd5a; /* Un verde un poco más oscuro al pasar el ratón */
}

/* Estilo para el icono de WhatsApp dentro del botón */
.whatsapp-btn i {
  font-size: 1.4em; /* Hacer el ícono un poco más grande para que se note bien */
  vertical-align: middle; /* Asegura una buena alineación con el texto */
  /* Propiedades para asegurar la visibilidad del ícono */
  display: inline-block; /* Importante para que se aplique el tamaño y color */
  line-height: 1; /* A veces ayuda con el centrado vertical */
}

/* Pop-up Styles */
.popup-overlay {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Dark overlay */
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Ensure it's above other content */
}

.popup-content {
  background-color: var(--secondary-color); /* Your primary color */
  color: var(--white); /* White text */
  padding: 2.5rem;
  border-radius: 1rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  text-align: center;
  position: relative;
  max-width: 90%;
  width: 400px;
  animation: fadeInScale 0.3s ease-out forwards; /* Simple animation */
}

.popup-content h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--white); /* Ensure heading is white */
}

.popup-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--white); /* Ensure paragraph is white */
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: var(--text-dark); /* Darker on hover */
}

/* Animation for pop-up */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- MEDIA QUERIES --- */

@media (width > 540px) {
  .service__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (width > 768px) {
  nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    z-index: 1000;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  }

  .nav__header {
    flex: 1;
    padding: 0;
    background-color: transparent;
  }

  .nav__logo a {
    color: var(--text-dark);
  }

  .nav__logo a span {
    color: var(--secondary-color);
  }

  .nav__menu__btn {
    display: none;
  }
  
  .mobile-whatsapp-btn {
    display: none;
  }

  .nav__links {
    position: static;
    width: fit-content;
    padding: 0;
    flex-direction: row;
    background-color: transparent;
    transform: none !important;
  }

  .nav__links a {
    color: var(--text-light);
  }

  .nav__links a:hover {
    color: var(--primary-color);
  }

  .nav__btns {
    flex: 1;
    display: flex;
    justify-content: flex-end;
  }

  .language-selector {
    padding: 0;
  }

  .header__container {
    padding-top: 2rem;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 0;
  }

  .header__image {
    grid-area: 1/2/2/3;
  }

  .header__content :is(h1, .section__description) {
    text-align: left;
  }

  .header__btns {
    justify-content: flex-start;
  }

  .service__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .about__container {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .portfolio__header {
    grid-template-columns: repeat(2, 1fr);
  }

  .portfolio__header :is(.section__header, .section__description) {
    text-align: left;
  }

  .portfolio__content {
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
  }

  .portfolio__image {
    grid-area: 1/2/2/3;
  }

  .footer__container {
    grid-template-columns: repeat(5, 1fr);
  }

  .footer__col:nth-child(1) {
    grid-column: 1/3;
    max-width: 350px;
  }
}

@media (width > 1024px) {
  .service__grid {
    gap: 1.5rem;
  }

  .feedback__card {
    padding: 2rem 1.5rem;
  }
}

/* Mobile Specific Styles */
@media (max-width: 768px) {
  /* Mobile Nav Header */
  .nav__header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  }

  .nav__logo a {
    color: var(--text-dark);
  }

  .nav__logo a span {
    color: var(--secondary-color);
  }

  .nav__menu__btn {
    color: var(--text-dark);
  }

  /* Hide header image on mobile */
  .header__image {
    display: none;
  }

  /* Adjust header content for mobile */
  .header__content h1 {
    font-size: 2.5rem;
    line-height: 3rem;
    text-align: center;
  }

  .header__content .section__description1 {
    text-align: center;
  }

  /* Service Cards in Vertical Layout */
  .service__grid {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 0;
  }

  .service__card {
    width: 100%;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .service__card div {
    margin-inline: auto;
  }

  .service__card .section__description {
    text-align: center;
  }

  /* Portfolio image content positioning for mobile */
  .portfolio__image__content {
    position: absolute;
    top: 0;
    right: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 300px;
    padding-block: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    border-radius: 0.25rem;
    z-index: 1;
  }

  .portfolio__image__content div {
    padding-inline: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    text-align: center;
  }
  
  .portfolio__image__content h4 {
    font-size: 1.5rem;
  }
  
  .portfolio__image__content p {
    font-size: 0.8rem;
  }

  /* Center all section content on mobile */
  .about__container, 
  .portfolio__container {
    text-align: center;
  }

  .about__content .section__header, 
  .portfolio__header .section__header {
    text-align: center;
  }

  .about__list .section__description,
  .portfolio__list .section__description {
    text-align: center;
  }

  /* Testimonials adjustments for mobile */
  .swiper-slide {
    min-width: auto;
    width: 100%;
  }

  /* Contact form adjustments for mobile */
  .form__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .form__row label {
    width: 100%;
  }

  .form__row input {
    width: 100%;
    max-width: 90%;
    margin: 0 auto;
  }

  .form__column textarea {
    width: 90%;
    margin: 0 auto;
  }

  .form__button {
    justify-content: center;
  }
}