:root {
  /* Colores */
  --primary: #b6001c;
  --dark-bg: #1d1f23;
  --light-bg: #fdfdfd;
  --text: #111;
  --text-light: #fff;

  /* Tipografía */
  --font: 'Poppins', sans-serif;

  /* Transiciones */
  --tran: 0.3s ease;

    /* Tamaño del logo */
  --logo-width: 120px;   /* Ajusta este valor */
  --logo-height: auto;   /* O un valor fijo como 80px */
}

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--light-bg);
  color: var(--text);
  scroll-behavior: smooth;
}

.header {
  position: sticky;
  top: 0;
  background: var(--light-bg);
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
  z-index: 100;
}

.logo img {
  width: var(--logo-width);
  height: var(--logo-height);
  object-fit: contain;    /* Asegura que mantenga proporción */
}

.nav {
  display: flex;
  align-items: center;
}

.nav__list {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}

.nav__link {
  text-decoration: none;
  font-weight: 600;
  color: var(--text);
  transition: color var(--tran);
}

.nav__link:hover,
.nav__link:focus {
  color: var(--primary);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--text);
  transition: var(--tran);
}

.hamburger::before,
.hamburger::after {
  content: '';
  position: relative;
}

.hamburger::before { top: -6px; }
.hamburger::after { top: 3px; }

.theme-toggle {
  border: none;
  background: none;
  font-size: 1.2rem;
  margin-left: 1rem;
  cursor: pointer;
}

.hero {
  text-align: center;
  padding: 4rem 1rem;
  background: var(--light-bg);
}

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

.hero h1 span {
  color: var(--primary);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--text-light);
  text-decoration: none;
  border-radius: 4px;
  transition: background var(--tran);
}

.btn:hover { background: darken(var(--primary), 10%); }

.content {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.module-card {
  background: var(--light-bg);
  border: 1px solid #ccc;
  padding: 1.5rem;
  border-radius: 6px;
  transition: transform var(--tran), box-shadow var(--tran);
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.full-width { grid-column: 1 / -1; }

.table-wrapper { overflow-x: auto; margin-top: 1rem; }

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.75rem;
  border: 1px solid #ccc;
}

.toolbar-list {
  list-style: none;
  padding-left: 0;
  columns: 2;
}

.back-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: none;
  border: none;
  background: var(--primary);
  color: var(--text-light);
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .nav__list { 
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--light-bg);
    flex-direction: column;
    width: 200px;
    transform: translateX(100%);
    transition: transform var(--tran);
  }
  .nav__list.open { transform: translateX(0); }
  .nav-toggle { display: block; }
}

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

footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: color var(--tran);
}

footer a:hover,
footer a:focus {
  color: var(--primary);
  text-decoration: underline;
}

