/*
Theme Name: Fitness9
Theme URI: https://fitness9.in
Author: Fitness9 Team
Author URI: https://fitness9.in
Description: A modern, fully animated WordPress theme for Fitness9 Gym. Features Gutenberg block support, custom blocks for programs/trainers/testimonials, full customizer options, and all the animations from the original design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fitness9
Tags: gym, fitness, sports, health, gutenberg, block-editor, custom-colors, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ===========================
   CSS VARIABLES
   =========================== */
:root {
    --primary-red: #E31837;
    --dark-red: #B71C1C;
    --light-red: #FF5252;
    --black: #000000;
    --dark-gray: #111111;
    --light-gray: #f5f5f5;
    --text-gray: #666666;
    --white: #ffffff;
    
    --font-primary: 'Poppins', sans-serif;
    
    --transition-speed: 0.3s;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 15px 40px rgba(227, 24, 55, 0.3);
}

/* ===========================
   RESET & BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-gray);
    background: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-speed) ease;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--black);
    line-height: 1.2;
}

ul {
    list-style: none;
}

/* ===========================
   SCROLL PROGRESS BAR
   =========================== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--light-red));
    z-index: 10000;
    transition: width 0.1s ease;
}

/* ===========================
   PRELOADER
   =========================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.preloader-circle {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(227, 24, 55, 0.2);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

.preloader-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 3px;
}

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

/* ===========================
   NAVIGATION
   =========================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.95);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: 2px;
}

.logo span {
    color: var(--primary-red);
}

.nav-links {
    display: flex;
    gap: 35px;
    align-items: center;
}

.nav-links li a {
    color: var(--white);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-red);
    transition: width 0.3s ease;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--black);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('img/hero-bg.jpg') center/cover no-repeat;
    opacity: 0.4;
}

.hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(227, 24, 55, 0.3), rgba(0, 0, 0, 0.7));
}

.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 50%;
    opacity: 0.5;
    animation: float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 1s; }
.particle:nth-child(5) { left: 50%; animation-delay: 3s; }
.particle:nth-child(6) { left: 60%; animation-delay: 5s; }
.particle:nth-child(7) { left: 70%; animation-delay: 2.5s; }
.particle:nth-child(8) { left: 80%; animation-delay: 4.5s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1.5s; }
.particle:nth-child(10) { left: 95%; animation-delay: 3.5s; }

@keyframes float {
    0%, 100% { transform: translateY(100vh) scale(0); }
    50% { transform: translateY(-100vh) scale(1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    color: var(--primary-red);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.1;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.hero-title span {
    color: var(--primary-red);
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
    animation: fadeInUp 1s ease 0.6s backwards;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s backwards;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 10px;
    background: var(--primary-red);
    border-radius: 3px;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0%, 20% { transform: translate(-50%, 0); opacity: 0; }
    50% { opacity: 1; }
    80%, 100% { transform: translate(-50%, 20px); opacity: 0; }
}

/* ===========================
   BUTTONS
   =========================== */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(227, 24, 55, 0.3);
}

.btn-primary:hover {
    background: var(--dark-red);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(227, 24, 55, 0.4);
}

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

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
}

.btn-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 5px 15px rgba(227, 24, 55, 0.3); }
    50% { box-shadow: 0 5px 25px rgba(227, 24, 55, 0.6); }
}

/* ===========================
   SECTIONS
   =========================== */
.section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.section-dark {
    background: var(--dark-gray);
}

.section-light {
    background: var(--light-gray);
}

.section-red {
    background: var(--primary-red);
}

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

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary-red);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 8px 20px;
    background: rgba(227, 24, 55, 0.1);
    border-radius: 20px;
    margin-bottom: 15px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
}

.section-title span {
    color: var(--primary-red);
}

.section-dark .section-title,
.section-red .section-title {
    color: var(--white);
}

.section-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
    margin: 0 auto;
}

/* ===========================
   ABOUT SECTION
   =========================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
}

.experience-badge {
    position: absolute;
    bottom: 30px;
    right: 30px;
    background: var(--primary-red);
    color: var(--white);
    padding: 30px;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(227, 24, 55, 0.5);
}

.experience-badge .number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.about-content p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin: 30px 0;
}

.about-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.9);
}

.about-feature i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

/* ===========================
   STATS SECTION
   =========================== */
.stats {
    background: var(--primary-red);
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.stat-item {
    text-align: center;
    color: var(--white);
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ===========================
   SERVICES/PROGRAMS SECTION
   =========================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px 30px;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-red);
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-red), var(--dark-red));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: rotateY(360deg);
}

.service-card h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-card p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

/* ===========================
   TESTIMONIALS
   =========================== */
.testimonials-slider {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.testimonial-item {
    display: none;
    text-align: center;
    padding: 40px;
}

.testimonial-item.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.testimonial-text {
    font-size: 1.3rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    line-height: 1.8;
}

.testimonial-author-info h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.testimonial-author-info span {
    color: var(--primary-red);
    font-size: 0.95rem;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background: var(--primary-red);
    width: 30px;
    border-radius: 6px;
}

/* ===========================
   FOOTER
   =========================== */
.footer {
    background: var(--black);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about .logo {
    margin-bottom: 20px;
}

.footer-about p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: var(--primary-red);
    transform: translateY(-3px);
}

.footer h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.footer-contact i {
    color: var(--primary-red);
    margin-top: 3px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

/* ===========================
   ANIMATIONS
   =========================== */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

.animate-left {
    transform: translateX(-50px);
}

.animate-right {
    transform: translateX(50px);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* ===========================
   WORDPRESS SPECIFIC STYLES
   =========================== */
.wp-block-image img {
    border-radius: 10px;
}

.alignleft {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
}

.alignright {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.9rem;
    font-style: italic;
    color: var(--text-gray);
    margin-top: 10px;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 992px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: var(--black);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 3rem;
    }
}
