@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap");

/* body {
  font-family: system-ui, sans-serif;
} */

html {
  scroll-behavior: smooth;
}

.video-responsive {
    overflow: hidden;
    padding-bottom: 56.25%;
    position: relative;
    height: 0;
}

.video-responsive iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
}



.resized-image {
    width: 200px; /* Set your desired width */
    height: 10%; /* This ensures the aspect ratio is maintained */
  }

.side-by-side {
    width: 48%; /* Adjust the width as needed, just ensure both fit side by side */
    margin-right: 2%; /* Optional spacing between images */
    height: auto; /* Maintain aspect ratio */
}

.containeri {
    display: grid;
    grid-template-columns: 1fr; /* Creates two columns of equal width */
    gap: 10px; /* Adjust the gap between images */
  }

  
.containeri img {
    width: 50%; /* Makes image fill the cell, adjust as needed */
    height: auto; /* Maintain aspect ratio */
  }
  

/* ─── Global typography & base styles ─── */
body {
  font-size: 16px;
  line-height: 1.6;
  color: var(--white-color);
  background-color: var(--black-color);
  font-weight: 400;
}
p, li {
  font-weight: 400;
}

/* ─── Containers & sections ─── */
.container,
.contact-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.section {
  padding: 4rem 0;
}

/* ─── Section titles ─── */
.main-title {
  font-size: 2.5rem;
  margin: 2rem 0 1.5rem;
  color: var(--white-color);
  text-align: center;
}

