/* ========================
   VARIABLES GLOBALES
======================== */
:root {
  --color-primary: #c50808;
  --color-primary-light: #c50808;
  --color-bg: #ffffff;
  --color-bg-alt: #f5f5f5;
  --color-text: #212121;
  --color-text-light: #666666;
}

.dark-mode {
  --color-primary: #c50808;
  --color-primary-light: #ef5350;
  --color-bg: #121212;
  --color-bg-alt: #1e1e1e;
  --color-text: #e0e0e0;
  --color-text-light: #aaaaaa;
}

.text-back {
  color: black !important;
}

/* ========================
   RESET BÁSICO
======================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Playfair Display", "Georgia", serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* ========================
   LAYOUT GLOBAL
======================== */
header {
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 1rem 2rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  font-weight: bold;
  color: white;
}

p {
  font-weight: 400;
  line-height: 1.6;
}

footer {
  background: var(--color-primary);
  color: var(--color-bg);
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

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

.card {
  background: var(--color-bg);
  border: 1px solid #ddd;
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

button,
.btn {
  display: inline-block;
  background: var(--color-primary);
  color: var(--color-bg);
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-weight: bold;
}

button:hover,
.btn:hover {
  background: var(--color-primary-light);
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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


/* NAVBAR */
/* style.css */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-height: 78px;
  background: #c50808;
  color: white;
  padding: 2px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-100%);
  opacity: 0;
  animation: slideDown 0.8s ease-out forwards;
  z-index: 1000;
}

/* Keyframes para animación */
@keyframes slideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


.navbar .logo {
  font-size: 1.5rem;
  font-weight: bold;
}

/* NAV LINKS */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1rem;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-weight: bold;
}

.nav-links a:hover {
  text-decoration: underline;
}

/* HAMBURGER BUTTON */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    background-color: #c50808;
    position: absolute;
    top: 60px;
    right: 10px;
    padding: 1rem;
    border-radius: 8px;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: flex;
  }
}

/* Botón dark */
.dark-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: white;
  transition: transform 0.3s;
}

.dark-toggle:hover {
  transform: rotate(20deg);
}

@media (max-width: 768px) {
  .dark-toggle {
    display: block;
  }
}


/* Footer */
.footer {
  background-color: #111;
  color: #eee;
  padding: 40px 20px 20px;
  font-family: "Merriweather", serif;
  bottom: 0;
  /* estilo periódico */
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-column {
  flex: 1 1 300px;
}

.footer-column h3 {
  margin-bottom: 15px;
  font-size: 1.2rem;
  border-bottom: 2px solid #555;
  display: inline-block;
  padding-bottom: 5px;
}

.footer-column p,
.footer-column ul,
.footer-column a {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-column ul {
  list-style: none;
  padding: 0;
}

.footer-column ul li {
  margin: 5px 0;
}

.footer-column ul li a {
  text-decoration: none;
  color: #eee;
  transition: color 0.3s;
}

.footer-column ul li a:hover {
  color: #ff4500;
}

.social-icons a {
  display: inline-block;
  margin-right: 10px;
  color: #eee;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.social-icons a:hover {
  color: #ff4500;
}

.footer-bottom {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 20px;
  background: #111;
  color: #fff;
  font-size: 14px;
  flex-wrap: wrap;
  /* para que en móviles se acomode en dos líneas */
}

.footer-bottom p {
  margin: 5px 0;
}

.page-btn {
  padding: 6px 12px;
  margin: 0 4px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
  color: #111;
}

.page-btn.active {
  background: #007bff;
  color: #fff;
  border-color: #007bff;
}

.scroll-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  background: none;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 40px;
  cursor: pointer;
  display: none; /* se muestra solo al llegar al final */
  /* transition: opacity 0.3s; */
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-top:hover,
.scroll-top:focus,
.scroll-top:active {
  background: none;
  color: inherit;
  outline: none;
  box-shadow: none;
}