/* Estilos para el preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9); /* Fondo semi-transparente */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loader {
    border: 8px solid #f3f3f3; /* Light grey */
    border-top: 8px solid #007bff; /* Blue */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 2s linear infinite;
}

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

/* Estilos para el formulario de login */
/* Se aplica solo a formularios dentro de un contenedor con la clase 'auth-container' para evitar afectar otros formularios. */
.auth-container form {
    opacity: 0; /* Inicialmente oculto */
    transform: translateY(20px); /* Desplazamiento inicial */
    transition: opacity 1s ease-in-out, transform 1s ease-in-out; /* Transición suave para aparecer y deslizar */
}

.auth-container form.loaded {
    opacity: 1; /* Mostrar cuando la clase 'loaded' se añade */
    transform: translateY(0); /* Volver a la posición original */
}

/* public/css/style.css */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-image: url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow-x: hidden; /* Evitar scroll horizontal durante la animación */
    position: relative; /* Para posicionar el Brick de forma absoluta */
}

.main-content-subscribe {
    display: flex;
    gap: 40px; /* Duplicar el espacio entre las columnas */
    width: 90%; /* Ajusta el ancho total */
    max-width: 1200px; /* Ancho máximo para pantallas grandes */
    border-radius: 8px;
    overflow: hidden;
    position: relative; /* Para el movimiento */
    left: 0;
    transition: left 0.5s ease-in-out; /* Animación de movimiento */
}

.plans-comparison-section {
    flex: 1; /* Ocupa 1/2 del espacio inicialmente */
    padding: 2rem;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: flex 0.5s ease-in-out, max-width 0.5s ease-in-out; /* Transición */
}

.plans-comparison-section h2 {
    background-color: #007bff; /* Fondo azul */
    color: white; /* Texto blanco */
    padding: 15px 30px; /* Espaciado interno */
    border-radius: 8px; /* Bordes redondeados */
    margin-bottom: 30px; /* Espacio debajo del título */
    font-size: 1.8em; /* Tamaño de fuente más grande */
    text-transform: uppercase; /* Texto en mayúsculas */
    letter-spacing: 1px; /* Espaciado entre letras */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Sombra sutil */
    text-align: center;
}

.subscribe-form-section {
    flex: 1; /* Ocupa 1/2 del espacio inicialmente */
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* Sombra aumentada */
    transition: flex 0.5s ease-in-out, max-width 0.5s ease-in-out; /* Transición */
}

.container {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
}

/* Restaurar estilos para formularios generales */
form {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    box-sizing: border-box; /* Añadido para corregir el ancho */
}

/* Estilos específicos para el formulario dentro de subscribe-form-section */
.subscribe-form-section form {
    background-color: transparent; /* Hacer el formulario transparente para que el fondo de subscribe-form-section se vea */
    padding: 0; /* Eliminar padding del formulario ya que lo tiene el subscribe-form-section */
    border-radius: 0; /* Eliminar border-radius del formulario */
    box-shadow: none; /* Eliminar box-shadow del formulario */
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 0.5rem;
}

p {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #0056b3;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
}

.login-link p {
    margin: 0;
    color: #666;
}

.login-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    width: 100%;
}

/* Estilos para la tabla comparativa (Hostinger-like) */
.comparison-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: transparent;
    box-shadow: none;
}

.comparison-table th,
.comparison-table td {
    border: none;
    padding: 15px 10px;
    text-align: center;
    vertical-align: middle;
}

.comparison-table thead th {
    background-color: #f0f2f5;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    font-size: 1em;
    padding: 20px 10px;
    border-bottom: 2px solid #ddd;
}

.comparison-table thead th:first-child {
    background-color: transparent;
    text-align: left;
    border-bottom: none;
}

.comparison-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: #555;
}

.comparison-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.comparison-table tbody tr:hover {
    background-color: #f1f1f1;
}

.comparison-table .text-danger {
    color: #dc3545;
    font-size: 1.2em;
}

.comparison-table .text-success {
    color: #28a745;
    font-size: 1.2em;
}

/* Estilos para la fila de precios */
.comparison-table tbody tr:last-child {
    font-weight: bold;
    font-size: 1.2em;
}

.comparison-table tbody tr:last-child td {
    color: #007bff;
    padding-top: 20px;
    padding-bottom: 20px;
}

.comparison-table tbody tr:last-child td:first-child {
    color: #333;
}

/* Estilos para los botones de suscripción */
.subscribe-button {
    display: block; /* Asegura que ocupe todo el ancho disponible */
    width: 100%;
    padding: 10px 15px;
    background-color: #007bff; /* Color principal */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #0056b3;
}

.login-link {
    text-align: center;
    margin-top: 1.5rem;
}

.login-link p {
    margin: 0;
    color: #666;
}

.login-link a {
    color: #007bff;
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.logo-container {
    text-align: center;
    margin-bottom: 20px;
}

.logo-container img {
    width: 100%;
}

/* Estilos para la tabla comparativa (Hostinger-like) */
.comparison-table-container {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    padding: 20px;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: transparent;
    box-shadow: none;
}

.comparison-table th,
.comparison-table td {
    border: none;
    padding: 15px 10px;
    text-align: center;
    vertical-align: middle;
}

.comparison-table thead th {
    background-color: #f0f2f5;
    font-weight: bold;
    color: #333;
    text-transform: uppercase;
    font-size: 1em;
    padding: 20px 10px;
    border-bottom: 2px solid #ddd;
}

.comparison-table thead th:first-child {
    background-color: transparent;
    text-align: left;
    border-bottom: none;
}

.comparison-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    color: #555;
}

