/* --- RESET Y BASE --- */
html, body {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  font-family: sans-serif;
}

/*
  .container:
  - Se centra en monitores grandes (máximo 1024x768)
  - En móvil, ocupa el ancho y la altura real del viewport (usamos --app-height)
*/
.container {
  width: 100%;
  max-width: 64rem; /* 1024px / 16 */
  height: var(--app-height);
  max-height: 48rem; /* 768px / 16 */
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background-color: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 0.3125rem 0.9375rem rgba(0,0,0,0.2);
  overflow: hidden;
  position: relative;
}

/* APP-WRAPPER: contenedor principal de la app */
.app-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  min-height: 0; /* Impide que el contenido crezca más allá de la altura asignada */
}

/* Botón de cierre para menú y modal */
.close-btn {
  position: absolute;
  top: 0.625rem;
  right: 0.625rem;
  cursor: pointer;
  font-size: 1.5rem;
  background-color: transparent;
  border: none;
  outline: none;
}

/* HEADER */
header {
  background-color: rgba(0, 140, 186, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  text-shadow: 0 0 4px rgba(0,0,0,0.8);
}

.logo {
  font-size: 1.2rem;
  font-weight: bold;
}

.menu-icon {
  font-size: 1.8rem;
  cursor: pointer;
}

/* MENÚ LATERAL */
nav {
  position: absolute;
  top: 0;
  left: -13.75rem; /* 220px / 16 */
  width: 13.75rem;
  height: 100%;
  background-color: #008cba;
  padding-top: 3rem;
  transition: 0.3s;
  z-index: 1000;
}

nav.show {
  left: 0;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-left: 1.5rem;
}

nav ul li a {
  color: #fff;
  text-decoration: none;
  font-size: 1rem;
}

/* CONTENT AREA (área dinámica donde se muestra el contenido de cada página) */
.content-area {
  position: relative;
  flex: 1;             /* Ocupa el espacio restante del contenedor */
  min-height: 0;       /* Permite que se active el scroll en un flex item */
  background: url('nosotros.jpg') no-repeat center center;
  background-size: cover;
  overflow-y: auto;    /* Habilita la barra de desplazamiento si el contenido es mayor */
  -webkit-overflow-scrolling: touch; /* Scroll suave en dispositivos iOS */
  padding: 2rem 1rem;
}

/* (Eliminado .content-overlay) */

/* CONTENEDOR GENERAL PARA ELEMENTOS VARIOS (no específico de la página) */
.btn-cta {
  display: inline-block;
  background-color: #ffcb05;
  color: #333;
  padding: 0.8rem 1.2rem;
  border-radius: 0.38rem;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s ease;
}

.btn-cta:hover {
  background-color: #e6b604;
}

/* FORMULARIO EMERGENTE PARA SUBIR FACTURA (Parte del marco fijo) */
.upload-container {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 0.5rem;
  padding: 2rem;
  width: 90%;
  max-width: 25rem;
  box-shadow: 0 0.125rem 0.3125rem rgba(0,0,0,0.2);
  z-index: 999;
}

.upload-container h2 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  text-align: center;
  color: #333;
}

.upload-container p {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #666;
}

.upload-container form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.upload-container label {
  font-weight: 600;
  color: #333;
  text-align: left;
}

.upload-container input[type="file"] {
  padding: 0.5rem;
  border: 0.0625rem solid #ccc;
  border-radius: 0.375rem;
  background: #f9f9f9;
  height: 3rem;
}

.upload-container button {
  background: #008cba;
  color: #fff;
  font-weight: 600;
  padding: 0.8rem;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.upload-container button:hover {
  background: #007ba2;
}

/* FOOTER */
footer {
  height: 3.125rem;
  line-height: 3.125rem;
  text-align: center;
  background-color: #fff;
  color: #aaa;
  font-size: 0.8rem;
}

/* Botón de archivo */
.btn-archivo {
  display: inline-flex;
  align-items: center;
  height: 3rem;
  padding: 0 1rem;
  background-color: #f9f9f9;
  border: 1px solid #ccc;
  color: #333;
  border-radius: 0.25rem;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}

.btn-archivo:hover {
  background-color: #eee;
  border-color: #bbb;
}
