/* ========================================
   XINOCORE DESIGN SYSTEM
   Mobile-First Responsive Design
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --accent: #f472b6;
    --background: #ffffff;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --text-lighter: #999999;
    --border-color: #e5e7eb;
    --card-bg: #ffffff;
    --overlay-dark: rgba(0, 0, 0, 0.7);

    /* Typography */
    --font-headings: 'Montserrat', sans-serif;
    --font-body: 'Nunito', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    /* Prevenir pull-to-refresh en iOS */
    overscroll-behavior-y: none;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevenir pull-to-refresh y bounce en iOS */
    overscroll-behavior-y: none;
    -webkit-overflow-scrolling: touch;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    font-weight: 700;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.125rem 2.25rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Space Backgrounds - Enhanced */
.space-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    background: linear-gradient(180deg, #0a0a1a 0%, #1a1a2e 50%, #16213e 100%);
}

.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, white, transparent),
        radial-gradient(2px 2px at 60px 70px, white, transparent),
        radial-gradient(1px 1px at 50px 50px, white, transparent),
        radial-gradient(1px 1px at 130px 80px, white, transparent),
        radial-gradient(2px 2px at 90px 10px, white, transparent),
        radial-gradient(1px 1px at 140px 60px, #a5b4fc, transparent),
        radial-gradient(1px 1px at 175px 25px, #c4b5fd, transparent),
        radial-gradient(2px 2px at 15px 95px, #fbbf24, transparent);
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite, starMove 100s linear infinite;
    opacity: 0.9;
}

.stars::before,
.stars::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(1px 1px at 80px 120px, rgba(255, 255, 255, 0.8), transparent),
        radial-gradient(2px 2px at 160px 40px, rgba(255, 255, 255, 0.6), transparent),
        radial-gradient(1px 1px at 30px 150px, rgba(255, 255, 255, 0.7), transparent);
    background-size: 200px 200px;
}

.stars::after {
    animation: twinkle 3s ease-in-out infinite reverse;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 0.4; }
}

@keyframes starMove {
    from { background-position: 0 0; }
    to { background-position: -200px 200px; }
}

.nebula {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float 25s ease-in-out infinite, pulse 8s ease-in-out infinite;
    will-change: transform, opacity;
}

.nebula-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary) 0%, var(--secondary) 40%, transparent 70%);
    top: -120px;
    right: -120px;
}

.nebula-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--secondary) 0%, var(--accent) 40%, transparent 70%);
    bottom: -180px;
    left: -180px;
    animation-delay: -12s, -4s;
}

.nebula-3 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--accent) 0%, var(--primary) 40%, transparent 70%);
    top: 50%;
    left: 50%;
    animation-delay: -6s, -2s;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    25% { transform: translate(calc(-50% + 40px), calc(-50% - 40px)) scale(1.15) rotate(90deg); }
    50% { transform: translate(-50%, calc(-50% - 80px)) scale(0.95) rotate(180deg); }
    75% { transform: translate(calc(-50% - 30px), calc(-50% + 30px)) scale(1.1) rotate(270deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.55; }
}

/* Shooting Stars */
.space-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

@keyframes shootingStar {
    0% {
        transform: translate(0, 0);
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        transform: translate(300px, 300px);
        opacity: 0;
    }
}

.space-window {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(10, 10, 26, 0.95) 0%, rgba(26, 26, 46, 0.8) 100%);
    overflow: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all var(--transition-base);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0; /* Reduced from 1rem to 0.5rem */
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    z-index: 1001;
}

.logo-icon {
    flex-shrink: 0;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 24px;
    z-index: 1001;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: none;
    padding: 5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: right var(--transition-slow);
}

.nav.active {
    right: 0;
}

