:root {
  /* Colores de fondo */
  --bg: #fcfcfc60;
  --bg-transparent: rgba(255, 255, 255, 0.6);
  --bg-alt: #f6f6f6;

  /* Colores de texto */
  --text: #212529;
  --text-alt: #4F4F4F;

  /* Colores principales */
  --primary: #d4122e;
  --accent: #0071ff;

  /* Tonos de gris para botón en modo claro */
    --button-bg: #6C757D;
    --button-text: #DEE2E6;
    --button-hover-bg: #5a6268;

}

[data-theme="dark"] {
  /* Colores de fondo */
  --bg: #212529;
  --bg-transparent: rgba(33, 37, 41, 0.25);
  --bg-alt: #2B3035;

  /* Colores de texto */
  --text: #fcfcfc;
  --text-alt: #DEE2E6;

  /* Colores principales */
  --primary: #d4122e;
  --accent: #4a90ff;

  --button-bg: #6C757D;
  --button-text: #FCFCFC;
  --button-hover-bg: #495057;
  
}

body {
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}

header,
section {
  padding: 60px min(40px, 6%);
  background-color: var(--bg-alt);
  transition: background-color 0.3s ease;
}

p {
  margin: 10px 0 20px 0;
  color: var(--text-alt);
}

button {
  border: none;
  padding: .8em 2em;
  background-color: var(--button-bg);
  color: var(--button-text);
  border-radius: 4px;
  font: inherit;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
}

button:hover {
  background-color: var(--button-hover-bg);
}

.cta-button {
  background-color: var(--accent);
  color: var(--button-text);
}

/* Botón de cambio de tema */
.theme-switch-container {
  position: fixed;
  bottom: 100px;
  right: 24px;
  z-index: 1000;
}

#theme-switch {
  height: 50px;
  width: 50px;
  padding: 0;
  border-radius: 50%;
  background-color: var(--bg-alt);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  border: none;
  cursor: pointer;
  position: relative;
  /* necesario para que los iconos absolutos se acomoden */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  /* sombra ligera */
}

#theme-switch i {
  color: var(--primary);
  position: absolute;
  transition: opacity 0.3s ease;
}

#theme-switch i:last-child {
  opacity: 0;
}

/* Cambios de icono según el tema */
[data-theme="dark"] #theme-switch i:first-child {
  opacity: 0;
}

[data-theme="dark"] #theme-switch i:last-child {
  opacity: 1;
}