.comparison-table tbody tr:nth-child(odd) {
    background-color: #f9f9f9;
}

.comparison-table tbody tr:hover {
    background-color: #f1f1f1;
}

.comparison-table .text-danger {
    color: #dc3545;
    font-size: 1.2em;
}

.comparison-table .text-success {
    color: #28a745;
    font-size: 1.2em;
}

/* Estilos para la fila de precios */
.comparison-table tbody tr:last-child {
    font-weight: bold;
    font-size: 1.2em;
}

.comparison-table tbody tr:last-child td {
    color: #007bff;
    padding-top: 20px;
    padding-bottom: 20px;
}

.comparison-table tbody tr:last-child td:first-child {
    color: #333;
}

/* Estilos para los botones de suscripción */
.subscribe-button {
    display: block; /* Asegura que ocupe todo el ancho disponible */
    width: 100%;
    padding: 10px 15px;
    background-color: #007bff; /* Color principal */
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.subscribe-button:hover {
    background-color: #0056b3;
}

/* Estilos para el botón de volver (FAB) */
.fab.back-button {
    position: fixed;
    top: 30px; /* Posición superior */
    left: 30px; /* Posición izquierda */
    width: 60px;
    height: 60px;
    background-color: #007bff; /* Mismo color azul */
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: width 0.3s ease-in-out, border-radius 0.3s ease-in-out;
    z-index: 1000;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab.back-button:hover {
    width: 150px; /* Ancho al hacer hover */
    border-radius: 30px;
    background-color: #0056b3; /* Mismo color hover */
}

.fab.back-button .fab-icon,
.fab.back-button .fab-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.2s ease-in-out;
    color: white;
    white-space: nowrap;
}

.fab.back-button .fab-icon {
    font-size: 28px;
    opacity: 1;
}

.fab.back-button .fab-text {
    font-size: 16px;
    font-weight: 600;
    opacity: 0;
}

.fab.back-button:hover .fab-icon {
    opacity: 0;
}

.fab.back-button:hover .fab-text {
    opacity: 1;
}

/* Estilos para el Brick de Mercado Pago que se desliza */
/* Estilos para el Brick de Mercado Pago */
#paymentBrick_container {
    width: 100%;
    max-width: 400px; /* Ajustado para que coincida con el ancho del formulario */
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.mp-logo {
    max-width: 200px; /* Ajusta el tamaño máximo del logo */
    margin-bottom: 10px; /* Espacio debajo del logo */
}

/* Media Queries para responsividad */
@media (max-width: 768px) {
    .main-content-subscribe {
        flex-direction: column;
        width: 95%;
        gap: 20px;
    }

    .plans-comparison-section,
    .subscribe-form-section {
        flex: none;
        width: 100%;
        padding: 1.5rem;
    }

    .subscribe-form-section form {
        box-shadow: none;
    }

    .comparison-table-container {
        padding: 10px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 10px 5px;
        font-size: 0.8em;
    }

    .comparison-table thead th:first-child,
    .comparison-table tbody td:first-child {
        text-align: left;
    }

    .form-columns-container {
        flex-direction: column; /* Apilar columnas en pantallas pequeñas */
    }

    .form-column-left, .form-column-right {
        width: 100%;
        padding: 0;
    }

    .right-column {
        max-width: 400px; /* Ancho máximo para la columna derecha */
        margin: 0 auto; /* Centrar la columna derecha */
    }

    body.brick-active .plans-comparison-section {
        flex: none;
        max-width: 100%;
    }

    body.brick-active .subscribe-form-section {
        flex: none;
        max-width: 100%;
    }

    #mp-brick-slide-container {
        width: 100%;
        right: 0; /* Asegurarse de que esté visible en móvil */
        position: relative; /* Cambiar a relativo para que fluya con el contenido */
        height: auto;
        box-shadow: none;
    }

    body.show-mp-brick .main-content-subscribe {
        left: 0; /* No mover en móvil, solo apilar */
}

/* Estilos para el Modal de Upgrade */
.modal {
    display: none; 
    position: fixed; 
    z-index: 10000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6); 
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fff;
    margin: 10% auto; 
    padding: 0;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    overflow: hidden;
    animation: slideIn 0.3s;
}

.modal-header {
    padding: 20px;
    background-color: #007bff;
    color: white;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

.modal-header .modal-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.modal-body {
    padding: 20px 30px;
    text-align: center;
}

.modal-body p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.6;
}

.modal-footer {
    padding: 20px;
    text-align: center;
    background-color: #f9f9f9;
    border-top: 1px solid #ddd;
}

.btn-upgrade {
    background-color: #28a745;
    color: white;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1em;
    transition: background-color 0.3s;
}

.btn-upgrade:hover {
    background-color: #218838;
}

.btn-secondary.close-modal-button {
    background-color: #6c757d;
    margin-left: 10px;
}

.btn-secondary.close-modal-button:hover {
    background-color: #5a6268;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

@keyframes fadeIn {
    from {opacity: 0}
    to {opacity: 1}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0}
    to {transform: translateY(0); opacity: 1}
}