/* ─── Button & link hover states ─── */
a:hover,
.project-report-link:hover,
.hero__button:hover,
.contact-form button:hover {
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

  /*----- VARIABLES CSS Y SASS -----*/
  /*Varibles sass*/
  /*Variables css*/
  /*Colores*/
  :root {
    --first-color: #4E1116;
    --black-color: #000;
    --white-color: #FFF;
  }
  
  /*Fuente y tipografia*/
  :root {
    --body-font: 'Poppins', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1rem;
    --normal-font-size: 0.93rem;
    --small-font-size: 0.81rem;
  }
  
  @media screen and (min-width: 768px) {
    :root {
      --h1-font-size: 4.5rem;
      --h2-font-size: 2rem;
      --normal-font-size: 1rem;
      --small-font-size: 1.37rem;
    }
  }
  
  /*z index*/
  :root {
    --z-back: -10;
    --z-normal: 1;
    --z-tooltip: 10;
    --z-fixed: 100;
    --z-modal: 1000;
  }
  
  /*----- BASE -----*/
  *, ::before, ::after {
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
  }
  
  body {
    margin: 3rem 0 0 0;
    font-family: var(--body-font);
    background-color: var(--black-color);
    color: var(--white-color);
    font-weight: 700;
    overflow: auto;
  }
  
  h1, h2 {
    margin: 0;
  }
  
  ul {
    list-style-type: disc;
    margin-left: 1.5em;       /* indent */
  }
  
  a {
    text-decoration: none;
  }

  p {
    display: list-item;       /* makes the p behave like a list item */
    list-style-type: square;  /* square marker */
    margin-left: 1.5em;       /* indent to line up under the marker */
  }
  
  img {
    max-width: 100%;
    height: auto;
  }
  
  /*----- LAYOUT -----*/
  .bd-grid {
    max-width: 1200px;
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .l-header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: var(--black-color);
  }
  
  /*----- PAGES -----*/
  /*Nav*/
  .nav {
    height: 3rem;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    font-weight: 700;
  }
  
  @media screen and (max-width: 768px) {
    .nav__menu {
      position: fixed;
      top: -100%;
      left: 0;
      background-image: -webkit-gradient(linear, left top, left bottom, from(var(--black-color)), to(var(--first-color)));
      background-image: linear-gradient(var(--black-color), var(--first-color));
      width: 100%;
      height: 45%;
      padding: 1.5rem;
      border-radius: 0 0 1rem 1rem;
      -webkit-transition: .5s;
      transition: .5s;
    }
  }
  
  .nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
    display: flex;
    gap: 2rem;
  }
  
  .nav__item {
    margin-bottom: 2rem;
  }
  
  .nav__link {
    color: var(--white-color);
  }
  
  .nav__link:hover {
    position: relative;
    color: var(--first-color);
  }
  
  .nav__link.active,
  .nav__link.active {
    color: var(--first-color);
  }

  .nav__link.active::after,
  .nav__logo.active::after {
    /* content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--first-color);
    bottom: -4px;
    left: 0; */
    display: none !important;
  }

  .nav__link:hover::after {
    position: absolute;
    content: '';
    width: 1.5rem;
    height: 0.1875rem;
    left: 0.125rem;
    top: 2.125rem;
    background-color: var(--first-color);
  }
  
  .nav__logo {
    font-size: var(--normal-font-size);
    color: var(--white-color);
  }
  
  .nav__toggle {
    font-size: 1.5rem;
    cursor: pointer;
  }
  
  /*Aparecer menu*/
  .show {
    top: 3rem;
  }
  
  /*Home*/
  .l-main {
    height: calc(100vh - 3rem);
    background-color: var(--black-color);
  }
  
  .home {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr;
        grid-template-columns: 1fr;
    -ms-grid-rows: max-content max-content;
        grid-template-rows: -webkit-max-content -webkit-max-content;
        grid-template-rows: max-content max-content;
    -ms-flex-line-pack: distribute;
        align-content: space-around;
    row-gap: 2.3rem;
    height: 100%;
    font-weight: 700;
  }
  
  .home__information {
    padding-left: 1.5rem;
    border-left: 5px solid var(--white-color);
    z-index: var(--z-tooltip);
  }
  
  .home__pressent {
    font-size: var(--small-font-size);
  }
  
  .home__title {
    font-size: var(--h1-font-size);
  }
  
  .home__skill {
    font-size: var(--h2-font-size);
  }
  
  .home__button {
    display: inline-block;
    margin-top: 1.5rem;
    font-size: .75rem;
    color: var(--white-color);
    padding: .625rem 1rem;
    border-radius: .25rem;
    background-image: -webkit-gradient(linear, left top, right top, from(var(--black-color)), to(var(--first-color)));
    background-image: linear-gradient(to right, var(--black-color), var(--first-color));
  }
  
  .home__img {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 291px;
    z-index: var(--z-normal);
  }
  
  .home__social {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    padding-bottom: 1rem;
  }
  
  .home__social-icon {
    margin-bottom: 2rem;
    font-size: 1.33rem;
    cursor: pointer;
  }
  
  .home__social-icon:hover {
    color: var(--first-color);
  }
  
  /*----- MEDIA QUERIES -----*/
  @media screen and (min-width: 768px) {
    body {
      margin-top: 4rem; 
      
    }
    .l-main {
      height: 100vh;
    }
    .nav {
      height: 4rem;
    }
    .nav__list {
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      padding-top: 0;
    }
    .nav__item {
      margin-left: 3rem;
      margin-bottom: 0;
    }
    .nav__toggle, .nav__close {
      display: none;
    }
    .nav__link {
      text-transform: initial;
    }
    .home {
      -ms-grid-rows: max-content 20px;
          grid-template-rows: -webkit-max-content 20px;
          grid-template-rows: max-content 20px;
      -ms-flex-line-pack: center;
          align-content: center;
    }
    .home__information {
      margin-top: 2rem;
    }
    .home__social {
      -webkit-box-orient: horizontal;
      -webkit-box-direction: normal;
          -ms-flex-direction: row;
              flex-direction: row;
      padding-top: 8rem;
      padding-bottom: 0;
    }
    .home__social-icon {
      margin-right: 2rem;
      margin-bottom: 0;
    }
    .home__img {
      width: 553px;
      right: 5%;
    }
  }
  
  @media screen and (min-width: 1200px) {
    .bd-grid {
      margin-left: auto;
      margin-right: auto;
    }
  }
  
  /*ANIMATE*/
  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: var(--z-modal);
  }
  
  .first {
    background-color: var(--first-color);
  }
  
  .second {
    background-color: var(--first-color);
    left: 33.3%;
  }
  
  .third {
    background-color: var(--first-color);
    left: 66.6%;
  }
  
  /* Main container styling */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 20px;
}

.main-title {
  text-align: center;
  margin-bottom: 40px;
}

