/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    /* Paleta Deep Space / AI Tech */
    --clr-bg-main: #060B19;
    --clr-bg-alt: #0B132B;
    --clr-primary: #FCA13C;
    /* Cyan brillante tecnológico */
    --clr-primary-glow: rgba(0, 229, 255, 0.4);
    --clr-secondary: #8E2DE2;
    /* Púrpura IA */
    --clr-secondary-glow: rgba(142, 45, 226, 0.4);

    --clr-text-main: #FFFFFF;
    --clr-text-muted: #A0ABC0;

    --font-main: 'Inter', sans-serif;

    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--clr-bg-main);
    color: var(--clr-text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   UTILIDADES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* BOTONES */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 1rem;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary), #00B8D4);
    color: #000;
    box-shadow: 0 4px 15px var(--clr-primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--clr-text-main);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.mt-4 {
    margin-top: 2rem;
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 0;
    z-index: 1000;
    transition: var(--transition-smooth);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(6, 11, 25, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 0;
}

.nav-container {
    max-width: 1000px;
    height: 80px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 130px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 5rem;
}

.nav-link {
    color: var(--clr-text-main);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: var(--transition-smooth);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--clr-primary);
    transition: var(--transition-smooth);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--clr-primary);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--clr-text-main);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    overflow: hidden;
}

.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.blob {
    position: absolute;
    filter: blur(80px);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    top: 20%;
    left: 10%;
    width: 300px;
    height: 300px;
    background: var(--clr-primary-glow);
}

.blob-2 {
    bottom: 10%;
    right: 10%;
    width: 400px;
    height: 400px;
    background: var(--clr-secondary-glow);
    animation-delay: -5s;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-50px) scale(1.1);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}



.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--clr-text-muted);
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* =========================================
   SERVICIOS
   ========================================= */
.services {
    background-color: var(--clr-bg-alt);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--clr-primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
}

.card-preview {
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.learn-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--clr-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 1rem;
    transition: var(--transition-smooth);
}

.learn-more i {
    transition: transform 0.3s ease;
}

.service-card:hover .learn-more i {
    transform: translateX(5px);
}

.card-details {
    display: none;
    opacity: 0;
}

/* Expanded State for Service Card */
.service-card.expanded {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) !important;
    width: 90%;
    max-width: 600px;
    height: auto;
    max-height: 90vh;
    z-index: 1000;
    cursor: default;
    background: rgba(11, 19, 43, 0.85);
    /* rgba value of --clr-bg-alt */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    padding: 3rem 2.5rem;
    overflow-y: auto;
    /* Remover hover effects when expanded */
}

.service-card.expanded:hover {
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    border-color: rgba(255, 255, 255, 0.2);
}

.service-card.expanded::before {
    display: none;
}

.service-card.expanded .card-preview {
    display: none;
}

.service-card.expanded .card-details {
    display: block;
    animation: fadeIn 0.4s forwards 0.1s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.close-card-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--clr-text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.close-card-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: rotate(90deg);
}

.details-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-right: 2rem;
    /* space for close button */
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-details .features-list li {
    background: rgba(255, 255, 255, 0.03);
    padding: 1.2rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 0.8rem;
    align-items: flex-start;
    /* For multi-line text */
}

.card-details .features-list .custom-check-icon {
    margin-top: 0;
}

/* Background overlay when a card is expanded */
.services-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s ease;
}

.services-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   DIRIGIDO A SECTION (Público Objetivo)
   ========================================= */
.target-audience {
    background-color: var(--clr-bg-main);
    position: relative;
    overflow: hidden;
}

.target-container {
    display: grid;
    grid-template-columns: 60% 35%;
    /* 60/40 roughly, with gap */
    gap: 5%;
    align-items: center;
}

.section-header-left {
    margin-bottom: 3rem;
}

.target-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.target-subtitle {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
}

.font-bold {
    font-weight: 800;
}

.audience-cards {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.audience-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: 15px;
    transition: var(--transition-smooth);
}

.audience-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(10px);
    border-color: rgba(0, 229, 255, 0.3);
}

.audience-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 229, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--clr-primary);
    flex-shrink: 0;
    border: 1px solid rgba(0, 229, 255, 0.2);
}

.audience-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--clr-text-main);
}

