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

:root {
    --primary: #3b4550;
    --primary-dark: #0a3d66;
    --primary-hover: #0d5ba8;
    --primary-light: #09f;
    --background: #06182a;
    --text-primary: #ffffff;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
    --border2: rgba(255, 255, 255, 0.3);
    --card-bg: #1e293b;
    --shadow: rgba(0, 0, 0, 0.3);
    --input-bg: #1e293b;
    --hsla-example: hsla(210, 100%, 56%, 1);
}

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(https://cdn.jsdelivr.net/fontsource/fonts/inter:vf@latest/latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

body {
  font-family: system-ui;
  background-color: var(--background);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
}

/* Títulos principales */
h1 {
  font-size: 1.5rem;
  line-height: 1.2;
  text-wrap: balance;
  display: flex;
  align-items: center;
  gap: 0.5rem;

  svg {
    width: 2rem;
    height: 2rem;
    color: var(--primary-light);
  }
}

/* solo se le aplica los estilos al primer parrafo seguido de un h1 */
h1 + p {
  text-wrap: balance;
  margin-bottom: 2rem
}

/* Header */
header {
  border-bottom: 1px solid var(--border);
  background: var(--background);
  padding: .5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;

  h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
  }
}

/* Navegación del header a otras páginas */
nav {
  align-items: center;
  gap: 1rem;
  display: flex;

  a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.2s;
    font-weight: 500;

    &:hover, &:focus {
      color: var(--primary);
      outline: none;
    }
  }
}

/* Botones del Header */
header div a {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background-color: #334155;
  color: var(--text-primary);
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  /* TODO */
}

/* Hero */
main > section:nth-child(1) {
  height: 500px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  h1 {
    padding-top: 36px;
  }

  & > img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    left: 0;
    right: 0;
    mask-image: linear-gradient(to bottom, rgba(16, 25, 34, 1) 5%, rgba(16, 25, 34, 0) 80%);
  }
}

/* Formulario de Búsqueda */
form {
  max-width: 42rem;
  width: 100%;
  margin: 0 auto;
  padding-inline: 1rem;
}

form > div {
  display: flex;
  align-items: center;
  background-color: var(--input-bg);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px var(--shadow);
  padding: 0.5rem;
  gap: 0.5rem;
}

form span {
  padding-left: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

form input[type="text"] {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  padding: 0.75rem 0.5rem;
  font-size: 1rem;
  font-family: inherit;
}

form input[type="text"]::placeholder {
  color: #64748b;
}

button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background-color: var(--primary);
  color: white;
  font-weight: 400;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  font-size: 1rem;
  white-space: nowrap;

  &:hover, /* pseudo-clase que significa que el ratón está encima */
  &:focus { /* pseudo-clase que significa que el elemento tiene el foco */
    background-color: var(--primary-hover);
    outline: 2px solid white;
    outline-offset: 2px;
  }

  &:active { 
    transform: scale(0.95)
  }

  &:disabled {
    opacity: .5;
    pointer-events: none;
  }


}

/* Features Section */
main > section:nth-child(2) {
  padding-inline: 1rem;
  background-color: var(--background);
  padding-top: 2rem;

  & > header {
    gap: 2px;
    flex-direction: column;

    h2 {
      margin-bottom: 0;
    }

    p {
      opacity: .75;
    }
  }

  & > div {
    max-width: 1280px;
    margin: 0 auto;
  }
}

main > section:nth-child(2) h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

main > section:nth-child(2) > div > div:first-child > p {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 42rem;
  margin: 0 auto;
}

/* Grid de Features */
main > section:nth-child(2) footer {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px
}

/* Feature Cards */
/* article {
  background-color: var(--card-bg);
  padding: 2rem;
  margin-bottom: 16px;
  border-radius: 0.5rem;                   
  box-shadow: 0px 1px 3px 0 var(--shadow); 

  svg {
    color: var(--primary-light);          
    background: rgba(0, 153, 255, 0.3);  
    border-radius: 9999px;               
    width: 64px;                         
    height: 64px;                        
    padding: 16px;                       
  }

  h3 {
    font-weight: 500;
  }

  p {
    color: var(--text-muted);
  }
} */

/* Footer */
footer {
  background-color: var(--background);
  border-top: 1px solid var(--border);
  text-align: center;
  padding: 16px;

  small {
    color: var(--text-muted);
    font-size: 0.875rem;
  }
}

article {
  background-color: var(--card-bg);
  padding: 2rem;
  margin-bottom: 16px;
  border-radius: 0.5rem;
  box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.5);

  svg {
    color: var(--primary-light);
    background: rgba(0, 153, 255, .3);
    width: 64px;
    height: 64px;
    border-radius: 100%;
    padding: 16px;
  }

  p {
    color: var(--text-muted);
  }

  h3 {
    font-weight: 500;
  }
}

.jobs-search {
  margin: 0;
  padding: 0;
  /* no se deveria de hacer, en un futuro buscar solucionar por medio de clases*/
  height: auto !important;

  h1 {
    font-size: 2.5rem;
    margin-bottom: .25rem;
  }

  p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
  }

  .search-bar {
    background: var(--input-bg);
    padding: .25rem .5rem;
  }

  .search-filters {
    display: flex;
    flex-wrap: wrap;
    margin-top: .5rem;
  }
  
  form {
    width: 100%;
    max-width: 1280px;
  }

  form div {
    background: none;
    box-shadow: none;
    padding: 0;
  }

  select {
    background-color: var(--card-bg);
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    outline: none;
    border: none;
    border-radius: .5rem;
    margin-top: .5rem;
    margin-right: .5rem;

    option {
      color: var(--text-muted);
      
    }
  }
}


.busquedas {
  max-width: 1280px; /* O el ancho máximo que use tu diseño */
  margin: 0 auto;    /* Centra la sección en la pantalla */
  

  h2 {
    margin-bottom: 1.5rem; /* Le da espacio vertical antes de la lista */
  }
}

.lista-busquedas {
  border: 1px solid var(--border2);
  border-radius: 1rem;

  article {
    background: none;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid var(--border2);
    margin: 0;

    display: flex;
    align-items: start;
    gap: 1rem;

    small {
      font-size: .875rem;
      color: var(--text-muted);
    }

    h3 {
      font-weight: bold;
      margin-bottom: .25rem;
    }
    p {
      margin-top: .5rem;
      color: var(--text-secondary);
    }

    &:last-child {
      border-bottom: none;
    }
  }
}

.paginacion {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin: 2rem 0;

  a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: .375rem;
    transition: all .3s;

    &:hover, &:focus{
      background: white;
    }
    
    &:active {
      transform: scale(0.90);
    }

    &.is-active {
      background-color: var(--primary-light);
      color: white;
      pointer-events: none;
    }
  }

  
}