/* Project section styling */
.project {
  margin-bottom: 50px;
  border-bottom: 1px solid var(--first-color); /* Adds a light line between projects */
  padding-bottom: 20px;
}

.project-title {
  color: var(--first-color);
  font-size: 24px;
  margin-bottom: 15px;
}

.project-description {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Styling for images within projects */
.project-images {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.project-image {
  width: 100%;
  max-width: 400px;
  height: auto;
  border-radius: 5px; /* Adds rounded corners to images */
}

/* Responsive design for video container */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Link styling */
.project-report-link {
  display: inline-block;
  background-color: #007bff;
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 5px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.project-report-link:hover {
  background-color: #0056b3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-images {
      flex-direction: column;
  }
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
}

.contact-title {
  margin-bottom: 30px;
  font-size: 2em;
  color: #333;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.social-links a {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #555;
  background-color: #f0f0f0;
  padding: 10px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.social-links a ion-icon {
  margin-right: 8px;
  font-size: 1.5em;
}

.social-links a:hover {
  background-color: #007bff; /* Adjust the color based on your theme */
  color: #fff;
}

@media (max-width: 768px) {
  .social-links {
      flex-direction: column;
      gap: 15px;
  }
}


/* ─── Hero section ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: calc(100vh - 4rem);
  gap: 2rem;
  padding: 2rem 1rem;
}
.hero__title {
  font-size: 2.5rem !important;
  margin-bottom: 1.2;
}
.hero__subtitle {
  font-size: 1.5rem !important;
  line-height: 1.4;
  margin-bottom: 1.5rem;
}
.hero__button {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: .5rem;
  background: var(--first-color);
  color: var(--white-color);
  text-transform: uppercase;
  font-weight: 700;
  text-decoration: none;
}
.hero__image img {
  width: 150%;
  height: auto;
  border-radius: 8px;
}

/* Mobile tweak */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__image {
    display: none; /* hide on small screens */
  }
}


/* ─── Projects card grid ─── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.card {
  background: var(--white-color);
  color: var(--black-color);
  border-radius: .5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  display: block;
  /* flex-direction: column; */
}

.card img {
  width: 100%;
  height: auto;
}

.card-content {
  padding: 1rem;
  /* flex: 1; */
}

.card-content h3 {
  margin: 0 0 .5rem;
  color: var(--first-color);
  font-size: var(--h2-font-size);
}

.card-content p,
.card-content ul {
  font-weight: 400;
  font-size: var(--normal-font-size);
  margin-bottom: 1rem;
}

.card-content ul {
  padding-inline-start: 1.25rem;
}

.card-actions {
  padding: 0 1rem 1rem;
  text-align: right;
}

/* hide the body by default */
.card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1rem; /* remove vertical padding initially */
}

/* reveal on hover */
.card:hover .card-body {
  max-height: 1000px;      /* large enough for any content */
  padding: 1rem;           /* restore vertical padding */
}

/* ensure the header stays visible */
.card-header {
  background: var(--white-color);
  padding: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}


/* Fallback for narrow screens */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}


/* ─── “Work” dropdown in nav ─── */
.has-dropdown {
  position: relative;
}
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--black-color);
  list-style: none;
  margin: 0;
  display: none;
  flex-direction: column;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
  border-radius: 0.25rem;
  gap: 1rem;
}
.has-dropdown:hover .dropdown {
  display: flex;
}
.dropdown .nav__link {
  margin: 0.25rem 0;
}

/* On mobile, let dropdown items stack inside the main menu */
@media (max-width: 768px) {
  .dropdown {
    position: static;
    box-shadow: none;
    padding-left: 1rem;
  }
}

/* ─── Contact Form ─── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid #ccc;
  border-radius: .5rem;
  font-size: var(--normal-font-size);
}

.contact-form button {
  align-self: flex-start;
  padding: .75rem 1.5rem;
  background: var(--first-color);
  color: var(--white-color);
  border: none;
  border-radius: .5rem;
  font-weight: 700;
  cursor: pointer;
}

.contact-form button:hover {
  opacity: 0.9;
}

@media (max-width: 768px) {
  /* kill the intro panels on mobile, so header/nav is always visible */
  .overlay {
    display: none !important;
  }
}