/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0066ff;
    --secondary-color: #00d4ff;
    --accent-color: #ff6b35;
    --dark-bg: #0f1419;
    --dark-secondary: #1a1f2e;
    --light-bg: #f8f9fa;
    --text-primary: #ffffff;
    --text-secondary: #a8b2c1;
    --text-dark: #1a1f2e;
    --border-color: rgba(255, 255, 255, 0.1);
    --gradient-1: linear-gradient(135deg, #0066ff 0%, #00d4ff 100%);
    --gradient-2: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    font-size: 16px;
    width: 100%;
    max-width: 100vw;
}

* {
    max-width: 100%;
}

img, video, canvas, svg {
    max-width: 100%;
    height: auto;
}

/* ===== ANIMATED BACKGROUND CANVAS ===== */
.animated-background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: var(--dark-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 14, 39, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(10, 14, 39, 0.98);
    box-shadow: var(--shadow-md);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 0;
    min-height: 70px;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 50%, #00d4ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    position: relative;
    transition: var(--transition);
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
    animation: gradient-shift 3s ease infinite;
    text-transform: uppercase;
}

.logo-text::before {
    content: 'SISTECOL SAS';
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.6;
    z-index: -1;
    animation: gradient-shift 3s ease infinite;
}

.logo-sas {
    font-size: 0.65em;
    font-weight: 600;
    letter-spacing: 0.25em;
    margin-left: 0.6rem;
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    opacity: 1;
    filter: brightness(1.15);
    text-transform: uppercase;
}

.logo-text:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.8));
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Fallback si la imagen no carga */
.logo::before {
    content: 'SISTECOL SAS';
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: none;
}

.logo-img[src=""],
.logo-img:not([src]) {
    display: none;
}

.logo-img[src=""] ~ .logo::before,
.logo-img:not([src]) ~ .logo::before {
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link:hover::after {
    width: 100%;
}

/* ===== DROPDOWN MENU ===== */
.nav-item-dropdown {
    position: relative;
}

/* Asegurar que el dropdown siempre esté disponible */
.nav-item-dropdown .nav-link {
    pointer-events: auto;
}

.nav-item-dropdown > .nav-link {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-item-dropdown > .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: var(--transition);
}

.nav-item-dropdown > .nav-link::before {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
    position: relative;
}

.nav-item-dropdown:hover > .nav-link::before {
    transform: rotate(180deg);
}

.nav-item-dropdown:hover > .nav-link::after {
    width: 100%;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-top: 1rem;
    display: block;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dropdown-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.dropdown-link:hover {
    color: var(--text-primary);
    background: rgba(0, 102, 255, 0.1);
    border-left-color: var(--primary-color);
    padding-left: 1.75rem;
}

.dropdown-link.active {
    color: var(--primary-color);
    background: rgba(0, 102, 255, 0.15);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 100px;
    padding-bottom: 60px;
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background-image: url('assets/images/fondo.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    will-change: transform;
    transform: translateZ(0);
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 14, 39, 0.7) 0%, rgba(10, 14, 39, 0.85) 100%),
                radial-gradient(circle at 30% 50%, rgba(0, 102, 255, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(0, 212, 255, 0.15) 0%, transparent 50%);
    z-index: 1;
}

.animated-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.3;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-color);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--secondary-color);
    top: 60%;
    right: 10%;
    animation-delay: 5s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--accent-color);
    bottom: 10%;
    left: 50%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    max-width: 800px;
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    font-size: clamp(2.2rem, 6vw, 4rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
}

.title-line.highlight {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.85rem 2rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #0052cc;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 2;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--text-secondary);
    border-radius: 2px;
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SECTIONS ===== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--dark-bg);
    padding: 100px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 102, 255, 0.05);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 102, 255, 0.3);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-number {
    font-size: 4rem;
    font-weight: 800;
    color: rgba(255, 255, 255, 0.05);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ===== TECHNOLOGIES SECTION ===== */
.technologies {
    background: var(--dark-secondary);
    padding: 100px 0;
}

.tech-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tech-tab {
    padding: 0.6rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
}

.tech-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(0, 102, 255, 0.3);
}

