* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --gold: #FFB800;
    --gold-dark: #CC9200;
    --red: #D32F2F;
    --red-dark: #B71C1C;
    --purple: #7B1FA2;
    --bg-dark: #0D0D0D;
    --bg-darker: #050505;
    --bg-card: #1A1A1A;
    --text-primary: #FFFFFF;
    --text-secondary: #B0B0B0;
    --text-muted: #707070;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Grid Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, rgba(255, 184, 0, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(255, 184, 0, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    opacity: 0.5;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.8rem 5%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 184, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(255, 184, 0, 0.5));
    animation: float 3s ease-in-out infinite;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo img:hover {
    animation: float 1s ease-in-out infinite, glow 2s ease-in-out infinite;
    transform: scale(1.1);
}

.logo-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: none; /* Oculto por defecto, se muestra solo cuando está activo */
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    padding: 0.5rem 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--red));
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 184, 0, 0.1);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
    border-radius: 4px;
}

.nav-links a:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover::before {
    width: 100%;
}

/* Hamburger Menu - Más pequeño y mejor animación */
.hamburger {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    touch-action: manipulation;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform: scale(0.9);
}

.hamburger:hover {
    background-color: rgba(255, 184, 0, 0.1);
    transform: scale(1);
}

.hamburger span {
    width: 22px;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
    transition: all 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
    transform-origin: center;
}

.hamburger span:nth-child(1) {
    transition-delay: 0s;
}

.hamburger span:nth-child(2) {
    transition-delay: 0.05s;
}

.hamburger span:nth-child(3) {
    transition-delay: 0.1s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px) scaleX(0.8);
    transition-delay: 0.1s;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
    transition-delay: 0.05s;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px) scaleX(0.8);
    transition-delay: 0s;
}

/* Mobile Menu Styles - Ahora para todos los dispositivos */
.nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    gap: 2rem;
    transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
    border-left: 1px solid rgba(255, 184, 0, 0.2);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    opacity: 0;
    transform: translateX(30px) scale(0.95);
}

.nav-links.active {
    right: 0;
    display: flex;
    opacity: 1;
    transform: translateX(0) scale(1);
}

.nav-links a {
    font-size: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 184, 0, 0.1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.nav-links a::after {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        width: 70%;
        max-width: 300px;
    }
}

@media (min-width: 769px) {
    .nav-links {
        width: 40%;
        max-width: 400px;
    }
}

/* Scroll Animations - Optimized for mobile */
.fade-in {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
    will-change: auto;
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-60px) translateZ(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0) translateZ(0);
    will-change: auto;
}

.slide-in-right {
    opacity: 0;
    transform: translateX(60px) translateZ(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0) translateZ(0);
    will-change: auto;
}

.scale-in {
    opacity: 0;
    transform: scale(0.8) translateZ(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: opacity, transform;
    backface-visibility: hidden;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1) translateZ(0);
    will-change: auto;
}

/* Staggered Animations */
.scale-in:nth-child(1) { transition-delay: 0s; }
.scale-in:nth-child(2) { transition-delay: 0.1s; }
.scale-in:nth-child(3) { transition-delay: 0.2s; }
.scale-in:nth-child(4) { transition-delay: 0.3s; }
.scale-in:nth-child(5) { transition-delay: 0.4s; }
.scale-in:nth-child(6) { transition-delay: 0.5s; }
.scale-in:nth-child(7) { transition-delay: 0.6s; }
.scale-in:nth-child(8) { transition-delay: 0.7s; }

/* Reduce animations on devices that prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Enable scroll animations on mobile with optimized performance */
@media (max-width: 768px) {
    .fade-in,
    .slide-in-left,
    .slide-in-right,
    .scale-in {
        /* Animations enabled on mobile */
    }
}

/* Animaciones Personalizadas */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 184, 0, 0.3); }
    50% { box-shadow: 0 0 30px rgba(255, 184, 0, 0.6); }
}

@keyframes slideInStagger {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes rotateGlow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes textShimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Counter Animation */
.counter {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gold);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 5% 2rem;
    position: relative;
    background: radial-gradient(ellipse at center, rgba(255, 184, 0, 0.05) 0%, transparent 70%);
    scroll-margin-top: 80px;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    text-align: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 184, 0, 0.1);
    border: 1px solid var(--gold);
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 1.5rem;
    letter-spacing: 1.5px;
}

.hero h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #FFFFFF 0%, var(--gold) 50%, var(--red) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
    font-weight: 300;
}

.hero-tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.7rem, 1.2vw, 0.9rem);
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 2rem;
}

.hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    padding: 0.8rem 2rem;
    font-size: 0.9rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: var(--bg-darker);
    box-shadow: 0 4px 20px rgba(255, 184, 0, 0.3);
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 35px rgba(255, 184, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.btn-secondary {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--gold);
    transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
}