.nav-link {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* Special Portfolio Link - Stand Out */
.nav-link[href="portafolio.html"] {
    position: relative;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    border-bottom: none !important;
    font-weight: 700;
    overflow: hidden;
}

.nav-link[href="portafolio.html"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.nav-link[href="portafolio.html"]:hover::before {
    left: 100%;
}

.nav-link[href="portafolio.html"]:hover {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-contact {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    border-bottom: none !important;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--spacing-xl) 0 8rem;
}

.hero-title {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
}

.hero-cta .btn {
    width: 220px;
    padding: 1rem 2rem;
    font-size: 1.0625rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hero-cta .btn-primary {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-cta .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.hero-cta .btn-primary:hover::before {
    left: 100%;
}

.hero-cta .btn-primary:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-cta .btn-secondary {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-cta .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.15), transparent);
    transition: left 0.5s ease;
}

.hero-cta .btn-secondary:hover::before {
    left: 100%;
}

.hero-cta .btn-secondary:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(139, 92, 246, 0.5), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-8px);
}

.scroll-indicator::before {
    content: 'Desliza hacia abajo';
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: fadeInOut 3s ease-in-out infinite;
}

.scroll-indicator span {
    display: block;
    width: 32px;
    height: 52px;
    border: 3px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    position: relative;
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.1),
        0 0 20px rgba(99, 102, 241, 0.3),
        inset 0 0 20px rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

.scroll-indicator:hover span {
    border-color: rgba(255, 255, 255, 0.9);
    box-shadow:
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 0 30px rgba(99, 102, 241, 0.5),
        inset 0 0 20px rgba(99, 102, 241, 0.2);
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
    border-radius: 50%;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2.5s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(165, 180, 252, 0.4);
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid rgba(255, 255, 255, 0.6);
    animation: arrowBounce 2s ease-in-out infinite;
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(165, 180, 252, 0.4);
    }
    50% {
        opacity: 0.6;
        box-shadow: 0 0 5px rgba(255, 255, 255, 0.4), 0 0 10px rgba(165, 180, 252, 0.2);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(28px);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0), 0 0 0 rgba(165, 180, 252, 0);
    }
}

@keyframes arrowBounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
        opacity: 0.6;
    }
    50% {
        transform: translateX(-50%) translateY(4px);
        opacity: 1;
    }
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-title {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Services Section */
.services {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.services-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.service-card {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: white;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    color: white;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.18), 0 1.5px 6px rgba(0,0,0,0.10);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.service-description {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.service-benefits {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-benefits li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
}

.service-benefits li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Portfolio Preview Section */
.portfolio-preview {
    position: relative;
    padding: var(--spacing-3xl) 0;
    overflow: hidden;
}

.portfolio-preview .section-header {
    position: relative;
    z-index: 2;
}

.portfolio-preview .section-title,
.portfolio-preview .section-subtitle {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.portfolio-grid {
    display: grid;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    position: relative;
    z-index: 2;
}

.portfolio-preview .text-center {
    position: relative;
    z-index: 2;
    padding: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-xl);
    margin-top: var(--spacing-md);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-base);
}

.portfolio-preview .text-center:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.portfolio-preview .btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.portfolio-preview .btn-large:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.6), 0 0 40px rgba(139, 92, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.portfolio-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-slow);
    cursor: pointer;
    position: relative;
}

.portfolio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--accent) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 1;
    border-radius: var(--radius-lg);
}

.portfolio-card:hover::before {
    opacity: 0.05;
}

.portfolio-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(99, 102, 241, 0.2);
}

.portfolio-card:hover .portfolio-cover-image {
    transform: scale(1.1);
}

.portfolio-item:hover .portfolio-cover-image {
    transform: scale(1.1);
}

.portfolio-card:active {
    transform: translateY(-10px) scale(1.01);
}

.portfolio-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.portfolio-cover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-slow);
}

.portfolio-info {
    padding: var(--spacing-lg);
    position: relative;
    z-index: 2;
    background: white;
}

