/* Reset y variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    overflow-y: auto;
}

:root {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #8b5cf6;
    --accent-color: #06b6d4;
    --text-dark: #0f172a;
    --text-medium: #334155;
    --text-light: #64748b;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(15, 23, 42, 0.85);
    --bg-light: rgba(248, 250, 252, 0.05);
    --border-color: rgba(148, 163, 184, 0.2);
    --border-accent: rgba(59, 130, 246, 0.3);
    --success-color: #10b981;
    --error-color: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-accent: 0 4px 20px rgba(59, 130, 246, 0.15);
    --shadow-accent-strong: 0 8px 30px rgba(59, 130, 246, 0.25);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-darker);
    background-image: 
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(59, 130, 246, 0.02) 2px, rgba(59, 130, 246, 0.02) 4px),
        repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(59, 130, 246, 0.02) 2px, rgba(59, 130, 246, 0.02) 4px),
        radial-gradient(ellipse at top, #1e293b 0%, #0f172a 50%, #020617 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #e2e8f0;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Imágenes de fondo decorativas con efecto tech */
.background-images {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.bg-img {
    position: absolute;
    opacity: 0.12;
    filter: blur(2px) hue-rotate(200deg) saturate(1.2);
    object-fit: cover;
    mix-blend-mode: soft-light;
}

.bg-img-1 {
    width: 350px;
    height: 350px;
    top: 5%;
    right: 3%;
    animation: floatSubtle 25s ease-in-out infinite;
}

.bg-img-2 {
    width: 320px;
    height: 320px;
    bottom: 5%;
    left: 3%;
    animation: floatSubtle 30s ease-in-out infinite reverse;
}

.bg-img-3 {
    width: 300px;
    height: 300px;
    top: 60%;
    right: 5%;
    animation: floatSide 28s ease-in-out infinite;
}

.bg-img-4 {
    width: 280px;
    height: 280px;
    top: 30%;
    left: 5%;
    animation: floatSide 32s ease-in-out infinite reverse;
}

@keyframes floatSubtle {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.12;
    }
    50% {
        transform: translateY(-20px) rotate(3deg);
        opacity: 0.18;
    }
}

@keyframes floatSide {
    0%, 100% {
        transform: translateY(-50%) translateX(0px) rotate(0deg);
        opacity: 0.10;
    }
    33% {
        transform: translateY(-55%) translateX(15px) rotate(2deg);
        opacity: 0.16;
    }
    66% {
        transform: translateY(-45%) translateX(-10px) rotate(-2deg);
        opacity: 0.14;
    }
}

/* ========================================
   SELECTOR DE IDIOMA
   ======================================== */
.language-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 9999;
    animation: fadeIn 0.8s ease-out;
    pointer-events: all;
}

.lang-toggle {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.lang-toggle:hover {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.active-flag {
    width: 20px;
    height: auto;
    display: block;
    border-radius: 2px;
    opacity: 0.85;
}

.lang-arrow {
    font-size: 8px;
    color: rgba(226, 232, 240, 0.6);
    transition: transform 0.3s ease;
}

.language-selector.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 6px;
    min-width: 90px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 10000;
}

.language-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    width: 100%;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    color: rgba(226, 232, 240, 0.8);
    font-size: 12px;
    font-weight: 500;
}

.lang-option:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: #e2e8f0;
}

.lang-option.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
    color: #f8fafc;
}

.flag-icon-small {
    width: 18px;
    height: auto;
    display: block;
    border-radius: 2px;
    opacity: 0.8;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .language-selector {
        top: 15px;
        right: 15px;
    }
    
    .lang-toggle {
        padding: 5px 8px;
    }
    
    .active-flag {
        width: 18px;
    }
    
    .lang-dropdown {
        min-width: 80px;
    }
    
    .flag-icon-small {
        width: 16px;
    }
}

.container {
    position: relative;
    z-index: 1;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    box-shadow: var(--shadow-lg), var(--shadow-accent);
    max-width: 700px;
    width: 100%;
    padding: 60px 50px;
    animation: fadeIn 0.8s ease-out;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), var(--secondary-color), transparent);
    border-radius: 24px 24px 0 0;
    opacity: 0.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.icon-wrapper {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.header-icon {
    width: 90px;
    height: 90px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: var(--shadow-accent);
    border: 2px solid var(--border-accent);
    animation: fadeIn 0.8s ease-out;
    transition: all 0.3s ease;
}

.header-icon:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-accent-strong);
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #f8fafc;
    margin-bottom: 12px;
    letter-spacing: -1px;
    line-height: 1.2;
}

