/* Dominik Mielczarek - CSS Reorganizado y Responsive */

/*
 * TABLA DE CONTENIDOS
 * 
 * 1. Variables y configuración global
 * 2. Estilos base (body, texto, enlaces)
 * 3. Componentes de navegación
 * 4. Formularios e inputs
 * 5. Botones
 * 6. Modales
 * 7. Tablas
 * 8. Media queries y responsive
 * 9. Utilidades
 */

/* === 1. VARIABLES Y CONFIGURACIÓN GLOBAL === */
:root {
  /* Colores principales */
  --primary-color: #2196f3;
  --secondary-color: #26c789;
  --accent-color: #49633b;
  
  /* Colores de texto */
  --text-color: #333;
  --light-text: #fff;
  
  /* Espaciado y bordes */
  --border-radius: 8px;
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  
  /* Sombras */
  --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
/* === 2. ESTILOS BASE === */
body {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  height: 100vh;
  background: linear-gradient(to bottom right, var(--accent-color), var(--secondary-color), var(--primary-color));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  font-family: Arial, sans-serif;
  color: var(--text-color);
}

/* Tipografía */
p {
  margin: var(--spacing-xs);
  line-height: 1.5;
}

h1, h2, h3, h4, h5, h6 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

/* Elementos de formulario */
label {
  display: inline-block;
  margin-top: var(--spacing-xs);
  margin-right: var(--spacing-sm);
}

/* Elementos multimedia */
canvas {
  border: 1px solid #000;
}

/* Enlaces */
a {
  text-decoration: none;
  outline: none;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

a:focus,
a:active {
  outline: none;
  border: none;
  -webkit-tap-highlight-color: transparent;
}

/* === 3. COMPONENTES DE NAVEGACIÓN === */
nav {
  background-color: #333;
  color: var(--light-text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--spacing-lg);
  height: 60px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: var(--box-shadow);
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  z-index: 1000;
}

nav ul li a {
  color: var(--light-text);
  text-decoration: none;
  padding: 0 var(--spacing-lg);
  line-height: 60px;
  display: block;
  text-align: center;
  transition: background-color 0.3s ease;
}

nav ul li a:hover {
  background-color: #555;
}

nav .menu-icon {
  display: none;
  cursor: pointer;
  font-size: 30px;
  color: var(--light-text);
  filter: invert(1);
}

@media screen and (max-width: 768px) {
  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #555;
    z-index: 1000;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }

  nav ul li a {
    padding: 15px 20px;
    line-height: normal;
  }

  nav .menu-icon {
    display: block;
    margin-left: auto;
    
  /* Mejoras para botones en móviles */
  .btnCentrales button {
    margin: 8px 0;
    width: 100%;
    max-width: 300px;
    padding: 15px;
    font-size: 16px;
  }
  
  /* Mejoras para modales en móviles */
  .modal-content {
    width: 90%;
    margin: 10% auto;
    padding: 15px;
  }
  }

  .menu.open ul {
    display: flex;
    flex-direction: column;
  }
}

/* === 4. FORMULARIOS E INPUTS === */
/* Campos de texto */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  padding: var(--spacing-sm);
  margin: var(--spacing-sm) 0;
  text-align: center;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 14px;
  transition: border-color 0.3s ease;
}

input:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

input:hover {
  border-color: var(--secondary-color);
}

/* Checkboxes */
input[type="checkbox"] {
  width: 25px;
  height: 25px;
  margin-right: var(--spacing-sm);
  cursor: pointer;
}

input[type="checkbox"]:checked {
  background-color: var(--secondary-color);
  border: 2px solid var(--secondary-color);
}

/* Selects */
select {
  width: 100%;
  padding: var(--spacing-md);
  margin: var(--spacing-sm) 0;
  box-sizing: border-box;
  border: 2px solid #ccc;
  border-radius: var(--border-radius);
  font-size: 16px;
  background-color: #f9f9f9;
  color: var(--text-color);
  cursor: pointer;
  transition: border-color 0.3s ease;
}

select:focus {
  border-color: var(--secondary-color);
  outline: none;
  box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

/* Clase para campos con error */
.input-error {
  border-color: #f44336 !important;
}

.error-message {
  color: #f44336;
  font-size: 12px;
  margin-top: 5px;
}

.formulario {
  border: 3px solid #56df17;
  padding: 15px;
  border-radius: 5px;
  background-color: #f9f9f9;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* === MODALS === */
.modal,
.modalz,
.modal-config,
.modal-repaired {
  display: none;
  position: fixed;
  z-index: 3010;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  justify-content: center;
  align-items: center;
}

.modal-content,
.modal-content-repaired {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  text-align: center;
  font-size: 16px;
}

.modal-content h1,
.modal-content p {
  text-align: center;
}

.modal-content button {
  width: 100%;
}

.close,
.close-btn,
.close-repaired-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
}

.close:hover,
.close-btn:hover,
.close-repaired-btn:hover {
  color: black;
}

/* === BUTTONS === */
.btn,
.btn1,
.btn2,
.btn3,
.btn4,
#chatButton {
  margin-top: 10px;
  padding: 10px 20px;
  font-size: 16px;
  width: 250px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.3s;
  color: #000;
}

.btn { background-color: rgba(62, 235, 19, 0.89); }
.btn1 { background-color: rgba(230, 210, 28, 0.712); }
.btn2 { background-color: rgba(255, 0, 0, 0.63); }
.btn3 { background-color: rgba(0, 81, 255, 0.884); }
.btn4 { background-color: rgba(9, 255, 0, 0.582); }
#chatButton { background-color: #4CAF50; color: white; }

.btn:hover,
.btn1:hover,
.btn2:hover,
.btn3:hover,
#chatButton:hover {
  transform: scale(1.1);
  background-color: #45a049;
}

.btnCentrales {
  margin: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* === OTHER === */
.footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(72, 255, 0, 0.808);
  color: #3d3838;
  font-size: 16px;
}

#userEmail2 { color: #fefefe; }

#obs6 {
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  resize: none;
}

#Contraseña,
#Patron,
#PINi {
  display: none;
}

.boton-flotante {
  position: fixed;
  bottom: 60px;
  right: 20px;
  background-color: #25d36544;
  color: white;
  border: none;
  border-radius: 50px;
  padding: 1px 20px;
  height: 120px;
  box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 1000;
}

#img {
  width: 200px;
  margin-top: 15px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .btn,
  .btn1,
  .btn2,
  .btn3,
  #chatButton {
    width: 200px;
    padding: 12px;
    font-size: 11px;
  }

  .modal-content,
  .modal-content-repaired {
    width: 95%;
    font-size: 14px;
  }
}