.btn-secondary:hover {
    color: var(--bg-darker);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(255, 184, 0, 0.4);
}

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

/* Stats Section */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 3rem auto 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 184, 0, 0.2);
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Section Styles */
section {
    padding: 3rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    scroll-margin-top: 80px;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-tag {
    font-size: 0.75rem;
    color: var(--gold);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Robots Grid */
.robots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.robot-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.robot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--red), var(--purple));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    pointer-events: none;
}

.robot-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(255, 184, 0, 0.05), transparent);
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: rotate(0deg);
    opacity: 0;
    pointer-events: none;
}

.robot-card:hover::before {
    transform: scaleX(1);
}

.robot-card:hover::after {
    transform: rotate(360deg);
    opacity: 1;
}

.robot-card:hover {
    border-color: var(--gold);
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 20px 50px rgba(255, 184, 0, 0.3);
}

.robot-card:hover .robot-name {
    animation: textShimmer 1.5s ease-in-out;
    background: linear-gradient(90deg, var(--gold) 0%, #ffffff 50%, var(--gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.robot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.2rem;
}

.robot-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold);
}

.robot-status {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(76, 175, 80, 0.15);
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #4CAF50;
}

.robot-status.en-construccion {
    background: rgba(255, 152, 0, 0.15);
    color: #FF9800;
}

.robot-status.en-planeacion {
    background: rgba(33, 150, 243, 0.15);
    color: #2196F3;
}

.robot-status.inactivo {
    background: rgba(158, 158, 158, 0.15);
    color: #9E9E9E;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.robot-status.en-construccion .status-dot {
    background: #FF9800;
}

.robot-status.en-planeacion .status-dot {
    background: #2196F3;
}

.robot-status.inactivo .status-dot {
    background: #9E9E9E;
    animation: none;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.robot-category {
    display: inline-block;
    background: rgba(255, 184, 0, 0.15);
    color: var(--gold);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.robot-description {
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    font-size: 0.88rem;
    line-height: 1.6;
}

.robot-myth {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.82rem;
    margin-bottom: 1.2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--gold);
}

.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(123, 31, 162, 0.15);
    color: #BA68C8;
    padding: 0.3rem 0.7rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Philosophy Section */
.philosophy {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 3rem;
    border: 1px solid rgba(255, 184, 0, 0.2);
    margin: 2rem 0;
    position: relative;
}

.philosophy-content {
    max-width: 850px;
    margin: 0 auto;
}

.philosophy h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    color: var(--gold);
    margin-bottom: 1.2rem;
}

.philosophy p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
}

.philosophy-quote {
    background: rgba(255, 184, 0, 0.05);
    border-left: 4px solid var(--gold);
    padding: 1.5rem;
    margin-top: 1.5rem;
    border-radius: 8px;
}

.philosophy-quote p {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.philosophy-quote span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Tech Stack Section */
.tech-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.tech-category {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.tech-category:hover {
    border-color: var(--gold);
    transform: translateY(-5px);
}

.tech-category h3 {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    color: var(--gold);
    margin-bottom: 1.2rem;
}

.tech-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.tech-item::before {
    content: '▸';
    color: var(--gold);
    font-weight: bold;
}

/* Gallery Section - Instagram Style */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 1 / 1;
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 184, 0, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.gallery-item:hover {
    border-color: var(--gold);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(255, 184, 0, 0.4);
}

.gallery-item:hover::before {
    transform: translateX(100%);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.15) rotate(2deg);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    padding: 1.2rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.gallery-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Team Members Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.member-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--red));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.member-card:hover::before {
    transform: scaleX(1);
}

.member-card:hover {
    border-color: var(--gold);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 184, 0, 0.2);
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 1.2rem;
    border: 3px solid var(--gold);
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(255, 184, 0, 0.3);
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255, 184, 0, 0.3));
}

.member-name {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.member-role {
    display: inline-block;
    background: rgba(255, 184, 0, 0.15);
    color: var(--gold);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.member-bio {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
}

.member-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 184, 0, 0.1);
    border: 1px solid rgba(255, 184, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.member-social a:hover {
    background: var(--gold);
    color: var(--bg-darker);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 184, 0, 0.4);
}

.member-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(255, 184, 0, 0.2);
}

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

.member-stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--gold);
    word-break: break-word;
    hyphens: auto;
}

.member-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.2rem;
}

/* Achievements Section */
.achievements-timeline {
    position: relative;
    padding: 2rem 0;
    margin-top: 2rem;
}

.achievements-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--red));
    border-radius: 2px;
}

.achievement-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    position: relative;
}

.achievement-item:nth-child(odd) {
    flex-direction: row;
}

.achievement-item:nth-child(even) {
    flex-direction: row-reverse;
}

.achievement-content {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
}

.achievement-item:nth-child(odd) .achievement-content {
    margin-right: calc(50% + 1.5rem);
}

