/* ===================================
   FULLSCREEN CODE SOLUTIONS - STYLES
   =================================== */

/* CSS Variables - Brand Color Palette */
:root {
    --primary-cyan: #00D9FF;
    --dark-cyan: #00A8CC;
    --deep-black: #000000;
    --dark-gray: #1A1A1A;
    --medium-gray: #333333;
    --light-gray: #CCCCCC;
    --white: #FFFFFF;
    --gradient-primary: linear-gradient(135deg, var(--primary-cyan), var(--dark-cyan));
    --gradient-dark: linear-gradient(180deg, var(--deep-black), var(--dark-gray));
    --shadow-glow: 0 0 20px rgba(0, 217, 255, 0.3);
    --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--deep-black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* P5.js Background Canvas */
#p5-background {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 0 !important;
    pointer-events: none !important;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

/* ===================================
   NAVIGATION
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.98);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.1);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    filter: drop-shadow(var(--shadow-glow));
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-cyan);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    padding: 0.4rem 0.8rem;
    background: var(--medium-gray);
    color: var(--white);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
}

.lang-btn:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: var(--gradient-primary);
    color: var(--deep-black);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    z-index: 1002;
    margin-right: 1.5rem;
}

.nav-actions {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
}

.btn-login {
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(0, 217, 255, 0.2);
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-login::before {
    content: '👤';
    font-size: 1.2rem;
}

.btn-login:hover {
    background: rgba(0, 217, 255, 0.3);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-text {
    color: var(--primary-cyan);
    font-size: 0.75rem;
    display: none;
}

.user-dropdown {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    width: 40px;
    height: 40px;
    padding: 0;
    background: rgba(0, 217, 255, 0.2);
    color: var(--primary-cyan);
    border: 2px solid var(--primary-cyan);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.7rem;
}

.user-menu-btn span {
    display: none;
}

.user-menu-btn::before {
    content: '👤';
    font-size: 1.2rem;
}

.user-menu-btn svg {
    display: none;
}

.user-menu-btn:hover {
    background: rgba(0, 217, 255, 0.3);
    transform: scale(1.1);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid var(--primary-cyan);
    border-radius: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
    z-index: 1001;
}

.user-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
}

.user-dropdown-menu a:last-child {
    border-bottom: none;
}

.user-dropdown-menu a:hover {
    background: rgba(0, 217, 255, 0.1);
    color: var(--primary-cyan);
}

.user-dropdown-menu svg {
    flex-shrink: 0;
}

.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(--primary-cyan);
    transition: var(--transition);
}

/* ===================================
   HERO SECTION
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    z-index: 3;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.highlight {
    color: var(--primary-cyan);
    text-shadow: var(--shadow-glow);
}

.glitch {
    position: relative;
    display: inline-block;
}

.glitch:hover {
    animation: glitch 0.3s ease-in-out;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--light-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--deep-black);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-cyan);
    border-color: var(--primary-cyan);
}

.btn-secondary:hover {
    background: var(--primary-cyan);
    color: var(--deep-black);
    transform: translateY(-3px);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-logo {
    animation: float 6s ease-in-out infinite;
}

.floating-logo img {
    width: 100%;
    max-width: 400px;
    filter: drop-shadow(var(--shadow-glow));
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--primary-cyan);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary-cyan);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { top: 10px; opacity: 1; }
    100% { top: 30px; opacity: 0; }
}

/* ===================================
   SECTIONS
   =================================== */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--light-gray);
    font-size: 1.2rem;
    margin-bottom: 4rem;
}

/* ===================================
   SERVICES SECTION
   =================================== */
.services {
    background: rgba(26, 26, 26, 0.95);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--medium-gray);
    padding: 2rem;
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-card);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    color: var(--primary-cyan);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.service-card p {
    color: var(--light-gray);
    line-height: 1.8;
}

/* ===================================
   PROJECTS SECTION
   =================================== */
.projects {
    background: rgba(0, 0, 0, 0.8);
}

/* Filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
    margin-bottom: 2rem;
    padding: 0;
    max-width: 100%;
}

.filter-btn {
    padding: 0.4rem 0.9rem;
    background: var(--medium-gray);
    color: var(--white);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    font-weight: 500;
}

.filter-btn:hover {
    border-color: var(--primary-cyan);
    color: var(--primary-cyan);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--gradient-primary);
    color: var(--deep-black);
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.gallery-btn {
    width: 40px;
    height: 40px;
    background: var(--medium-gray);
    border: 1px solid var(--primary-cyan);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--primary-cyan);
}

.gallery-btn svg {
    width: 20px;
    height: 20px;
}

.gallery-btn:hover {
    background: var(--primary-cyan);
    color: var(--deep-black);
    transform: scale(1.1);
    box-shadow: var(--shadow-glow);
}

.gallery-info {
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 600;
    min-width: 60px;
    text-align: center;
}

.autoplay-btn {
    position: relative;
}

.autoplay-btn.active {
    background: var(--primary-cyan);
    color: var(--deep-black);
}

/* Selected Project Display */
.selected-project {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 4rem;
    border: 1px solid rgba(51, 51, 51, 0.5);
    box-shadow: var(--shadow-card);
    position: relative;
}