.audience-text p {
    color: var(--clr-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Video Wrapper Animado */
.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 20px;
    padding: 3px;
    /* Espacio para el borde gradiente */
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Borde gradiente que gira (Ilusión futurista) */
.video-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent 70%, var(--clr-primary) 80%, #00e5ff 100%);
    animation: rotateGradient 4s linear infinite;
    z-index: -1;
}

@keyframes rotateGradient {
    100% {
        transform: rotate(360deg);
    }
}

.futuristic-video {
    position: relative;
    width: 100%;
    border-radius: 17px;
    /* Un poco menos que el contenedor para encajar */
    display: block;
    z-index: 2;
    background-color: transparent !important;
    opacity: 1 !important;
    filter: brightness(1) contrast(1) grayscale(0) !important;
    mix-blend-mode: normal !important;
    object-fit: cover !important;
}

/* Custom minimal controls styling: Quitando el fondo oscuro que causaba la "capa gris" en Webkit */
video::-webkit-media-controls-enclosure {
    border-radius: 0 0 17px 17px;
    background: transparent !important;
}

/* Media Queries for new section */
@media (max-width: 968px) {
    .target-container {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .section-header-left {
        text-align: center;
        margin-bottom: 2rem;
    }

    .target-subtitle {
        margin: 0 auto;
    }
}

/* =========================================
   POR QUÉ NOSOTROS (Sobre la empresa)
   ========================================= */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--clr-text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.features-list {
    list-style: none;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: var(--clr-text-main);
}

.custom-check-icon {
    width: 22px;
    height: 22px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
    display: inline-block;
    flex-shrink: 0;
    margin-top: 2px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
}

/* Mockup CSS */
.dashboard-mockup {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.mockup-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 0.8rem 1rem;
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #FF5F56;
}

.dot.yellow {
    background: #FFBD2E;
}

.dot.green {
    background: #27C93F;
}

.mockup-body {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    min-height: 250px;
}

.mockup-metrics {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    width: 100%;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.85rem;
    color: var(--clr-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--clr-text-main);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.6rem;
    height: 120px;
    width: 100%;
    margin-top: auto;
}

.bar-wrapper {
    flex: 1;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px 4px 0 0;
    display: flex;
    align-items: flex-end;
}

.bar-chart .bar-wrapper div {
    width: 100%;
    background: linear-gradient(180deg, var(--clr-primary), var(--clr-secondary));
    border-radius: 4px 4px 0 0;
    height: 0;
    /* Inicio en 0 para la animación CSS */
    opacity: 0.9;
    transition: height 1.5s cubic-bezier(0.1, 0.5, 0.1, 1);
}

/* Animaciones activadas cuando el contenedor .hidden-right recibe la clase .show */
.show .bar-1 {
    height: 35% !important;
    transition-delay: 0.1s;
}

.show .bar-2 {
    height: 50% !important;
    transition-delay: 0.2s;
}

.show .bar-3 {
    height: 40% !important;
    transition-delay: 0.3s;
}

.show .bar-4 {
    height: 70% !important;
    transition-delay: 0.4s;
}

.show .bar-5 {
    height: 55% !important;
    transition-delay: 0.5s;
}

.show .bar-6 {
    height: 85% !important;
    transition-delay: 0.6s;
}

.show .bar-7 {
    height: 100% !important;
    transition-delay: 0.7s;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: #02050A;
    padding: 4rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: var(--clr-text-muted);
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--clr-text-main);
    text-decoration: none;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    background: var(--clr-primary);
    color: #000;
    transform: translateY(-3px);
}

.footer-contact h4 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-contact p {
    color: var(--clr-text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--clr-primary);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--clr-text-muted);
    font-size: 0.9rem;
}

/* =========================================
   ANIMACIONES DE APARICIÓN (Añadidas vía JS)
   ========================================= */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.hidden-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.show {
    opacity: 1;
    transform: translateY(0);
    transform: translateX(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* =========================================
   MEDIA QUERIES (Responsive)
   ========================================= */
@media (max-width: 968px) {
    .about-container {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        background-color: var(--clr-bg-alt);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.5);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1.5rem 0;
    }

    .nav-link {
        font-size: 1.2rem;
        display: block;
        padding: 1rem;
    }

    .btn-nav {
        margin-top: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}