/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 5rem;

  /*========== Colors ==========*/
  /*Color mode HSL(hue, saturation, lightness)*/
  --first-hue: 258;
  --second-hue: 225;
  --first-color: hsl(var(--first-hue), 54%, 48%);
  --title-color: hsl(var(--second-hue), 64%, 18%);
  --text-color: hsl(var(--first-hue), 8%, 35%);
  --border-color: hsl(var(--second-hue), 4%, 55%);
  --body-color: hsl(var(--first-hue), 60%, 98%);
  --container-color: #fff;

  /*========== Font and typography ==========*/
  /*.5rem = 8px | 1rem = 16px ...*/
  --body-font: "Jost", sans-serif;
  --biggest-font-size: 4.25rem;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.813rem;

  /*========== Font weight ==========*/
  --font-light: 300;
  --font-medium: 500;
  --font-semibold: 600;

  /*========== z index ==========*/
  --z-tooltip: 10;
  --z-fixed: 100;
}

/* Responsive typography */
@media screen and (max-width: 1024px) {
  :root {
    --biggest-font-size: 2.75rem;
    --h1-font-size: 1.5rem;
    --h2-font-size: 1.25rem;
    --h3-font-size: 1rem;
    --normal-font-size: 0.938rem;
    --small-font-size: 0.813rem;
    --smaller-font-size: 0.75rem;
  }
}

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

html {
  scroll-behavior: smooth;
}

body,
button,
input,
textarea {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
}

body {
  background-color: var(--body-color);
  color: var(--text-color);
}

