/* =================== */
/* Estilos Base para todos los dispositivos */
/* =================== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  /*background-image: url(Images/Login01.png);
  background-repeat: no-repeat;*/
  background: #f0eacd;
  line-height: 1.6; /* Mejora la legibilidad */
}

/* Encabezado */
header {
  background: #ffffff;
  color: white;
  padding: 1rem;
  display: flex;
  flex-wrap: wrap; /* Permite que los elementos se envuelvan */
  justify-content: space-between;
  align-items: center;
}

.hidden {
  display: none;
}

#logo {
  width: 20%;
}

/* Formularios */
form {
  margin: 2rem auto;
  padding: 1.5rem;
  background: white;
  max-width: 90%; /* Ancho máximo flexible */
  width: 400px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

form h2 {
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

input,
button {
  display: block;
  width: 90%;
  margin: 0.5rem 0;
  padding: 12px; /* Aumenta el padding para un mejor toque en móviles */
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}

button {
  margin-left: 12px;
  background: #886801;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #5a3e00;
}

.error {
  color: red;
  font-size: 0.9rem;
}

#logoutBtn {
  width: 10%;
}

#goToRegister {
  width: 15%;
}
/**********Footer_styles*************/

#footertext {
  text-decoration: none;
  color: inherit;
}

#footertext.visited {
  text-decoration: none;
  color: inherit;
}

.site-footer {
  margin-top: 234px;
  padding: 40px;
  background-color: var(--azul);
}

.container {
  text-align: center;
  font-size: 14px;
  color: var(--blanco);
}

.footer-nav {
  background-color: var(--azul);
  margin-bottom: 20px;
}

/* Dashboard */
/* Navegación */
nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  gap: 0.5rem; /* Espaciado más pequeño para pantallas pequeñas */
}

nav a {
  text-decoration: none;
  background: #886801;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  flex-grow: 1; /* Permite que los enlaces se expandan */
  text-align: center;
}

/* Contenido Principal */
#content {
  padding: 1rem;
}

nav a:hover {
  background: #5a3e00;
}

/* My Bank */
#myBank {
  padding: 2rem;
  text-align: center;
}

#myBank h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* My Bank */
.bank-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem; /* Fuente más pequeña para móviles */
  display: block;
  overflow-x: auto; /* Permite el scroll horizontal en tablas */
  white-space: nowrap;
}

.bank-table th {
  background: #886801;
  color: white;
  padding: 10px;
}

.bank-table td {
  border: 1px solid #ccc;
  padding: 10px;
}

.balance-box {
  margin-top: 2rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  color: #886801;
  display: inline-block;
  text-align: center;
}

.balance-box p {
  font-size: 2rem;
  margin-top: 0.5rem;
}

.balance-actions {
  margin-top: 1rem;
  display: flex;
  flex-direction: column; /* Apila los botones verticalmente */
  gap: 1rem;
  justify-content: center;
}

.balance-actions button {
  padding: 8px 16px;
  background: #886801;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.3s;
}

.balance-actions button:hover {
  background: #5a3e00;
}

/* Tablas */
table {
  border-collapse: collapse;
  width: 90%;
  margin: auto;
  background: white;
}
th,
td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}
th {
  background: var(--azul);
  color: white;
}
tbody tr:hover {
  background: rgba(0, 51, 160, 0.1);
}

/* Animaciones */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 600px) {
  header {
    flex-direction: column;
    text-align: center;
  }
  nav ul {
    flex-direction: column;
    align-items: center;
  }
}

/* =================== */
/* Media Queries para Tablets y Escritorio (768px y más) */
/* =================== */
@media (min-width: 768px) {
  nav ul {
    gap: 1rem; /* Restaura el espacio en pantallas más grandes */
  }

  nav a {
    flex-grow: 0; /* Desactiva el crecimiento en escritorio */
    text-align: left;
  }

  .bank-table {
    display: table;
    font-size: 1.1rem;
  }

  .balance-actions {
    flex-direction: row; /* Vuelve a poner los botones en fila */
  }
}

/* =================== */
/* Media Query para Escritorio (1024px y más) */
/* =================== */
@media (min-width: 1024px) {
  header {
    padding: 1rem 3rem; /* Más padding en pantallas grandes */
  }

  form {
    max-width: 450px; /* Ancho máximo más grande para formularios */
  }

  #content {
    padding: 2rem 5rem;
  }
}

/* ============================
   ADMIN PANEL
============================ */
#adminPanel {
  max-width: 800px;
  margin: 2rem auto;
  padding: 2rem;
  background: #9c7234;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#adminPanel h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 2rem;
  color: #ffffff;
}

#adminPanel h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  color: #fff;
  font-size: 1.3rem;
}

.admin-section {
  margin-bottom: 1.5rem;
}

.admin-section label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #fff;
}

.admin-section input,
.admin-section select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
  margin-bottom: 0.8rem;
  transition: border 0.2s;
}

.admin-section input:focus,
.admin-section select:focus {
  border-color: #0055a5;
  outline: none;
}