.portfolio-category {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.portfolio-title {
    font-size: 1.375rem;
    margin-bottom: 0.625rem;
    color: var(--text-dark);
    font-weight: 700;
}

.portfolio-description {
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.text-center {
    text-align: center;
}

/* About Section */
.about {
    padding: var(--spacing-3xl) 0;
    background: white;
}

.about-grid {
    display: grid;
    gap: var(--spacing-xl);
}

.about-text {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
}

.about-text strong {
    color: var(--text-dark);
    font-weight: 700;
}

.about-mission {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary);
    margin: var(--spacing-lg) 0;
}

.about-mission h3 {
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.about-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: var(--spacing-lg);
}

.about-location svg {
    color: var(--primary);
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    align-items: stretch;
}

.feature-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(139, 92, 246, 0.03) 100%);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    width: 100%;
}

.feature-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.08) 100%);
    transform: translateX(8px);
}

.feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.feature-item h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.feature-item p {
    color: var(--text-light);
    font-size: 0.9375rem;
    margin: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 2px solid var(--border-color);
    width: 100%;
    place-items: center;
}

.stat-item {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-headings);
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    position: relative;
    padding: var(--spacing-3xl) 0;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.cta-section .space-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none !important;
    z-index: 0;
}

.cta-section .container {
    position: relative;
    z-index: 10;
    width: 100%;
}

.cta-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: white;
    padding: var(--spacing-xl) 0;
}

.cta-title {
    font-size: 2.25rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cta-text {
    font-size: 1.0625rem;
    margin-bottom: var(--spacing-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Rocket Animation */
.rocket-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.rocket {
    position: absolute;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    animation: rocketFlight 20s linear infinite;
}

@keyframes rocketFlight {
    0% {
        left: -10%;
        top: 70%;
        transform: translate(-50%, -50%) rotate(-45deg);
        opacity: 0;
    }
    5% {
        opacity: 1;
    }
    25% {
        left: 25%;
        top: 50%;
        transform: translate(-50%, -50%) rotate(-35deg);
    }
    50% {
        left: 50%;
        top: 30%;
        transform: translate(-50%, -50%) rotate(-40deg);
    }
    75% {
        left: 75%;
        top: 20%;
        transform: translate(-50%, -50%) rotate(-38deg);
    }
    95% {
        opacity: 1;
    }
    100% {
        left: 110%;
        top: 10%;
        transform: translate(-50%, -50%) rotate(-42deg);
        opacity: 0;
    }
}

.rocket-flame {
    transform-origin: center;
}

/* Add floating animation to rocket */
@keyframes rocketFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-3px) rotate(1deg);
    }
    50% {
        transform: translateY(-5px) rotate(-1deg);
    }
    75% {
        transform: translateY(-3px) rotate(1deg);
    }
}

.rocket {
    animation: rocketFlight 20s linear infinite, rocketFloat 2s ease-in-out infinite;
}

/* Rocket Trail Effect */
.rocket::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 80px;
    background: linear-gradient(to bottom, rgba(251, 191, 36, 0.5), transparent);
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    filter: blur(2px);
    animation: trailPulse 0.3s ease-in-out infinite;
}

@keyframes trailPulse {
    0%, 100% {
        opacity: 0.8;
        height: 80px;
    }
    50% {
        opacity: 0.4;
        height: 60px;
    }
}

/* Contact Section */
.contact {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.contact-grid {
    display: grid;
    gap: var(--spacing-xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
    margin: 0;
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
    justify-content: center;
}

.social-link {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all var(--transition-base);
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.contact-form-wrapper {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

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

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9375rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: linear-gradient(180deg, #1a1a2e 0%, #0a0a1a 100%);
    color: white;
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
}

.footer-grid {
    display: grid;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-headings);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-title {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a,
.footer-contact li {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-base);
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9375rem;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: all var(--transition-base);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

/* Portfolio Page Specific */
.portfolio-hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;
    overflow: hidden;
}

.portfolio-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.portfolio-hero-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    color: white;
}

.portfolio-hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Filters */
.filters-wrapper {
    position: sticky;
    top: 70px;
    background: white;
    z-index: 100;
    padding: var(--spacing-md) 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
}

.filters {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.5rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: white;
    color: var(--text-dark);
    transition: all var(--transition-base);
    white-space: nowrap;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-md);
}

/* Portfolio Section */
.portfolio-section {
    padding: var(--spacing-xl) 0 var(--spacing-3xl);
}

.portfolio-full-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.portfolio-item {
    opacity: 1;
    transform: scale(1);
    transition: all var(--transition-slow);
}

.portfolio-item.hidden {
    display: none;
}

.portfolio-item-image {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.portfolio-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: var(--spacing-lg);
    color: white;
    transition: all var(--transition-base);
}

.portfolio-item-category {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-sm);
}

.portfolio-item-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: white;
}