.project-media {
    width: 100%;
    min-height: 400px;
    background: rgba(51, 51, 51, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animaciones para el slideshow */
@keyframes projectSlideIn {
    0% {
        opacity: 0;
        transform: translateX(50px) scale(0.95);
        filter: blur(5px);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
        filter: blur(0);
    }
}

@keyframes projectFadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.project-media.transitioning {
    animation: projectFadeIn 0.5s ease-in-out;
}

.project-media.transitioning img,
.project-media.transitioning iframe {
    animation: projectSlideIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-media img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.project-media img:hover {
    transform: scale(1.02);
    filter: brightness(1.1);
}

.project-media iframe {
    width: 100%;
    height: 500px;
    border: none;
}

.instagram-embed-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    padding: 1rem;
}

.instagram-media {
    margin: 0 auto !important;
}

.project-details {
    padding: 2rem;
    position: relative;
}

.project-details.transitioning h3 {
    animation: slideInFromBottom 0.5s ease 0.1s both;
}

.project-details.transitioning .project-tags {
    animation: slideInFromBottom 0.5s ease 0.2s both;
}

.project-details.transitioning p {
    animation: slideInFromBottom 0.5s ease 0.3s both;
}

.project-details.transitioning .project-links {
    animation: slideInFromBottom 0.5s ease 0.4s both;
}

@keyframes slideInFromBottom {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-details h3 {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.3);
    transition: text-shadow 0.3s ease;
}

.project-details h3:hover {
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.6);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.project-tag {
    padding: 0.4rem 0.8rem;
    background: var(--medium-gray);
    color: var(--primary-cyan);
    border-radius: 15px;
    font-size: 0.85rem;
    border: 1px solid var(--primary-cyan);
}

.project-details p {
    color: var(--light-gray);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.project-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-links a {
    padding: 0.8rem 1.5rem;
    background: var(--gradient-primary);
    color: var(--deep-black);
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
}

.project-links a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

/* Projects Grid - Horizontal Carousel */
.projects-grid {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1rem 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.projects-grid::-webkit-scrollbar {
    height: 8px;
}

.projects-grid::-webkit-scrollbar-track {
    background: var(--medium-gray);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-thumb {
    background: var(--primary-cyan);
    border-radius: 10px;
}

.projects-grid::-webkit-scrollbar-thumb:hover {
    background: var(--dark-cyan);
}

.project-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    width: 200px;
    height: 200px;
    min-width: 200px;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.project-card.selected {
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
}

.project-card.hidden {
    display: none;
}

.project-image {
    width: 100%;
    height: 100%;
    background: var(--gradient-dark);
    position: relative;
    transition: var(--transition);
    background-size: cover;
    background-position: center;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 217, 255, 0.15) 0%, rgba(0, 168, 204, 0.05) 100%);
    transition: var(--transition);
    z-index: 1;
}

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition);
    text-align: center;
    z-index: 2;
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-card:hover .project-image::before {
    opacity: 0.3;
}

.project-overlay h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-cyan);
}