.tech-tab.active {
    background: var(--primary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

.tech-content {
    position: relative;
    min-height: 300px;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
    position: absolute;
    width: 100%;
    pointer-events: none;
}

.tech-grid.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    pointer-events: all;
}

.tech-item {
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.tech-item:hover {
    background: rgba(0, 102, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(0, 102, 255, 0.4);
    box-shadow: var(--shadow-sm);
}

/* ===== WHY US SECTION ===== */
.why-us {
    background: var(--dark-bg);
    padding: 100px 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--dark-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 102, 255, 0.05);
    box-shadow: var(--shadow-md);
    border-color: rgba(0, 102, 255, 0.3);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.feature-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio {
    background: var(--dark-secondary);
    padding: 100px 0;
    position: relative;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
    align-items: stretch;
}

.portfolio-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease, border-color 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--dark-bg);
    min-height: 300px;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.25), 0 4px 20px rgba(0, 0, 0, 0.4);
    border-color: rgba(0, 102, 255, 0.5);
}

.portfolio-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background: var(--dark-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0) scale(1);
    background: var(--dark-bg);
    will-change: transform;
}

.portfolio-image img[src=""],
.portfolio-image img:not([src]) {
    opacity: 0.3;
    background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 100%);
}

.portfolio-image img {
    animation: fadeInImage 0.6s ease-in-out;
}

@keyframes fadeInImage {
    from {
        opacity: 0;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.portfolio-item:hover .portfolio-image img {
    transform: translateZ(0) scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    text-align: center;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item:hover .portfolio-overlay h3 {
    transform: translateY(0);
}

.portfolio-overlay p {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
    transform: translateY(10px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) 0.05s;
    opacity: 0;
}

.portfolio-item:hover .portfolio-overlay p {
    transform: translateY(0);
    opacity: 1;
}

.portfolio-btn {
    padding: 0.85rem 2rem;
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
    transform: translateY(10px) scale(0.95);
    opacity: 0;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.portfolio-item:hover .portfolio-btn {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.portfolio-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

/* ===== PORTFOLIO MODAL ===== */
.portfolio-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.portfolio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: var(--dark-secondary);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10001;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    border-radius: 20px 0 0 20px;
    min-height: 400px;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.modal-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-info p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.modal-details {
    margin-bottom: 2rem;
}

.modal-details ul {
    list-style: none;
    padding: 0;
}

.modal-details li {
    color: var(--text-secondary);
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.modal-details li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.modal-cta {
    align-self: flex-start;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        border-radius: 20px 20px 0 0;
        min-height: 280px;
        max-height: 320px;
        object-fit: cover;
        object-position: center center;
        width: 100%;
    }
    
    .modal-info {
        padding: 2rem;
    }
    
    .portfolio-modal.active {
        padding: 1rem;
    }
    
    .modal-content {
        max-width: 100%;
        border-radius: 16px;
    }
}

/* ===== PARTNERS SECTION ===== */
.partners {
    background: var(--dark-secondary);
    padding: 60px 0;
    overflow: hidden;
}

.partners-slider {
    overflow: hidden;
    position: relative;
}

.partners-track {
    display: flex;
    gap: 3rem;
    animation: scroll-partners 30s linear infinite;
}

.partner-item {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    opacity: 0.6;
    transition: var(--transition);
}

.partner-item:hover {
    opacity: 1;
    color: var(--primary-color);
}

@keyframes scroll-partners {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--dark-secondary);
    padding: 100px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: start;
    gap: 1.5rem;
}

.contact-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    position: relative;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: rgba(0, 102, 255, 0.05);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 500;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.form-message.warning {
    display: block;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-loader {
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark-bg);
    padding: 60px 0 30px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
}

.footer-logo-text {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, #00d4ff 0%, #0066ff 50%, #00d4ff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    transition: var(--transition);
    animation: gradient-shift 3s ease infinite;
    text-transform: uppercase;
}

.footer-logo-text:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 15px rgba(0, 212, 255, 0.6));
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .logo-img {
        height: 70px;
        max-width: 220px;
        min-width: 180px;
        padding: 3px;
    }
    
    .footer-logo-text {
        font-size: 1.3rem;
        letter-spacing: 0.08em;
    }
    
    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: rgba(10, 14, 39, 0.98);
        width: 100%;
        padding: 2rem;
        gap: 1rem;
        transition: var(--transition);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }
    
    .nav-item-dropdown > .nav-link::after {
        display: none;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin-top: 0;
        margin-left: 1rem;
        border: none;
        border-left: 2px solid var(--border-color);
        border-radius: 0;
        box-shadow: none;
        padding: 0.5rem 0 0.5rem 1rem;
        display: none;
        min-width: auto;
    }
    
    .nav-item-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .hero {
        min-height: 80vh;
        padding-top: 80px;
        padding-bottom: 40px;
    }
    
    .hero-background {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 0.85rem 1.5rem;
    }

    section {
        padding: 60px 0;
    }

    .services-grid,
    .features-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .portfolio-item {
        min-height: 280px;
        aspect-ratio: 16/9;
        border-radius: 12px;
    }
    
    .portfolio-overlay {
        padding: 1.5rem;
        opacity: 1;
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.2) 70%, transparent 100%);
    }
    
    .portfolio-overlay h3 {
        font-size: 1.3rem;
        transform: translateY(0);
    }
    
    .portfolio-overlay p {
        font-size: 0.9rem;
        transform: translateY(0);
        opacity: 1;
    }
    
    .portfolio-btn {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tech-tabs {
        flex-direction: column;
        gap: 0.75rem;
    }

    .tech-tab {
        width: 100%;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 12px;
    }
    
    section {
        padding: 50px 0;
    }

    .service-card,
    .feature-card {
        padding: 1.5rem;
    }
    
    .portfolio-grid {
        gap: 1.2rem;
    }
    
    .portfolio-item {
        min-height: 240px;
        border-radius: 10px;
    }
    
    .portfolio-overlay {
        padding: 1.2rem;
        opacity: 1;
    }
    
    .portfolio-overlay h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        transform: translateY(0);
    }
    
    .portfolio-overlay p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
        transform: translateY(0);
        opacity: 1;
    }
    
    .portfolio-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    
    .modal-image {
        min-height: 220px;
        max-height: 280px;
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .modal-info h2 {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }
    
    .hero-subtitle {
        font-size: clamp(0.9rem, 3vw, 1.1rem);
    }
    
    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .contact-icon {
        font-size: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ===== ANIMATIONS ===== */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== WHATSAPP FLOATING BUTTON ===== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: float-whatsapp 3s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
    background: #20BA5A;
}

.whatsapp-icon {
    width: 32px;
    height: 32px;
    color: white;
    z-index: 2;
    position: relative;
}

.whatsapp-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: pulse-whatsapp 2s ease-out infinite;
    z-index: 1;
}

