:root {
    --primary: #5046e5;
    --secondary: #00E1FF;
    --dark: #1e1e2c;
    --light: #ffffff;
    --accent: #ff3c78;
    --neon-shadow: 0 0 10px var(--secondary), 0 0 20px var(--secondary), 0 0 30px var(--secondary);
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(80, 70, 229, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(80, 70, 229, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(80, 70, 229, 0);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    background-color: var(--dark);
    color: var(--light);
}



/* Video que cubre exactamente el área amarilla */
.hero {
    position: relative;
    min-height: 80vh; /* Altura completa de pantalla */
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Importante: cubre toda el área */
    object-position: center; /* Centra el video */
}

/* Para asegurar que cubra desde el navbar hasta abajo */
@media (min-width: 768px) {
    .hero {
        height: 100vh; /* Altura completa menos navbar */
        padding-top: 80px; /* Altura del navbar */
    }
}




.navbar {
    background-color: rgba(30, 30, 44, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    z-index: 100;
}

.navbar-brand {
    font-weight: 700;
    font-size: 24px;
    color: var(--light);
}

.navbar-brand span {
    color: var(--secondary);
}

.nav-link {
    color: var(--light) !important;
    margin: 0 10px;
    position: relative;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.btn-contact {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    color: var(--light);
    font-weight: 600;
    padding: 10px 25px;
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 225, 255, 0.3);
}

.btn-contact:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 225, 255, 0.5);
}

.hero {
    min-height: 100vh;
    background: linear-gradient(-45deg, #1e1e2c, #2a2a3d, #323248, #292937);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    z-index: 2;
    position: relative;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(90deg, var(--light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    color: var(--accent);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.8);
}

.hero-btns .btn {
    margin-right: 15px;
    margin-bottom: 15px;
    font-weight: 600;
    padding: 12px 30px;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    color: var(--light);
    box-shadow: 0 4px 15px rgba(80, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(80, 70, 229, 0.5);
    background: linear-gradient(45deg, var(--secondary), var(--primary));
}

.btn-outline-light {
    border: 2px solid var(--light);
    color: var(--light);
}

.btn-outline-light:hover {
    background-color: var(--light);
    color: var(--dark);
    transform: translateY(-3px);
}

.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    opacity: 0.2;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -50px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: -50px;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 30%;
    right: 20%;
    animation-delay: 4s;
}

.services {
    padding: 100px 0;
    background-color: #15151e;
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--light);
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.section-title p {
    color: rgba(255, 255, 255, 0.7);
    max-width: 700px;
    margin: 0 auto;
}

.service-card {
    background: linear-gradient(145deg, #1e1e2c, #252536);
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    transition: all 0.5s ease;
    opacity: 0;
    z-index: -1;
    transform: translateY(100%);
}

.service-card:hover::before {
    opacity: 0.05;
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: var(--secondary);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--light);
    transform: scale(1.1);
    box-shadow: 0 0 0 0 rgba(80, 70, 229, 0.7);
    animation: pulse 1.5s infinite;
}

.service-card h5 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--light);
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
}

.works {
    padding: 100px 0;
    background-color: var(--dark);
}

.portfolio-filter {
    text-align: center;
    margin-bottom: 40px;
}

.portfolio-filter button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    padding: 8px 20px;
    margin: 0 5px 10px;
    border-radius: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-filter button.active,
.portfolio-filter button:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--light);
    box-shadow: 0 4px 15px rgba(80, 70, 229, 0.3);
}

.portfolio-item {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin: 0 auto;
}

.portfolio-img i {
    color: var(--secondary);
    transition: all 0.5s ease;
}

.portfolio-item h5 {
    color: var(--light);
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
}

.portfolio-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item:hover .portfolio-img i {
    transform: scale(1.2);
}