.project-overlay p {
    color: var(--light-gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-link {
    color: var(--primary-cyan);
    text-decoration: none;
    border: 2px solid var(--primary-cyan);
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.project-link:hover {
    background: var(--primary-cyan);
    color: var(--deep-black);
}

/* ===================================
   ABOUT SECTION
   =================================== */
.about {
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    color: var(--light-gray);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--light-gray);
    font-size: 0.9rem;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 0.5rem;
    justify-items: center;
    max-width: 400px;
    margin: 0 auto;
}

.tech-item {
    background: rgba(51, 51, 51, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    border: 1px solid transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    width: 120px;
    margin: 0 auto;
    position: relative;
    cursor: pointer;
}

.tech-item img {
    max-width: 70px;
    max-height: 70px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tech-item:hover {
    border-color: var(--primary-cyan);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.4);
}

/* Tooltip para tecnologías */
.tech-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 15px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: rgba(0, 217, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: var(--deep-black);
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    max-width: 250px;
    white-space: normal;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.6),
                0 5px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 217, 255, 1);
    font-weight: 600;
    line-height: 1.4;
}

.tech-item::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 5px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 8px solid transparent;
    border-top-color: rgba(0, 217, 255, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.tech-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.tech-item:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Team Section - Mortal Kombat Style */
.team-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.team-member-card {
    position: relative;
    width: 150px;
    height: 150px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid var(--medium-gray);
    transition: var(--transition);
    background: var(--medium-gray);
}

.team-member-card:hover {
    border-color: var(--primary-cyan);
    transform: scale(1.05);
    box-shadow: var(--shadow-glow);
}

.team-member-card.active {
    border-color: var(--primary-cyan);
    box-shadow: var(--shadow-glow);
}

.team-member-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-member-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    padding: 1rem 0.5rem 0.5rem;
    transform: translateY(100%);
    transition: var(--transition);
}

.team-member-card:hover .team-member-info {
    transform: translateY(0);
}

.team-member-info h4 {
    font-size: 0.9rem;
    color: var(--primary-cyan);
    margin-bottom: 0.2rem;
}

.team-member-info p {
    font-size: 0.7rem;
    color: var(--light-gray);
}

.team-member-display {
    background: var(--medium-gray);
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid var(--primary-cyan);
    box-shadow: var(--shadow-card);
}

.team-member-large {
    width: 100%;
    max-width: 400px;
    height: auto;
    max-height: 500px;
    margin: 0 auto;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

.team-member-large img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    object-position: center;
    display: block;
    will-change: transform, filter, opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

.team-member-large::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0, 217, 255, 0.1) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
    pointer-events: none;
}

/* Animación de entrada para la imagen del equipo */
@keyframes teamMemberEntrance {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-15deg) translateZ(0);
        filter: blur(10px) brightness(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.08) rotate(3deg) translateZ(0);
        filter: blur(1px) brightness(1.3);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg) translateZ(0);
        filter: blur(0) brightness(1);
    }
}

@keyframes neonPulse {
    0% {
        box-shadow: 0 0 20px rgba(0, 217, 255, 0.4),
                    0 0 40px rgba(0, 217, 255, 0.3),
                    0 0 60px rgba(0, 217, 255, 0.2),
                    inset 0 0 15px rgba(0, 217, 255, 0.2);
    }
    25% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.8),
                    0 0 80px rgba(0, 217, 255, 0.6),
                    0 0 120px rgba(0, 217, 255, 0.4),
                    0 0 160px rgba(0, 217, 255, 0.2),
                    inset 0 0 30px rgba(0, 217, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 60px rgba(0, 217, 255, 1),
                    0 0 100px rgba(0, 217, 255, 0.8),
                    0 0 140px rgba(0, 217, 255, 0.6),
                    0 0 180px rgba(0, 217, 255, 0.4),
                    0 0 220px rgba(0, 217, 255, 0.2),
                    inset 0 0 40px rgba(0, 217, 255, 0.4);
    }
    75% {
        box-shadow: 0 0 40px rgba(0, 217, 255, 0.8),
                    0 0 80px rgba(0, 217, 255, 0.6),
                    0 0 120px rgba(0, 217, 255, 0.4),
                    0 0 160px rgba(0, 217, 255, 0.2),
                    inset 0 0 30px rgba(0, 217, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 30px rgba(0, 217, 255, 0.5),
                    0 0 60px rgba(0, 217, 255, 0.3),
                    0 0 90px rgba(0, 217, 255, 0.2),
                    inset 0 0 20px rgba(0, 217, 255, 0.2);
    }
}

@keyframes neonBorder {
    0% {
        border-color: rgba(0, 217, 255, 0.3);
        filter: drop-shadow(0 0 5px rgba(0, 217, 255, 0.5));
    }
    25% {
        border-color: rgba(0, 217, 255, 0.8);
        filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.8));
    }
    50% {
        border-color: rgba(0, 217, 255, 1);
        filter: drop-shadow(0 0 25px rgba(0, 217, 255, 1)) drop-shadow(0 0 50px rgba(0, 217, 255, 0.6));
    }
    75% {
        border-color: rgba(0, 217, 255, 0.8);
        filter: drop-shadow(0 0 15px rgba(0, 217, 255, 0.8));
    }
    100% {
        border-color: rgba(0, 217, 255, 0.5);
        filter: drop-shadow(0 0 8px rgba(0, 217, 255, 0.6));
    }
}

.team-member-large.animating {
    animation: neonPulse 1.5s ease-in-out;
    border: 2px solid rgba(0, 217, 255, 0.5);
}

.team-member-large.animating::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 10px;
    border: 2px solid transparent;
    animation: neonBorder 1.5s ease-in-out;
    z-index: 2;
    pointer-events: none;
}

.team-member-large.animating img {
    animation: teamMemberEntrance 1.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.team-member-details {
    padding: 2rem;
}

.team-member-details h3 {
    font-size: 2rem;
    color: var(--primary-cyan);
    margin-bottom: 0.5rem;
    transition: all 0.4s ease;
}

.team-member-details h4 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 1.5rem;
    font-weight: 500;
    transition: all 0.4s ease 0.1s;
}

