/* assets/estilos.css */
/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: #f5f7f9;
    color: #333;
    line-height: 1.6;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #2c3e50, #4a6491);
    color: white;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.menu {
    list-style: none;
    padding: 0 20px;
}

.menu li {
    margin-bottom: 15px;
}

.menu a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 12px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.menu a:hover {
    background-color: rgba(255,255,255,0.1);
    transform: translateX(5px);
}

/* Contenido principal */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
}

.header h1 {
    color: #2c3e50;
    font-size: 2rem;
}

.header-right {
    color: #3498db;
    font-weight: bold;
}

/* Contenido */
.content {
    flex: 1;
    padding: 20px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.card {
    background-color: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.info-card h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.update-date {
    display: block;
    color: #7f8c8d;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.info-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 15px;
}

.info-body strong {
    display: block;
    color: #2c3e50;
    margin: 15px 0 8px;
    font-size: 1.1rem;
}

.info-body p {
    margin-bottom: 15px;
}

.video-card {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.video-card strong {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Galería */
.gallery-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-card strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.gallery img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.news {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.news strong {
    display: block;
    margin-bottom: 10px;
    color: #2c3e50;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    margin-top: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .menu {
        display: flex;
        justify-content: space-around;
        padding: 0 10px;
    }
    
    .menu li {
        margin-bottom: 0;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .info-body {
        grid-template-columns: 1fr;
    }
    
    .footer {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/**/

/* ===== Galería / Swiper de imágenes ===== */
.gallery { width: 100%; }

.image-swiper {
  width: 100%;
  max-width: 500px;              /* opcional, límite de ancho */
  aspect-ratio: 16 / 9;          /* controla proporción (usa 1 / 1 si quieres cuadrado) */
  border-radius: 10px;
  overflow: hidden;
  background: #f3f5f8;
}


.image-swiper .swiper-wrapper { align-items: stretch; }
.image-swiper .swiper-slide {
  display: flex;          /* para que el img pueda ocupar todo */
}

.image-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;  /* llena sin deformar */
  display: block;
}

/* Botones y paginación (scoped a esta galería) */
.image-swiper .swiper-button-next,
.image-swiper .swiper-button-prev {
  width: 34px; height: 34px;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.75);
}

.image-swiper .swiper-button-next:after,
.image-swiper .swiper-button-prev:after {
  font-size: 16px;
  font-weight: bold;
  color: #384457;
}

.image-swiper .swiper-pagination-bullet {
  opacity: .5;
}
.image-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* ===== Noticias / Swiper de noticias ===== */
.news-swiper {
  width: 100%;
  max-width: 500px;           /* opcional: ancho máximo */
  aspect-ratio: 16 / 9;       /* controla la proporción del swiper */
  border-radius: 10px;
  overflow: hidden;
  background: #f3f5f8;
  margin-top: 10px;
}

.news-swiper .swiper-wrapper {
  align-items: stretch;
}

.news-swiper .swiper-slide {
  display: flex;              /* permite que el contenido ocupe todo el slide */
  flex-direction: row;        /* imagen a la izquierda, contenido a la derecha */
}

.news-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px 0 0 10px; /* opcional, bordes redondeados solo en la imagen */
}

.news-swiper .card-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-swiper .swiper-button-next,
.news-swiper .swiper-button-prev {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  backdrop-filter: blur(4px);
  background: rgba(255,255,255,0.75);
}

.news-swiper .swiper-button-next:after,
.news-swiper .swiper-button-prev:after {
  font-size: 16px;
  font-weight: bold;
  color: #384457;
}

.news-swiper .swiper-pagination-bullet {
  opacity: 0.5;
}

.news-swiper .swiper-pagination-bullet-active {
  opacity: 1;
}

/* Estilo básico para noticias en swiper */
.news-swiper .swiper-slide .row {
  display: flex;
  width: 100%;
  height: 100%;
}

.news-swiper .swiper-slide .col-5 {
  flex: 0 0 40%; /* ocupa 40% del ancho */
}

.news-swiper .swiper-slide .col-7 {
  flex: 1;       /* ocupa el resto */
  padding: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px 0 0 10px; /* opcional */
}


/* Estilos para centrar el calendario y dar margen */
#calendar {
  max-width: 900px;       /* ancho máximo */
  margin: 20px auto;      /* margen superior/inferior + centrado horizontal */
  padding: 10px;          /* un poco de espacio interno */
  background: #fff;       /* fondo opcional para destacar */
  border-radius: 8px;     /* bordes redondeados */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* sombra ligera */
}


/* Contenedor del formulario */
.form-validar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;               /* separación entre campos */
    justify-content: flex-start;
    max-width: 900px;        /* ancho máximo del formulario */
    margin: 0 auto;           /* centrado horizontal */
    padding: 20px 0;
}

/* Labels */
.form-validar .form-label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: #333;
}

/* Inputs */
.form-validar .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-validar .form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 4px rgba(0,123,255,0.5);
}

