/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Top */
.header-top {
    background-color: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.header-top .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo-cheviplan {
    height: 45px;
    width: auto;
}

/* Search Box */
.search-box {
    display: flex;
    flex: 1;
    max-width: 300px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 0;
    font-size: 14px;
    outline: none;
}

.search-box input:focus {
    border-color: #0066cc;
}

.search-box button {
    background-color: #333;
    color: #fff;
    border: none;
    padding: 10px 18px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #555;
}

/* Header Buttons */
.header-buttons {
    display: flex;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-outline {
    border: 2px solid #0066cc;
    color: #0066cc;
    background-color: transparent;
}

.btn-outline:hover {
    background-color: #0066cc;
    color: #fff;
}

.btn-primary {
    background-color: #0066cc;
    color: #fff;
    border: 2px solid #0066cc;
}

.btn-primary:hover {
    background-color: #0052a3;
    border-color: #0052a3;
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

/* Navbar */
.navbar {
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.nav-menu {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #0066cc;
}

.nav-link i {
    font-size: 10px;
    margin-left: 5px;
}

/* Banner */
.banner {
    background-color: #0066cc;
    padding: 25px 0;
}

.banner h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    font-style: italic;
}

/* Main Content */
.main-content {
    padding: 40px 0;
    min-height: 400px;
    background-color: #f9f9f9;
}

/* Sección Aportes */
.aportes-section {
    background-color: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.aportes-header {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.pse-logo {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.aportes-title h2 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.aportes-title p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.tab-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #6c757d;
    color: #fff;
}

.tab-btn.active {
    background-color: #0066cc;
}

.tab-btn:hover:not(.active) {
    background-color: #5a6268;
}

/* Formulario */
.form-container {
    border-top: 1px solid #eee;
    padding-top: 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group .required {
    color: #dc3545;
}

.form-group select,
.form-group input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #0066cc;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* ==================== RESPONSIVE ==================== */

/* Tablet */
@media (max-width: 992px) {
    .header-top .container {
        flex-wrap: wrap;
    }

    .search-box {
        order: 3;
        max-width: 100%;
        width: 100%;
        margin-top: 15px;
    }

    .nav-link {
        padding: 15px 12px;
        font-size: 13px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header-top .container {
        flex-wrap: wrap;
    }

    .logo {
        flex: 1;
    }

    .logo-chevyplan {
        height: 35px;
    }

    .search-box {
        order: 4;
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
    }

    .header-buttons {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    /* Navbar Mobile */
    .navbar {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #fff;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }

    .navbar.active {
        display: block;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
    }

    .header {
        position: relative;
    }

    /* Banner Mobile */
    .banner h1 {
        font-size: 18px;
        padding: 0 10px;
    }

    /* Mostrar botones en menú móvil */
    .navbar.active::after {
        content: '';
        display: block;
        padding: 15px 20px;
    }
}

/* Mobile pequeño */
@media (max-width: 480px) {
    .logo-chevyplan {
        height: 28px;
    }

    .banner h1 {
        font-size: 16px;
    }
}

/* Responsive Formulario */
@media (max-width: 768px) {
    .aportes-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .aportes-title h2 {
        font-size: 20px;
    }

    .tabs {
        justify-content: center;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .aportes-section {
        padding: 20px;
    }
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: #f5f5f5;
    padding: 50px 0 0;
    border-top: 1px solid #ddd;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    margin-top: 20px;
}

.footer-col h4:first-child {
    margin-top: 0;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul li a {
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: #0066cc;
}

.footer-col p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

/* Footer Brand Column */
.footer-brand {
    padding-right: 20px;
}

.footer-logo {
    height: 40px;
    margin-bottom: 20px;
}

.superintendencia-box {
    border: 1px solid #333;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.superintendencia-box p {
    font-size: 11px;
    color: #333;
    margin: 2px 0;
}

.footer-link {
    margin-bottom: 10px;
}

.footer-link a {
    color: #0066cc;
    text-decoration: none;
}

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

/* Social Icons */
.social-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.social-icon {
    width: 35px;
    height: 35px;
    border: 1px solid #333;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.social-icon:hover {
    background-color: #333;
    color: #fff;
}

/* SiteLock Badge */
.sitelock-badge {
    border: 2px solid #4a7c59;
    padding: 10px 15px;
    text-align: center;
    max-width: 180px;
}

.sitelock-badge p {
    font-size: 11px;
    color: #333;
    margin: 2px 0;
}

.sitelock-badge p strong {
    font-size: 16px;
    color: #4a7c59;
}

.sitelock-date {
    background-color: #4a7c59;
    color: #fff !important;
    padding: 3px 8px;
    font-size: 10px !important;
    margin-top: 5px;
    display: inline-block;
}

/* Footer Bottom */
.footer-bottom {
    background-color: #fff;
    padding: 20px 0;
    margin-top: 40px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: #666;
}

/* Footer Responsive */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-brand {
        text-align: center;
        padding-right: 0;
    }

    .footer-logo {
        margin: 0 auto 20px;
        display: block;
    }

    .social-icons {
        justify-content: center;
    }

    .sitelock-badge {
        margin: 0 auto;
    }

    .footer-col {
        text-align: center;
    }

    .footer-col ul li a {
        display: inline-block;
    }
}

/* Botón Consultar */
.button-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding: 20px 0;
}

.btn-consultar {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-consultar:hover:not(:disabled) {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
    transform: translateY(-2px);
}

.btn-consultar:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(30, 136, 229, 0.3);
}

.btn-consultar:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .btn-consultar {
        width: 100%;
        padding: 14px 30px;
    }
}

/* ==================== LOADING ==================== */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1e88e5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.loading-container p {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.loading-subtitle {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* ==================== RESULTADOS ==================== */
.resultados-container {
    animation: fadeIn 0.5s ease-in;
}

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

.mensaje-bienvenida {
    margin-bottom: 20px;
}

.mensaje-bienvenida p {
    font-size: 18px;
    color: #333;
    line-height: 1.6;
}

.mensaje-bienvenida strong {
    font-weight: 600;
}

.alerta-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    border-left: 4px solid #17a2b8;
    border-radius: 4px;
    padding: 15px 20px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.alerta-info i {
    color: #17a2b8;
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.alerta-info p {
    font-size: 13px;
    color: #0c5460;
    margin: 0;
    line-height: 1.6;
}

/* Contrato Card */
.contrato-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contrato-info {
    background-color: #f8f9fa;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.info-item {
    flex: 1;
    min-width: 150px;
}

.info-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.info-value {
    display: block;
    font-size: 15px;
    color: #333;
    font-weight: 600;
}

/* Formulario de Pago */
.pago-form {
    padding-top: 15px;
}

.form-row-pago {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group-pago {
    display: flex;
    flex-direction: column;
}

.form-group-pago label {
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    font-weight: 500;
}

.select-pago,
.input-pago {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
}

.select-pago {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.input-pago:read-only {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.button-pagar-container {
    display: flex;
    justify-content: center;
}

.btn-pagar {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 40px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-pagar:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.btn-pagar:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* Botón Nueva Consulta */
.button-nueva-consulta {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.btn-nueva-consulta {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 35px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-nueva-consulta:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}

/* No Encontrado */
.no-encontrado-container {
    text-align: center;
    padding: 60px 20px;
}

.no-encontrado-icon {
    font-size: 60px;
    color: #ffc107;
    margin-bottom: 20px;
}

.no-encontrado-icon.error {
    color: #dc3545;
}

.no-encontrado-container h3 {
    font-size: 24px;
    color: #333;
    margin-bottom: 15px;
}

.no-encontrado-container p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

/* ==================== RESPONSIVE RESULTADOS ==================== */
@media (max-width: 768px) {
    .contrato-info {
        flex-direction: column;
        gap: 15px;
    }

    .info-item {
        min-width: 100%;
    }

    .form-row-pago {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .alerta-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .mensaje-bienvenida p {
        font-size: 16px;
    }

    .contrato-card {
        padding: 20px 15px;
    }

    .btn-pagar {
        width: 100%;
    }
}

/* ==================== MODAL PSE ==================== */
.pse-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    animation: fadeIn 0.3s ease-in;
}

.pse-modal-content {
    background-color: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.pse-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 1;
}

.pse-modal-close:hover {
    background-color: #f0f0f0;
    color: #333;
}

.pse-modal-header {
    background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
}

.pse-modal-title {
    color: white;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.pse-modal-body {
    padding: 30px;
}

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

.pse-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.pse-radio-group {
    display: flex;
    gap: 20px;
}

.pse-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
    cursor: pointer;
}

.pse-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.pse-input,
.pse-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s;
    font-family: inherit;
}

.pse-input:focus,
.pse-select:focus {
    outline: none;
    border-color: #1e88e5;
}

.pse-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
    cursor: pointer;
}

.pse-btn-pagar {
    width: 100%;
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 16px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

.pse-btn-pagar:hover:not(:disabled) {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
    transform: translateY(-2px);
}

.pse-btn-pagar:active:not(:disabled) {
    transform: translateY(0);
}

.pse-btn-pagar:disabled {
    background: #cccccc;
    color: #666666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.pse-powered-by {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px 30px 10px;
    color: #666;
    font-size: 13px;
}

.pse-kushki-logo {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099ff 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.pse-footer-text {
    padding: 0 30px 25px;
    font-size: 11px;
    color: #999;
    text-align: center;
    line-height: 1.5;
}

.pse-footer-link {
    color: #1e88e5;
    text-decoration: none;
}

.pse-footer-link:hover {
    text-decoration: underline;
}

/* Responsive Modal PSE */
@media (max-width: 768px) {
    .pse-modal-overlay {
        padding: 10px;
        align-items: flex-end;
    }

    .pse-modal-content {
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }

    .pse-modal-header {
        padding: 20px 25px;
    }

    .pse-modal-title {
        font-size: 18px;
    }

    .pse-modal-body {
        padding: 25px 20px;
    }

    .pse-powered-by,
    .pse-footer-text {
        padding-left: 20px;
        padding-right: 20px;
    }

    .pse-radio-group {
        gap: 15px;
    }
}
