:root {
    --primary-red: #E50914;
    --primary-red-hover: #b20710;
    --dark-bg: #050505;
    --card-bg: #121212;
    --text-white: #ffffff;
    --text-gray: #b3b3b3;
    --gradient-red: linear-gradient(135deg, #E50914 0%, #800000 100%);
    --font-main: 'Outfit', sans-serif;
    --nav-height: 80px;
}

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

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    animation: fadeInPage 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInPage {
    0% {
        opacity: 0;
        transform: scale(1.02);
        filter: blur(8px);
    }

    100% {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* Base Reveal Animation */
@keyframes revealUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-text {
    opacity: 0;
    animation: revealUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

/* Typography & Utilities */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-red {
    color: var(--primary-red);
}

.text-gradient {
    background: var(--gradient-red);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.section-padding {
    padding: 80px 0;
    animation: revealUp 1.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Delay staggered for common elements */
.template-card,
.template-preview-card,
.category-header,
.feature-card {
    animation: revealUp 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.showcase-grid article:nth-child(1) {
    animation-delay: 0.2s;
}

.showcase-grid article:nth-child(2) {
    animation-delay: 0.4s;
}

.showcase-grid article:nth-child(3) {
    animation-delay: 0.6s;
}

.showcase-grid article:nth-child(4) {
    animation-delay: 0.8s;
}

.mt-4 {
    margin-top: 2rem;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-red);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: 2px solid var(--primary-red);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.3s;
    text-decoration: none;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: white;
    transition: 0.4s;
    z-index: -1;
}

.btn-primary:hover::after {
    width: 100%;
}

.btn-primary:hover {
    color: var(--primary-red);
    transform: translateY(-2px);
}

.btn-primary i {
    margin-left: 10px;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    border: 2px solid white;
    transition: 0.3s;
    text-decoration: none;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--dark-bg);
    transform: translateY(-2px);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: white;
    padding: 14px 34px;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid #f59e0b;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.btn-outline::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #f59e0b;
    transition: 0.4s;
    z-index: -1;
}

.btn-outline:hover::after {
    width: 100%;
}

.btn-outline:hover {
    color: white;
    transform: translateY(-2px);
}

.btn-outline.small {
    padding: 8px 20px;
    font-size: 0.85rem;
}

/* Navbar */
/* Navbar - FIXED POSITION FIX */
.navbar {
    height: var(--nav-height);
    display: flex;
    align-items: center;
    position: fixed;
    /* Force fixed to prevent disappearing on scroll */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 99999;
    /* Max z-index to stay above 3D/Video elements */
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.95);
    /* Consistent dark background */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.sticky {
    position: fixed;
    background: rgba(5, 5, 5, 0.95);
}

.navbar.hidden {
    transform: translateY(-100%);
}

/* Mini Menu Component */
.mini-menu {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    /* Start hidden above */
    background: rgba(18, 18, 18, 0.9);
    /* Darker card bg */
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 12px 30px;
    z-index: 20001;
    display: flex;
    gap: 25px;
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.mini-menu.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.mini-menu-link {
    color: var(--text-gray);
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 6px 12px;
    transition: color 0.3s;
}

.mini-menu-link:hover {
    color: white;
}

.mini-menu-link.active {
    color: white;
}

/* Subtle Active Ring Indicator */



.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 60px;
    align-items: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-gray);
}

.nav-links a:hover {
    color: white;
}

.nav-links .btn-primary.small,
.nav-cta {
    padding: 8px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-links .btn-primary:hover,
.nav-cta:hover {
    color: var(--primary-red);
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .nav-cta {
        display: none;
    }

    .mobile-only {
        display: block;
    }

}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mega Menu Styles (Squarespace Floating Card) */
.mega-menu {
    position: fixed;
    top: calc(var(--nav-height) + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 95%;
    max-width: 1100px;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 35px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    z-index: 20001;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* El "Piquito" (Triángulo indicador) */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: var(--arrow-left, 50%);
    transform: translateX(-50%);
    border-left: 12px solid transparent;
    border-right: 12px solid transparent;
    border-bottom: 12px solid #000000;
}

.mega-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Staggered items animation when menu is active */
.mega-menu.active .mega-item,
.mega-menu.active .mega-item-ia,
.mega-menu.active .mega-preview-container {
    animation: revealUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.mega-menu.active .mega-item:nth-child(1) {
    animation-delay: 0.1s;
}

.mega-menu.active .mega-item:nth-child(2) {
    animation-delay: 0.15s;
}

.mega-menu.active .mega-item:nth-child(3) {
    animation-delay: 0.2s;
}

.mega-menu.active .mega-item:nth-child(4) {
    animation-delay: 0.25s;
}

.mega-menu.active .mega-item:nth-child(5) {
    animation-delay: 0.3s;
}

.mega-menu.active .mega-item:nth-child(6) {
    animation-delay: 0.35s;
}

.mega-menu.active .mega-preview-container {
    animation-delay: 0.4s;
}

.mega-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.mega-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #444;
    letter-spacing: 2px;
    margin-bottom: 25px;
    text-transform: uppercase;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mega-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.mega-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mega-item {
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mega-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.mega-item h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
    transition: color 0.3s;
}

.mega-item:hover h4 {
    color: var(--primary-red);
}

.mega-item p {
    color: var(--text-gray);
    font-size: 0.85rem;
    margin: 0;
    line-height: 1.4;
}

/* Preview Section */
.mega-preview-container {
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

.menu-preview {
    height: 200px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #000;
    margin-bottom: 15px;
}

.menu-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.4s ease, transform 0.6s ease;
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 15px;
}

.preview-overlay span {
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.view-all-link {
    display: inline-block;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    margin-top: 15px;
    transition: color 0.3s ease;
}

.view-all-link i {
    font-size: 0.75rem;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.view-all-link:hover {
    color: var(--primary-red);
}

.view-all-link:hover i {
    transform: translateX(5px);
}

/* Nav Arrows */
.nav-links i {
    font-size: 0.7rem;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.has-mega:hover i {
    transform: rotate(180deg);
}

/* Video Player Mockup Styles (Producción IA) */
.video-player-mockup {
    position: relative;
    width: 100%;
    height: 220px;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 25px rgba(229, 9, 20, 0.15);
    /* Sutil brillo rojo */
    transition: box-shadow 0.4s ease;
}

.video-player-mockup:hover {
    box-shadow: 0 0 45px rgba(229, 9, 20, 0.3);
}

.video-player-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.play-icon-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55px;
    height: 55px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.4);
    pointer-events: none;
    z-index: 2;
}

.video-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 2;
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--primary-red);
    box-shadow: 0 0 10px var(--primary-red);
    animation: progress-loop 4s linear infinite;
}

@keyframes progress-loop {
    0% {
        width: 0;
        opacity: 1;
    }

    85% {
        width: 100%;
        opacity: 1;
    }

    100% {
        width: 100%;
        opacity: 0;
    }
}

.mega-item-ia {
    padding: 15px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mega-item-ia:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.mega-item-ia h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.mega-item-ia:hover h4 {
    color: var(--primary-red);
}

.mega-item-ia p {
    color: var(--text-gray);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* Mobile Hidden */
@media (max-width: 768px) {
    .mega-menu {
        display: none !important;
    }
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    overflow: hidden;
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(229, 9, 20, 0.15) 0%, rgba(5, 5, 5, 0) 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Para asegurar responsividad */
}


/* Floating Shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    opacity: 0.6;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--primary-red);
    top: 10%;
    right: -5%;
    animation: float 10s infinite alternate;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: #800000;
    bottom: 10%;
    left: -5%;
    animation: float 15s infinite alternate-reverse;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }

    100% {
        transform: translateY(50px) rotate(20deg);
    }
}

/* Stats Section */
.stats {
    background-color: #0f0f0f;
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
    gap: 20px;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 5px;
}

.stat-item p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

/* Solutions Section */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.title-line {
    width: 60px;
    height: 4px;
    background-color: var(--primary-red);
    margin: 0 auto 20px;
}

.section-subtitle {
    color: var(--text-gray);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.solution-card {
    background: transparent;
    perspective: 1000px;
    /* 3D context */
    padding: 0;
    border: none;
    border-radius: 12px;
    /* For layout consistency */
    position: relative;
    /* Remove overflow:hidden to allow 3D elements to move if needed, though they are contained */
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    display: grid;
    /* Allows faces to stack and size container */
}

.card-front,
.card-back {
    grid-area: 1 / 1;
    /* Stack faces */
    backface-visibility: hidden;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Maintain original layout */
    position: relative;
    overflow: hidden;
    /* Keep the red line contained */
}

.card-back {
    transform: rotateY(180deg);
    justify-content: center;
    /* Center content on back for better look */
    text-align: center;
    /* Align text on back */
}

.solution-card:hover .card-inner {
    transform: rotateY(180deg);
}

/* Restore the hover lift on the container */
.solution-card:hover {
    transform: translateY(-5px);
}

/* Red line effect re-applied to faces */
.card-front::before,
.card-back::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.solution-card:hover .card-front::before,
.solution-card:hover .card-back::before {
    transform: scaleX(1);
}

.flip-indicator {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: var(--primary-red);
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

.card-icon {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 25px;
}

.solution-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.solution-card p {
    color: var(--text-gray);
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.card-link {
    color: var(--primary-red);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-link:hover {
    gap: 12px;
}

/* Feature Section */
.feature-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.feature-text h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-list {
    margin-top: 30px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Tech Visual - Abstract CSS Art */
/* 3D Dashboard Interaction */
.interactive-container {
    perspective: 1000px;
    /* Enable 3D space */
    background: transparent !important;
    /* Override tech-visual bg */
    border: none !important;
    overflow: visible !important;
    height: 440px;
    /* Adjusted height: middle ground */
}

.dashboard-3d {
    width: 90%;
    height: 90%;
    background: linear-gradient(135deg, #1a1a1a 0%, #050505 100%);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 30px rgba(229, 9, 20, 0.1);
    display: flex;
    flex-direction: column;
    padding: 15px;
    position: relative;
    transition: transform 0.1s ease-out;
    /* Smooth tilting */
    transform-style: preserve-3d;
}

.dashboard-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-header .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #333;
}

.dashboard-header .dot:nth-child(1) {
    background: #ff5f56;
}

.dashboard-header .dot:nth-child(2) {
    background: #ffbd2e;
}

.dashboard-header .dot:nth-child(3) {
    background: #27c93f;
}

.dashboard-body {
    display: flex;
    gap: 15px;
    flex: 1;
}

.panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    transition: background 0.3s;
}

.panel:hover {
    background: rgba(229, 9, 20, 0.05);
    /* Red tint on hover */
}

.panel h4 {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Web Panel styles */
/* Web Panel styles */
.code-simulation {
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 0.75rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.code-row {
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    width: fit-content;
}

/* 1. Initialize: Slide & border indicator */
.code-row:nth-child(1):hover {
    color: #ff7875;
    /* Lighter red */
    transform: translateX(10px);
}

.code-row:nth-child(1):hover::before {
    content: '>';
    position: absolute;
    left: -12px;
    color: var(--primary-red);
    animation: blink 1s infinite;
}

/* 2. Optimize: Expansion */
.code-row:nth-child(2):hover {
    color: var(--primary-red);
    letter-spacing: 1px;
    font-weight: 700;
}

/* 3. Deploy: Glow/Success */
.code-row:nth-child(3):hover {
    color: #fff;
    text-shadow: 0 0 10px var(--primary-red), 0 0 20px var(--primary-red);
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* 4. Scale: Skew/Speed effect */
.code-row:nth-child(4):hover {
    color: var(--primary-red);
    /* Consistent red */
    transform: skewX(-10deg) translateX(5px);
}

/* 5. Security: Wavy scan effect */
.code-row:nth-child(5):hover {
    color: var(--primary-red);
    /* Consistent red */
    text-decoration: underline wavy rgba(229, 9, 20, 0.5);
    text-underline-offset: 4px;
}

.mini-browser {
    margin-top: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 5px;
    background: #000;
}

.mini-hero {
    height: 30px;
    background: #333;
    margin-bottom: 5px;
    border-radius: 2px;
    transition: background 0.3s;
}

.mini-hero:hover {
    background: var(--primary-red);
    cursor: pointer;
}

.mini-grid {
    display: flex;
    gap: 5px;
}

.mini-box {
    flex: 1;
    height: 20px;
    border-radius: 2px;
    background: #333;
    transition: background 0.3s;
}

.mini-box:hover {
    background: var(--primary-red);
    cursor: pointer;
}

/* Video Panel styles */
.video-preview {
    flex: 1;
    background: #000;
    border-radius: 6px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin-bottom: 10px;
}

.avatar-circle {
    font-size: 2.5rem;
    color: #333;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: white;
    box-shadow: 0 0 15px var(--primary-red);
    z-index: 10;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.play-overlay:hover {
    transform: translate(-50%, -50%) scale(1.3);
    box-shadow: 0 0 30px var(--primary-red);
    cursor: pointer;
}

/* ... existing styles ... */

@keyframes pulse-button {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 15px var(--primary-red);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.15);
        box-shadow: 0 0 25px var(--primary-red);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.2;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.audio-wave {
    display: flex;
    gap: 3px;
    height: 15px;
    align-items: flex-end;
    justify-content: center;
}

.audio-wave .bar {
    width: 3px;
    background: var(--primary-red);
    animation: wave 1s infinite ease-in-out;
}

.audio-wave .bar:nth-child(2) {
    animation-delay: 0.1s;
    height: 60%;
}

.audio-wave .bar:nth-child(3) {
    animation-delay: 0.2s;
    height: 100%;
}

.audio-wave .bar:nth-child(4) {
    animation-delay: 0.3s;
    height: 60%;
}

@keyframes wave {

    0%,
    100% {
        height: 30%;
    }

    50% {
        height: 100%;
    }
}

.floating-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: var(--primary-red);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    transform: translateZ(30px);
    /* 3D pop out */
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s;
}

.floating-badge:hover {
    transform: translateZ(40px) scale(1.1);
    background-color: #ff1f2c;
    /* Lighter red */
}



@keyframes scan {
    0% {
        top: -10%;
    }

    100% {
        top: 110%;
    }
}



/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('https://images.unsplash.com/photo-1550751827-4bd374c3f58b?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.cta-form {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.cta-form input {
    padding: 15px 25px;
    border-radius: 4px;
    border: none;
    width: 350px;
    font-family: inherit;
    outline: none;
}

/* Footer */
footer {
    padding: 80px 0 30px;
    background: #050505;
    border-top: 1px solid #1a1a1a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.footer-brand p {
    color: var(--text-gray);
    max-width: 300px;
}

.footer-links h4 {
    margin-bottom: 20px;
    color: white;
}

.footer-links a {
    display: block;
    color: var(--text-gray);
    margin-bottom: 10px;
}

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

.footer-social a {
    font-size: 1.5rem;
    color: white;
    margin-right: 20px;
}

.footer-social a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #1a1a1a;
    color: #555;
    font-size: 0.9rem;
}

/* Animations */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease;
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.fade-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
}

.visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

/* Gallery Page Styles */
.gallery-page {
    padding-top: var(--nav-height);
    background: #050505;
}

.gallery-hero {
    padding: 80px 0 40px;
    text-align: center;
}

.gallery-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
}

.gallery-hero p {
    color: var(--text-gray);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Filter Bar */
.filter-section {
    padding: 30px 0;
    background: #050505;
}

.filter-bar {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.filter-btn.active {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.1);
    box-shadow: 0 0 15px rgba(229, 9, 20, 0.2);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 0 100px;
}

.template-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    animation: cardAppear 0.5s ease backwards;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.template-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-image-wrap {
    height: 400px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.card-image-wrap img {
    width: 100%;
    min-height: 400px;
    object-fit: cover;
    object-position: top;
    transition: transform 6s linear;
    /* Control speed of long scroll */
    display: block;
}

.template-card:hover .card-image-wrap img {
    transform: translateY(calc(-100% + 400px));
}

.card-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card:hover .card-overlay {
    opacity: 1;
}

.btn-demo {
    padding: 12px 24px;
    background: var(--primary-red);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.template-card:hover .btn-demo {
    transform: translateY(0);
}

.ia-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary-red), #930612);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.3);
    z-index: 5;
}

.card-info {
    padding: 20px;
}

.card-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.card-info p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* Solutions Grid */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

/* Modal Styles */
.detail-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.detail-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #0a0a0a;
    width: 90%;
    max-width: 1000px;
    height: 80vh;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.detail-modal.active .modal-content {
    transform: scale(1);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
}

.modal-image {
    background: #000;
    overflow-y: auto;
}

.modal-image img {
    width: 100%;
    display: block;
}

.modal-text {
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-text h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.modal-text p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 30px;
}

.tools-used {
    margin-bottom: 40px;
}

.tools-used h4 {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #888;
}

.tools-used ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tools-used li {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Gallery */
@media (max-width: 992px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .template-grid {
        grid-template-columns: 1fr;
    }

    .gallery-hero h1 {
        font-size: 2.5rem;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 300px;
    }

    .modal-text {
        padding: 30px;
    }
}

/* Process Section */
.process-section {
    background: #080808;
    position: relative;
    overflow: hidden;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 60px;
}

.process-item {
    text-align: center;
    position: relative;
    padding: 20px;
    transition: transform 0.3s ease;
}

.process-item:hover {
    transform: translateY(-10px);
}

.process-icon {
    width: 80px;
    height: 80px;
    background: var(--card-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-red);
    margin: 0 auto 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.process-step {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 30px;
    height: 30px;
    background: var(--primary-red);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
    transition: 0.3s;
}

.process-item:hover .process-step {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(229, 9, 20, 0.8);
}

.process-item h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.process-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Categories Ecosystem Preview */
.categories-preview {
    background: #050505;
}

.categories-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.categories-display-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.category-mini-card {
    position: relative;
    height: 300px;
    border-radius: 24px;
    overflow: hidden;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.05);
    text-decoration: none;
    color: white;
    display: block;
}

.category-mini-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.category-mini-card:hover img {
    transform: scale(1.1);
}

.category-mini-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    transition: background 0.3s;
}

.category-mini-card:hover .category-mini-overlay {
    background: linear-gradient(to top, rgba(229, 9, 20, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.category-mini-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    transform: translateY(10px);
    transition: transform 0.4s;
    color: white;
}

.category-mini-overlay span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
    transform: translateY(10px);
    transition: transform 0.4s 0.1s;
    color: white;
}

.category-mini-card:hover .category-mini-overlay h3,
.category-mini-card:hover .category-mini-overlay span {
    transform: translateY(0);
}

@media (max-width: 992px) {
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-display-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .process-grid {
        grid-template-columns: 1fr;
    }

    .categories-display-grid {
        grid-template-columns: 1fr;
    }
}

/* Secondary Button (Outline Style y Ovalado) */
/* Secondary Button (Outline Style y Ovalado) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 35px;
    background: transparent;
    border: 2px solid white;
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: white;
    transition: 0.4s;
    z-index: -1;
}

.btn-secondary:hover::after {
    width: 100%;
}

.btn-secondary:hover {
    color: #000000;
    transform: translateY(-2px);
}

/* Hero Buttons Spacing */
.hero-buttons {
    display: flex;
    gap: 25px;
    /* Más separación */
    justify-content: flex-start;
    margin-top: 30px;
}

/* Logo Styles */
.logo-img {
    height: 2.2em;
    width: auto;
    vertical-align: middle;
    object-fit: contain;
    display: inline-block;
}

.navbar .logo a {
    display: flex;
    align-items: center;
}

.navbar .logo-img {
    height: 45px;
}

.footer-brand h3 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .logo-img {
    height: 55px;
}

/* =========================================
   RESPONSIVE DESIGN SYSTEM (Restored)
   ========================================= */

@media (max-width: 992px) {
    .container {
        padding: 0 30px;
    }

    .hero h1 {
        font-size: 3.5rem;
    }

    .feature-container {
        gap: 40px;
    }

    .stats-grid {
        gap: 15px;
    }

    .stat-item h3 {
        font-size: 2.5rem;
    }
}

/* Default: Hide mobile sub-menus (Desktop) */
.mobile-sub-nav {
    display: none;
}

@media (max-width: 768px) {

    /* Navbar Navigation */
    .menu-toggle {
        display: block;
        color: white;
        font-size: 1.8rem;
    }

    .nav-links {
        display: none;
    }

    /* Fixed Mobile Menu Styling */
    .nav-links[style*="display: flex"] {
        transform: none !important;
        left: 0 !important;
        background: rgba(5, 5, 5, 0.98) !important;
        backdrop-filter: blur(20px);
        z-index: 1000;
        gap: 0;
        /* Remove gap, handle padding in items */
        padding-top: 20px;
        width: 100%;
        text-align: center;
        /* Enable scrolling */
        overflow-y: auto;
        max-height: 80vh;
        padding-bottom: 30px;
    }

    .nav-links>li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a {
        font-size: 1.2rem;
        display: inline-block;
        padding: 5px;
    }

    /* Mobile Sub Menu Styling */
    .mobile-sub-nav {
        display: none;
        /* Hidden until toggled */
        background: rgba(255, 255, 255, 0.03);
        margin-top: 15px;
        padding: 10px 0;
        width: 100%;
    }

    .mobile-sub-nav.active {
        display: block;
        animation: fadeIn 0.3s ease;
    }

    .mobile-sub-nav li {
        border: none;
        padding: 8px 0;
    }

    .mobile-sub-nav a {
        font-size: 1rem;
        color: #aaa;
    }

    .mobile-sub-nav a:hover {
        color: white;
    }

    .fa-chevron-down {
        transition: transform 0.3s;
        font-size: 0.8em;
        margin-left: 5px;
    }

    .has-mega.active-mobile .fa-chevron-down {
        transform: rotate(180deg);
    }


    .nav-cta,
    .mini-menu {
        display: none !important;
    }

    /* Hero Section */
    .hero {
        padding-top: 100px;
        height: auto;
        min-height: 100vh;
        text-align: center;
        align-items: center;
    }

    .hero-content {
        margin: 0 auto;
        padding-bottom: 60px;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

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

    .hero-buttons {
        justify-content: center;
        gap: 15px;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    /* Solutions & Grids */
    .solutions-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .feature-container {
        grid-template-columns: 1fr;
    }

    .feature-text {
        order: 1;
        text-align: center;
    }

    .feature-image {
        order: 2;
        margin-top: 40px;
    }

    .feature-list li {
        justify-content: center;
    }

    /* Process Section */
    .process-grid {
        grid-template-columns: 1fr;
    }

    .process-item {
        margin-bottom: 30px;
    }

    /* Feature Highlight / Tilt Card */
    .interactive-container {
        height: 350px;
    }

    .dashboard-3d {
        width: 100%;
    }

    /* Ecosystem Preview */
    .categories-display-grid {
        grid-template-columns: 1fr;
    }

    .category-mini-card {
        height: 250px;
    }

    /* CTA Section */
    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-form {
        flex-direction: column;
        align-items: center;
    }


    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .footer-brand p {
        margin: 0 auto;
    }

    .footer-brand h3 {
        justify-content: center;
    }

    .footer-social {
        display: flex;
        justify-content: center;
        gap: 20px;
    }

    .footer-social a {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }
}