/* Botones */
.form-validar .btn {
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    margin-right: 10px;
    transition: background 0.3s, color 0.3s;
}

/* Botón cancelar */
.form-validar .btn-cancelar {
    background-color: #dc3545;
    color: #fff;
}

.form-validar .btn-cancelar:hover {
    background-color: #c82333;
}

/* Botón validar */
.form-validar .btn-validar {
    background-color: #007bff;
    color: #fff;
}

.form-validar .btn-validar:hover {
    background-color: #0069d9;
}



/**/

/* === Tabla de Pagos === */
.table {
  width: 100%;
  border-collapse: separate;      /* permite bordes redondeados */
  border-spacing: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
  font-variant-numeric: tabular-nums; /* dígitos alineados */
}

.table thead th {
  background: #f3f5f8;
  color: #384457;
  font-weight: 700;
  text-align: center;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  position: sticky;  /* cabezal “pegado” al hacer scroll */
  top: 0;
  z-index: 1;
}

/* Bordes redondeados en las esquinas del thead/tbody */
.table thead th:first-child { border-top-left-radius: 10px; }
.table thead th:last-child  { border-top-right-radius: 10px; }
.table tbody tr:last-child td:first-child { border-bottom-left-radius: 10px; }
.table tbody tr:last-child td:last-child  { border-bottom-right-radius: 10px; }

.table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;         /* equivalente a .align-middle */
}

/* Emulación de .table-bordered */
.table-bordered th,
.table-bordered td {
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}
.table-bordered tr:first-child th { border-top: 1px solid #e5e7eb; }
.table-bordered tr:last-child  td { border-bottom: 1px solid #e5e7eb; }

/* Emulación de .table-striped */
.table-striped tbody tr:nth-child(odd)  { background: #fafbfc; }
.table-striped tbody tr:hover           { background: #eef5ff; }

/* Alineación: centra todo por defecto */
#pagosTable th, 
#pagosTable td { 
  text-align: center; 
}

/* Si “IdPagos” y “Número de Casa” se te iban a la izquierda, los centramos explícitamente */
#pagosTable td:nth-child(1),
#pagosTable td:nth-child(2),
#pagosTable th:nth-child(1),
#pagosTable th:nth-child(2) {
  text-align: center;
}

/* Monto alineado a la derecha (más natural para cantidades) */
#pagosTable td:nth-child(6),
#pagosTable th:nth-child(6) {
  text-align: right;
  white-space: nowrap;
}

/* La fecha sin saltos de línea */
#pagosTable td:nth-child(5),
#pagosTable th:nth-child(5) {
  white-space: nowrap;
}

/* Evitar desbordes en pantallas pequeñas */
.card-body {
  overflow-x: auto;
}

/* Responsive */
@media (max-width: 768px) {
  #pagosTable { font-size: 14px; }
  #pagosTable th, #pagosTable td { padding: 10px; }
}