@keyframes float-whatsapp {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-whatsapp {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Responsive WhatsApp Button */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }
}

/* ===== SCROLL TO TOP BUTTON STYLES ===== */
.scroll-top-btn {
    position: fixed !important;
    bottom: 100px !important;
    right: 30px !important;
    z-index: 998 !important;
}

/* Responsive Scroll To Top Button */
@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 90px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }
}

/* ===== MUSIC CONTROL BUTTON ===== */
.music-control-btn {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    width: 60px !important;
    height: 60px !important;
    background: var(--gradient-1) !important;
    border: none !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4) !important;
    z-index: 99999 !important; /* Muy alto para estar por encima de todo */
    cursor: pointer !important;
    transition: var(--transition) !important;
    animation: float-music 3s ease-in-out infinite !important;
    pointer-events: auto !important; /* Asegura que el botón sea clickeable */
    touch-action: manipulation !important; /* Mejora la respuesta táctil */
    -webkit-tap-highlight-color: transparent !important; /* Elimina el highlight en móviles */
}

.music-control-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 102, 255, 0.6);
}

.music-control-btn.playing {
    background: var(--gradient-2);
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

.music-control-btn.playing:hover {
    box-shadow: 0 6px 30px rgba(255, 107, 53, 0.6);
}

.music-icon {
    width: 28px;
    height: 28px;
    color: white;
    z-index: 2;
    position: relative;
    pointer-events: none; /* Permite que los clics pasen a través del icono */
}

.music-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--primary-color);
    animation: pulse-music 2s ease-out infinite;
    z-index: 1;
    pointer-events: none; /* Permite que los clics pasen a través */
}

.music-control-btn.playing .music-pulse {
    background: var(--accent-color);
}

@keyframes float-music {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-music {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Responsive Music Control Button */
@media (max-width: 768px) {
    .music-control-btn {
        width: 55px;
        height: 55px;
        bottom: 20px;
        left: 20px;
    }
    
    .music-icon {
        width: 24px;
        height: 24px;
    }
    
    /* Ajustar posición del botón de scroll cuando hay música */
    .scroll-top-btn {
        bottom: 90px !important;
    }
}