h1,
h2,
h3 {
  color: var(--title-color);
  font-weight: var(--font-semibold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

p {
  line-height: 1.6rem;
  text-align: left;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
}

.grid {
  display: grid;
}

.section {
  padding: 8rem 0 2rem;
}

.section__subtitle,
.section__title {
  text-align: center;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--first-color);
  margin-bottom: 3rem;
}

.section__subtitle {
  display: block;
}

/*=============== HEADER & NAV===============*/
.header {
  width: 100%;
  background-color: var(--container-color);
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
}

.nav {
  height: calc(var(--header-height) + 2.5rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  column-gap: 3rem;
  transition: 0.4s;
}

.nav__logo-img {
  width: 180px;
  height: auto;
  display: block;
  border-radius: 0;
}

.nav__list {
  display: flex;
  column-gap: 2rem;
}

.nav__link {
  position: relative;
  color: var(--title-color);
  font-weight: var(--font-medium);
  transition: 0.4s;
}

.nav__link:hover {
  color: var(--first-color);
}

.nav__close,
.nav__toggle {
  color: var(--title-color);
}

.nav__close {
  font-size: 1.5rem;
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  cursor: pointer;
}

.nav__toggle {
  font-size: 1.25rem;
  cursor: pointer;
}

.nav__close,
.nav__toggle {
  display: none;
}

/* Active link */
.nav__link:hover::before,
.nav__link::before {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--first-color);
  border-radius: 25%;
  transition: 0.4s;
}

.nav__link:hover::before,
.active-link::before {
  width: 30px;
}

.active-link {
  color: var(--first-color);
}

/* Change background header */
.scroll-header {
  box-shadow: 0 1px 9px hsla(0, 0%, 19%, 0.2);
}

.scroll-header .nav {
  height: var(--header-height);
}

/*=============== HOME ===============*/
.home {
  padding: 12.5rem 0 2rem;
  min-height: 92vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background-image: url("../img/Hero-lissette.jpg");
  background-size: cover;
  background-position: right top 10px;
  background-repeat: no-repeat;
}

.home__container {
  width: 100%;
}

.home__content {
  max-width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.home__subtitle,
.home__title {
  font-size: var(--biggest-font-size);
  line-height: 68px;
  font-weight: var(--font-light);
}

.home__subtitle {
  margin-bottom: 0.75rem;
}
.home__title {
  margin-bottom: 2rem;
}
.home__title span {
  font-weight: var(--font-medium);
}

.home__buttons {
  display: flex;
  flex-direction: column;
  margin-bottom: 2rem;
}

.home__buttons span {
  color: var(--first-color);
  font-size: var(--h1-font-size);
  font-weight: var(--font-medium);
}

.home__description {
  font-size: var(--h2-font-size);
  line-height: 36px;
  margin-bottom: 2.5rem;
  max-width: 100%;
}

/*=============== SOCIAL ===============*/
.home__social {
  display: flex;
  align-items: center;
  width: max-content;
}

.home__social-follow {
  color: var(--title-color);
  font-size: 17px;
  font-weight: var(--font-medium);
  padding-right: 8.175rem;
  position: relative;
}

.home__social-follow::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 58%;
  width: 100px;
  height: 2px;
  background-color: hsla(var(--second-hue), 64%, 18%, 0.15);
}

.home__social-links {
  display: inline-flex;
  column-gap: 0.5rem;
}

.home__social-link {
  display: inline-flex;
  align-items: center;
  padding: 1rem 0.875rem 0.875rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid hsla(var(--second-hue), 64%, 18%, 0.15);
  background-color: var(--container-color);
  color: var(--title-color);
  transition: 0.4s;
  overflow: hidden;
}

.home__social-link span {
  display: inline-block;
  font-weight: var(--font-medium);
  white-space: nowrap;
  line-height: 20px;
  transform: translateX(1.5rem);
  max-width: 0;
  opacity: 0;
  transition: 1.2s;
}

.home__social-link:hover span {
  max-width: 400px;
  opacity: 1;
  transform: translateX(0.5rem);
}

.home__social-link:hover i,
.home__social-link:hover span {
  color: var(--first-color);
}

/*=============== BUTTONS ===============*/
.button {
  display: inline-block;
  background-color: var(--first-color);
  color: var(--container-color);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
  transition: 0.4s;
}

.button:hover {
  background-color: var(--title-color);
}

/*=============== ABOUT ===============*/
.about__container {
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.875rem;
}

.about__img {
  justify-self: center;
}

.about__subtitle,
.about__title {
  text-align: left;
}

.about__title {
  margin-bottom: 2.5rem;
}

.about__description {
  color: var(--title-color);
  font-weight: var(--font-medium);
  font-size: 17px;
  margin-bottom: 1.5rem;
}

.about__details {
  margin-bottom: 2.5rem;
}

.about__award {
  grid-template-columns: 4fr 8fr;
  align-items: center;
}

.award__title {
  font-size: 17px;
  font-weight: var(--font-medium);
  margin-bottom: 0.5rem;
}

/*=============== WORK ===============*/
.work__container {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columnas exactas */
  gap: 1.875rem;
}

.work__content {
  position: relative;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.work__content:hover {
  box-shadow: 0 2px 16px hsla(var(--second-hue), 48%, 8%, 0.1);
}

.work__content img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  vertical-align: middle;
  transition: 0.4s;
}

.work__overlay {
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  opacity: 0;
  transition: 0.4s;
}

.work__content:hover .work__overlay {
  opacity: 1;
  border-radius: 0.75rem;
}

.work__overlay-icon {
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-top: -1rem;
  margin-left: -1rem;
  font-size: 2rem;
  color: var(--first-color);
  transform: scale(0);
  transition: 0.4s;
}

.work__content:hover .work__overlay-icon {
  transform: scale(1);
}

/*=============== LIGHTBOX ===============*/
.lightbox {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  padding: 30px;
}

.lightbox.open {
  display: flex;
}

.lightbox .lightbox-content img {
  height: auto;
  width: auto;
  cursor: pointer;
  display: block;
  padding: 40px 0 30px;
}

.lightbox .lightbox-content {
  position: relative;
}

.lightbox.open .lightbox-content {
  animation: lightboxImage 0.5s ease;
}

.lightbox-button {
  display: inline-flex;
  align-items: center;
  column-gap: 0.75rem;
  background-color: var(--first-color);
  color: var(--container-color);
  padding: 0.8rem 1.5rem;
  border-radius: 0.5rem;
  transition: 0.4s;
  margin-top: 1.5rem;
  font-weight: var(--font-medium);
}

.lightbox-button i {
  font-size: 1.25rem;
  display: flex;
}

@keyframes lightboxImage {
  0% {
    transform: scale(0.8);
  }

  100% {
    transform: scale(1);
  }
}

.lightbox .lightbox-content .lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  font-size: 2.2rem;
  color: var(--title-color);
  line-height: 1;
  text-align: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1010;
  transition: 0.4s;
}

