/* Variables Globales */
:root {
    --primary-color: #140082;
    --secondary-color: #048200;
    --accent-color: #FAE320;
    --dark-color: #0a0a2f;
    --light-color: #f5f7ff;
}

/* Base */
body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
    overflow-x: hidden;
}

/* Header Section */
.headerx {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.custom_e1 {
    position: absolute;
    right: -100px;
    top: -100px;
    opacity: 0.05;
}

.custom_e1 img {
    width: 300px;
    height: auto;
}

/* Animaciones para cifras */
.cifrash, .cifrash2, .desh, .desh2 {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.cifrash2, .desh2 {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Sección Expertos */
.expertos .carousel-item {
    transition: transform 0.6s ease-in-out;
}

.expertos i {
    transition: all 0.3s ease;
}

.expertos i:hover {
    transform: scale(1.1);
}

/* Sección Clientes */
.grayscale-hover {
    filter: grayscale(100%);
    transition: filter 0.3s ease;
    max-height: 80px;
    width: auto;
    margin: 0 auto;
}

.grayscale-hover:hover {
    filter: grayscale(0%);
}

.clientes .carousel-control-prev-icon,
.clientes .carousel-control-next-icon {
    background-size: 50%;
    background-color: var(--primary-color);
    border-radius: 50%;
    padding: 20px;
}

/* Tech Icons */
.tech-icon {
    max-height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.tech-icon:hover {
    transform: translateY(-5px);
}

/* Sección Productos */
.productos .row {
    transition: all 0.3s ease;
}

.productos .row:hover {
    transform: translateY(-5px);
}

/* Sección Equipo */
.equipo img.rounded-circle {
    border: 4px solid var(--primary-color);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #1e293b 100%);
}

/* Responsive */
@media (max-width: 768px) {
    .headerx {
        min-height: auto;
        padding: 80px 0;
    }
    
    .display-1 {
        font-size: 3rem;
    }
    
    .cifrash, .cifrash2 {
        margin-bottom: 20px;
    }
    
    .tech-icon {
        max-height: 40px;
    }
}

/* Botones personalizados */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.3);
}

/* Card de contacto */
.card {
    border: none;
    border-radius: 20px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(20, 0, 130, 0.25);
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1045;
}

.scroll-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transition: width 0.2s ease;
}

.hero-section {
    background: linear-gradient(135deg, #140082 0%, rgba(20, 0, 130, 0.95) 55%, rgba(4, 130, 0, 0.9) 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding-top: 90px;
}

.hero-nav {
    background: rgba(8, 0, 42, 0.80);
    backdrop-filter: blur(12px);
}

.hero-nav .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.04em;
}

.hero-nav .nav-item.dropdown {
    position: static;
}

.hero-nav .dropdown-menu-rubros {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    margin: 0;
    border-radius: 0;
    border-top: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(8, 10, 42, 0.96);
    backdrop-filter: blur(18px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    padding: 1.5rem 2rem;
}

.hero-nav .dropdown-menu-rubros .dropdown-header {
    color: var(--accent-color);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.hero-nav .dropdown-menu-rubros .dropdown-item {
    color: #f8fafc;
    padding-left: 0;
    padding-right: 0;
    margin-bottom: 0.35rem;
    border-radius: 0.5rem;
}

.hero-nav .dropdown-menu-rubros .dropdown-item:hover,
.hero-nav .dropdown-menu-rubros .dropdown-item:focus {
    background: rgba(255, 255, 255, 0.08);
}

.hero-nav .dropdown-menu-rubros .row {
    gap: 1rem;
}

@media (max-width: 992px) {
    .hero-nav .dropdown-menu-rubros {
        min-width: auto;
        width: 100%;
        padding: 1rem;

        /* NUEVO */
        max-height: 75vh;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

.hero-section .eyebrow {
    color: var(--accent-color);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.82rem;
}

.hero-visual {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2rem;
    padding: 2rem;
}

.hero-visual-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-visual-header span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    background: rgba(255, 255, 255, 0.7);
}

.hero-visual-body {
    min-height: 420px;
    display: grid;
    gap: 1rem;
}

.hero-visual-body .card {
    border-radius: 1.5rem;
    border: none;
    background: rgba(255, 255, 255, 0.1);
}

.hero-visual-body .hero-panel {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    min-height: 180px;
}

.hero-visual-body .hero-panel h5,
.hero-visual-body .hero-panel p {
    color: rgba(255, 255, 255, 0.88);
}

.hero-visual-body .hero-panel .badge {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.feature-card,
.segment-card,
.use-case-card,
.testimonial-card,
.pricing-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(20, 0, 130, 0.14);
    background: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.feature-card:hover,
.segment-card:hover,
.use-case-card:hover,
.testimonial-card:hover,
.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(20, 0, 130, 0.08);
}

.segment-card {
    min-height: 260px;
    padding: 2rem;
}

.use-case-card {
    padding: 2rem;
}

.demo-card {
    background: linear-gradient(180deg, rgba(20, 0, 130, 0.98), rgba(4, 130, 0, 0.92));
    border-radius: 2rem;
    color: #fff;
    padding: 2rem;
    overflow: hidden;
}

.demo-card .demo-preview {
    border-radius: 1.8rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.demo-card .demo-preview::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.8rem;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08);
}

.demo-card .demo-preview i {
    font-size: 3rem;
    color: rgba(250, 227, 32, 0.98);
}

.demo-card .demo-preview p {
    position: relative;
    z-index: 1;
    margin-top: 1rem;
    font-size: 1.05rem;
    text-align: center;
}

.pricing-card {
    padding: 2rem;
}

.pricing-card.best {
    border-color: rgba(4, 130, 0, 0.3);
    background: linear-gradient(180deg, rgba(4, 130, 0, 0.08), #fff);
}

.pricing-card .price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
}

.pricing-card .price small {
    font-size: 1rem;
    color: #6c757d;
}

.client-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    align-items: center;
}

.client-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80px;
    background: #f8f9ff;
    border-radius: 1rem;
    color: #334155;
    font-weight: 600;
    font-size: 0.95rem;
}

.badge-tech {
    background: rgba(255,255,255,0.14);
    color: #ffffff;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.whatsapp-float {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 1050;
}

.whatsapp-float a {
    display: inline-flex;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 15px 35px rgba(37, 211, 102, 0.25);
}

.back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 80px;
    z-index: 1050;
    display: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 25px rgba(20, 0, 130, 0.2);
}

