/*
 * Este es un archivo de estilo CSS en Rails.
 * Contiene todas las reglas de estilo de tu aplicación.
 */

/* ========================================================================= */
/* ESTILOS GLOBALES Y BÁSICOS                                                */
/* ========================================================================= */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2E4053;
    color: #FFFFFF;
    text-align: center;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 20px;
}

p {
    margin-bottom: 10px;
    line-height: 1.6;
}

a {
    color: #D8C3A5;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #C3AF94;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================================================= */
/* ESTILOS DE LA BARRA DE NAVEGACIÓN (RESPONSIVE)                            */
/* ========================================================================= */
.navbar-wrapper {
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    position: fixed; /* Cambiado a fixed */
    top: 0;
    width: 100%;
    z-index: 1000; /* Aseguramos que esté por encima de otros elementos */
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    height: 40px;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

.logo-link {
    display: inline-block;
    line-height: 0;
}

.navbar {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
}

.navbar-toggler {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
    position: relative;
    z-index: 10;
}

.toggler-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.navbar-collapse.active {
    max-height: 500px;
    z-index: 1001; /* Añadido para asegurar que esté sobre el contenido */
}

.navbar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
}

.nav-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 1.1em;
    white-space: nowrap;
    transition: color 0.3s ease;
    padding: 0.5rem 1.5rem;
}

.nav-link:hover {
    color: #D8C3A5;
}

/* Media Query para Escritorio */
@media (min-width: 768px) {
    .navbar {
        justify-content: flex-end;
    }
    .navbar-toggler {
        display: none;
    }
    .navbar-collapse {
        position: static;
        max-height: none;
        overflow: visible;
        width: auto;
    }
    .navbar-nav {
        flex-direction: row;
        align-items: center;
        gap: 15px;
    }
    .nav-item {
        border-bottom: none;
        padding: 0;
    }
    .nav-link {
        padding: 0;
    }
}

/* ========================================================================= */
/* ESTILOS DE LA PÁGINA DE INICIO (home/index)                               */
/* ========================================================================= */
.home-container {
    padding: 30px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    max-width: 1200px;
    margin: 50px auto;
    box-sizing: border-box;
}
.home-content {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}
.text-section {
    flex: 1;
    min-width: 300px;
    text-align: left;
    color: #FFFFFF;
}
.text-section h1 {
    font-size: 2.8em;
    margin-bottom: 0.5em;
    color: #D8C3A5;
    text-align: left;
}
.text-section p {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 1em;
}
.banner-section {
    flex: 1.5;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}
.slideshow-container {
    max-width: 700px;
    position: relative;
    margin: auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}