.subtitle {
    font-size: 1rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.tagline {
    font-size: 1.15rem;
    color: #94a3b8;
    font-weight: 400;
    line-height: 1.6;
}

/* Main Content */
.intro {
    text-align: center;
    margin-bottom: 40px;
}

.tech-features {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 35px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover {
    background: rgba(59, 130, 246, 0.08);
    border-color: var(--border-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-accent);
}

.feature-icon {
    font-size: 1.8rem;
}

.feature-text {
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.intro-text {
    font-size: 1.1rem;
    color: #cbd5e1;
    line-height: 1.7;
}

/* Formulario */
.form-section {
    margin-bottom: 30px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Campo honeypot oculto para anti-spam */
.hidden {
    display: none;
}

/* Labels del formulario */
.form-label {
    display: block;
    margin-bottom: 10px;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Filas del formulario para layout en dos columnas */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px 18px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: rgba(15, 23, 42, 0.5);
    color: #e2e8f0;
    backdrop-filter: blur(5px);
}

/* Mantener estilos originales en autocomplete */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus,
.form-group select:-webkit-autofill,
.form-group select:-webkit-autofill:hover,
.form-group select:-webkit-autofill:focus {
    -webkit-text-fill-color: #e2e8f0;
    -webkit-box-shadow: 0 0 0px 1000px rgba(15, 23, 42, 0.5) inset;
    box-shadow: 0 0 0px 1000px rgba(15, 23, 42, 0.5) inset;
    transition: background-color 5000s ease-in-out 0s;
    border: 2px solid var(--border-color);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: rgba(15, 23, 42, 0.7);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #64748b;
}

.form-group select {
    cursor: pointer;
    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='%233b82f6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.form-group select option {
    background: var(--bg-dark);
    color: #e2e8f0;
}

/* Botón de envío */
.submit-btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    padding: 18px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-accent);
    margin-top: 10px;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent-strong);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--secondary-color) 100%);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.6;
}

.btn-text {
    position: relative;
    z-index: 1;
}

/* Mensaje del formulario */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    text-align: center;
    display: none;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.show {
    display: block;
}

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
    border: 1px solid var(--success-color);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.15);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    border: 1px solid var(--error-color);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15);
}

/* CTA de calendario */
.calendar-cta {
    text-align: center;
    margin-top: 35px;
    padding-top: 35px;
    border-top: 1px solid var(--border-color);
}

.cta-text {
    font-size: 1rem;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.calendar-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 16px 35px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-accent);
    text-decoration: none;
}

.calendar-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.calendar-btn:hover::before {
    left: 100%;
}

.calendar-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent-strong);
}

.calendar-btn:active {
    transform: translateY(0);
}

/* Sección de clientes */
.clients-section {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid var(--border-color);
    overflow: hidden;
}

.clients-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #e2e8f0;
    margin-bottom: 40px;
    letter-spacing: -0.5px;
}

/* Contenedor del carrusel */
.carousel-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 20px 0;
}

.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-card) 0%, transparent 100%);
}

.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-card) 0%, transparent 100%);
}

/* Track del carrusel */
.carousel-track {
    display: flex;
    gap: 30px;
    animation: scroll 30s linear infinite;
    width: fit-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Logos cuadrados más grandes */
.client-logo {
    width: 160px;
    height: 160px;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
    position: relative;
}

.client-logo:hover {
    border-color: var(--border-accent);
    background: rgba(59, 130, 246, 0.08);
    transform: scale(1.05) translateY(-5px);
    box-shadow: var(--shadow-accent);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0%) brightness(1.1) opacity(0.6);
    transition: all 0.4s ease;
    border-radius: 8px;
}

.client-logo:hover img {
    filter: grayscale(0%) brightness(1) opacity(1);
}

/* Badge de símbolo para contractor */
.contractor-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    z-index: 1;
    line-height: 1;
}

