/* -------------------- RESET Y BASE -------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", sans-serif;
  background-color: #f4f6f8;
  color: #333;
  padding: 20px;
}

/* -------------------- ENCABEZADO FIJO -------------------- */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: linear-gradient(90deg, #171a6d, #03041828);
  color: white;
  padding: 15px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  margin: 0;
  font-size: 24px;
}

.menu-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  display: none;
}

.nav-links {
  display: flex;
  gap: 25px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.nav-links a i {
  margin-right: 8px;
}

.nav-links a:hover {
  transform: scale(1.1);
  text-decoration: underline;
}

/* -------------------- CONTENIDO PRINCIPAL -------------------- */
main {
  padding: 120px 30px 30px;
}

.container {
  max-width: 800px;
  margin: auto;
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

h2,
h3 {
  margin-bottom: 20px;
  color: #0078d7;
}

/* -------------------- FORMULARIOS -------------------- */
form input,
form textarea,
form select {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 16px;
}

form input[type="submit"] {
  background-color: #0078d7;
  color: white;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

form input[type="submit"]:hover {
  background-color: #005fa3;
}

/* -------------------- TABLAS -------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

th {
  background-color: #f0f2f5;
  color: #555;
}

tr:hover {
  background-color: #f9f9f9;
}

/* -------------------- TARJETAS -------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 30px;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.6s ease forwards;
  opacity: 0;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 16px;
  color: #0078d7;
}

.card-body {
  font-size: 15px;
  color: #444;
  margin-bottom: 15px;
}

.card-footer a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: #0078d7;
  font-weight: bold;
  transition: color 0.3s ease;
}

.card-footer a:hover {
  color: #005fa3;
}

.card-footer img.pdf-icon {
  width: 20px;
  margin-right: 8px;
  transition: transform 0.2s ease;
}

.card-footer a:hover img.pdf-icon {
  transform: scale(1.1);
}

/* -------------------- ANIMACIONES -------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------------- RESPONSIVE -------------------- */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    top: 70px;
    right: 0;
    background-color: #4e54c8;
    flex-direction: column;
    width: 100%;
    display: none;
    padding: 10px 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 10px 20px;
    border-top: 1px solid rgba(252, 251, 251, 0.2);
  }

  .container {
    padding: 20px;
  }

  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  th {
    display: none;
  }

  td {
    position: relative;
    padding-left: 50%;
    border-bottom: 1px solid #eee;
  }

  td::before {
    position: absolute;
    left: 15px;
    top: 12px;
    white-space: nowrap;
    font-weight: bold;
    color: #555;
    content: attr(data-label);
  }
}
