:root {
    --primary: #d4a74c;
    /* Oro más vibrante y premium */
    --primary-dark: #b68d30;
    --secondary: #0f111a;
    /* Azul noche más profundo */
    --accent: #f2c94c;
    --bg-dark: #05060a;
    --text-light: #f8f9fa;
    --text-muted: #828294;
    --glass: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.5);
}

*,
::before,
::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(195, 146, 46, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(26, 28, 44, 1) 0%, transparent 50%);
    z-index: -1;
}

/* Typography Overrides */
h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.02em;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hidden {
    display: none !important;
}

/* Navigation */
nav {
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-light);
}

.logo span {
    color: var(--primary);
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 2rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.nav-country-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-light);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    margin-left: 2rem;
    cursor: pointer;
    outline: none;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.nav-country-select:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.nav-country-select option {
    background: #0f111a;
    color: white;
}

/* Hero Section */
.hero {
    padding: 8rem 0 5rem;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    max-width: 900px;
    margin: 0 auto 1.5rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Search Bar */
.search-container {
    width: 90%;
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    background: var(--glass);
    padding: 0.6rem;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-premium);
}

.search-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    outline: none;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(195, 146, 46, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(195, 146, 46, 0.3);
}

.btn-secondary {
    background: var(--glass);
    color: white;
    border: 1px solid var(--glass-border);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Category Filters */
.categories-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(195, 146, 46, 0.05);
}

/* Document Grid */
.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
    width: 100%;
}

.doc-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 2rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.doc-card:hover {
    transform: translateY(-10px);
    border-color: rgba(195, 146, 46, 0.5);
    background: rgba(195, 146, 46, 0.03);
}

.doc-card .icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.doc-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
}

.doc-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.btn-select-mini {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}

/* Questionnaire Section */
.card.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 3rem;
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-header {
    margin-bottom: 3rem;
}

.progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 2rem;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 15px var(--primary);
}

.input-group {
    margin-bottom: 2rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.2rem;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
}

.input-group.error input,
.input-group.error select,
.input-group.error textarea {
    border-color: #ff4d4d;
    background: rgba(255, 77, 77, 0.05);
}

.error-message {
    color: #ff4d4d;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.input-group select option {
    background: #0f111a;
    color: white;
}

.field-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.na-container {
    margin-top: -1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-end;
}

.btn-na {
    background: transparent;
    border: 1px dashed var(--glass-border);
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-na:hover {
    border-color: var(--primary);
    color: white;
    background: rgba(147, 51, 234, 0.1);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* Intl-tel-input Customization */
.iti {
    width: 100%;
}

.iti__country-list {
    background-color: #0f111a !important;
    border: 1px solid var(--glass-border) !important;
    color: white !important;
    border-radius: 12px !important;
    overflow-x: hidden;
    max-width: 300px;
    backdrop-filter: blur(20px);
}

.iti__country:hover,
.iti__country.iti__active,
.iti__country.iti__highlight {
    background-color: var(--primary) !important;
    color: white !important;
}

.iti__selected-dial-code {
    color: white !important;
    font-weight: 500;
}

.iti__country-name,
.iti__dial-code {
    color: var(--text-muted);
}

.iti__country:hover .iti__country-name,
.iti__country:hover .iti__dial-code,
.iti__country.iti__active .iti__country-name,
.iti__country.iti__active .iti__dial-code {
    color: white !important;
}

.iti__search-input {
    background: rgba(255, 255, 255, 0.05) !important;
    color: white !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* Preview Layout */
.preview-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

.doc-viewer {
    background: #fff;
    color: #333;
    padding: 3rem;
    border-radius: 10px;
    height: 650px;
    position: relative;
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
    scroll-behavior: smooth;
}

/* Scrollbar Premium */
.doc-viewer::-webkit-scrollbar {
    width: 8px;
}

.doc-viewer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.doc-viewer::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.doc-viewer::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.doc-page {
    font-family: 'Times New Roman', serif;
    font-size: 1.1rem;
    text-align: justify;
    color: #111;
}

.doc-page h1,
.doc-page h2 {
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
    font-size: 1.4rem;
    border-bottom: 2px solid #333;
    padding-bottom: 0.5rem;
}

.doc-page h3 {
    margin: 1.5rem 0 1rem;
    text-decoration: underline;
    font-size: 1.1rem;
}

.doc-page p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
}

.doc-page strong {
    font-weight: 700;
}

.doc-page ul,
.doc-page ol {
    margin-bottom: 1.2rem;
    padding-left: 2rem;
}

.doc-page li {
    margin-bottom: 0.5rem;
}

.preview-overlay {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
    background: linear-gradient(transparent, #fff 90%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2rem;
    pointer-events: none;
    margin-top: -200px;
    z-index: 10;
}

.preview-overlay span {
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.2rem;
}

.payment-card {
    position: sticky;
    top: 100px;
}

.price-tag {
    font-size: 3rem;
    font-weight: 800;
    margin: 2rem 0;
    text-align: center;
}

.price-tag .currency {
    font-size: 1.5rem;
    color: var(--primary);
    vertical-align: super;
}

.benefit-list {
    margin: 2rem 0;
}

.benefit {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Location Specifics */
.location-box {
    margin-bottom: 3rem;
}

.step-hint {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    text-align: center;
}

.location-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

/* Loading & Errors */
.loading-container {
    padding: 5rem 2rem;
    text-align: center;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(195, 146, 46, 0.1);
    border-left-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 2rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-message {
    color: var(--accent);
    font-size: 1.25rem;
    font-weight: 600;
    min-height: 1.5em;
    transition: all 0.5s ease;
}

.loading-subtext {
    color: var(--text-muted);
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Error Box */
.error-box {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    padding: 3rem;
    border-radius: 25px;
    text-align: center;
}

/* Lead Capture & Payment Reveal */
.payment-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

#leadCapture,
#paymentDetails {
    transition: all 0.3s ease;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.action-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-large {
    padding: 1.2rem;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: 100%;
}

.success-box {
    text-align: center;
    padding: 3rem;
}

/* Responsive Overhaul */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .card.glass {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .form-header h2 {
        font-size: 1.4rem;
    }

    .preview-layout {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 5rem 0 3rem;
        width: 100%;
        overflow: hidden;
    }

    .hero h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        padding: 0 1rem;
        line-height: 1.25;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .doc-viewer {
        padding: 1.5rem;
        height: 500px;
    }

    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem 1rem;
        text-align: center;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        width: 100%;
    }

    .nav-links a,
    .nav-country-select {
        margin: 0 !important;
        width: 100%;
        max-width: 280px;
    }

    .search-container {
        flex-direction: column;
        width: 95%;
        gap: 0.5rem;
        background: transparent;
        border: none;
        box-shadow: none;
        padding: 0;
    }

    .search-container input {
        background: var(--glass);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .search-container button {
        width: 100%;
    }
}

footer {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    background: rgba(10, 11, 20, 0.8);
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}