/* Botones */
#adminPanel button {
  display: block;
  width: 100%;
  padding: 12px;
  font-size: 1rem;
  font-weight: bold;
  background: #574200;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.3s ease;
}

#adminPanel button:hover {
  background: #302500;
}

/* Tabla de edición de movimientos */
#editMovementsTable {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: 0.95rem;
}

#editMovementsTable th {
  background: #886801;
  color: #fff;
  padding: 10px;
  text-align: left;
}

#editMovementsTable td {
  border: 1px solid #ddd;
  padding: 8px;
}

#editMovementsTable tr:nth-child(even) {
  background: #f9f9f9;
}

#editMovementsTable tr:hover {
  background: #f1f1f1;
}

/* ============================
   LOADER SPINNER
============================ */
.loader {
  border: 6px solid #f3f3f3; /* fondo gris claro */
  border-top: 6px solid #886801; /* azul corporativo */
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*====================
==== CLASE PARA OCULTAR===
========================*/
.hidden {
  display: none !important;
}

/* LOGIN PAGE con transición */
/*🔹 El formulario debe ir por encima del overlay*/
#loginPage .login-container {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  width: 350px;
}

/* LOGIN PAGE con carrusel + overlay */
#loginPage {
  position: relative;
  background-image: url("/Frontend/Images/Login01.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-image 1s ease-in-out;
  overflow: hidden; /* asegura que overlay no se desborde */
}

/*🔹 Overlay oscuro 
#loginPage::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7); /* aquí ajustas opacidad
  z-index: 0;
}*/

/* ========================================= */
/* Estilos para la nueva sección "Financial" */
/* ========================================= */

.financial-topics-section,
.life-stages-section {
  padding: 3rem 1rem;
  text-align: center;
}

.financial-topics-section {
  background: #f4f6f9;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #5a3e00;
}

.section-subtitle {
  max-width: 800px;
  margin: 0 auto 3rem;
}

/* Estilos de la cuadrícula de temas */
.topics-grid,
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.topic-item {
  background: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  text-align: center;
}

.topic-item:hover {
  transform: translateY(-5px);
}

.topic-item i {
  font-size: 2.5rem;
  color: #e51937;
  margin-bottom: 1rem;
}

.topic-item h3 {
  margin: 0.5rem 0;
  font-size: 1.25rem;
  color: #5a3e00;
}

.topic-item p {
  font-size: 0.95rem;
  color: #666;
}

/* Estilos de las tarjetas de artículos */
.article-card {
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
}

.article-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card .card-text {
  padding: 1.5rem;
  text-align: left;
}

.article-card h3 {
  font-size: 1.1rem;
  margin-top: 0;
  color: #5a3e00;
}

.article-card .resource-count {
  font-size: 0.85rem;
  color: #888;
  margin-top: 0.5rem;
}

.resource-count i {
  margin-right: 5px;
}