.back-to-top i {
    font-size: 1rem;
}

.footer {
    background: linear-gradient(135deg, #05041a 0%, #140082 100%);
    color: #dfe3ff;
}

.footer a {
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.footer a:hover {
    opacity: 0.8;
}

.contact-footer-item h5 {
    color: var(--accent-color);
    font-size: 1rem;
}

.contact-footer-item a {
    font-weight: 600;
    display: inline-block;
}

.contact-footer-item p {
    color: #dfe3ff;
}

.text-white-50 {
    color: rgba(255, 255, 255, 0.5);
}

.border-white-50 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}


@media (max-width: 992px) {
    .hero-section {
        padding-top: 110px;
    }

    .hero-visual-body {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: 100px;
    }

    .hero-visual {
        padding: 1.5rem;
    }

    .hero-visual-body .hero-panel {
        min-height: auto;
    }

    .segment-card,
    .use-case-card,
    .pricing-card,
    .testimonial-card {
        min-height: auto;
    }
}

.rubro-hero {
    background: linear-gradient(135deg, #140082 0%, rgba(4, 130, 0, 0.95) 100%);
    color: #ffffff;
    padding: 6rem 0 1px;
}

.rubro-hero h1,
.rubro-hero h2,
.rubro-hero h3 {
    color: #ffffff;
}

.rubro-hero p {
    color: rgba(255, 255, 255, 0.9);
}

.rubro-section {
    padding: 4rem 0;
}

.rubro-card {
    border-radius: 1.5rem;
    border: 1px solid rgba(20, 0, 130, 0.12);
    box-shadow: 0 20px 50px rgba(20, 0, 130, 0.05);
    background: #ffffff;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.rubro-card h3 {
    color: var(--primary-color);
}

.rubro-card ul {
    list-style: none;
    padding-left: 0;
}

.rubro-card ul li::before {
    content: "\f00c";
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

.rubro-summary {
    background: linear-gradient(180deg, rgba(20, 0, 130, 0.05), #ffffff);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(20, 0, 130, 0.12);
}

.rubro-summary h5 {
    color: var(--primary-color);
}

.rubro-summary p,
.rubro-summary li {
    color: #4b5563;
}

.rubro-links .list-group-item {
    border-radius: 0.9rem;
    border: 1px solid rgba(20, 0, 130, 0.08);
    transition: all 0.25s ease;
}

.rubro-links .list-group-item:hover {
    background: rgba(20, 0, 130, 0.05);
    transform: translateX(4px);
}

@media (max-width: 992px) {
    .rubro-hero {
        padding-top: 4rem;
        padding-bottom: 1px;
    }
}

/* Formulario de Contacto */
.hero-section-contact {
    background: linear-gradient(135deg, #140082 0%, rgba(20, 0, 130, 0.95) 55%, rgba(4, 130, 0, 0.9) 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
    padding-top: 90px;
}

.contact-form-card {
    background: #ffffff;
    border: 1px solid rgba(20, 0, 130, 0.08);
}

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

.form-label {
    color: var(--dark-color);
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

.form-control,
.form-select {
    border: 2px solid rgba(20, 0, 130, 0.12);
    border-radius: 0.8rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: #fff;
}

.form-control::placeholder {
    color: #999;
    font-style: italic;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 0.3rem rgba(20, 0, 130, 0.1);
}

.form-control:invalid:not(:placeholder-shown),
.form-select:invalid {
    border-color: #dc3545;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
}

.form-text {
    font-size: 0.85rem;
    line-height: 1.4;
}

.form-text.text-danger {
    color: #dc3545 !important;
}

.alert-messages {
    animation: slideIn 0.3s ease-out;
}

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

.alert {
    border-radius: 1rem;
    border: none;
    animation: slideIn 0.3s ease-out;
}

.alert-success {
    background-color: rgba(40, 167, 69, 0.1);
    color: #155724;
}

.alert-error,
.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
}

.alert-info {
    background-color: rgba(17, 103, 177, 0.1);
    color: #004085;
}

.btn-primary[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: #ffffff;
    font-size: 1rem;
    padding: 0.8rem 2rem;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
}

.btn-primary[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(20, 0, 130, 0.2);
    background: linear-gradient(135deg, #0d0052, #035a00);
}

.btn-primary[type="submit"]:active {
    transform: translateY(0);
}

.btn-close {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.btn-close:hover {
    opacity: 1;
}

.contact-info-card {
    background: #f8f9ff;
    border: 1px solid rgba(20, 0, 130, 0.08);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(20, 0, 130, 0.08);
}

.contact-info-card h5 {
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.contact-info-card p {
    color: #555;
    margin-top: 0.5rem;
}

.contact-info-card a {
    color: var(--primary-color);
    font-weight: 600;
}

.contact-info-card a:hover {
    color: var(--secondary-color);
}

.g-recaptcha {
    margin: 0;
}

/* Accesibilidad */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible para accesibilidad */
.form-control:focus-visible,
.form-select:focus-visible,
button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .hero-section-contact {
        padding-top: 100px;
    }

    .contact-form-card {
        padding: 2rem !important;
    }

    .btn-primary[type="submit"] {
        padding: 0.7rem 1.5rem;
        font-size: 0.95rem;
    }

    .contact-info-card {
        margin-top: 1rem;
    }

    .form-label {
        font-size: 0.9rem;
    }
}

.same-padding-as-h6 {
    padding: 0.5rem 1rem !important;
}