/* Tipografía y color general */
body, h1, h2, h3, h4, h5, h6, p, table, th, td, input, button, label, a, nav {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  color: #333;
}

/* Estructura general del body */
body {
  background-color: #f9fbfd;
  margin: 20px;
  position: relative;
}

/* Fondos dinámicos */
body::before,
body.login-page::before,
body.menu-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0.7;
  z-index: -1;
}

body::before {
  background-image: url("../img/fondos/fondo-pasteles.jpg");
}

body.login-page::before {
  background-image: url("../img/fondos/fondo-login2.png");
}

body.menu-page::before {
  background-image: url("../img/fondo-login.jpg");
  opacity: 0.6;
}

/* Títulos */
h2, h3, h4 {
  color: #004080;
  text-align: center;
  margin: 40px 0 20px;
  text-shadow: 2px 2px 5px #f7f5f5;
}

h2 {
  font-size: 28px !important;
}

h3 {
  font-size: 24px !important;
}

h4 {
  font-size: 18px !important;
  text-shadow: none;
}

/* Contenedor de tablas */
.table-container {
  max-width: 900px;
  margin: 0 auto;
  display: block;
  padding: 0 10px;
}

/* Tablas */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 64, 128, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background-color: #004080;
}

thead th {
  padding: 12px 15px;
  text-align: left;
  font-weight: bold;
}

tbody tr:nth-child(even) {
  background-color: #e6f0ff;
}

tbody tr:nth-child(odd) {
  background-color: #fff;
}

tbody td {
  padding: 10px 15px;
  border-bottom: 1px solid #d6e0f5;
  text-align: center;
}

tbody tr:hover {
  background-color: #cce0ff;
}

/* Navbar superior */
nav {
  background-color: #003366;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 768px;
  margin: 0 auto;
}

nav a {
  color: white;
  text-decoration: none;
  font-weight: bold;
}

nav a:hover {
  text-decoration: underline;
}

/* Navbar alternativa */
.navbar {
  padding: 0.5rem 1rem;
  background-color: #f8f9fa !important;
  justify-content: flex-end;
  font-size: 16px !important;
}

.navbar a.nav-link {
  color: #004080 !important;
  font-weight: bold;
}

.navbar a.nav-link:hover {
  text-decoration: underline;
  color: #002b55 !important;
}

/* Login */
.login-form {
  width: 300px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background-color: #f9f9f9;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.login-form h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 20px;
}

.login-form label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
  color: #555;
}

.login-form input[type="password"] {
  width: 92%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 14px;
}

.login-form input[type="submit"] {
  width: 100%;
  padding: 10px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
}

.login-form input[type="submit"]:hover {
  background-color: #45a049;
}

/* Menú principal */
.menu-container {
  text-align: center;
  padding: 2rem;
}

.menu-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 300px;
  margin: 0 auto;
}

.menu-buttons a {
  text-decoration: none;
}

.menu-button {
  padding: 12px 20px;
  font-size: 16px;
  background-color: #007BFF;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

.menu-button:hover {
  background-color: #0056b3;
}

/* Grilla de PDFs */
.grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.pdf-item {
  text-align: center;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 15px;
  transition: transform 0.2s;
}

.pdf-item:hover {
  transform: scale(1.03);
}

.pdf-item img {
  width: 100px;
  height: auto;
  margin-bottom: 10px;
}

.pdf-item a {
  text-decoration: none;
  color: #333;
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .navbar {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}
