* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    color: #4a4a4a;
    margin: 0;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 53%;
    height: 100%;
    background-color: #FBFCFF;
    z-index: -1;
}

.container {
    display: grid;
    grid-template-columns: 47% 53%;
    min-height: 100vh;
    max-width: 1920px;
    margin: 0 auto;
}

/* Media queries for container */
@media (max-width: 992px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    body::before {
        display: none;
    }
    
    .right-section {
        margin-top: 20px;
        padding: 20px 0;
        align-items: center;
    }

    .login-section {
        padding-top: 10px;
    }

    .bank-logo {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .service-cards-container {
        display: none; /* Ocultar service cards en móvil */
    }

    .right-section {
        display: none; /* Ocultar sección derecha completa en móvil */
    }

    .container {
        grid-template-columns: 1fr; /* Usar todo el ancho para el formulario */
    }

    .login-section {
        max-width: 100%;
        padding: 20px;
        margin: 0 auto;
    }

    .main-logo {
        max-width: 240px;
    }

    .welcome-banner {
        padding: 6px 15px 6px 70px;
        max-width: 100%;
        margin: 20px auto;
    }

    .banner-image {
        width: 70px;
    }
}

@media (max-width: 576px) {
    .login-section {
        padding: 15px;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .input-group select,
    .input-group input {
        width: 100%;
    }

    .welcome-banner {
        padding: 6px 12px 6px 60px;
        font-size: 13px;
    }

    .banner-image {
        width: 60px;
    }

    .service-cards-container {
        padding: 0 20px;
    }

    .service-card {
        min-width: 90px;
        height: 90px;
    }
}

@media (max-width: 360px) {
    .login-section {
        padding: 10px;
    }

    .main-logo {
        max-width: 200px;
    }

    .service-card {
        min-width: 80px;
        height: 80px;
        padding: 6px;
    }

    .card-icon {
        width: 28px;
        height: 28px;
    }

    .card-content h3 {
        font-size: 10px;
    }
}

/* Error and connection status */
.login-error {
    display: none;
    background-color: #fff2f2;
    border: 1px solid #ffcdd2;
    color: #d32f2f;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
    width: 100%;
}

.connection-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    display: none;
}

.login-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 20px;
    padding-top: 20px;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.right-section {
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    margin-top: 90px;
}

.service-cards-container {
    position: relative;
    max-width: 450px;
    width: 100%;
    padding: 0 40px;
    margin: 0;
    overflow: hidden;
}

.service-cards {
    display: flex;
    gap: 12px;
    width: 100%;
    will-change: transform;
    transition: transform 0.3s ease-in-out;
    margin: 0;
    padding: 10px 0;
}

.service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    width: calc((100% - 24px) / 3);
    min-width: 120px;
    height: 110px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #002A8D;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    background: #002A8D;
    color: white;
}

.card-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    background: rgba(0,42,141,0.05);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 1000;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0051a2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { 
        transform: rotate(0deg);
    }
    100% { 
        transform: rotate(360deg);
    }
}

.loading-screen p {
    margin-top: 1rem;
    color: #333;
    font-size: 1.1rem;
}

.service-card:hover .card-icon {
    background: rgba(255,255,255,0.15);
}

.card-icon svg {
    width: 20px;
    height: 20px;
}

.card-content {
    text-align: center;
    margin-top: 4px;
}

.card-content h3 {
    font-size: 12px;
    line-height: 1.3;
    font-weight: 600;
    margin: 0;
    transition: color 0.3s ease;
}

.bank-logo {
    text-align: center;
    margin-bottom: -5px;
    margin-top: -25px;
}

.main-logo {
    max-width: 280px;
    height: auto;
}

.welcome-banner {
    background-color: #002A8D;
    border-radius: 15px;
    padding: 6px 20px 6px 85px;
    display: flex;
    align-items: center;
    margin: 0 auto 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 360px;
    position: relative;
    overflow: hidden;
    min-height: 28px;
}

.banner-image {
    position: absolute;
    left: 0;
    top: 0;
    width: 85px;
    height: 100%;
    object-fit: contain;
    padding: 5px;
}

.banner-text {
    flex: 1;
    margin-left: 0;
}

.banner-text p {
    margin-bottom: 8px;
    font-weight: 600;
    color: white;
    font-size: 14px;
}

.banner-text a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    opacity: 1;
}

.login-container {
    background: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 360px;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,0.08);
}

.login-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    gap: 0;
}

.login-options::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #E5E5E5;
}

.login-options button {
    padding: 15px 20px;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    font-size: 15px;
    position: relative;
    transition: color 0.3s ease;
}

.login-options button.active {
    color: #002A8D;
    font-weight: 600;
}

.login-options button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #002A8D;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.login-options button.active::after {
    transform: scaleX(1);
}

.login-alert {
    background-color: #E8F4FF;
    padding: 15px 45px 15px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    position: relative;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    width: 100%;
}

.close-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #002A8D;
    border: none;
    background: none;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.close-icon:hover {
    background-color: rgba(0, 42, 141, 0.05);
}

.login-form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group select {
    width: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    background-color: #fff;
    font-size: 14px;
    color: #666;
}

.input-group select option {
    padding: 8px;
    background-color: #002A8D;
    color: white;
}