.team-member-details p {
    transition: all 0.4s ease 0.2s;
}

/* Animación de texto */
@keyframes textFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.team-member-details.animating h3 {
    animation: textFadeIn 0.5s ease 0.3s both;
}

.team-member-details.animating h4 {
    animation: textFadeIn 0.5s ease 0.5s both;
}

.team-member-details.animating p {
    animation: textFadeIn 0.5s ease 0.7s both;
}

.team-member-details p {
    color: var(--light-gray);
    line-height: 1.8;
    font-size: 1rem;
}

/* ===================================
   CONTACT SECTION
   =================================== */
.contact {
    background: rgba(0, 0, 0, 0.8);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    color: var(--primary-cyan);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.contact-item p {
    color: var(--light-gray);
}

.contact-form {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid rgba(51, 51, 51, 0.5);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: var(--medium-gray);
    border: 1px solid transparent;
    border-radius: 5px;
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    width: 100%;
}

/* ===================================
   WHATSAPP BUTTON
   =================================== */
.whatsapp-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 9999;
    transition: var(--transition);
    text-decoration: none;
    color: white;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
}

.whatsapp-button svg {
    width: 40px;
    height: 40px;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    background: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem 0 1rem;
    border-top: 1px solid rgba(51, 51, 51, 0.5);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 1rem;
}

.footer-logo p {
    color: var(--light-gray);
}

.footer-links h4,
.footer-social h4 {
    color: var(--primary-cyan);
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--light-gray);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-cyan);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--medium-gray);
    border-radius: 50%;
    color: var(--primary-cyan);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-cyan);
    color: var(--deep-black);
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--medium-gray);
    color: var(--light-gray);
}

/* ===================================
   ANIMATIONS
   =================================== */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
}

[data-aos="fade-up"] {
    transform: translateY(50px);
}

[data-aos="fade-up"].aos-animate {
    transform: translateY(0);
}

[data-aos="fade-right"] {
    transform: translateX(-50px);
}

[data-aos="fade-right"].aos-animate {
    transform: translateX(0);
}

[data-aos="fade-left"] {
    transform: translateX(50px);
}

[data-aos="fade-left"].aos-animate {
    transform: translateX(0);
}

[data-aos="zoom-in"] {
    transform: scale(0.8);
}

[data-aos="zoom-in"].aos-animate {
    transform: scale(1);
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 968px) {
    .nav-right {
        display: flex;
        align-items: center;
    }
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: rgba(0, 0, 0, 0.98);
        width: 100%;
        padding: 2rem;
        transition: var(--transition);
        border-top: 1px solid var(--primary-cyan);
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
        order: 2;
    }

    .auth-container {
        margin-right: 1rem;
        order: 1;
    }
    
    .nav-actions {
        display: flex;
        align-items: center;
    }

    .language-selector {
        justify-content: center;
        padding-top: 1rem;
        border-top: 1px solid rgba(0, 217, 255, 0.2);
        margin-top: 1rem;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .filters {
        gap: 0.5rem;
    }

    .filter-btn {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .gallery-controls {
        gap: 1rem;
    }

    .gallery-btn {
        width: 40px;
        height: 40px;
    }

    .project-media iframe {
        height: 350px;
    }

    .team-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        justify-items: center;
    }

    .team-member-card {
        width: 120px;
        height: 120px;
    }

    .team-member-large {
        height: 300px;
    }

    .whatsapp-button {
        width: 60px;
        height: 60px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-button svg {
        width: 35px;
        height: 35px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 38px;
    }
    
    .auth-container {
        margin-right: 0.5rem;
    }
    
    .nav-content {
        padding: 0.5rem 0;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .filters {
        gap: 0.4rem;
    }

    .filter-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .gallery-controls {
        gap: 0.5rem;
    }

    .gallery-btn {
        width: 35px;
        height: 35px;
    }

    .gallery-btn svg {
        width: 18px;
        height: 18px;
    }

    .gallery-info {
        font-size: 1rem;
        min-width: 60px;
    }

    .project-media iframe {
        height: 250px;
    }

    .project-details {
        padding: 1.5rem;
    }

    .project-details h3 {
        font-size: 1.5rem;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-member-card {
        width: 100px;
        height: 100px;
    }

    .team-member-large {
        height: 250px;
    }

    .team-member-details {
        padding: 1.5rem;
    }

    .team-member-details h3 {
        font-size: 1.5rem;
    }

    .team-member-details h4 {
        font-size: 1rem;
    }

    .team-member-details p {
        font-size: 0.9rem;
    }

    .whatsapp-button {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-button svg {
        width: 30px;
        height: 30px;
    }
}