/* Adaptación para pantallas pequeñas */
@media (max-width: 768px) {
  .topics-grid,
  .articles-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================= */
/* Estilos para las nuevas secciones de contenido */
/* ========================================= */

.financial-goals-section,
.savings-section {
  padding: 3rem 1rem;
  background: #ffffff;
  border-bottom: 1px dashed #dcdcdc;
}

.split-layout {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.split-layout .text-content {
  flex: 1;
  min-width: 300px;
}

.split-layout .image-content {
  flex: 1;
  min-width: 300px;
}

.split-layout img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.savings-section .fact-box {
  text-align: center;
  padding: 2rem 0;
}

.savings-section .fact-box h1 {
  font-size: 1.5rem;
  font-style: italic;
  color: #5a3e00;
}

.three-column-layout {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  margin-top: 2rem;
}

.text-column {
  flex-basis: 300px; /* Ancho fijo para el texto */
  flex-shrink: 0;
}

.text-column h2,
.text-column h3 {
  text-align: left;
}

.article-card {
  background: #f4f6f9;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  flex: 1;
  min-width: 250px;
  max-width: 350px;
  display: flex;
  flex-direction: column;
}

.article-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-text {
  padding: 1rem;
  text-align: left;
}

.card-text h3 {
  font-size: 1.1rem;
  color: #5a3e00;
  margin: 0;
}

/* Media queries para adaptar la disposición en pantallas pequeñas */
@media (max-width: 768px) {
  .split-layout,
  .three-column-layout {
    flex-direction: column;
  }

  .text-content,
  .text-column,
  .article-card {
    width: 100%;
    text-align: center;
  }

  .card-text h3 {
    text-align: center;
  }
}

/* ========================================= */
/* Estilos para la sección "How to Invest" */
/* ========================================= */

.intro-section {
  padding: 3rem 1rem;
  background: #f4f6f9;
}

.intro-section h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
}

.intro-text-right {
  max-width: 800px;
  margin-left: auto;
  text-align: right;
  font-style: italic;
  color: #333;
}

.two-column-section {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 2rem 1rem;
}

.two-column-section .column {
  flex: 1;
  min-width: 300px;
}

.column-bg-blue {
  background-color: #5a3e00;
  padding: 2rem;
  color: #fff;
  border-radius: 8px;
}

.text-red {
  color: #e51937;
}

.text-white {
  color: #ffffff;
}

/* Sección de "Better Money Habits" */
.about-section {
  background-color: #f7f9fc;
  padding: 4rem 1rem;
}

.about-content-right {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  align-items: flex-start;
  gap: 2rem;
}

.about-image-left {
  flex: 1;
  min-height: 400px;
  background: url("https://images.unsplash.com/photo-1556761175-5973dc0f32e7")
    no-repeat center center/cover;
  border-radius: 8px;
}

.about-text-right {
  flex: 1;
}

.about-text-right h1 {
  margin-top: 0;
}

/* Sección de ancho completo */
.full-width-section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.full-width-section .section-subtitle {
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 2rem;
}

.full-width-section ul {
  list-style-type: none;
  padding-left: 0;
  margin-top: 1.5rem;
}

.full-width-section li {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e51937' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 0.5rem;
  background-position: 0 0.2rem;
  padding-left: 2rem;
  margin-bottom: 1rem;
}

.Howto02 img{
  margin-top: 100px;
  width: 1200px;
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
  .intro-text-right {
    text-align: center;
    margin-left: 0;
  }
  .about-content-right {
    flex-direction: column-reverse; /* Pone la imagen debajo en móviles */
  }
}

@media (max-width: 600px) {
  .two-column-section .column {
    min-width: 100%;
  }
}

/* ========================================= */
/* Estilos para la sección de Inversión */
/* ========================================= */

.dynamic-content.fade-in {
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.investment-intro-section {
    padding: 3rem 1rem;
    background: #f4f6f9;
}

.investment-intro-section h1 {
    font-size: 2.5rem;
    color: #5a3e00;
    margin-bottom: 0.5rem;
}

.investment-intro-section .subtitle {
    font-size: 1.5rem;
    color: #5a3e00;
    margin-bottom: 1.5rem;
}

.investment-intro-section .intro-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.investment-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
    padding: 3rem 1rem;
}

.bg-light-gray {
    background: #f9f9f9;
}

.column-content {
    flex: 1;
    min-width: 300px;
}

.image-column {
    flex: 1;
    min-width: 300px;
}

.image-column img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.image-column img:hover {
    transform: scale(1.02);
}

.section-title {
    font-size: 2rem;
    color: #5a3e00;
    margin-bottom: 2rem;
    text-align: left;
}

.option-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.icon-large {
    font-size: 2.5rem;
    color: #5a3e00;
    flex-shrink: 0;
}

.option-item h3 {
    margin-top: 0;
    color: #5a3e00;
}

.option-item ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0.5rem 0;
}

.option-item ul li {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23e51937' d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    background-position: 0 0.1rem;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Estilos de la sección "Bank of America's Role" */
.bank-role-section {
    padding: 4rem 1rem;
    background: #ffffff;
}

.bank-role-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.bank-role-content h3 {
    color: #5a3e00;
}

.considerations-section {
    padding: 3rem 1rem;
    background: #f4f6f9;
    border-top: 1px dashed #dcdcdc;
}

.considerations-section p {
    max-width: 800px;
    margin: 0 auto;
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .investment-options, .bank-role-content {
        flex-direction: column;
    }
    .image-column {
        order: -1; /* Mueve la imagen arriba en móviles */
    }
    .image-right {
        order: 1; /* Mantiene la imagen a la derecha del texto en la primera sección */
    }
}

/* ========================================= */
/* Estilos para la sección de Fideicomisos */
/* ========================================= */

.intro-section {
    padding: 3rem 1rem;
    background: #f4f6f9;
}

.intro-section h1 {
    font-size: 2.5rem;
    color: #5a3e00;
    margin-bottom: 0.5rem;
}

.intro-section .subtitle {
    font-size: 1.5rem;
    color: #5a3e00;
    margin-bottom: 1.5rem;
}

.intro-section .intro-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
}

.content-grid {
    display: grid;
    gap: 2rem;
    padding: 2rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.two-columns {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-item {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.grid-item h3 {
    font-size: 1.25rem;
    color: #5a3e00;
    margin-top: 1rem;
}

.grid-item p {
    font-size: 1rem;
    color: #666;
}

.icon-large.text-blue {
    font-size: 3rem;
    color: #5a3e00;
}

/* Estilos para la sección de beneficios */
.benefits-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 3rem;
    padding: 3rem 1rem;
}

.benefits-section .image-column {
    flex: 1;
    min-width: 300px;
}

.benefits-section .image-column img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.benefits-section .column-content {
    flex: 1;
    min-width: 300px;
}

.benefits-section ul {
    list-style-type: none;
    padding-left: 0;
}

.benefits-section li {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    position: relative;
    padding-left: 1.5rem;
}

.benefits-section li::before {
    content: "\2022"; /* Bullet point */
    color: #e51937;
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1.5em;
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .benefits-section {
        flex-direction: column;
    }
}

/* Estilos para los mensajes de estado */
#statusMessage {
  padding: 1rem;
  margin: 1rem auto;
  text-align: center;
  border-radius: 8px;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  max-width: 800px;
}

#statusMessage.visible {
  opacity: 1;
}

.status-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
