/*
// Reglas para CSS
1. Posicionamiento
2. Modelo de caja (box model)
3. Tipografia
4. Visuales 'efecto visuales como el hover'
5. Otras / Miselaneos

// Breakpoints
xs: 360px; // extra chico, extra small
  // @media (width >= xs)
sm: 640px; // chico, small
  // @media (width >= sm)
md: 768px; //mediano, medium
  // @media (width >= md)
lg: 1024px; // largo, large
  // @media (width >= lg)
xl: 1280px; // extra largo, extra large
  // @media (width >= xl)
2xl: 1536px; // 1440px doble extra largo
  // @meia (width >= 2xl)
*/

/* varialble para colores */
:root {
  --xs: 360px;
  --s: 640px;
  --md: 768px;
  --lg: 1024px;
  --xl: 1280px;
  --xxl: 1536px;

  --icon-toggle-menu: url("../assets/icons/menu/menu_black.svg");
  --transform-menu-show: translate(100%);

  --color-orange: oklch(0.6903 0.1849 47.69);
  --color-grey: oklch(0.963 0.0093 99.98);
  --color-back: oklch(0.2133 0.0067 34.3);
  --color-white: oklch(1 0 0);

  /* Uso de clamp() para tamaños de fuente responsivos que se ajustan automáticamente 
           basados en el viewport sin necesidad de media queries */
  --tamano-fuente-peq: clamp(0.8rem, 0.7rem + 0.5vw, 1rem);
  --tamano-fuente-base: clamp(1rem, 0.9rem + 0.5vw, 1.25rem);
  --tamano-fuente-grande: clamp(1.5rem, 1.4rem + 0.5vw, 2rem);
  --tamano-fuente-xl: clamp(2rem, 1.8rem + 1vw, 3rem);

  /* Espaciado */
  --espaciado-xs: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --espaciado-peq: clamp(0.75rem, 0.65rem + 0.5vw, 1rem);
  --espaciado-med: clamp(1rem, 0.9rem + 0.5vw, 1.5rem);
  --espaciado-grande: clamp(1.5rem, 1.4rem + 0.5vw, 2.5rem);
  --espaciado-xl: clamp(2rem, 1.8rem + 1vw, 4rem);

  /* Bordes */
  --radio-borde: 8px;

  /* Iconos de menu */
  --icon-menu-white: url("../assets/menu/menu_white.svg");
  --icon-close-white: url("../assets/menu/close_white.svg");

  --transform-menu-show: translate(-100%);
}

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

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

html {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  /* font-size: 62.5%; */
  /* 100% = 16px, (10 * 100) / 16 = 62.5% =>  1rem = 10px*/
  /*100  === normal*/
  /* scrollbar-color: var(--detalles) var(--fondo-principal); */
  scrollbar-width: thin;
}

input,
button,
textarea,
select {
  font: inherit;
}

p {
  font-size: var(--tamano-fuente-base);
  text-wrap: pretty;
  color: var(--color-back);
}

ul {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
}

body {
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  line-height: 1.6;
  /* width: 100dvw; */
  /* padding: var(--espaciado-xs); */
  background-color: var(--color-grey);
}

.container {
  width: 100%;
  min-width: 320px;
  max-width: 1200px;
  /* width: min(360px, 1024px); */
  margin: 0 auto;
  padding: var(--espaciado-xs);
}

.header {
  position: sticky;
  top: 1rem;
  z-index: 1;

  height: 80px;
}

main {
  display: grid;
  gap: 1rem;
  container-type: inline-size;
}

.footer {
  border-radius: var(--radio-borde);
  background-color: var(--fondo-secundario);
  height: 60px;
  color: var(--color-paragraph);
  text-align: center;
}

.btn-primary {
  font-size: var(--tamano-fuente-base);
  font-weight: bold;
  padding: 0.4em 1em;
  border-radius: var(--radio-borde);
  background-color: var(--color-orange);
  color: var(--color-white);
  align-self: center;
  text-decoration: none;
  text-align: center;
}

.btn-secundary {
  font-size: var(--tamano-fuente-base);
  font-weight: bold;
  padding: 0.4em 1em;
  border-radius: var(--radio-borde);
  border: solid 2px var(--color-button);
  color: var(--color-button-text);
  align-self: center;
  text-decoration: none;
  text-align: center;
}

.btn-card-primary {
  padding: 0.4em 0.8em;
  font-size: var(--tamano-fuente-peq);
  font-weight: 500;
  border-radius: 0.8em;
  background-color: var(--color-orange);
  color: var(--color-white);
  align-self: center;
  text-decoration: none;
  text-align: center;
}
.btn-card-secundary {
  width: 100%;
  padding: 0.2em 0.8em;
  font-size: var(--tamano-fuente-peq);
  font-weight: 500;
  border-radius: 0.8em;
  border: solid 1px var(--color-back);
  color: var(--color-black);
  background-color: var(--color-white);
  align-self: center;
  text-decoration: none;
  text-align: center;
}

.desabled {
  pointer-events: none;
  opacity: 0.6;
}

.lines {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