.portfolio-item-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

/* Process Section */
.process-section {
    padding: var(--spacing-3xl) 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.process-grid {
    display: grid;
    gap: var(--spacing-lg);
}

.process-step {
    position: relative;
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.process-step:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.process-number {
    position: absolute;
    top: -1rem;
    right: 1.5rem;
    font-family: var(--font-headings);
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.2;
}

.process-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: var(--spacing-md);
}

.process-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.process-description {
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* Animation on Scroll */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Tablet Styles */
@media (min-width: 768px) {
    :root {
        --container-padding: 2rem;
    }

    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }

    .hamburger {
        display: none;
    }

    .nav {
        position: static;
        width: auto;
        max-width: none;
        height: auto;
        background: transparent;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1rem;
    }

    .btn-contact {
        padding: 0.625rem 1.25rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-cta {
        flex-direction: row;
        justify-content: center;
        gap: 1.5rem;
    }

    .hero-cta .btn {
        width: 210px;
        padding: 1rem 2rem;
        font-size: 1.0625rem;
    }

    .scroll-indicator {
        bottom: 2.5rem;
    }

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

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

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

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-2xl);
    }

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

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

    .portfolio-item-overlay {
        opacity: 0;
        transform: translateY(20px);
    }

    .portfolio-item:hover .portfolio-item-overlay {
        opacity: 1;
        transform: translateY(0);
    }

    .portfolio-item-overlay {
        background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.8) 70%, transparent 100%);
    }

    .cta-title {
        font-size: 2.75rem;
    }

    .cta-text {
        font-size: 1.125rem;
    }

    .rocket {
        width: 70px;
        height: 95px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    :root {
        --container-padding: 2.5rem;
    }

    h1 {
        font-size: 3.5rem;
    }

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

    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .portfolio-full-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .filters {
        justify-content: center;
    }

    .cta-section {
        min-height: 600px;
    }

    .cta-title {
        font-size: 3rem;
    }

    .rocket {
        width: 80px;
        height: 110px;
    }

    @keyframes rocketFlight {
        0% {
            left: -10%;
            top: 75%;
            transform: translate(-50%, -50%) rotate(-45deg);
            opacity: 0;
        }
        5% {
            opacity: 1;
        }
        20% {
            left: 20%;
            top: 55%;
            transform: translate(-50%, -50%) rotate(-38deg);
        }
        40% {
            left: 40%;
            top: 40%;
            transform: translate(-50%, -50%) rotate(-42deg);
        }
        60% {
            left: 60%;
            top: 25%;
            transform: translate(-50%, -50%) rotate(-40deg);
        }
        80% {
            left: 80%;
            top: 15%;
            transform: translate(-50%, -50%) rotate(-43deg);
        }
        95% {
            opacity: 1;
        }
        100% {
            left: 115%;
            top: 5%;
            transform: translate(-50%, -50%) rotate(-45deg);
            opacity: 0;
        }
    }
}

/* Large Desktop Styles */
@media (min-width: 1440px) {
    .hero-title {
        font-size: 4rem;
    }

    .portfolio-hero-title {
        font-size: 3.5rem;
    }
}

/* ========================================
   PROTECCIÓN DEL MODAL
   Asegurar que otros CSS no rompan el modal
   ======================================== */

/* Forzar que el modal siempre use estos estilos */
.project-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 10000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.project-modal.active {
    opacity: 1 !important;
    visibility: visible !important;
}

