/* ================================
   BODYFIT GYM - Production Ready Styles
   ================================ */

:root {
    --primary-color: #e72a34;
    --dark-color: #010103;
    --light-color: #fff;
    --gray-light: #f8f9fa;
    --gray-dark: #6c757d;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Prevents content from hiding behind fixed navbar */
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

/* ================================
   NAVIGATION - Fixed with proper spacing
   ================================ */

.navbar {
    background: var(--light-color);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.navbar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    color: var(--dark-color) !important;
    letter-spacing: 1px;
}

.brand-highlight {
    color: var(--primary-color);
}

.nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 70%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ================================
   HERO SECTION - Fixed scroll issues
   ================================ */

.hero-section {
    min-height: 100vh;
    background: linear-gradient(rgba(1, 1, 3, 0.7), rgba(1, 1, 3, 0.7)),
                url('/placeholder.svg?height=1080&width=1920') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--light-color);
    padding-top: 90px; /* Compensate for fixed navbar */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(1, 1, 3, 0.3);
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 0;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-description {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.text-accent {
    color: var(--primary-color);
}

.hero-buttons .btn {
    padding: 1rem 2.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
}

.btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    color: var(--light-color);
}

.btn-primary:hover {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(231, 42, 52, 0.3);
}

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

.btn-outline-light:hover {
    background: var(--light-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--light-color);
    transform: translateY(-3px);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator a {
    color: var(--light-color);
    font-size: 2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ================================
   SECTIONS - Consistent spacing
   ================================ */

.section-padding {
    padding: 4rem 0;
    scroll-margin-top: 90px; /* Ensures sections aren't hidden behind navbar */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

/* ================================
   ABOUT SECTION
   ================================ */

.about-image-wrapper {
    position: relative;
}

.about-image-wrapper img {
    border-radius: 10px;
    width: 100%;
    height: auto;
}

.experience-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 1.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.experience-badge h3 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 900;
}

.experience-badge p {
    margin: 0;
    font-size: 1rem;
}

.about-features .feature-item {
    display: flex;
    align-items: start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.about-features .feature-item i {
    font-size: 2rem;
    margin-top: 0.3rem;
}

.about-features .feature-item h5 {
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.about-features .feature-item p {
    margin: 0;
    color: var(--gray-dark);
}

/* ================================
   SERVICES SECTION
   ================================ */

.service-card {
    background: var(--light-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    height: 100%;
    border: 2px solid transparent;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    transition: var(--transition);
}

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

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.service-card p {
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--gray-dark);
}

.service-features li i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* ================================
   GALLERY SECTION - Optimized uniform grid
   ================================ */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    aspect-ratio: 1 / 1; /* Perfect square ratio */
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Hover effects */
.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(231,42,52,0.25);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h4 {
    color: #fff;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.6);
}

/* ================================
   PRICING SECTION
   ================================ */

.pricing-card {
    background: var(--light-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    position: relative;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(231, 42, 52, 0.2);
}

.badge-popular {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: var(--light-color);
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
}

.pricing-header {
    text-align: center;
    margin-bottom: 2rem;
}

.pricing-header h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.price .currency {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.price .amount {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary-color);
}

.price .period {
    font-size: 1.2rem;
    color: var(--gray-dark);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
}

.pricing-features li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-features li i {
    margin-right: 0.5rem;
}

.pricing-features .fa-check {
    color: var(--primary-color);
}

.pricing-features .fa-times {
    color: #ccc;
}

/* ================================
   TESTIMONIALS SECTION
   ================================ */

.testimonial-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    height: 100%;
}

.testimonial-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stars {
    color: #ffc107;
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.testimonial-author h5 {
    margin: 0;
    font-size: 1.1rem;
}

.testimonial-author p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ================================
   BMI CALCULATOR SECTION
   ================================ */

.bmi-calculator-card {
    background: var(--light-color);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.bmi-result {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
}

.result-display h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.bmi-category {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.bmi-bar {
    height: 20px;
    background: linear-gradient(to right, #3498db, #2ecc71, #f39c12, #e74c3c);
    border-radius: 10px;
    position: relative;
    margin: 1rem 0;
}

.bmi-indicator {
    position: absolute;
    top: -5px;
    width: 4px;
    height: 30px;
    background: var(--dark-color);
    transition: left 0.5s ease;
}

.bmi-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--gray-dark);
    margin-top: 0.5rem;
}

.bmi-recommendation {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 1.5rem;
    text-align: left;
}

.bmi-recommendation h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ================================
   CONTACT SECTION
   ================================ */

.contact-info .info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.contact-info .info-item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0.3rem;
}

.contact-info .info-item h5 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-info .info-item p {
    margin: 0;
    color: var(--gray-dark);
}

.contact-info .info-item a {
    color: var(--primary-color);
}

.contact-info .info-item a:hover {
    text-decoration: underline;
}

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

.social-link {
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--dark-color);
    color: var(--light-color);
    transform: translateY(-5px);
}

.contact-form-wrapper {
    background: var(--light-color);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.form-control,
.form-select {
    padding: 0.8rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(231, 42, 52, 0.1);
}

.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* ================================
   FOOTER
   ================================ */

.footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 0 1rem;
}

.footer-title {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.footer-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.footer-links {
    list-style: none;
    padding: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-hours {
    list-style: none;
    padding: 0;
    color: rgba(255, 255, 255, 0.7);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 20px;
    font-size: 0.875rem;
    color: #888;
}

.copyright-text {
    margin-bottom: 0px !important;
}

.powered-by {
    margin: 10px 0 0;
    font-size: 0.8rem;
    opacity: 0.7;
}

.powered-by a {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
}

.powered-by a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ================================
   SCROLL TO TOP BUTTON
   ================================ */

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--dark-color);
    transform: translateY(-5px);
}

/* ================================
   PANATA BANNER – FIXED & PERFECTLY CENTERED
   ================================ */
.panata-banner {
    background: linear-gradient(135deg, #111 0%, #222 100%);
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 3rem 0;
}

.panata-banner .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 1.5rem;
}

.panata-banner p {
    margin: 0;
    opacity: 0.8;
    font-size: 1.1rem;
    font-weight: 300;
}

.panata-banner h3 {
    margin: 0;
    font-size: 2.8rem;
    font-weight: 900;
}

.panata-link {
    color: #fff !important;
    transition: all 0.4s ease;
    text-decoration: none !important;
}

.panata-link:hover {
    color: var(--primary-color) !important;
    text-shadow: 0 0 20px rgba(231,42,52,0.6);
}

.panata-logo {
    height: 70px;
    max-width: 280px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(255,255,255,0.3));
    transition: transform 0.4s ease;
}

.panata-logo:hover {
    transform: scale(1.08);
}

/* Mobile perfect centering */
@media (max-width: 768px) {
    .panata-banner {
        padding: 2.5rem 0;
    }
    .panata-banner h3 {
        font-size: 2.2rem;
    }
    .panata-logo {
        height: 55px;
    }
}

/* ================================
   CRITICAL FIXES - Production optimizations
   ================================ */

/* Prevent horizontal overflow on all devices */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Ensure containers never cause overflow */
.container,
.container-fluid {
/*    padding-bottom: 2%;*/
    overflow-x: hidden;
}

/* Optimize navbar for mobile - prevent content overlap */
#mainNav {
    padding: 0.75rem 0 !important;
    transition: padding 0.3s ease;
}

#mainNav .navbar-brand img {
    max-height: 50px;
    width: auto;
    transition: max-height 0.3s ease;
}

#mainNav.scrolled {
    padding: 0.3rem 0 !important;
}

#mainNav.scrolled .navbar-brand img {
    max-height: 40px;
}

