/* Ocultar la tabla de crédito tributario por defecto */
#creditoTable {
    display: none;
}
/* Estilos generales */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #f4f6f9;
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    padding: 20px;
    max-width: 90%;
    margin: auto;
    padding-top: 80px; /* Espacio para los botones fijos */
}

/* Encabezado */

.header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 5px 20px; /* Reduce el padding vertical */
    height: 140px; /* Ajusta la altura del header */
    background: linear-gradient(90deg, #007bff, #0056b3);
    color: white;
    border-bottom: 4px solid #004085;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

/* Nuevo contenedor para "powered by" que lo coloca en una nueva línea */
.powered-wrapper {
    width: 100%;
    display: flex;
    justify-content: flex-end; /* Alineado a la derecha */
    margin-top: -60px; /* Reduce la distancia entre el título y powered by */
    padding-right: 20px;
}

/* Contenedor del "powered by" */
.powered-container {
    text-align: right;
    padding-right: 20px;
}

/* Estilo del "powered by" */
.powered-by {
    font-size: 0.9rem;
    color: #f8f9fc;
    font-style: italic;
    text-align: right;
}

.powered-by a {
    color: #ffcc00;
    font-weight: bold;
    text-decoration: none;
}

.powered-by a:hover {
    text-decoration: underline;
}


	
/* Estilo del título principal */
/* Asegurar que el título y el eslogan estén en la misma línea */
.title {
    font-size: 3.5rem; /* Tamaño grande */
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: flex-end; /* Alinea el eslogan en la parte inferior del título */
    gap: 15px; /* Espacio entre el título y el eslogan */
}

/* Ajuste del eslogan */
.slogan {
    font-size: 1.8rem; /* Tamaño más grande */
    font-style: italic;
    color: #f8f9fc;
    display: inline-block;
    line-height: 2.2; /* Ajuste de la altura del texto */

}

.titulo-contacto {
    margin: 12px 0 8px;
    color: #0056b3;
    font-size: 1.1rem;
    font-weight: 700;
}

.message {
    min-height: 1.2em;
}

.toggle-table {
    margin-top: 20px;
    color: #000;
    cursor: pointer;
    user-select: none;
}

.click-text {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.table-credito {
    margin-top: 10px;
}

/* Botones */
button {
    background: linear-gradient(90deg, #28a745, #218838);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-size: 1.2rem;
    font-weight: bold;
    margin: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
    background: linear-gradient(90deg, #218838, #1e7e34);
    transform: scale(1.08);
}

/* Estilos específicos para los botones de verificaCT617 */
.verificaCT617-button {
    background: #1abc9c;
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    height: 50px;
    min-width: 150px;
    padding: 0 20px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.verificaCT617-button:hover {
    background: #34495e;
}

/* Estilo del botón videoTUTORIAL */
.verificaCT617-button.small-button {
    font-size: 0.75rem;
    min-width: 110px;
    padding: 0 14px;
}


/* Contenedor unificado de DATOS CONTRIBUYENTE y DATOS DECLARACIÓN */
.datos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.datos-declaracion-actions button {
    min-width: 180px;
    height: 50px;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

.datos-declaracion-actions {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end; /* ✅ alinea todos los hijos al fondo */
    gap: 10px;
    margin-top: 10px;
}

.datos-contribuyente-container, .datos-declaracion-container {
    flex: 1;
    min-width: 45%;
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

/* Ajustar las tablas dentro del contenedor */
.datos-contribuyente-container table, .datos-declaracion-container table {
    width: 100%; /* Asegurar que la tabla ocupa todo el ancho del contenedor */
    border-collapse: collapse;
    margin-top: 10px;
}

.datos-contribuyente-container th, .datos-contribuyente-container td,
.datos-declaracion-container th, .datos-declaracion-container td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
    font-size: 1rem;
    word-wrap: break-word;
    overflow: hidden;
}

.datos-declaracion-container th, .datos-declaracion-container td {
    text-align: center;
}

.datos-contribuyente-container th, .datos-declaracion-container th {
    background: #007bff;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}


/* Tablas generales */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

table th, table td {
    border: 1px solid #ddd;
    padding: 16px;
    text-align: left;
    font-size: 1rem;
}

table th {
    background: #007bff;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
}

/* Contenedor de resultados */
.resultado-container {
    width: 100%;
    background: white;
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: 0px 5px 12px rgba(0, 0, 0, 0.2);
    text-align: right; /* ✅ Alinea el texto interno a la derecha */
    margin-bottom: 15px;
    box-sizing: border-box; /* ✅ Asegura que padding no rompa el ancho */
}

/* Estilo para el mensaje de resultado */
.resultado {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
    text-align: left; /* Alineado a la izquierda */
    color: #007bff; /* Color azul */
    background-color: transparent; /* Sin fondo */
    border: none; /* Sin borde */
}


/* Diseño responsivo */
@media (max-width: 768px) {
    .datos-container {
        flex-direction: column;
        align-items: center;
    }

    .datos-contribuyente-container, 
    .datos-declaracion-container {
        width: 100%;
    }
    
    .datos-declaracion-actions {
        display: flex;
        justify-content: flex-end;
        padding: 0 10px;
        margin-top: 10px;
    }
}

.contact-link {
    color: #007bff;
    font-weight: bold;
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

/* 📌 Estilos específicos para la impresión */
@media print {
    body.imprimir {
        background: none !important;
        color: black !important;
    }

    .header {
        box-shadow: none !important;
        border-bottom: 2px solid #000 !important;
        height: auto !important;
        padding: 10px 20px !important;
    }

    .title {
        font-size: 3rem !important;
        text-shadow: none !important;
    }

    .slogan {
        font-size: 1.5rem !important;
        color: black !important;
    }

    .powered-by, .new-title {
        color: black !important;
        font-size: 0.9rem !important;
    }

    .powered-by a::after {
        content: " (https://www.youtube.com/@rentabilidadECUADOR)";
        font-size: 0.8rem;
        color: black;
    }

    /* Ocultar botones y elementos innecesarios */
    button, input[type="file"], #creditoTable, #toggleCredito {
        display: none !important;
    }

    /* Ajuste de tablas */
    table {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }

    th, td {
        border: 1px solid #000 !important;
        padding: 8px !important;
    }
}

.declaracion-flex-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    margin-top: 15px;
    width: 100%;
}

.declaracion-col {
    flex: 1;
    min-width: 45%;
    background-color: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.declaracion-col.izquierda #resultadoContainer {
    width: 100%;
    max-width: 100%;
    margin-bottom: 15px;
}

/* ==================== MODAL SUSCRIPCIÓN ==================== */
.modal-suscripcion {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content-suscripcion {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 2% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 92vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 25px;
    top: 20px;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.close-modal:hover {
    color: #ffd700;
    transform: rotate(90deg);
}

.modal-header-suscripcion {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    padding: 30px;
    text-align: center;
    color: white;
    position: relative;
}

.modal-header-suscripcion h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-subtitulo {
    margin: 0;
    font-size: 16px;
    opacity: 0.95;
}

.modal-body-suscripcion {
    padding: 30px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-body-suscripcion::-webkit-scrollbar {
    width: 8px;
}

.modal-body-suscripcion::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body-suscripcion::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}

.info-contribuyente-modal,
.caracteristicas-plan,
.video-info {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.info-contribuyente-modal h3,
.caracteristicas-plan h3 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 20px;
}

.datos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.dato-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.dato-label {
    font-size: 12px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
}

.dato-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.dato-item.destacado {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.dato-item.destacado .dato-label,
.dato-item.destacado .dato-value {
    color: white;
}

.dato-item.destacado .dato-value {
    font-size: 28px;
    font-weight: bold;
}

.lista-caracteristicas {
    display: grid;
    gap: 12px;
}

.caracteristica-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
    transition: all 0.3s ease;
}

.caracteristica-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.caracteristica-icon {
    font-size: 24px;
}

.caracteristica-texto {
    flex: 1;
    font-size: 15px;
    color: #333;
}

.video-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffc107;
    text-align: center;
}

.video-info p {
    margin: 0 0 15px 0;
    color: #856404;
}

.modal-footer-suscripcion {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 15px;
    justify-content: center;
}

.btn-primary-modal,
.btn-secondary-modal,
.btn-secondary {
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-primary-modal {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-primary-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.btn-secondary-modal {
    background: #6c757d;
    color: white;
    flex: 0.5;
}

.btn-secondary-modal:hover {
    background: #5a6268;
}

.btn-secondary {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #333;
    width: 100%;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
}

@media (max-width: 768px) {
    .modal-content-suscripcion {
        width: 95%;
        margin: 10% auto;
    }
    
    .modal-header-suscripcion h2 {
        font-size: 24px;
    }
    
    .datos-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-footer-suscripcion {
        flex-direction: column;
    }
    
    .btn-primary-modal,
    .btn-secondary-modal {
        width: 100%;
        flex: 1;
    }
}

/* ==================== MODAL DE CONFIRMACIÓN ==================== */
.modal-confirmacion {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.3s ease;
}

.modal-content-confirmacion {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 650px;
    max-height: 90vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideDown 0.4s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.confirmacion-header {
    background: linear-gradient(135deg, #28a745 0%, #20803a 100%);
    padding: 25px;
    text-align: center;
    color: white;
}

.confirmacion-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.confirmacion-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 180px);
    flex: 1;
}

.confirmacion-body::-webkit-scrollbar {
    width: 10px;
}

.confirmacion-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.confirmacion-body::-webkit-scrollbar-thumb {
    background: #28a745;
    border-radius: 10px;
}

.confirmacion-footer {
    padding: 20px 30px;
    text-align: center;
    border-top: 2px solid #e9ecef;
    background: white;
}

.btn-primary-confirmacion {
    background: linear-gradient(135deg, #28a745 0%, #20803a 100%);
    color: white;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-primary-confirmacion:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

#contenidoConfirmacion {
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

#contenidoConfirmacion strong {
    color: #007bff;
    font-weight: 600;
}

#contenidoConfirmacion .dato-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

#contenidoConfirmacion .separador {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    border-left: 5px solid #ffc107;
    border-radius: 8px;
}

#contenidoConfirmacion .separador h3 {
    margin: 0 0 15px 0;
    color: #856404;
    font-size: 17px;
    text-align: center;
}

#contenidoConfirmacion .advertencia-item {
    padding: 8px 0;
    padding-left: 20px;
    position: relative;
}

#contenidoConfirmacion .advertencia-item:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

/* ==================== FORMULARIO DE REGISTRO ==================== */
.formulario-registro {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.formulario-registro h3 {
    margin: 0 0 20px 0;
    color: #007bff;
    font-size: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group .required {
    color: #dc3545;
    font-weight: bold;
}

.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group input[type="email"]:invalid:not(:placeholder-shown),
.form-group input[type="tel"]:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 12px;
}

.checkbox-group {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #28a745;
}

/* Responsive para formulario */
@media (max-width: 768px) {
    .formulario-registro {
        padding: 15px;
    }
    
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

/* Estado consolidado del mensaje (evita conflictos por reglas duplicadas) */
.success {
    text-align: left;
    color: #007bff;
    background-color: transparent;
    border: none;
}

.error {
    text-align: left;
    color: #007bff;
    background-color: transparent;
    border: none;
}
