/* Variables y Estilos Globales */
:root {
  --primary-color: #005a9c;
  --secondary-color: #003366;
  --accent-color: #28a745;
  --bg-color: #f4f7f9;
  --card-bg: #ffffff;
  --text-color: #333333;
  --border-radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: var(--bg-color);
  color: var(--text-color);
}

/* Encabezado */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Navegación */
nav {
  background-color: var(--secondary-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  flex-wrap: wrap;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 1rem 1.2rem;
  display: block;
  font-weight: 500;
  transition: background-color 0.3s;
}

nav a:hover, nav a.active {
  background-color: var(--primary-color);
  border-bottom: 4px solid #ffcc00;
}

/* Contenido Principal */
main {
  max-width: 1050px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Tarjetas y Rejillas */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.card {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.dua-box {
  border-left: 5px solid var(--accent-color);
  margin-top: 1.5rem;
}

.note {
  background-color: #e9ecef;
  padding: 1rem;
  border-left: 4px solid var(--primary-color);
  margin-top: 1.5rem;
}

/* Preguntas del Quiz */
.quiz-container {
  margin-top: 1.5rem;
}

.question {
  background: var(--card-bg);
  padding: 1.2rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.question p {
  margin-bottom: 0.5rem;
}

.question button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.7rem;
  margin: 0.4rem 0;
  background: #e9ecef;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s;
}

.question button:hover {
  background: #dce2e6;
}

.feedback {
  font-weight: bold;
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.correct { color: #28a745; }
.incorrect { color: #dc3545; }

/* ABP Card */
.abp-card {
  border-top: 5px solid var(--primary-color);
}

.abp-card ol {
  margin-left: 1.5rem;
  margin-top: 1rem;
}

.abp-card li {
  margin-bottom: 0.8rem;
}

/* Pie de Página */
footer {
  text-align: center;
  padding: 2rem;
  background-color: var(--secondary-color);
  color: white;
  margin-top: 3rem;
}

@media (max-width: 600px) {
  nav ul {
    flex-direction: column;
  }
  nav a {
    text-align: center;
  }
}
/* Estilos para respuestas seleccionadas y deshabilitadas */
.question button.disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.question button.selected {
  opacity: 1;
  font-weight: bold;
  border-width: 2px;
}

.question button.btn-correct {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.question button.btn-incorrect {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}