/* ================================
   RESPONSIVE STYLES - Mobile first approach
   ================================ */

@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .navbar-collapse {
        background: var(--light-color);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: 10px;
    }
    
    .section-padding {
        scroll-margin-top: 80px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        min-height: 100vh;
        text-align: center;
        padding-top: 70px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .hero-buttons .btn {
        padding: 0.8rem 1.5rem;
        margin-bottom: 1rem;
    }
    
    .section-padding {
        padding: 3rem 0;
        scroll-margin-top: 70px;
    }
    
    .about-features .feature-item {
        margin-bottom: 1rem;
    }
    
    .experience-badge {
        bottom: 10px;
        right: 10px;
        padding: 1rem;
    }
    
    .gallery-overlay h4 {
        font-size: 1.2rem;
    }
    
    #mainNav .navbar-brand img {
        max-height: 40px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .service-card,
    .pricing-card,
    .bmi-calculator-card,
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    .price .amount {
        font-size: 2.5rem;
    }
    
    .section-padding {
        scroll-margin-top: 60px;
    }
}

/* ================================
   ACCESSIBILITY & PERFORMANCE
   ================================ */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-buttons,
    .scroll-indicator,
    .scroll-top,
    .social-links {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: black !important;
        min-height: auto;
    }
}
/* Add nice space only after the service cards */
#services .row.g-4 {
    margin-bottom: 1rem;        /* This creates the "2% feel" you want */
    padding-bottom: 1rem;       /* Extra safety */
}

/* On mobile make it a bit more generous so it never feels cut off */
@media (max-width: 767px) {
    #services .row.g-4 {
        margin-bottom: 1rem;
        padding-bottom: 1rem;
    }
}
