/* --- General Styles --- */
body {
  font-family: "Arial", sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(to bottom, #f4f4f9 0%, #e9ecef 100%);
  color: #333;
  transition: background-color 0.4s ease, color 0.4s ease;
}

header {
  /*background-image: url('https://lgonzalez.info/wp-content/uploads/2025/03/Faro-Punta-Cumplida.webp');*/
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 300px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

header img {
  max-width: 150px;
  margin-bottom: 10px;
}
.site-header {
  background: url("./assets/fondo_header.jpg") center center / cover no-repeat;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0 20px;
}

.header-content {
  display: flex;
  align-items: center;
  background-color: rgba(
    0,
    0,
    0,
    0.4
  ); /* opcional: fondo semitransparente detrás de logo+texto */
  padding: 10px 20px;
  border-radius: 10px;
}

.logo-header {
  height: 80px;
  width: auto;
  margin-right: 20px;
}

.site-title {
  color: white;
  font-size: 2rem;
  font-weight: bold;
}

nav {
  background: rgba(247, 250, 252, 0.9);
  padding: 0.5rem 1rem;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
  gap: 1rem;
}

nav a {
  color: #4a5568;
  text-decoration: none;
  margin: 0 15px;
  font-size: 18px;
  padding: 0.5rem;
}

nav a:hover {
  color: #2b6cb0;
}
.dropdown {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #ebedee;
  min-width: 200px;
  z-index: 10;
  flex-direction: column;
}
.submenu a:hover {
  background-color: #b6b5b5;
}

.submenu a {
  padding: 0.5rem 1rem;
}

.dropdown:hover .submenu {
  display: flex;
}

/* Para móviles */
.hamburguesa {
  display: none;
  background: #646464;
  opacity: 0.8;
  border: none;
  color: #004b87;
  font-size: 1.5rem;
  margin: 0.5rem;
}

@media (max-width: 768px) {
  .hamburguesa {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
  }

  nav.oculto {
    display: none;
  }

  nav.mostrar {
    display: flex;
  }

  .dropdown .submenu {
    position: static;
    background-color: #fbfcfd;
    display: none;
  }

  .dropdown .submenu.mostrar {
    display: flex;
  }
}
footer {
  background-color: #2d3748;
  color: white;
  text-align: center;
  padding: 20px;
  font-size: 14px;
  margin-top: 40px;
}

.container {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 0.8s ease-out;
  transition: background-color 0.4s ease;
}

.resaltado {
  background-color: #fff8b5;
  transition: background-color 0.8s ease;
}

h1,
h3 {
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

h1 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Formularios --- */
form,
#parametros-form {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-group label {
  min-width: 160px;
  text-align: right;
  font-weight: 600;
}

input[type="text"],
input[type="number"],
select,
#nombreInstalacion {
  flex: 1;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #ccc;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 10px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
select:focus,
#nombreInstalacion:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.4);
  background: #fff;
  outline: none;
}

/* --- Botones --- */
.botones-superiores {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin: 20px auto;
  padding: 10px;
  text-align: center;
}

button,
.btn,
.info-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #007bff;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s, transform 0.2s;
}

button:hover,
.btn:hover,
.info-button:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

.botones-acciones {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin: 25px 0;
}

.btn-guardar {
  background-color: #4caf50;
}
.btn-cargar {
  background-color: #2196f3;
}
.btn-borrar {
  background-color: #f44336;
}
.btn-pdf {
  background-color: #9c27b0;
}

.btn-guardar:hover {
  background-color: #45a049;
}
.btn-cargar:hover {
  background-color: #1e88e5;
}
.btn-borrar:hover {
  background-color: #d32f2f;
}
.btn-pdf:hover {
  background-color: #7b1fa2;
}

/* --- Tablas --- */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: white;
  margin-bottom: 20px;
}

th,
td {
  border: 1px solid #ddd;
  text-align: center;
  padding: 8px;
}

th {
  background-color: #007bff;
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
}

tr:nth-child(even) {
  background-color: #f9f9f9;
}
tr:hover {
  background-color: #f1f1f1;
}

canvas {
  margin-top: 20px;
}

/* --- Responsive Mobile --- */
@media (max-width: 768px) {
  form,
  #parametros-form {
    grid-template-columns: 1fr;
  }
  .form-group {
    flex-direction: column;
    align-items: flex-start;
  }
  button,
  .btn,
  .info-button {
    width: 100%;
    font-size: 18px;
    padding: 12px;
  }
  h1,
  h3 {
    font-size: 1.5rem;
  }
  .panel-resultados {
    overflow-x: auto;
    display: block;
  }
  table {
    min-width: 600px;
  }
}

/* --- Tooltip --- */
.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  width: 220px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  font-size: 0.9em;
  border-radius: 8px;
  text-align: left;
  line-height: 1.4;
  white-space: pre-line;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1000;
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* --- Paneles --- */
.panel {
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-bottom: 20px;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.panel-header {
  padding: 15px 20px;
  background-color: #e9ecef;
  font-weight: bold;
  cursor: pointer;
  font-size: 1.1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.panel-header:hover {
  background-color: #d6d8db;
}
.panel-content {
  display: none;
  padding: 20px;
  background-color: #dcdee0;
}
.panel.open .panel-content {
  display: block;
}
.panel.open .panel-icon {
  transform: rotate(45deg);
}

/* --- Popups --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.popup {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  text-align: center;
  z-index: 1010;
}

.popup h2,
.popup p {
  margin: 0 0 10px;
  line-height: 1.5;
}
.popup a {
  color: #007bff;
  text-decoration: none;
}
.popup a:hover {
  text-decoration: underline;
}

/* --- Edición Radiación --- */
.editable-radiation {
  width: 80px;
  text-align: center;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

.editable-radiation:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* --- Version Badge --- */
.version-badge {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  padding: 10px 20px;
  background: #f0f0f0;
  border-left: 4px solid #3498db;
  border-radius: 8px;
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: #666;
  white-space: nowrap;
  max-width: 600px;
}

.version-number {
  background: #3498db;
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.9em;
}

/* --- Dark Mode --- */
body.dark-mode {
  background: linear-gradient(to bottom, #1e1e1e 0%, #121212 100%);
  color: #eee;
}

body.dark-mode label,
body.dark-mode .tooltip,
body.dark-mode h1 {
  color: #e0e0e0;
}

body.dark-mode .container,
body.dark-mode .panel,
body.dark-mode .panel-content {
  background: #2c2c2c;
}

body.dark-mode .panel-header {
  background-color: #333;
  color: #eee;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #333;
  color: #eee;
  border: 1px solid #555;
}

body.dark-mode th {
  background-color: #444;
}

body.dark-mode .btn,
body.dark-mode .info-button {
  background-color: #555;
}

body.dark-mode .btn:hover,
body.dark-mode .info-button:hover {
  background-color: #777;
}

body.dark-mode #panel-resultados {
  background-color: #1e1e2f;
  color: #f1f1f1;
}

body.dark-mode #panel-resultados td {
  background-color: #2c2c3a;
  color: #e0e0e0;
  border-top: 1px solid #444;
}
/*RAL TOOL*/
.ral-button button.activo {
  background-color: #0056b3;
  color: #fff;
  font-weight: bold;
  border: 2px solid #003f7d;
}