/* Texto disclaimer debajo del carrusel */
.contractor-disclaimer {
    text-align: center;
    margin-top: 30px;
    font-size: 0.9rem;
    color: #94a3b8;
    font-style: italic;
    letter-spacing: 0.2px;
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.footer-text {
    color: #64748b;
    font-size: 0.9rem;
}

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.social-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(148, 163, 184, 0.05);
    border: 1px solid rgba(148, 163, 184, 0.1);
}

.social-links a:hover {
    color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.social-links a svg {
    width: 20px;
    height: 20px;
}

.social-links a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

/* Responsive */
/* Estilos para la página de Calendly */
.calendly-container {
    max-width: 900px;
}

.calendly-section {
    position: relative;
}

.calendly-inline-widget {
    border-radius: 12px;
    overflow: hidden;
}

.calendly-placeholder {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 50px 40px;
    text-align: center;
}

.placeholder-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.calendly-placeholder h2 {
    color: #e2e8f0;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.calendly-placeholder p {
    color: #cbd5e1;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.setup-steps {
    text-align: left;
    max-width: 600px;
    margin: 30px auto;
    color: #94a3b8;
    line-height: 1.8;
}

.setup-steps li {
    margin-bottom: 15px;
}

.setup-steps a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.setup-steps a:hover {
    color: var(--primary-hover);
}

.setup-steps code {
    background: rgba(59, 130, 246, 0.1);
    padding: 3px 8px;
    border-radius: 4px;
    color: var(--primary-color);
    font-size: 0.9em;
}

.temp-contact {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
    font-size: 1.1rem;
}

.temp-contact strong {
    color: var(--primary-color);
}

.back-link-container {
    text-align: center;
    margin-top: 40px;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-link:hover {
    color: var(--primary-hover);
    transform: translateX(-5px);
}

@media (max-width: 768px) {
    .container {
        padding: 50px 35px;
        max-width: 100%;
    }

    .title {
        font-size: 2rem;
    }

    .calendly-inline-widget {
        height: 600px !important;
    }

    .calendly-placeholder {
        padding: 40px 25px;
    }

    .placeholder-icon {
        font-size: 3rem;
    }
}

@media (max-width: 640px) {
    body {
        padding: 20px;
    }

    .container {
        padding: 40px 25px;
    }

    .calendar-btn {
        padding: 14px 28px;
        font-size: 1rem;
    }

    .cta-text {
        font-size: 0.95rem;
    }

    .header-icon {
        width: 75px;
        height: 75px;
    }

    .title {
        font-size: 1.85rem;
    }

    .subtitle {
        font-size: 0.85rem;
        letter-spacing: 1.5px;
    }

    .tagline {
        font-size: 1rem;
    }
    
    .bg-img-1, .bg-img-2, .bg-img-3, .bg-img-4 {
        width: 280px;
        height: 280px;
        opacity: 0.08;
    }

    .clients-section {
        margin-top: 50px;
        padding-top: 40px;
    }

    .clients-title {
        font-size: 1.3rem;
        margin-bottom: 30px;
    }

    .carousel-container::before,
    .carousel-container::after {
        width: 40px;
    }

    .carousel-track {
        gap: 20px;
        animation: scroll 25s linear infinite;
    }

    .client-logo {
        width: 120px;
        height: 120px;
        min-width: 120px;
        padding: 18px;
    }

    .tech-features {
        gap: 12px;
    }

    .feature-item {
        padding: 14px 18px;
    }

    .feature-icon {
        font-size: 1.5rem;
    }

    .feature-text {
        font-size: 0.8rem;
    }

    .intro-text {
        font-size: 1rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 14px 16px;
        font-size: 0.95rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .submit-btn {
        padding: 16px 32px;
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 30px 20px;
    }

    .title {
        font-size: 1.65rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .feature-item {
        padding: 12px 16px;
    }

    .carousel-track {
        gap: 15px;
        animation: scroll 20s linear infinite;
    }

    .client-logo {
        width: 100px;
        height: 100px;
        min-width: 100px;
        padding: 15px;
    }

    .contractor-badge {
        font-size: 1rem;
        top: 6px;
        right: 6px;
    }

    .contractor-disclaimer {
        font-size: 0.8rem;
        margin-top: 25px;
    }
}
