/* ========== PROTECCIÓN AVANZADA CONTRA SELECCIÓN Y COPIA ========== */
* {
    -webkit-tap-highlight-color: transparent;
}

body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* ========== FORMULARIOS: TEXTO SIEMPRE BLANCO (FIX) ========== */
input, textarea, select, [contenteditable="true"],
input:focus, textarea:focus, select:focus, [contenteditable="true"]:focus,
input:active, textarea:active, select:active,
.form-control, .form-control:focus, .form-control:active {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    color: #ffffff !important;           /* BLANCO EN TODAS LAS SITUACIONES */
    background-color: #0a0f1a !important; /* Fondo oscuro sólido para que el blanco resalte */
    caret-color: #ffffff !important;      /* Cursor blanco */
}

/* Placeholders (texto de ejemplo) más tenue pero legible */
::placeholder {
    color: #a0b4d0 !important;
    opacity: 1;
}

/* Protección de imágenes */
img, svg, canvas, video {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

/* Protección contra inspección de elementos */
[data-protected="true"] {
    position: relative;
}

/* ========== PALETA DE COLORES ========== */
:root {
    --primary: #00d4ff;
    --primary-dark: #0099cc;
    --primary-glow: #00eaff;
    --dark: #0a0f1a;
    --darker: #04070c;
    --dark-gray: #0f172a;
    --white: #ffffff;
    --text: #e0f2fe;
    --card-bg: rgba(15, 25, 45, 0.85);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--darker);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    line-height: 1.6;
    position: relative;
}

/* Canvas de fondo seguro (ESTE ES EL FONDO ORIGINAL) */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: radial-gradient(circle at center, #0a1030 0%, #04070c 100%);
    pointer-events: none;
}

/* Capa anti-debugging visual */
#security-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9998;
    display: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 600;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--darker);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    flex-direction: column;
}

.preloader-content {
    text-align: center;
}

.preloader-logo {
    max-width: 180px;
    margin-bottom: 30px;
    filter: drop-shadow(0 0 15px var(--primary));
}

.loading-container {
    width: 300px;
    height: 4px;
    background-color: rgba(0, 212, 255, 0.2);
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
}

.loading-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-glow) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    box-shadow: 0 0 12px var(--primary);
}

.loading-text {
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Header con blur seguro */
header {
    background-color: rgba(4, 7, 12, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: 700;
    font-size: 1.6rem;
}

.navbar-nav .nav-link {
    color: var(--text) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
    background-color: rgba(0, 212, 255, 0.15);
    border-radius: 8px;
}

/* Hero section */
.hero {
    padding: 100px 0;
    text-align: center;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.08) 0%, rgba(4, 7, 12, 0) 70%);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    max-width: 220px;
    margin-bottom: 10px;
    filter: drop-shadow(0 0 20px var(--primary));
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { filter: drop-shadow(0 0 5px var(--primary)); }
    50% { filter: drop-shadow(0 0 25px var(--primary-glow)); }
    100% { filter: drop-shadow(0 0 5px var(--primary)); }
}

.hero h1 {
    color: var(--primary);
    font-size: 3rem;
    margin-bottom: 25px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

.hero-badge {
    display: inline-block;
    background: rgba(0, 212, 255, 0.15);
    color: var(--primary);
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 212, 255, 0.4);
}

/* Secciones */
.hybrid-model, .services, .fullstack-section, .allies-section, .profile-section, .contact, .cta, .python-test-section {
    padding: 80px 0;
}

.model-card, .service-card, .allies-card, .fullstack-card, .profile-card, .python-test-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 40px;
    transition: var(--transition);
    border: 1px solid rgba(0, 212, 255, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    height: 100%;
}

.model-card:hover, .service-card:hover, .allies-card:hover, .python-test-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
}

.service-card {
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card h3, .model-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--white);
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.service-features li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
}

.service-features li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--primary);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
    justify-content: center;
}

.tech-tag {
    background: rgba(0, 212, 255, 0.12);
    color: var(--primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.8;
}

.fullstack-card {
    position: relative;
    overflow: hidden;
}

.fullstack-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

.government-badge {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid var(--primary);
    padding: 10px 25px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: var(--primary);
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    gap: 30px;
    flex-wrap: wrap;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid var(--primary);
    object-fit: cover;
    box-shadow: 0 0 35px rgba(0, 212, 255, 0.4);
}

.profile-name {
    color: var(--primary);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.profile-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.profile-tag {
    background: rgba(0, 212, 255, 0.12);
    color: var(--primary);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(0, 212, 255, 0.3);
}

.contact-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 212, 255, 0.12);
    border-radius: 50%;
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item:hover {
    background: var(--primary);
    color: var(--darker);
    transform: translateY(-3px);
}

.profile-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 30px;
}

