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

:root {
  --primary-font: "DM Sans", serif;
  --secondary-font: "Inter", sans-serif;
  --primary-color: 0, 0%, 100%;
  --secondary-color: rgb(220, 252, 115);
  --accent-color: 222, 95%, 48%;
  --card-color: 240, 36%, 20%;
  --bg-color: rgb(13, 17, 23);
  --transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --navbar-height: 80px;
  --fallback-font: "serif";
  --font-size: 14px;
  --h1-size: 2.986rem;
  --h2-size: 2.488rem;
  --h3-size: 2.074rem;
  --h4-size: 1.728rem;
  --h5-size: 1.5rem;
  --h6-size: 1.25rem;
  --text-color: 34, 64%, 98%;
  --card-width: 320px;
  --card-height: 460px;
  --gap: 24px;
}

body {
  font-family: var(--primary-font), var(--fallback-font);
  font-optical-sizing: auto;
  font-style: normal;
  background-color: var(--bg-color);
  color: hsl(var(--text-color));
  font-weight: 200;
  letter-spacing: 0.04rem;
  font-size: 14px;
}

main {
  margin-top: var(--navbar-height);
}

ul {
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  padding-inline-start: 0px;
  margin-block-start: 0px;
  margin-block-end: 0px;
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* a:visited {
  color: unset;
} */


button {
  background: none;
  color: inherit;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  outline: inherit;
}

h1 {
  font-size: 2.986rem;
}

h2 {
  font-size: var(--h4-size);
}

h3 {
  font-size: 2.074rem;
}

h4 {
  font-size: 1.728rem;
}

h5 {
  font-size: var(--h5-size);
}

h6 {
  font-size: var(--h6-size);
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

/*
GENERAL STYLES
*/

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 4rem 1rem;
}

.inter {
  font-family: var(--secondary-font);
  font-weight: 100;
  color: var(--secondary-color);
  font-size: 0.5rem;
}

.secondary-color {
  color: var(--secondary-color);
  font-weight: 600;
}

.button {
  border: 1px solid var(--secondary-color);
  padding: 0.5rem 1rem;
  color: var(--secondary-color);
  width: fit-content;
  font-weight: 600;
  letter-spacing: 0.04rem;
  transition: var(--transition);
}

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

/*
HEADER STYLES
*/

header {
  position: fixed;
  top: 0;
  z-index: 999;
  background-color: var(--bg-color);
  width: 100%;
}

nav {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  background-color: var(--bg-color);
  padding: 1rem;
  max-width: 1140px;
  margin: 0 auto;
}

nav ul {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

nav ul li a:hover {
  color: var(--secondary-color);
  transition: all 0.3s ease-in-out;
}

nav ul li:last-child {
  font-weight: 700;
  color: var(--secondary-color);
}

nav ul li:last-child a:hover {
  color: hsl(var(--primary-color));
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-text span:first-child {
  font-weight: 700;
}

.menu-btn {
  color: transparent;
  position: absolute;
  right: 1rem;
  transform: translateY(-50%);
  top: 50%;
  bottom: 50%;
  background: none;
  border: none;
  width: 24px;
  height: 18px;
  display: block;
  overflow: hidden;
}

.menu-btn.open span {
  width: 0px;
}

.menu-btn.open::after {
  transform: rotate(45deg);
}

.menu-btn.open::before {
  transform: rotate(-45deg);
}

.menu-btn span {
  height: 1px;
  background: var(--secondary-color);
  border-radius: 1rem;
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  bottom: 50%;
  transform: translateY(-50%);
  transform-origin: right;
  transition: var(--transition);
  width: 24px;
}

.menu-btn::before,
.menu-btn::after {
  content: "";
  height: 1px;
  transition: var(--transition);
  background: var(--secondary-color);
  border-radius: 1rem;
  position: absolute;
  left: 0;
  right: 0;
  transform-origin: left;
}

.menu-btn::after {
  top: 0px;
}

.menu-btn::before {
  bottom: 0px;
}

.menu-items {
  position: absolute;
  flex-direction: column;
  align-items: center;
  top: -500%;
  left: 0;
  z-index: -1;
  width: 100dvw;
  height: auto;
  margin-top: calc(var(--navbar-height) - 1px);
  transition: var(--transition);
  background-color: var(--bg-color);
  padding: 2rem;
}

.menu-items.open {
  top: 0px;
}

/*
HERO STYLES
*/

.title {
  color: var(--secondary-color);
}

.title span {
  color: hsl(var(--primary-color));
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

/* .hero img {
  width: 100%;
  height: auto;
} */

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/*
SOBRE MI STYLES
*/

.title-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.title-container {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.title-container h2 {
  width: 100%;
  height: min-content;
  border-bottom: 1px solid hsl(var(--accent-color));
  font-weight: normal;
}

/* 
SLIDER STYLES
*/

#medios,
#charlas {
  position: relative;
}

.slider-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  padding: 1rem 0;
}

.slider-wrapper {
  width: 100%;
  overflow: hidden;
  margin: 0 auto;
  padding-top: 5px;
  padding-bottom: 5px;
}

/* .slider {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  gap: var(--gap);
} */

.slider {
  display: flex;
  flex-wrap: wrap; /* Esto permite que al llegar a la 3ra card, la 4ta baje */
  gap: var(--gap);
  /* justify-content: center;  */ /* Opcional: para que si sobran cards, queden centradas */
}

.card {
  flex: 0 0 100%;
  height: var(--card-height);
  background: hsla(var(--card-color), .8);
  display: flex;
  padding: 1.25rem;
  border-radius: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: hsl(var(--text-color));
  position: relative;
  overflow: hidden;
}

.card.slider-2 {
  padding: 0;
  background-color: #fff;
}

.card-text {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  width: 100%;
}

.card.slider-2:hover {
  background-color: #fff;
}

.card:hover {
  transform: translateY(-5px);
  background: hsla(var(--card-color), 1);
  box-shadow: 0 12px 24px -10px rgba(0, 0, 0, 0.15);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: hsl(var(--accent-color));
  transition: height 0.3s ease;
}

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

.card-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
  width: 100%;
}

.card-image {
  width: 100%;
  height: 50%;
  object-fit: cover;
}

.card-text.slider-2 {
  padding: 1.25rem;
  color: var(--bg-color);
}

.card-text.slider-2 .card-title {
  font-size: 1.25rem;
  min-height: auto;
  padding: 0;
  background-color: transparent;
  text-align: start;
  height: min-content;
}

.card-date {
  font-family: var(--secondary-font);
  font-size: 0.875rem;
  color: var(--accent-color);
  transition: transform 0.3s ease;
}

.card:hover .card-date {
  transform: translateX(8px);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
  min-height: 220px;
  background-color: hsla(var(--accent-color), .15);
  padding: 1rem;
  border-radius: 1rem;
  position: relative;
  text-align: center;
}

.card-title .slider-2 {
  font-size: 1.25rem;
  min-height: auto;
  padding: 0;
}

.card-title.slider-2::after {
  content: none;
}

.card-title::after {
  content: url(/public/mati_logo-small.svg);
  position: absolute;
  left: 50%;
  bottom: -180px;
  transform: translateX(-50%);
  height: 100%;
}

/* .card:hover .card-title {
  color: hsl(var(--accent-color));
} */

.card-description-wrapper {
  flex: 1;
}

.card-description {
  font-size: 1rem;
  line-height: 1.5;
  opacity: 0.8;
}

.card-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
  width: fit-content;
  text-decoration: underline;
}

.card-link.slider-2 {
  color: hsl(var(--accent-color));
}

.card-link svg {
  transition: transform 0.3s ease;
}

.card-link:hover {
  opacity: 0.8;
  color: hsl(var(--text-color));
}

.card-link.slider-2:hover {
  color: hsl(var(--bg-color));
}

.card-link:hover svg {
  transform: translateX(4px);
}

.buttons {
  margin-left: auto;
  margin-right: 1rem;
}

/*
  EXPERIENCIA STYLES
*/



.experiencia-h6 {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 200;
  line-height: normal;
}


.barra-color {
    color: var(--secondary-color);
}

/*
  JUMBOTRON STYLES
*/

.jumbotron {
  position: relative;
  height: 50vh;
}

.fingerprints {
  position: absolute;
  width: 120px;
  height: 120px;
}

.fingerprints:nth-child(1) {
  top: 0;
  right: 0;
}

.fingerprints:nth-child(2) {
  bottom: 0;
  transform: rotate(180deg);
}

.jumbotron-text {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 10;
}

.jumbotron-text p:nth-child(1) {
  text-transform: uppercase;
}

.jumbotron-text p:last-child {
  text-decoration: underline;
}

.jumbotron h2 {
  text-transform: uppercase;
}

/*
FOOTER STYLES
*/
footer {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  justify-content: center;
  align-items: center;
}

.footer-text {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-text p {
  font-size: 1.5rem;
}

footer p {
  text-align: center;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.social-icons a {
  width: 3rem;
  height: 3rem;
  background-color: hsla(var(--text-color), 0.8);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.social-icons svg {
  fill: var(--bg-color);
}

.social-icons a:hover {
  background-color: hsla(var(--text-color), 1);
}

/*
MEDIA QUERIES
*/

@media screen and (min-width: 980px) {

  .main-container {
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  
  .menu-btn {
    display: none;
  }

  .menu-items {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    padding: 0;
    position: static;
    z-index: 0;
    margin-top: 0;
    width: fit-content;
  }

  .inter {
    font-size: 0.75rem;
  }

  .hero {
    flex-direction: row;
    gap: 3rem;
    justify-content: space-between;
  }

  .hero img {
    width: 350px;
    height: auto;
  }

  .hero-text {
    width: 50%;
  }

  .title-wrapper {
    flex-direction: row;
    align-items: flex-start;
  }

  .title-wrapper.col {
    flex-direction: column;
  }

  .about-text,
  .title-container {
    width: 50%;
  }

  .title-container.full {
    width: 100%;
  }

  .slider-wrapper {
    max-width: 100%;
  }
  
  .card {
    flex: 0 0 calc((100% - var(--gap) * 2) / 3);
  }

  .card-title {
    height: 220px;
  }

  .card-title::after {
    bottom: -180px;
  }

  .buttons {
    margin-right: 0;
  }

  .fingerprints {
    width: 160px;
    height: 160px;
  }

  .jumbotron {
    order: 1;
  }

  #charlas {
    order: 2;
  }

  footer {
    order: 3;
  }

}

@media screen and (min-width: 680px) and (max-width: 979.98px) {
  .slider-wrapper {
    max-width: 100%;
  }
  
  .card {
    flex: 0 0 calc(50% - var(--gap)/2);
  }
  

}

@media screen and (max-width: 679.98px) {
  .slider-wrapper {
    max-width: min(var(--card-width), 100%);
  }
  
  .card {
    width: calc(100% - 2rem);
    min-width: auto;
  }
}

@media screen and (max-width: 368px) {
  :root {
    --card-width: 280px;
  }

  .container {
    padding: 2rem 1rem;
  }

  .hero img {
    width: 300px;
    height: auto;
  }
  
  .slider-wrapper {
    max-width: 100%;
  }
  
  .card {
    width: calc(100% - 2rem);
    min-width: auto;
    padding: 1.5rem;
    height: 380px;
  }
  
  .card-title {
    font-size: 1.25rem;
    min-height: 130px;
  }

  .card-title::after {
    bottom: -100px;
  }
}