.lightbox .lightbox-content .lightbox-close:hover {
  color: var(--first-color);
}

.lightbox .lightbox-content .lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 2rem;
  width: auto;
  display: block;
  z-index: 10;
}

.lightbox .lightbox-controls .prev-item,
.lightbox .lightbox-controls .next-item {
  position: absolute;
  cursor: pointer;
  top: 50%;
  margin-top: -1rem;
  color: hsl(250, 60%, 82%);
  z-index: 110;
  transition: all 0.4s ease;
}

.lightbox .lightbox-controls .next-item:hover,
.lightbox .lightbox-controls .prev-item:hover {
  color: var(--container-color);
}

.lightbox .lightbox-controls .prev-item {
  left: 30px;
}

.lightbox .lightbox-controls .next-item {
  right: 30px;
}

.lightbox .lightbox-controls .next-item .bx,
.lightbox .lightbox-controls .prev-item .bx {
  font-size: 1.7rem;
}

/*=============== NUEVO ESTILO LIGHTBOX DETALLES ===============*/
.portfolio__modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  align-items: flex-start;
  background-color: var(--container-color);
  padding: 2rem;
  border-radius: 1.5rem;
}

.portfolio__modal-content {
  position: relative;
  background-color: var(--container-color);
  padding: 3.5rem 2.5rem 2.5rem;
  border-radius: 1.5rem;
  max-width: 1000px;
  width: 90%;
}

.portfolio__modal-img {
  width: 100%;
  border-radius: 1rem;
  object-fit: cover;
}

.portfolio__modal-info {
  text-align: left;
}

.lightbox-title {
  font-size: var(--h2-font-size);
  color: var(--title-color);
  margin-bottom: 0.5rem;
}

.lightbox-category {
  display: block;
  font-size: var(--small-font-size);
  color: var(--first-color);
  font-weight: var(--font-medium);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.lightbox-description {
  font-size: var(--small-font-size);
  line-height: 1.6;
  color: var(--text-color);
}

.lightbox-content {
  max-width: 1000px;
  width: 90%;
}

/*=============== PROJECT ===============*/
.project {
  padding: 6.25rem 0;
  background-image: url("../img/background-cta.jpg");
  background-size: auto;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: center 85.1688px;
}

.project__container {
  place-items: center;
}

.project__title {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 0.25rem;
}

.project__description {
  font-size: var(--h3-font-size);
  text-align: center;
  margin-bottom: 2rem;
}

/*=============== EXPERIENCE ===============*/
.qualification__container {
  grid-template-columns: repeat(2, 1fr);
  column-gap: 3rem;
}

.timeline__item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 2.5rem;
}

.timeline__item:last-child {
  margin-bottom: 0;
}

.timeline__item::before {
  content: "";
  width: 2px;
  height: 60%;
  position: absolute;
  left: 0.459rem;
  top: 0;
  background-color: var(--first-color);
  transition: 0.4s;
}

.timeline__item:hover::before {
  height: 100%;
}

.circle__dot {
  position: absolute;
  left: 0;
  top: 0;
  height: 1rem;
  width: 1rem;
  border: 2px solid var(--first-color);
  border-radius: 0.25rem;
  background-color: var(--body-color);
  transform: rotate(134deg);
  transition: 0.4s;
}

.timeline__item:hover .circle__dot {
  background-color: var(--first-color);
}

.timeline__title {
  font-size: var(--h3-font-size);
  font-weight: var(--font-medium);
  margin-bottom: 1rem;
}

.timeline__date {
  display: flex;
  align-items: center;
  column-gap: 0.4rem;
  font-size: var(--small-font-size);
  color: var(--first-color);
  margin-bottom: 0.5rem;
}

/*=============== CONTACT ===============*/
.contact__container {
  grid-template-columns: 6.5fr 5.5fr;
  column-gap: 3rem;
  align-items: flex-start;
  padding-bottom: 3rem;
}

.contact__form-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1.5rem;
}

.contact__form-div {
  position: relative;
  margin-bottom: 2rem;
  height: 4rem;
}

.contact__form-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 2px solid hsl(var(--second-hue), 4%, 55%);
  background: none;
  color: var(--text-color);
  outline: none;
  border-radius: 0.75rem;
  padding: 1.5rem;
  z-index: 1;
}

