/* style.css */
:root { 
  --bg:#0f1320; 
  --card:#151a2c; 
  --ink:#e7e9f3; 
  --muted:#a8adc2; 
  --accent:#6dd6ff; 
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; 
}

body { 
  background: var(--bg); 
  color: var(--ink); 
  line-height: 1.5; 
  padding: 24px; 
  font-family: system-ui, sans-serif; 
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header, footer { 
  text-align: center; 
  margin-bottom: 24px; 
}

header h1 { 
  font-size: 2rem; 
  margin-bottom: 8px; 
}

.utility-bar { 
  position: sticky; 
  top: 0; 
  z-index: 1000; 
  background: rgba(21,26,44,0.95); 
  backdrop-filter: blur(6px); 
  border: 1px solid #202744; 
  border-radius: 12px; 
  padding: 10px; 
  margin: 16px auto 24px; 
  max-width: 1200px; 
  display: flex; 
  align-items: center; 
  gap: 12px; 
  justify-content: center; 
}

.dropdown { 
  position: relative; 
  min-width: 220px; 
}

.dropdown-toggle { 
  width: 100%; 
  display: inline-flex; 
  align-items: center; 
  gap: 10px; 
  justify-content: center; 
  padding: 10px 14px; 
  border-radius: 12px; 
  border: 1px solid #202744; 
  background: #1a2040; 
  color: var(--ink); 
  cursor: pointer; 
  user-select: none; 
}

.hamburger { 
  display: inline-flex; 
  flex-direction: column; 
  gap: 3px; 
}

.hamburger span { 
  display: block; 
  width: 16px; 
  height: 2px; 
  background: var(--ink); 
  border-radius: 2px; 
}

.dropdown-menu { 
  position: absolute; 
  top: calc(100% + 8px); 
  left: 0; 
  right: 0; 
  background: var(--card); 
  border: 1px solid #202744; 
  border-radius: 12px; 
  padding: 8px; 
  display: none; 
  max-height: 60vh; 
  overflow: auto; 
  box-shadow: 0 8px 20px rgba(0,0,0,0.35); 
}

.dropdown.open .dropdown-menu { 
  display: block; 
}

.dropdown-menu a { 
  display: block; 
  padding: 10px 12px; 
  border-radius: 8px; 
  color: var(--ink); 
  text-decoration: none; 
  border: 1px solid transparent; 
}

.dropdown-menu a:hover { 
  background: #1f2543; 
  border-color: #2b345a; 
}

.search-box { 
  position: relative; 
  width: 100%; 
  max-width: 600px; 
  flex: 1 1 auto; 
}

.search-icon { 
  position: absolute; 
  left: 12px; 
  top: 50%; 
  transform: translateY(-50%); 
  font-size: 1.1rem; 
  color: var(--muted); 
  pointer-events: none; 
}

#search { 
  width: 100%; 
  padding: 10px 16px 10px 36px; 
  border-radius: 12px; 
  border: 1px solid #202744; 
  background: var(--card); 
  color: var(--ink); 
  font-size: 1rem; 
  outline: none; 
  transition: box-shadow 0.3s, border-color 0.3s; 
}

#search::placeholder { 
  color: var(--muted); 
}

#search:focus { 
  border-color: var(--accent); 
  box-shadow: 0 0 8px var(--accent); 
}

main { 
  max-width: 1200px; 
  margin: 0 auto;
  width: 100%;
  flex: 1;
}

.grid { 
  display: flex; 
  flex-direction: column; 
  gap: 24px; 
}

.section { 
  background: var(--card); 
  border: 1px solid #202744; 
  border-radius: 14px; 
  padding: 20px; 
  box-shadow: 0 4px 8px rgba(0,0,0,0.3); 
}