.profile-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: var(--darker);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.profile-btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: var(--darker);
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 6px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover, .profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
}

.contact-form {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

/* Nota: .form-control ya tiene el color blanco forzado arriba, pero mantengo bordes y sombras originales */
.form-control {
    border: 1px solid rgba(0, 212, 255, 0.2);
    padding: 12px 15px;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.25);
    outline: none;
}

.form-label {
    color: var(--primary);
    font-weight: 500;
}

footer {
    background-color: var(--dark);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(0, 212, 255, 0.15);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-about {
    flex: 1;
    min-width: 300px;
    margin-right: 40px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column h4 {
    color: var(--primary);
    margin-bottom: 20px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
}

.footer-links-list li {
    margin-bottom: 10px;
}

.footer-links-list a {
    color: var(--text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links-list a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 5px var(--primary));
}

/* WhatsApp Button */
.whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 100;
    transition: var(--transition);
}

.whatsapp-button a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}

.whatsapp-button a:hover {
    transform: scale(1.1);
}

.whatsapp-button i {
    color: white;
    font-size: 1.8rem;
}

/* Botón de idioma flotante */
.floating-language-btn {
    position: fixed;
    bottom: 110px;
    right: 30px;
    z-index: 101;
    transition: var(--transition);
}

.floating-language-btn .language-main-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 150px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    color: var(--darker);
    font-weight: 600;
}

.floating-language-dropdown {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--dark-gray);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 12px;
    padding: 12px;
    min-width: 200px;
    z-index: 1000;
    display: none;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-height: 400px;
    overflow-y: auto;
}

.floating-language-dropdown.show {
    display: block;
    animation: fadeInUp 0.3s ease;
}

.floating-lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;
    border-radius: 8px;
    color: var(--text);
    transition: var(--transition);
    cursor: pointer;
}

.floating-lang-option:hover {
    background: rgba(0, 212, 255, 0.2);
    color: var(--primary);
}

.floating-lang-option.active {
    background: rgba(0, 212, 255, 0.25);
    color: var(--primary);
}

.language-flag {
    font-size: 1.2rem;
}

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

.info-logo-img {
    max-width: 80px;
    filter: drop-shadow(0 0 10px var(--primary));
    transition: transform 0.3s ease;
}

.info-logo-img:hover {
    transform: scale(1.05);
}

.login-section {
    min-height: calc(100vh - 200px);
    padding: 80px 0;
}

.login-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid rgba(0, 212, 255, 0.2);
    display: flex;
    flex-wrap: wrap;
}

.login-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.login-form-container {
    flex: 1;
    min-width: 400px;
    padding: 60px 50px;
    background: rgba(15, 25, 45, 0.95);
    position: relative;
}

.login-form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
}

/* Estilos específicos para la tarjeta de Python Test (CORREGIDOS, SIN DISTORSIÓN) */
.python-test-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 212, 255, 0.4);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.python-test-card:hover {
    border-color: var(--primary);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.2);
    transform: translateY(-10px);
}

/* Botón personalizado con estilo Python pero sin romper el diseño */
.python-test-card .btn-python {
    background: linear-gradient(135deg, #306998, #FFD43B);
    color: #000;
    font-weight: bold;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.python-test-card .btn-python:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(255, 212, 59, 0.5);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    .section-title h2 { font-size: 2rem; }
    .profile-header { justify-content: center; text-align: center; }
    .footer-content { flex-direction: column; }
    .whatsapp-button a { width: 50px; height: 50px; }
    .login-form-container { min-width: 300px; padding: 40px 30px; }
    .login-card { flex-direction: column; }
    .floating-language-btn .language-main-btn { padding: 8px 16px; min-width: 130px; font-size: 0.8rem; }
    .python-test-card h3 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 1.6rem; }
    .section-title h2 { font-size: 1.5rem; }
    .model-card, .service-card, .allies-card { padding: 25px; }
    .login-image { display: none; }
}

/* Anti-selection visual feedback */
::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}