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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #1f2937;
    font-weight: 800;
    font-size: 1.5rem;
}

.nav-logo i {
    color: #3b82f6;
    margin-right: 8px;
    font-size: 1.8rem;
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #4b5563;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link:hover,
.nav-link.active {
    color: #3b82f6;
}

.dropdown {
    position: relative;
}


/* Desktop Dropdown Styles */
.dropdown-content {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    display: block; /* Ensure it's always block */
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-content a {
    display: block;
    padding: 12px 20px;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background: #f3f4f6;
    color: #3b82f6;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #4b5563;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: rgb(243, 147, 223);
    overflow: hidden;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(45deg, #ffffff, #e0e7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.btn {
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-outline:hover {
    background: #3b82f6;
    color: white;
}

.hero-stats {
    display: flex;
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-placeholder {
    width: 400px;
    height: 400px;
    background: rgba(165, 81, 218, 0.763);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-image-placeholder i {
    font-size: 9rem;
    color: rgba(244, 137, 225, 0.7);
}

/* Features Section */
.features {
    padding: 100px 0;
    background: #f8fafc;
}

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

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.feature-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.feature-link:hover {
    color: #1d4ed8;
    transform: translateX(5px);
}

/* Popular Workouts Section */
.popular-workouts {
    padding: 100px 0;
}

.workout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.workout-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.workout-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.workout-image {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #667eea, #764ba2);
}

.workout-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.workout-image-placeholder i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.8);
}

.workout-duration {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.workout-content {
    padding: 1.5rem;
}

.workout-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.workout-content p {
    color: #6b7280;
    margin-bottom: 1rem;
}

.workout-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.workout-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.workout-meta i {
    color: #f59e0b;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, #1f2937, #374151);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-logo i {
    color: #3b82f6;
    margin-right: 8px;
}

.footer-section p {
    color: #9ca3af;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #3b82f6;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

.footer-bottom a {
    color: #3b82f6;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }


    .dropdown-content {
        transition: max-height 0.3s ease, opacity 0.2s ease;
        will-change: max-height, opacity;
    }
    
    .dropdown .fa-chevron-down {
        transition: transform 0.3s ease;
    }
    
    .dropdown.dropdown-active .fa-chevron-down {
        transform: rotate(180deg);
    }
    
    .dropdown-content a {
        transition: background-color 0.2s ease, color 0.2s ease;
    }

        .dropdown-content {
        position: static;
        background: #f8fafc;
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        display: none;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
    }

    .dropdown.dropdown-active .dropdown-content {
        display: block;
        max-height: none;
        overflow: visible;
    }

    .dropdown-content a {
        padding: 12px 30px;
        border-bottom: 1px solid #e5e7eb;
    }

    .dropdown-content a:last-child {
        border-bottom: none;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

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

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-image-placeholder {
        width: 300px;
        height: 300px;
    }

    .features-grid,
    .workout-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 60px;
    }

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

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .feature-card,
    .workout-content {
        padding: 1.5rem;
    }

    .features,
    .popular-workouts {
        padding: 60px 0;
    }

    .cta {
        padding: 60px 0;
    }

    .cta-content h2 {
        font-size: 2rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}



/* Featured Video Section */
.featured-video {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.featured-video iframe {
    width: 100%;
    height: 400px;
    border: none;
    display: block;
}

/* Category Videos Grid */
.category-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.video-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-item iframe {
    width: 100%;
    height: 250px;
    border: none;
    display: block;
}

.video-item .lazy-iframe-container {
    height: 250px;
    width: 100%;
}

.video-item h4 {
    padding: 1rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    text-align: center;
}

/* Performance Optimizations */

/* Lazy iframe container styles */
.lazy-iframe-container {
    position: relative;
    background: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
    height: 400px; /* Default height for desktop */
    width: 100%;
}

.lazy-iframe-container:hover {
    transform: scale(1.02);
}

.lazy-iframe-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    z-index: 2;
}

.lazy-iframe-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
}

.lazy-iframe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    display: none;
    z-index: 3;
}

/* Optimize images for better performance */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Reduce layout shifts */
.hero-image-placeholder,
.workout-image-placeholder,
.visual-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 12px;
    min-height: 200px;
}

/* Optimize animations for better performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Critical CSS for above-the-fold content */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-top: 70px;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Button optimizations */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    will-change: transform;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #007bff;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .lazy-iframe-container {
        height: 250px !important;
    }
}

/* Preload spinner for better UX */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Optimize font loading */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/inter/v12/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuLyfAZ9hiA.woff2') format('woff2');
}

/* Reduce paint complexity */
.feature-card,
.workout-card,
.category-card {
    will-change: transform;
    backface-visibility: hidden;
}

/* Optimize scrolling performance */
.navbar,
.hero {
    will-change: transform;
}

/* Reduce reflows and repaints */
.nav-menu.active {
    transform: translateX(0);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}


/* Enhanced Mobile Navigation Styles */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 15px;
        height: 60px;
    }
    
    .nav-logo a {
        font-size: 1.3rem;
    }
    
    .nav-logo i {
        font-size: 1.5rem;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-list {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .nav-link {
        padding: 15px 20px;
        width: 100%;
        justify-content: space-between;
        font-size: 1.1rem;
        color: #1f2937;
        border: none;
        background: none;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: #f3f4f6;
        color: #3b82f6;
    }
    
    .nav-link.dropdown-open {
        background: #f3f4f6;
        color: #3b82f6;
    }
    
    .dropdown {
        position: static;
    }
    
    .dropdown-content {
        position: static;
        background: #f8fafc;
        margin-top: 0;
        box-shadow: none;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        max-height: none;
        overflow: visible;
    }
    
    .dropdown.dropdown-active .dropdown-content {
        display: block !important;
        visibility: visible !important;
        margin-top: 1rem;
    }
    
    .dropdown-content a {
        padding: 12px 40px;
        font-size: 1rem;
        color: #6b7280;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .dropdown-content a:last-child {
        border-bottom: none;
    }
    
    .dropdown-content a:hover {
        background: #e5e7eb;
        color: #3b82f6;
    }
    
    .nav-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Enhanced Mobile Hero Section */
@media (max-width: 768px) {
    .hero {
        padding: 80px 0 60px;
        min-height: auto;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 15px;
    }
    
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
        line-height: 1.5;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    .hero-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .stat {
        text-align: center;
    }
    
    .stat-number {
        font-size: 1.5rem;
        display: block;
        margin-bottom: 0.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: 1rem;
    }
    
    .hero-image-placeholder {
        min-height: 200px;
        max-height: 250px;
    }
}

/* Enhanced Mobile Features Section */
@media (max-width: 768px) {
    .features {
        padding: 60px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }
    
    .feature-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .feature-icon {
        margin-bottom: 1rem;
    }
    
    .feature-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .feature-card p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
}

/* Enhanced Mobile Workout Cards */
@media (max-width: 768px) {
    .workout-grid,
    .categories-grid,
    .routines-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 15px;
    }
    
    .workout-card,
    .category-card,
    .routine-card {
        margin-bottom: 1rem;
    }
    
    .workout-image,
    .lazy-iframe-container {
        height: 200px !important;
        margin-bottom: 1rem;
    }
    
    .workout-content {
        padding: 1rem;
    }
    
    .workout-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .category-videos {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .video-item {
        margin-bottom: 1rem;
    }
    
    .video-item iframe,
    .video-item .lazy-iframe-container {
        height: 200px !important;
    }
}

/* Enhanced Mobile Forms */
@media (max-width: 768px) {
    .calculator-container,
    .form-container {
        margin: 1rem 15px;
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .input-group {
        margin-bottom: 1rem;
    }
    
    .input-group label {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .input-group input,
    .input-group select {
        padding: 0.75rem;
        font-size: 1rem;
        border-radius: 6px;
    }
    
    .calculate-btn,
    .btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
        margin-top: 1rem;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .result-card {
        padding: 1rem;
        text-align: center;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
}

/* Enhanced Mobile Tables and Lists */
@media (max-width: 768px) {
    .exercise-list,
    .routine-exercises {
        padding: 0 15px;
    }
    
    .exercise-list ul,
    .routine-exercises ul {
        padding-left: 1rem;
    }
    
    .exercise-list li,
    .routine-exercises li {
        margin-bottom: 0.5rem;
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .tips-section {
        margin: 1rem 15px;
        padding: 1rem;
    }
    
    .tips-section h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .tips-section li {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 0.5rem;
    }
}

/* Enhanced Mobile Footer */
@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 15px;
    }
    
    .footer-section {
        margin-bottom: 1.5rem;
    }
    
    .footer-section h3 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    .footer-section ul {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .footer-section a {
        font-size: 0.95rem;
        padding: 0.25rem 0;
    }
    
    .footer-bottom {
        margin-top: 2rem;
        padding-top: 1rem;
        text-align: center;
    }
}

/* Enhanced Mobile Page Headers */
@media (max-width: 768px) {
    .page-header {
        padding: 100px 0 40px;
        text-align: center;
    }
    
    .page-header-content {
        padding: 0 15px;
    }
    
    .page-header h1 {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .page-header p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .breadcrumb {
        font-size: 0.9rem;
        justify-content: center;
    }
}

/* Enhanced Mobile Sections */
@media (max-width: 768px) {
    .section-header {
        text-align: center;
        margin-bottom: 2rem;
        padding: 0 15px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .section-header p {
        font-size: 1rem;
        line-height: 1.5;
    }
    
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 40px 0;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    .btn,
    .nav-link,
    .dropdown-content a,
    .feature-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }
    
    .lazy-iframe-container {
        touch-action: manipulation;
        cursor: pointer;
    }
    
    .lazy-iframe-play-button {
        pointer-events: none;
    }
}

/* Improved scrolling performance on mobile */
@media (max-width: 768px) {
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Enhanced mobile typography */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.6;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    h4 {
        font-size: 1.25rem;
        line-height: 1.4;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
}

/* Mobile-specific animations */
@media (max-width: 768px) {
    .feature-card,
    .workout-card,
    .category-card {
        transition: transform 0.2s ease;
    }
    
    .feature-card:active,
    .workout-card:active,
    .category-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.95);
    }
}

/* Accessibility improvements for mobile */
@media (max-width: 768px) {
    .nav-link:focus,
    .btn:focus,
    input:focus,
    select:focus {
        outline: 2px solid #3b82f6;
        outline-offset: 2px;
    }
    
    .dropdown-content a:focus {
        background: #e5e7eb;
        color: #3b82f6;
        outline: none;
    }
}

/* Mobile landscape optimizations */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 60px 0 40px;
    }
    
    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-image {
        order: 2;
    }
    
    .nav-menu {
        height: calc(100vh - 60px);
    }
}

/* Very small screens (320px and below) */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .feature-card,
    .workout-card {
        padding: 1rem;
    }
    
    .calculator-container {
        margin: 1rem 10px;
        padding: 1rem;
    }
}