.achievement-item:nth-child(even) .achievement-content {
    margin-left: calc(50% + 1.5rem);
}

.achievement-icon {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--gold), var(--red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 0 20px rgba(255, 184, 0, 0.5);
    z-index: 2;
}

.achievement-date {
    font-family: 'Orbitron', sans-serif;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.achievement-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.4rem;
}

.achievement-place {
    display: inline-block;
    background: rgba(255, 184, 0, 0.15);
    color: var(--gold);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
}

.achievement-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.85rem;
}

/* Stats Dashboard */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 16px;
    padding: 1.5rem 1.2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold), var(--red));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 184, 0, 0.1) 0%, transparent 70%);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(-50%, -50%);
    border-radius: 50%;
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:hover::after {
    width: 300px;
    height: 300px;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--gold);
    box-shadow: 0 15px 40px rgba(255, 184, 0, 0.3);
}

.stat-card:hover .stat-icon {
    animation: bounceIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

.stat-number {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--gold), var(--red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Social Links */
.social-section {
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.05), rgba(211, 47, 47, 0.05));
    border-radius: 20px;
    padding: 3rem 2rem;
    text-align: center;
}

.social-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
    margin-top: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.social-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem 1.2rem;
    background: var(--bg-card);
    border: 1px solid rgba(255, 184, 0, 0.2);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 184, 0, 0.05), rgba(211, 47, 47, 0.05));
    transform: scale(0);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 50%;
}

.social-link:hover {
    border-color: var(--gold);
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 184, 0, 0.3);
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link:hover .social-icon {
    animation: bounceIn 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: scale(1.1);
}

.social-icon {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 0 10px rgba(255, 184, 0, 0.3));
}

.social-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.social-handle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Footer */
footer {
    background: var(--bg-darker);
    padding: 2.5rem 5%;
    border-top: 1px solid rgba(255, 184, 0, 0.1);
    text-align: center;
}

.footer-quote {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.footer-translation {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    font-family: 'Orbitron', sans-serif;
    font-size: 1rem;
    color: var(--gold);
    font-weight: 700;
    margin: 1.5rem 0;
}

.footer-text {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .tech-categories {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .social-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
}

@media (max-width: 640px) {
    .stats-dashboard {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }
    
    .stat-card {
        padding: 1.2rem 0.8rem;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }
    
    .tech-category {
        padding: 1rem;
    }
    
    .social-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 100%;
    }
    
    .social-link {
        padding: 1rem 0.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0.8rem 3%;
    }

    .hero {
        padding: 5rem 3% 2rem; /* Aumentado de 3rem a 5rem para que no tape el navbar */
        min-height: 100vh;
    }
    
    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 4rem); /* Título más grande en móvil */
        margin-top: 1rem; /* Espacio adicional arriba */
    }

    section {
        padding: 2rem 3%;
    }

    .philosophy {
        padding: 1.2rem;
    }

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

    .robots-grid {
        grid-template-columns: 1fr;
    }

    .achievements-timeline::before {
        left: 20px;
    }

    .achievement-item {
        flex-direction: column !important;
        padding-left: 50px;
    }

    .achievement-item:nth-child(odd) .achievement-content,
    .achievement-item:nth-child(even) .achievement-content {
        margin: 0;
    }

    .achievement-icon {
        left: 20px;
        transform: translateX(0);
    }

    .stats-dashboard {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 100%;
    }
}

/* Hidden Calculadora Link (solo para admin) */
.admin-link {
    position: fixed;
    bottom: 20px;
    right: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.admin-link:hover {
    opacity: 0.3;
}
/* ================================
   Ajustes para mejorar visualización
   de las tarjetas del equipo
   ================================ */

/* Forzar que las tarjetas del grid tengan alturas consistentes */
.team-grid {
    align-items: stretch; /* estira filas para que las tarjetas compartan altura */
    grid-auto-rows: 1fr; /* asegura filas de igual altura dentro del grid */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* columnas más anchas en escritorio */
}

.member-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* empuja las estadísticas al final */
    min-height: 420px; /* evita compresión cuando la bio es larga */
}

/* La bio puede crecer y empujar el footer de la tarjeta hacia abajo */
.member-bio {
    flex: 1 1 auto;
    margin-bottom: 1rem;
}

/* Evitar quiebres en números/etiquetas y mostrar ellipsis si excede */
.member-stat-number,
.member-stat-label {
    white-space: nowrap;
    word-break: normal;
    hyphens: none;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-stat {
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Ajustes responsive */
@media (max-width: 768px) {
    .member-card {
        min-height: 360px;
        padding: 1.5rem 1rem;
    }
    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        grid-auto-rows: auto;
    }
    .member-stat {
        min-width: 0;
    }
    .member-avatar {
        width: 100px;
        height: 100px;
    }
}

