/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

/* Scroll */
::-webkit-scrollbar {
    width: 10px; /* o el tamaño que prefieras */
}

::-webkit-scrollbar-thumb {
    background-color: #056bd8; /* Color del "dedo" del scrollbar */
    border-radius: 4px;
}

::-webkit-scrollbar-track {
    background: #fff; /* Color del fondo del track */
}

/* Body general */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f7fc;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
  min-height: 100vh;
}

/* Links fijos */
.link__distancia, .link__divisas, .link__facturas, .link__pro, .link__incoterms {
  position: fixed;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 5px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  text-decoration: none;
}

.link__distancia { top:30px; right:20px; color:#007bff; }
.link__incoterms { top:30px; left:20px; color:#007bff; }
.link__facturas { top:70px; right:20px; color:#007bff; }
.link__divisas { top:70px; left:20px; color:#007bff}
.link__pro { top:112px; left:20px; color:#61dafb; background-color:#121b2b; font-weight:700; }

.link__distancia:hover, .link__facturas:hover, .link__divisas:hover, .link__incoterms:hover {
  background-color:#007bff; color:#fff; transform: scale(1.05);
}
.link__pro:hover { color:#121b2b; background-color:#61dafb; transform: scale(1.05); }

/* Contenedor principal */
.container2 {
  width: 100%;
  max-width: 800px;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  padding: 25px 30px;
  margin: -8px auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Header */
header {
  text-align:center;
  margin-bottom:10px;
}
h1 {
  color:#007bff;
  font-size:28px;
  margin-bottom:5px;
}

/* Descripción */
.descripcion {
  max-width: 700px;
  margin: 0 auto;
  background-color:#fefefe;
  padding:12px 15px;
  border:1px solid #d1d9e0;
  border-radius:10px;
  text-align:center;
  font-size:14px;
  color:#333;
  line-height:1.5;
}

/* Secciones grid */
.sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(240px,1fr));
  gap:20px;
  margin-top:15px;
}

/* Tarjetas de sección */
.section-card {
  background-color:#fff;
  border-radius:10px;
  box-shadow:0 6px 12px rgba(0,0,0,0.08);
  padding:18px;
  text-align:center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.section-card:hover {
  transform: scale(1.04);
  box-shadow:0 8px 18px rgba(0,0,0,0.12);
}

/* Botones */
.boton-calcular {
  background-color:#007bff;
  color:white;
  font-size:16px;
  border:none;
  border-radius:6px;
  padding:12px 22px;
  cursor:pointer;
  transition: all 0.3s;
}
.boton-calcular:hover { background-color:#0056b3; transform: scale(1.03); }

/* Exámenes grid */
.exams-grid {
  display:grid;
  grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
  gap:18px;
  margin-top:15px;
}

/* Tarjetas de examen */
.exam-card {
  background-color:#fff;
  border-radius:10px;
  box-shadow:0 4px 12px rgba(0,0,0,0.08);
  padding:15px 18px;
  display:flex;
  flex-direction: column;
  justify-content:flex-start;
  gap:6px;
}
.exam-num {
  font-weight:bold;
  color:#007bff;
  font-size:16px;
}
.exam-level {
  font-size:13px;
  color:#555;
  margin-top:2px;
}

@media (max-width: 400px) {

  /* Links más pequeños */
  .link__distancia,
  .link__divisas,
  .link__facturas,
  .link__incoterms,
  .link__pro {
    font-size: 10px;
    padding: 5px 8px;
  }
}

@media (max-width: 600px) {

  /* Links más pequeños */
  .link__distancia,
  .link__divisas,
  .link__facturas,
  .link__incoterms,
  .link__pro {
    font-size: 12px;
    padding: 6px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }

  /* Columna izquierda (3 links) */
  .link__incoterms { top: 15px; left: 10px; }
  .link__divisas   { top: 50px; left: 10px; }
  .link__pro       { top: 85px; left: 10px; }

  /* Columna derecha (2 links) */
  .link__distancia { top: 15px; right: 10px; }
  .link__facturas  { top: 50px; right: 10px; }

  /* Bajamos el container para que no se pise */
  .container2 {
    margin-top: 100px;
  }
}

@media (max-width: 800px) {

  /* Links más pequeños */
  .link__distancia,
  .link__divisas,
  .link__facturas,
  .link__incoterms,
  .link__pro {
    font-size: 16px;
    padding: 6px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }

  /* Columna izquierda (3 links) */
  .link__incoterms { top: 15px; left: 10px; }
  .link__divisas   { top: 50px; left: 10px; }
  .link__pro       { top: 85px; left: 10px; }

  /* Columna derecha (2 links) */
  .link__distancia { top: 15px; right: 10px; }
  .link__facturas  { top: 50px; right: 10px; }

  /* Bajamos el container para que no se pise */
  .container2 {
    margin-top: 90px;
  }
}

@media (max-width: 1024px) {
  /* Links más pequeños */
  .link__distancia,
  .link__divisas,
  .link__facturas,
  .link__incoterms,
  .link__pro {
    font-size: 16px;
    padding: 6px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  }

  /* Bajamos el container para que no se pise */
  .container2 {
    margin-top: 90px;
    height: fit-content;
  }
}

/* Políticas */
.footer-legal {
    width: 100%;
    background-color: transparent;
    text-align: center;
    padding: 15px;
    z-index: 10;
}

.footer-legal a, #cookie-settings-btn {
    color: #007bff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin: 0 5px;
}

.footer-legal a:hover, #cookie-settings-btn:hover {
    text-decoration: underline;
}

/* Modal general */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

/* Contenido del modal */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.modal-text {
    max-height: 70vh;
    overflow-y: auto;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Botón cerrar */
.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

.modal-text h2,
.modal-text h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #222;
}

.modal-text p {
    margin-bottom: 1em;
    color: #444;
    line-height: 1.6;
    font-size: 15px;
}

.modal-text ul {
    margin: 0 0 1.5em 1.5em;
    color: #444;
    font-size: 15px;
    line-height: 1.6;
}

.modal-text ul li {
    margin-bottom: 0.5em;
}

#cookie-banner {
    display: none;
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 18px 22px;
    max-width: 520px;
    width: 90%;
    z-index: 10000;
    font-size: 14px;
    color: #333;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#cookie-banner .cookie-text {
    flex: 1 1 60%;
    min-width: 220px;
}

#cookie-banner .cookie-text p {
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.cookie-buttons {
    flex: 0 1 auto;
    display: flex;
    gap: 10px;
}

#cookie-banner button {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

#accept-cookies {
    background-color: #007bff;
    color: white;
}

#accept-cookies:hover {
    background-color: #0056b3;
}

#reject-cookies {
    background-color: #f0f0f0;
    color: #333;
}

#reject-cookies:hover {
    background-color: #dcdcdc;
}

#modal-preferencias .modal-text label {
    display: block;
    margin: 12px 0 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
    color: #222;
}

#modal-preferencias .modal-text input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.botones {
    display: flex;
    justify-content: center;
}

#modal-preferencias button {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}

#modal-preferencias button:first-of-type {
    background-color: #007bff;
    color: white;
}

#modal-preferencias button:first-of-type:hover {
    background-color: #0056b3;
}

#modal-preferencias button:last-of-type {
    background-color: #aaa;
    margin-left: 10px;
}

#modal-preferencias button:last-of-type:hover {
    background-color: #444;
    color: white;
}