.banner-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}
.mySlides {
    display: none;
}
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.6);
}
.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}
.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}
.numbertext {
    color: #f2f2f2;
    font-size: 12px;
    padding: 8px 12px;
    position: absolute;
    top: 0;
}
.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: rgba(255,255,255,0.4);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}
.active-dot, .dot:hover {
    background-color: #D8C3A5;
}
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}
@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}
@media (max-width: 768px) {
    .home-content {
        flex-direction: column;
        text-align: center;
    }
    .text-section {
        text-align: center;
    }
    .text-section h1 {
        text-align: center;
    }
    .button-group {
        justify-content: center;
    }
    .home-container {
        margin: 30px auto;
        padding: 20px;
    }
    .banner-image {
        height: 300px;
    }
    .slideshow-container {
        max-width: 95%;
    }
}
/* Estilos para la vista de estado de mensualidad */
.membership-status-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 20px;
    box-sizing: border-box;
}
.membership-status-card {
    background: linear-gradient(145deg, rgba(46,64,83, 0.95), rgba(20,29,38, 0.9));
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    padding: 50px;
    max-width: 550px;
    width: 100%;
    text-align: center;
    color: #E0E0E0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInScale 0.7s ease-out forwards;
}
.membership-status-card h2 {
    font-size: 2.5em;
    margin-bottom: 35px;
    color: #D8C3A5;
    text-shadow: 0 0 10px rgba(216, 195, 165, 0.5);
}
.status-indicator {
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    font-weight: bold;
    transition: all 0.5s ease;
}
.status-indicator p {
    font-size: 1.2em;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.8);
}
.status-indicator h3 {
    font-size: 3.5em;
    margin: 0;
    letter-spacing: 2px;
}
.status-indicator.active {
    background-color: rgba(60, 179, 113, 0.2);
    border: 2px solid #3CB371;
    color: #3CB371;
}
.status-indicator.inactive {
    background-color: rgba(220, 20, 60, 0.2);
    border: 2px solid #DC143C;
    color: #DC143C;
}
.status-message {
    font-size: 1.2em;
    margin-bottom: 25px;
    line-height: 1.6;
    color: #FFFFFF;
}
.call-to-action {
    font-size: 1.1em;
    color: #D8C3A5;
    margin-top: 30px;
    margin-bottom: 40px;
    font-weight: bold;
}
.membership-status-card .btn-secondary {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 1.1em;
    border-radius: 40px;
}
@media (max-width: 600px) {
    .membership-status-card {
        padding: 30px;
    }
    .membership-status-card h2 {
        font-size: 2em;
    }
    .status-indicator h3 {
        font-size: 2.8em;
    }
    .status-message, .call-to-action {
        font-size: 1em;
    }
}
/* Estilos generales para tablas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}
.table-responsive {
    overflow-x: auto;
    display: block;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}
th, td {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    white-space: nowrap;
}
th {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
    color: #FFFFFF;
}
tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}
tr:hover {
    background-color: rgba(255, 255, 255, 0.2);
}
/* Estilos para formularios */
form div {
    margin-bottom: 15px;
}
form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #D8C3A5;
}
form input[type="text"],
form input[type="email"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form input[type="datetime-local"] {
    width: calc(100% - 22px);
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    background-color: rgba(0, 0, 0, 0.4);
    color: #FFFFFF;
    box-sizing: border-box;
}
form input[type="date"],
form input[type="datetime-local"] {
    color-scheme: dark;
}
form input[type="submit"],
.action-button,
.btn {
    display: inline-block;
    padding: 12px 25px;
    background-color: #D8C3A5;
    color: #2E4053;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-right: 10px;
}
form input[type="submit"]:hover,
.action-button:hover,
.btn:hover {
    background-color: #C3AF94;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.btn-primary { background-color: #D8C3A5; }
.btn-success { background-color: #4CAF50; color: white; }
.btn-secondary { background-color: #555; color: white; }
.btn-danger { background-color: #f44336; color: white; }
.btn-sm {
    padding: 5px 10px;
    font-size: 0.8em;
    border-radius: 20px;
    margin: 2px;
}
.flash-message {
    padding: 10px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}
.flash-message.notice {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.flash-message.alert {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 100px);
    padding: 20px;
    box-sizing: border-box;
}
.auth-card {
    background: linear-gradient(145deg, rgba(46,64,83, 0.95), rgba(20,29,38, 0.9));
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
    padding: 50px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    color: #E0E0E0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInScale 0.7s ease-out forwards;
}
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
.auth-card h2 {
    font-size: 2.5em;
    margin-bottom: 35px;
    color: #D8C3A5;
    text-shadow: 0 0 10px rgba(216, 195, 165, 0.5);
}
.auth-card .field {
    margin-bottom: 25px;
    text-align: left;
}
.auth-card label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #D8C3A5;
    font-size: 1.1em;
}
.auth-card .form-control {
    width: calc(100% - 24px);
    padding: 14px 12px;
    border: 1px solid rgba(216, 195, 165, 0.4);
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.05);
    color: #FFFFFF;
    box-sizing: border-box;
    font-size: 1em;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.auth-card .form-control:focus {
    border-color: #D8C3A5;
    box-shadow: 0 0 15px rgba(216, 195, 165, 0.4);
    outline: none;
}
.auth-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}
.auth-card .actions {
    margin-top: 40px;
}
.auth-card .btn-primary {
    padding: 18px 50px;
    font-size: 1.5em;
    border-radius: 60px;
    background-color: #D8C3A5;
    color: #2E4053;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.auth-card .btn-primary:hover {
    background-color: #C3AF94;
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}
.auth-card .remember-me-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: -15px;
    margin-bottom: 25px;
}
.auth-card .remember-me-checkbox input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    background-color: transparent;
    border: 2px solid #D8C3A5;
    border-radius: 5px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
}
.auth-card .remember-me-checkbox input[type="checkbox"]:checked {
    background-color: #D8C3A5;
    border-color: #D8C3A5;
}
.auth-card .remember-me-checkbox input[type="checkbox"]:checked::before {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #2E4053;
    font-size: 14px;
}
.auth-card .remember-me-checkbox label {
    margin-bottom: 0;
    font-weight: normal;
    color: #FFFFFF;
    font-size: 1em;
}
.auth-links {
    margin-top: 35px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 25px;
}
.auth-links a {
    display: block;
    margin-bottom: 12px;
    color: #D8C3A5;
    font-size: 1.05em;
    text-decoration: underline;
    transition: color 0.3s ease;
}
.auth-links a:hover {
    color: #C3AF94;
}
@media (max-width: 500px) {
    .auth-card {
        padding: 30px;
        border-radius: 15px;
    }
    .auth-card h2 {
        font-size: 2em;
        margin-bottom: 25px;
    }
    .auth-card .form-control {
        padding: 10px;
        font-size: 0.9em;
    }
    .auth-card .btn-primary {
        padding: 12px 30px;
        font-size: 1.2em;
    }
    .auth-card .remember-me-checkbox label {
        font-size: 0.9em;
    }
    .auth-links a {
        font-size: 0.9em;
    }
}
.background-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: radial-gradient(circle, rgba(46,64,83,1) 0%, rgba(20,29,38,1) 100%);
}
main {
    flex-grow: 1;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
    text-align: left;
}
/* Responsive adjustments for header and main content */
@media (max-width: 768px) {
    header .header-content {
        flex-direction: column;
    }
    header nav ul {
        margin-top: 10px;
        flex-direction: column;
        align-items: center;
    }
    header nav li {
        margin: 5px 0;
    }
    header .user-info {
        margin-top: 10px;
        margin-left: 0;
        text-align: center;
    }
    main { padding: 15px; }
    th, td { padding: 8px; font-size: 0.9em; }
    form input[type="text"], form input[type="email"],
    form input[type="password"], form input[type="number"],
    form input[type="date"], form input[type="datetime-local"] {
        width: calc(100% - 16px);
        padding: 8px;
    }
    form input[type="submit"], .action-button, .btn {
        padding: 10px 20px;
        font-size: 1em;
        margin-right: 5px;
        margin-bottom: 10px;
    }
    .header-logo {
        height: 35px;
    }
}
@media (max-width: 480px) {
    header { padding: 10px 15px; }
    .header-logo { height: 30px; }
    header nav a { font-size: 0.9em; }
    main { padding: 10px; }
    th, td { padding: 6px; font-size: 0.8em; }
    form input[type="submit"], .action-button, .btn {
        padding: 8px 15px;
        font-size: 0.9em;
        margin-right: 5px;
        margin-bottom: 10px;
    }
    form div { margin-bottom: 10px; }
}