.input-group input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.cardholder-name {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.password-input {
    position: relative;
    width: 100%;
}

.password-input input {
    width: 100%;
    padding: 10px;
    padding-right: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    touch-action: manipulation;
}

.toggle-password:hover {
    opacity: 0.8;
}

.toggle-password svg {
    width: 24px;
    height: 24px;
}

.toggle-password .slash {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.toggle-password.show .slash {
    opacity: 1;
}

.toggle-password svg path {
    stroke: #002A8D;
    transition: all 0.2s ease;
}

.toggle-password:hover svg path {
    stroke: #001e66;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #002A8D;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 20px;
}

.login-button:hover {
    background-color: #001e66;
}

.links {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    gap: 20px;
}

.links a {
    color: #002A8D;
    text-decoration: none;
    font-size: 14px;
    position: relative;
    padding: 0 15px;
}

.links a:first-child {
    text-align: right;
    border-right: 1px solid #eee;
}

.links a:last-child {
    text-align: left;
}

.links a:after {
    content: '›';
    margin-left: 5px;
    font-size: 16px;
    vertical-align: middle;
}

.bottom-nav {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-top: 40px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 10px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.bottom-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-item {
    text-align: center;
    color: #002A8D;
    cursor: pointer;
    min-width: 80px;
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    flex-shrink: 0;
    scroll-snap-align: start;
    margin-right: 5px;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.nav-item img {
    width: 24px;
    margin-bottom: 5px;
}

.nav-item span {
    font-size: 12px;
    line-height: 1.2;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.welcome-title {
    font-size: 22px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
    margin-top: -15px;
    white-space: nowrap;
    letter-spacing: -0.3px;
    text-align: right;
    padding-right: 15px;
}

/* Botones de navegación */
.nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: 1px solid #002A8D;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.3s ease;
    padding: 0;
}

.nav-button:hover {
    background: #FBFCFF;
}

.nav-button:hover svg {
    color: #002A8D;
}

.nav-button:hover circle {
    fill: #F5F9FF;
}

.nav-button svg {
    width: 32px;
    height: 32px;
    color: #002A8D;
}

.nav-button svg path {
    stroke-width: 1.2;
}

.nav-button svg circle {
    fill: white;
}

.nav-button.prev-button {
    left: 0;
}

.nav-button.next-button {
    right: 0;
}

.nav-button.hidden {
    display: none;
}

/* Estilos para el texto de privacidad */
.privacy-text {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
    max-width: 360px;
    margin-left: auto;
    margin-right: auto;
}

.privacy-text a {
    color: #002A8D;
    text-decoration: none;
}

.privacy-text a:hover {
    text-decoration: underline;
}

.privacy-text-right {
    text-align: left;
    margin-left: 40px;
    margin-top: 40px;
}

@media (max-width: 992px) {
    .privacy-text {
        text-align: center;
        padding: 0 20px;
        margin-bottom: 30px;
    }
    
    .privacy-text-right {
        display: none;
    }
}

@media (max-width: 576px) {
    .privacy-text {
        font-size: 11px;
        padding: 0 15px;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        margin: 0;
    }
}

@media (max-width: 992px) {
    body::before {
        display: none;
    }
    
    body {
        background-color: #f5f6f8;
    }

    .container {
        grid-template-columns: 1fr;
    }

    .login-section {
        padding: 20px;
        margin: 0 auto;
        background-color: white;
    }

    .right-section {
        padding: 20px;
    }

    .service-cards-container {
        max-width: 100%;
        padding: 0 30px;
    }

    .service-cards {
        padding: 15px;
    }

    .service-card {
        min-width: 110px;
        padding: 12px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .bank-logo {
        margin-bottom: 20px;
    }

    .main-logo {
        max-width: 200px;
    }

    .welcome-title {
        font-size: 20px;
        text-align: center;
        padding: 0;
        margin-bottom: 20px;
    }

    .welcome-banner {
        flex-direction: column;
        text-align: center;
        padding: 70px 15px 15px;
        margin: 0 15px 20px;
        max-width: none;
    }

    .banner-image {
        width: 70px;
        height: 70px;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        padding: 10px;
    }

    .banner-text {
        margin-top: 5px;
    }

    .banner-text p {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .banner-text a {
        font-size: 13px;
    }

    .login-container {
        margin: 0 15px;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 10px;
    }

    .welcome-title {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .welcome-banner {
        padding: 65px 12px 12px;
        margin: 0 10px 15px;
    }

    .banner-image {
        width: 60px;
        height: 60px;
    }

    .banner-text p,
    .banner-text a {
        font-size: 12px;
    }

    .login-container {
        margin: 0 10px;
        padding: 12px;
    }

    .login-options button {
        padding: 12px;
        font-size: 14px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .input-group {
        flex-direction: column;
        gap: 8px;
    }

    .input-group select,
    .input-group input,
    .password-input input {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
}
/* Ajustes para pantallas muy pequeñas */
@media (max-width: 360px) {
    .container {
        padding: 8px;
    }

    .welcome-banner {
        padding: 75px 15px 12px;
    }

    .banner-text p {
        font-size: 14px;
    }

    .banner-text a {
        font-size: 12px;
    }

    .login-container {
        padding: 15px;
    }

    .form-group label {
        font-size: 14px;
    }    .bottom-nav {
        gap: 8px;
    }

    .nav-item {
        min-width: 65px;
        width: 65px;
        height: 65px;
        padding: 6px;
    }

    .nav-item img {
        width: 18px;
        margin-bottom: 4px;
    }

    .nav-item span {
        font-size: 10px;
    }

    .welcome-title {
        font-size: 20px;
        margin-bottom: 12px;
    }
}

.version-number {
    position: fixed;
    right: 15px;
    bottom: 15px;
    font-size: 10px;
    color: #666;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    letter-spacing: 1px;
}

@media (max-width: 992px) {
    .version-number {
        display: none;
    }
}