.experience {
    padding: 100px 0;
    background-color: #15151e;
    position: relative;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1.5px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -13px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: 4px solid var(--dark);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:nth-child(even)::after {
    left: -13px;
}

.timeline-content {
    padding: 20px 30px;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-date {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-title {
    color: var(--light);
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-text {
    color: rgba(255, 255, 255, 0.7);
}

.contact {
    padding: 100px 0;
    background: linear-gradient(-45deg, #1e1e2c, #2a2a3d, #323248, #292937);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    position: relative;
}

.contact-form {
    background: linear-gradient(145deg, #1e1e2c, #252536);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-control, .form-floating>.form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light);
    border-radius: 10px;
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label {
    color: var(--secondary);
    opacity: 0.8;
}

.form-floating>label {
    color: rgba(255, 255, 255, 0.5);
}

.form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary);
    box-shadow: 0 0 0 0.25rem rgba(0, 225, 255, 0.25);
    color: var(--light);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-response {
    margin: 15px 0;
    padding: 10px;
    border-radius: 5px;
}

.form-response.success {
    background-color: rgba(40, 167, 69, 0.2);
    border: 1px solid rgba(40, 167, 69, 0.3);
    color: #28a745;
}

.form-response.error {
    background-color: rgba(220, 53, 69, 0.2);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #dc3545;
}

.contact-info {
    background: linear-gradient(145deg, #1e1e2c, #252536);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.05);
    height: 100%;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: var(--secondary);
    font-size: 1.2rem;
    margin-right: 20px;
}

.contact-text h5 {
    color: var(--light);
    font-weight: 600;
    margin-bottom: 5px;
}

.contact-text p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.social-icons {
    display: flex;
    margin-top: 20px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    color: var(--secondary);
    font-size: 1rem;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--light);
    transform: translateY(-3px);
}

.footer {
    background-color: #15151e;
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0;
}

.footer span {
    color: var(--secondary);
}

/* Particles container */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Parallax Image */
.parallax-image {
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

/* Media Queries */
@media (max-width: 991.98px) {
    .hero h1 {
        font-size: 3rem;
    }

    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item:nth-child(even) {
        left: 0;
    }

    .timeline-item:nth-child(even)::after {
        left: 15px;
    }

    .timeline-item:nth-child(odd)::after {
        left: 15px;
    }
}

@media (max-width: 767.98px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .service-card {
        margin-bottom: 30px;
    }

    .contact-info {
        margin-top: 30px;
    }

    .portfolio-filter button {
        margin-bottom: 10px;
    }
}

@media (max-width: 575.98px) {
    .hero h1 {
        font-size: 2rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .hero-btns .btn {
        margin-right: 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .timeline-content {
        padding: 15px;
    }

    .contact-form, .contact-info {
        padding: 20px;
    }
}

/* Animations */
.fadeIn {
    animation: fadeIn 1s ease forwards;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll animations */
.reveal {
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    transition: all 1s ease;
}

.reveal.active {
    transform: translateY(0);
    opacity: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary), var(--secondary));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(var(--secondary), var(--primary));
}

/* Neon effects */
.neon-text {
    color: var(--secondary);
    text-shadow: var(--neon-shadow);
}

.neon-border {
    border: 2px solid var(--secondary);
    box-shadow: var(--neon-shadow);
}

/* Tooltip custom styling */
.tooltip-inner {
    background-color: var(--dark);
    border: 1px solid var(--secondary);
    color: var(--light);
    padding: 10px 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.bs-tooltip-auto[x-placement^=top] .arrow::before, 
.bs-tooltip-top .arrow::before {
    border-top-color: var(--secondary);
}

/* Dark mode toggle */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
}

.dark-mode-toggle i {
    color: var(--secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover i {
    color: var(--light);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

.back-to-top i {
    color: var(--secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.back-to-top:hover i {
    color: var(--light);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.6s ease;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--secondary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Cursor */
.cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--secondary);
    opacity: 0.5;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.cursor.active {
    width: 40px;
    height: 40px;
    opacity: 0.2;
}

/* Estilos adicionales para la sección de portafolio */
.portfolio-item {
    margin-bottom: 30px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    background: linear-gradient(145deg, #1e1e2c, #252536);
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-img {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    margin: 0 auto;
}

.portfolio-img i {
    color: var(--secondary);
    transition: all 0.5s ease;
}

.portfolio-item h5 {
    color: var(--light);
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 10px;
}

.portfolio-item p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.portfolio-item:hover .portfolio-img i {
    transform: scale(1.2);
    color: var(--light);
}


.glitch-text {
    white-space: nowrap;
}

/* Solo en móviles pequeños permite salto */
@media (max-width: 576px) {
    .glitch-text {
        white-space: normal; /* Permite salto en móviles */
        font-size: 2rem; /* Reduce tamaño */
    }
}


.portfolio-img {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.portfolio-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(99, 102, 241, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img img {
    transform: scale(1.1);
}

.portfolio-link {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.portfolio-link:hover {
    transform: scale(1.2);
}