:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    --secondary: #f59e0b;
    --accent: #10b981;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --border: #374151;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

[data-theme="dark"] header {
    background: rgba(17, 24, 39, 0.95);
}

header.scrolled {
    padding: 1rem 2rem;
    box-shadow: var(--shadow-lg);
}

.company-name {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.navbar {
    display: flex;
    gap: 0.5rem;
}

.navbar a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    cursor: pointer;
}

.navbar a:hover,
.navbar a.active {
    color: var(--text-primary);
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.theme-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Scroll Progress */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    z-index: 1001;
    transform-origin: left;
}

/* Sections */
section {
    position: relative;
    overflow: hidden;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(245, 158, 11, 0.1) 100%);
}

.hero-background {
    position: absolute;
    inset: 0;
    background-image: url('/img/Fondo_landing_JEMI.webp');
    /* Reemplaza con tu imagen */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

[data-theme="dark"] .hero-background {
    opacity: 0.08;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--bg-primary) 0%, transparent 50%, var(--bg-primary) 100%);
    z-index: 1;
}

.hero-content {
    text-align: center;
    max-width: 1000px;
    padding: 0 2rem;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.6;
}

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

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    cursor: pointer;
}

.hero-cta:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.4);
}

.hero-cta-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.hero-cta-secondary:hover {
    background: var(--primary);
    color: white;
}

/* JEMI Gym Manager Section */
.gym-section {
    padding: 8rem 2rem;
    background: var(--bg-primary);
    position: relative;
}

.gym-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.gym-content {
    position: relative;
}

.gym-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gym-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.gym-title .highlight {
    background: linear-gradient(135deg, var(--accent), #059669);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gym-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.gym-features {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
    border-color: var(--accent);
}

.feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent), #059669);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.feature-text h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-text p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.gym-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent), #059669);
    color: white;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    font-size: 1.05rem;
}

.gym-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(16, 185, 129, 0.4);
}

.gym-image-wrapper {
    position: relative;
    perspective: 1000px;
}

.gym-image-container {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3);
    transform: rotate(-3deg);
    transition: all 0.5s ease;
}

.gym-image-container:hover {
    transform: rotate(0deg) scale(1.02);
}

.gym-image-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.2));
    z-index: 1;
    transition: opacity 0.3s ease;
}

.gym-image-container:hover::before {
    opacity: 0;
}

.gym-image {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
}

.gym-image-badge {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    backdrop-filter: blur(10px);
}

.gym-image-badge-title {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.gym-image-badge-value {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), #059669);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Services Section */
.services-section {
    padding: 8rem 2rem;
    background: var(--bg-secondary);
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    line-height: 1.6;
}

.services-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 3rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

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

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: all 0.4s ease;
    font-size: 2.5rem;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-5deg);
}

.service-card h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.service-card p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.service-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.service-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Contact Section */
.contact-section {
    padding: 8rem 2rem;
    background: var(--bg-primary);
    position: relative;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.contact-info {
    position: relative;
}

.contact-info h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.contact-info p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.7;
}

.contact-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.benefit-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.contact-form {
    background: var(--bg-secondary);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem 1.5rem;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form button {
    width: 100%;
    background: var(--primary);
    color: white;
    padding: 1.2rem 2.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    box-shadow: var(--shadow);
}

.contact-form button svg {
    width: 22px;
    height: 22px;
}

.contact-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
}

.footer-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media screen and (max-width: 968px) {

    .gym-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .gym-image-wrapper {
        order: -1;
    }

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

@media screen and (max-width: 768px) {
    header {
        padding: 1rem 1.5rem;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-right {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        padding: 6rem 2rem 2rem;
        gap: 1rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav-right.active {
        right: 0;
    }

    .navbar {
        flex-direction: column;
        width: 100%;
    }

    .navbar a {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    section {
        padding: 4rem 1.5rem !important;
    }

    .hero-cta-group {
        flex-direction: column;
    }

    .hero-cta {
        width: 100%;
        justify-content: center;
    }

    .gym-image-container {
        transform: rotate(0deg);
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}