.contact__form-tag {
  position: absolute;
  top: -0.75rem;
  left: 1.25rem;
  font-size: var(--smaller-font-size);
  padding: 0.25rem;
  background-color: var(--body-color);
  z-index: 10;
}

.contact__form-area {
  height: 10.25rem;
}

.contact__form-area textarea {
  resize: none;
}

.contact__info {
  display: grid;
  row-gap: 1.875rem;
}

.contact__card div {
  display: flex;
  column-gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.contact__icon {
  font-size: 1.8rem;
  color: var(--first-color);
  display: inline-block;
  margin-bottom: 0.25rem;
}

.contact__card-title,
.contact__card-data {
  font-size: var(--normal-font-size);
}

.contact__card-title {
  padding-top: 0.16rem;
  font-weight: var(--font-medium);
}

.contact__card-data {
  display: block;
  margin-bottom: 0.5rem;
}

/*=============== FOOTER ===============*/
.footer {
  background-color: var(--first-color);
}

.footer__container {
  padding: 2rem 0 2rem;
}

.footer__title,
.footer__link {
  color: var(--container-color);
}

.footer__title {
  font-size: var(--h1-font-size);
  text-align: center;
  margin-bottom: 2rem;
}

.footer__link {
  font-size: 18px;
}

.footer__list {
  display: flex;
  justify-content: center;
  column-gap: 1.5rem;
  margin-bottom: 2.25rem;
}

.footer__social {
  display: flex;
  justify-content: center;
  column-gap: 1.25rem;
}

.footer__social-link {
  background-color: var(--body-color);
  color: var(--first-color);
  font-size: 1.25rem;
  padding: 0.48rem;
  border-radius: 0.5rem;
  display: inline-flex;
}

.footer__copy {
  display: block;
  text-align: center;
  margin-top: 4.5rem;
  color: var(--container-color);
  font-size: var(--small-font-size);
}

.home__social-link i {
  font-size: 1.5rem;
}

/*=============== BREAKPOINTS ===============*/
/* For large devices */
@media screen and (max-width: 1208px) {
  .container {
    margin-left: 2rem;
    margin-right: 2rem;
  }

  .services__container {
    column-gap: 3rem;
  }
}

@media screen and (max-width: 1024px) {
  .nav__logo-img {
    width: 150px;
  }

  .home {
    background-image: url("../img/Hero-lissette2.jpg");
  }

  .home__container {
    column-gap: 1.25rem;
  }

  .home__group {
    grid-template-columns: 9.5fr 2.5fr;
  }

  .home__title,
  .home__subtitle {
    line-height: 48px;
  }

  .home__title {
    margin-bottom: 1.5rem;
  }

  .home__description {
    font-size: var(--h3-font-size);
    max-width: 380px;
    margin-right: auto;
    margin-left: 0;
    line-height: 30px;
  }

  .home__social-follow {
    font-size: var(--normal-font-size);
  }

  .home__social-link {
    padding: 0.625rem 0.625rem 0.5rem 0.625rem;
    border-radius: 0.5rem;
  }

  .about__title {
    margin-bottom: 2rem;
  }

  .about__description {
    margin-bottom: 1rem;
    font-size: var(--normal-font-size);
  }

  .award__title {
    font-size: var(--normal-font-size);
  }

  .about__details {
    margin-bottom: 2rem;
  }

  .services__container {
    grid-template-columns: 1fr;
    row-gap: 3rem;
  }

  .services__button.services__active::before,
  .services__button:hover::before {
    width: 80px;
  }

  .services__title {
    font-size: var(--normal-font-size);
  }

  .work__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Bajamos a 2 columnas en tablet */
    gap: 1.875rem;
  }

  .project__title {
    font-size: var(--h2-font-size);
  }

  .project__description {
    font-size: var(--normal-font-size);
    margin-bottom: 1.5rem;
  }

  .timeline__item {
    padding-left: 2.5rem;
    margin-bottom: 2rem;
  }

  .contact__container {
    grid-template-columns: 7.5fr 4.5fr;
    column-gap: 2rem;
  }

  .footer__link {
    font-size: var(--normal-font-size);
  }

  .footer__social-link {
    padding: 0.3rem;
    border-radius: 0.25rem;
    font-size: 1rem;
  }
}