.project-modal .modal-content {
    max-height: 90vh !important;
    overflow-y: auto !important;
    position: relative !important;
}

.project-modal.active .modal-content {
    transform: scale(1) translateY(0) !important;
}

/* ========================================
   PROJECT MODAL
   ======================================== */

.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

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

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(30px);
    transition: transform var(--transition-slow);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.project-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.modal-close:hover {
    background: var(--secondary);
    color: white;
    transform: rotate(90deg);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.modal-header {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.modal-category {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.modal-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.modal-client {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.modal-year {
    font-size: 0.875rem;
    opacity: 0.8;
}

.modal-body {
    padding: 2rem;
}

.modal-gallery {
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.modal-main-image {
    width: 100%;
    height: auto;
    display: block;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.1);
}

.modal-thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.modal-thumbnail {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(0, 0, 0, 0.1);
}

.modal-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.modal-thumbnail.active {
    border: 3px solid var(--primary);
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.modal-description p {
    color: var(--text-light);
    line-height: 1.8;
}

.modal-features,
.modal-technologies {
    margin-bottom: 2rem;
}

.modal-features h3,
.modal-technologies h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.features-list {
    display: grid;
    gap: 0.75rem;
}

.feature-item-modal {
    display: flex;
    align-items: start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--radius-md);
}

.feature-item-modal::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
}

.technologies-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.modal-footer {
    padding: 1.5rem 2rem;
    background: #f9fafb;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.modal-btn {
    flex: 1;
    min-width: 150px;
}

/* Hover sutil y elegante para botones secundarios en el modal */
.modal-footer .btn-secondary:hover {
    background: rgba(139, 92, 246, 0.1) !important;
    border-color: var(--secondary) !important;
    color: var(--secondary) !important;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15) !important;
    transform: translateY(-1px) !important;
}

/* Modal Responsive */
@media (max-width: 767px) {
    .modal-content {
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }

    .modal-header {
        padding: 1.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-body {
        padding: 1.5rem;
    }

    .modal-footer {
        flex-direction: column;
    }

    .modal-btn {
        width: 100%;
    }
}


/* Improved Portfolio Card Animations */
.portfolio-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.portfolio-card:nth-child(1) { animation-delay: 0.1s; }
.portfolio-card:nth-child(2) { animation-delay: 0.2s; }
.portfolio-card:nth-child(3) { animation-delay: 0.3s; }
.portfolio-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Portfolio Item Enhanced */
.portfolio-item {
    position: relative;
    cursor: pointer;
}

.portfolio-item::after {
    content: 'Ver Detalles';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    opacity: 0;
    transition: opacity var(--transition-base);
    pointer-events: none;
    z-index: 10;
    box-shadow: var(--shadow-xl);
}

.portfolio-item:hover::after {
    opacity: 1;
}

@media (max-width: 767px) {
    .portfolio-item::after {
        content: 'Toca para ver';
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }

    /* Ajustes para el formulario de contacto en móviles */
    .container {
        padding: 0 var(--spacing-sm);
    }

    .contact-form-wrapper {
        padding: var(--spacing-md);
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .contact-grid {
        gap: var(--spacing-md);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 0.9375rem;
        width: 100%;
        box-sizing: border-box;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .btn-block {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }

    .form-privacy {
        font-size: 0.8125rem;
        padding: 0.75rem;
    }

    .contact-item {
        padding: var(--spacing-md);
    }
}

/* Dispositivos móviles muy pequeños */
@media (max-width: 480px) {
    .contact {
        padding: var(--spacing-xl) 0;
    }

    .contact-form-wrapper {
        padding: var(--spacing-sm);
        border-radius: var(--radius-md);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem;
        font-size: 0.875rem;
    }

    .form-group label {
        font-size: 0.875rem;
    }

    .btn-block {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .social-links {
        gap: var(--spacing-sm);
    }

    .social-link {
        width: 40px;
        height: 40px;
    }

    .social-link svg {
        width: 20px;
        height: 20px;
    }
}
