/* css/style.css - Con soporte para cámara */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header responsive */
.header {
    background: white;
    padding: 15px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

.logo {
    font-size: 22px;
    font-weight: bold;
    color: #2575fc;
    text-align: center;
    margin-bottom: 15px;
}

.logo i {
    font-size: 28px;
    vertical-align: middle;
    margin-right: 10px;
}

.nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.nav a {
    text-decoration: none;
    color: #333;
    padding: 10px 15px;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 14px;
    white-space: nowrap;
    background: #f8f9fa;
}

.nav a:hover, .nav a.active {
    background: #2575fc;
    color: white;
}

@media (min-width: 768px) {
    .header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 30px;
    }
    
    .logo {
        font-size: 26px;
        margin-bottom: 0;
        text-align: left;
    }
    
    .nav {
        gap: 15px;
    }
    
    .nav a {
        font-size: 16px;
        padding: 10px 20px;
    }
}

/* Card y formularios */
.card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-bottom: 25px;
}

@media (min-width: 768px) {
    .card {
        padding: 30px;
    }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border 0.3s;
    background: white;
}

.form-control:focus {
    border-color: #2575fc;
    outline: none;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

/* Sistema de pestañas */
.tabs {
    display: flex;
    overflow-x: auto;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

.tab {
    padding: 12px 20px;
    background: #f8f9fa;
    border: none;
    border-radius: 8px 8px 0 0;
    margin-right: 5px;
    cursor: pointer;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.3s;
}

.tab.active {
    background: #2575fc;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Campos de teléfono en fila */
.phone-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .phone-group {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Sistema de carga de imágenes */
.camera-container {
    margin-bottom: 25px;
}

.camera-options {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.camera-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    background: #f8f9fa;
    border: 2px dashed #2575fc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.camera-btn:hover {
    background: #e3f2fd;
}

.camera-btn i {
    font-size: 24px;
    color: #2575fc;
    margin-bottom: 8px;
    display: block;
}

.camera-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed #ccc;
    border-radius: 8px;
    margin: 15px auto;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.camera-preview img, .camera-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#cameraView {
    display: none;
}

.camera-controls {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

/* Calculadora 7% */
.calculator-7 {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
    border: 2px solid #2575fc;
}

.calc-display {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.calc-amount {
    font-size: 42px;
    font-weight: bold;
    color: #2575fc;
    margin: 10px 0;
}

.calc-detail {
    font-size: 18px;
    color: #666;
    margin: 5px 0;
}

.calc-highlight {
    color: #28a745;
    font-weight: bold;
}

.slider-container {
    position: relative;
    margin: 30px 0;
    padding: 0 10px;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #666;
}

input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(to right, #2575fc, #6a11cb);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 3px solid #2575fc;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
}

/* Botones */
.btn {
    background: linear-gradient(to right, #2575fc, #6a11cb);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 117, 252, 0.3);
}

.btn-secondary {
    background: #6c757d;
}

.btn-success {
    background: #28a745;
}

.btn-danger {
    background: #dc3545;
}

/* Alertas */
.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: slideIn 0.5s;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Preview de imágenes subidas */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 15px;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .preview-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.preview-item {
    text-align: center;
}

.preview-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    margin-bottom: 10px;
}

.preview-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}

/* Calculadora en index */
.interest-badge {
    background: #28a745;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    margin: 10px 0;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    margin-top: 30px;
    padding: 20px;
    font-size: 14px;
    opacity: 0.8;
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 20px 0;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(to right, #2575fc, #6a11cb);
    border-radius: 4px;
    transition: width 0.3s;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Scroll personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2575fc, #6a11cb);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1c5fc4, #5a0fb8);
}