/* ================================
   Paleta de Colores
   ================================ */
:root {
  --color-blanco: #ffffff;
  --color-negro: #000000;
  --color-gris-claro: #f5f5f5;
  --color-gris-medio: #cccccc;
  --color-gris-oscuro: #333333;

  --fuente-principal: "Inter", sans-serif;
  --fuente-secundaria: "Playfair Display", serif;
}

/* ================================
   Reset y Tipografía Base
   ================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-blanco);
  color: var(--color-negro);
  font-family: var(--fuente-principal);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ================================
   Encabezados y Párrafos
   ================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--fuente-secundaria);
  color: var(--color-negro);
  margin-bottom: 1rem;
  font-weight: 700;
}

p {
  margin-bottom: 1rem;
  color: var(--color-gris-oscuro);
}

/* ================================
   Enlaces
   ================================ */
a {
  color: var(--color-negro);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-gris-oscuro);
}

/* ================================
   Botones
   ================================ */
button,
.btn {
  background-color: var(--color-negro);
  color: var(--color-blanco);
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

button:hover,
.btn:hover {
  background-color: var(--color-gris-oscuro);
}

/* ================================
   Contenedores y Secciones
   ================================ */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 0;
}

.section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--color-gris-claro);
}

/* ================================
   Formularios
   ================================ */
input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--color-gris-medio);
  background-color: var(--color-blanco);
  color: var(--color-negro);
  font-family: var(--fuente-principal);
  margin-bottom: 1rem;
  transition: border-color 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--color-gris-oscuro);
  outline: none;
}

/* ================================
   Imágenes
   ================================ */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ================================
   Footer
   ================================ */
footer {
  background-color: var(--color-negro);
  color: var(--color-blanco);
  padding: 2rem 0;
  text-align: center;
}

footer a {
  color: var(--color-blanco);
  margin: 0 0.5rem;
}

footer a:hover {
  color: var(--color-gris-claro);
}

/* ================================
   Responsividad
   ================================ */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .container {
    width: 95%;
  }
}

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--color-negro);
  color: var(--color-blanco);
  border: none;
  padding: 12px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 100;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}