.bar { 
  height: 6px; 
  border-radius: 6px; 
  margin-bottom: 12px; 
  background: linear-gradient(90deg, var(--accent), #9a7cff); 
}

h1, h2 { 
  text-align: center; 
  margin-bottom: 16px; 
}

h2 { 
  margin-top: 24px; 
  color: #6dd6ff; 
  margin: 0 0 12px; 
  font-size: 1.4rem; 
  text-align: center; 
}

table { 
  width: 100%; 
  border-collapse: collapse; 
  font-size: 1rem; 
  margin-top: 12px; 
  table-layout: fixed;
}

th, td { 
  padding: 10px; 
  border-bottom: 1px solid #202744; 
  text-align: center;
  word-wrap: break-word;
}

th { 
  color: var(--muted); 
  font-weight: 600; 
}

/* Especificar anchos de columnas para mejor distribución */
th:nth-child(1), td:nth-child(1) { 
  width: 60%; 
  text-align: left;
}

th:nth-child(2), td:nth-child(2) { 
  width: 20%; 
}

th:nth-child(3), td:nth-child(3) { 
  width: 20%; 
}

tbody tr:hover { 
  background-color: rgba(109,214,255,0.2); 
  cursor: pointer; 
}

footer { 
  margin-top: 40px; 
  color: var(--muted); 
  font-size: 0.9rem; 
  text-align: center;
}

footer a { 
  color: var(--accent); 
  text-decoration: none; 
  margin: 0 6px; 
}

footer a:hover { 
  text-decoration: underline; 
}

/* Estilos para páginas de contenido (términos, política, etc.) */
.content-page {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.content-page h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #6dd6ff;
}

.content-page h2 {
  text-align: left;
  margin: 25px 0 15px 0;
  color: #6dd6ff;
}

.content-page p, .content-page ul {
  margin-bottom: 15px;
  line-height: 1.6;
}

.content-page ul {
  padding-left: 20px;
}

.content-page a {
  color: #6dd6ff;
  text-decoration: none;
}

.content-page a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-block;
  margin-top: 30px;
  padding: 10px 20px;
  background: #1a2040;
  border-radius: 8px;
  color: #e7e9f3;
  text-decoration: none;
}

.back-link:hover {
  background: #2b345a;
  text-decoration: none;
}

form {
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

input, textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #202744;
  background: var(--card);
  color: var(--ink);
  font-size: 1rem;
  outline: none;
}

input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

button {
  padding: 12px;
  border: none;
  border-radius: 8px;
  background: #6dd6ff;
  color: #0f1320;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

button:hover { 
  background: #5bc0e0; 
}

a { 
  color: #6dd6ff; 
  text-decoration: none; 
}

a:hover { 
  text-decoration: underline; 
}

.message { 
  text-align: center; 
  margin-top: 20px; 
  font-weight: bold; 
}

#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1b1f2f;
  color: #e7e9f3;
  padding: 16px;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.5);
  display: none;
  z-index: 9999;
}

#cookie-banner a {
  color: #6dd6ff; 
  text-decoration: underline; 
}

#accept-cookies {
  margin: 0 5px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #6dd6ff;
  color: #0f1320;
  font-weight: bold;
  cursor: pointer;
}

#reject-cookies {
  margin: 0 5px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  background: #444b63;
  color: #e7e9f3;
  font-weight: bold;
  cursor: pointer;
}

@media print { 
  body { 
    background: white; 
    color: black; 
  } 
  header, .utility-bar { 
    display: none !important; 
  } 
  table th, table td { 
    border: 1px solid #999; 
  } 
}

@media (max-width: 768px) {
  body {
    padding: 16px;
  }
  
  .utility-bar { 
    flex-wrap: wrap; 
    gap: 8px; 
  } 
  
  .dropdown { 
    min-width: 100%; 
  } 
  
  .dropdown-toggle { 
    justify-content: space-between; 
  } 
  
  .dropdown-menu { 
    left: 0; 
    right: 0; 
  }
  
  /* Ajustes para móviles en las tablas */
  th, td { 
    padding: 8px 4px; 
    font-size: 0.9rem; 
  }
  
  th:nth-child(1), td:nth-child(1) { 
    width: 50%; 
  }
  
  th:nth-child(2), td:nth-child(2) { 
    width: 25%; 
  }
  
  th:nth-child(3), td:nth-child(3) { 
    width: 25%; 
  }
  
  .section {
    padding: 15px;
  }
  
  .content-page {
    padding: 10px;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.5rem;
  }
  
  h2 {
    font-size: 1.2rem;
  }
  
  th, td {
    padding: 6px 3px;
    font-size: 0.8rem;
  }
  
  .search-box {
    order: 3;
    width: 100%;
  }
}