/* For medium devices */
@media screen and (max-width: 768px) {
  .section {
    padding: 4.5rem 0 2rem;
  }

  .nav {
    height: var(--header-height);
  }

  .nav__menu {
    position: fixed;
    background-color: var(--container-color);
    top: 0;
    right: -100%;
    width: 80%;
    height: 100%;
    padding: 4rem 0 0 3rem;
    box-shadow: -2px 0 4px hsla(250, 24%, 15%, 0.1);
    transition: 0.4s;
  }

  /* show menu */
  .show-menu {
    right: 0;
  }

  .nav__list {
    flex-direction: column;
    row-gap: 1.5rem;
  }

  .nav__toggle,
  .nav__close {
    display: block;
  }

  .nav__logo-img {
    width: 90px;
  }

  .home {
    background-image: url("../img/Hero-lissette4.jpg");
    padding: 9rem 0 2rem;
  }

  .home__container {
    grid-template-columns: 1fr;
    row-gap: 3rem;
  }

  .home__images {
    grid-template-columns: 1fr;
    row-gap: 1.875rem;
  }

  .home__img {
    width: 160px;
    order: 2;
  }

  .home__description {
    font-size: var(--h3-font-size);
    max-width: 150px;
    margin-right: auto;
    margin-left: 0;
    line-height: 30px;
  }

  .slide__img {
    width: 225px;
  }

  .home__group {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  .home__social {
    flex-direction: column;
    align-items: flex-start;
    row-gap: 1.2rem;
  }

  .home__social-follow::after {
    display: none;
  }

  .experience__img {
    justify-self: flex-start;
  }

  .about__container {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  .about__img {
    width: 250px;
  }

  .services__item {
    grid-template-columns: 1fr;
    row-gap: 1.875rem;
  }

  .services__img {
    width: 350px;
  }

  .project {
    padding: 4.5rem 3rem;
  }

  .portfolio__modal-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .portfolio__modal-content {
    padding: 3rem 1.5rem 1.5rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .qualification__container {
    grid-template-columns: 1fr;
    row-gap: 2.5rem;
  }

  .contact__container {
    grid-template-columns: 1fr;
    row-gap: 3rem;
  }

  .contact__info {
    order: -1;
  }
}

@media screen and (max-width: 576px) {
  .home {
    background-image: none;
    justify-content: center;
  }

  .home__content {
    max-width: 100%;
    align-items: center;
    text-align: center;
  }

  .home__title {
    line-height: 60px;
    margin-bottom: 1rem;
  }

  .home__subtitle {
    margin-bottom: 0.5rem;
  }

  .home__description {
    font-size: var(--h3-font-size);
    max-width: 100%;
    margin: 0 auto 2.5rem;
    line-height: 30px;
    text-align: center;
  }

  .home__social {
    flex-direction: column;
    align-items: center;
    row-gap: 1.2rem;
    width: 100%;
  }

  .home__social-follow {
    padding-right: 0;
  }

  .home__social-follow::after {
    display: none;
  }

  .about__title {
    text-align: center;
  }

  .services__img {
    width: 300px;
  }

  .portfolio__modal-grid {
    /* Aumentamos el gap para separar la imagen del texto */
    gap: 2rem;
  }

  .portfolio__modal-content {
    /* Aumentamos el padding para que el texto no toque los bordes */
    padding: 3.5rem 2rem 2.5rem;
    width: 85%;
    /* Le damos un poco más de altura permitida */
    max-height: 90vh;
    overflow-y: auto;
  }

  .portfolio__modal-img {
    border-radius: 0.75rem; /* Bordes un poco más suaves para pantallas pequeñas */
  }

  .portfolio__modal-title {
    /* Un poco más de espacio debajo del título */
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
  }

  .portfolio__modal-description {
    /* Aseguramos que el texto tenga un buen interlineado */
    line-height: 1.7;
    margin-bottom: 1.5rem;
  }

  /* Ajustamos la X para que no se sienta apretada en la esquina */
  .lightbox .lightbox-content .lightbox-close {
    top: 1.25rem;
    right: 1.25rem;
  }

  .lightbox .lightbox-content .lightbox-caption {
    display: none;
  }
}

.work__container {
  column-count: 2;
}

.contact__form-group {
  grid-template-columns: 1fr;
}
