/* ==========================================================================
   Patel Fitness - Premium Stylesheet
   ========================================================================== */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Poppins:wght@200;300;400;500;600;700;800&display=swap');

:root {
    --color-primary: #E53935;       /* Red Accent */
    --color-primary-dark: #C62828;  /* Darker Red */
    --color-primary-light: #FFCDD2; /* Light Red */
    --color-text-dark: #1F2937;     /* Dark Gray (Gray 800) */
    --color-text-muted: #4B5563;    /* Medium Gray (Gray 600) */
    --color-bg-light: #F9FAFB;      /* Off-white (Gray 50) */
    --color-bg-white: #FFFFFF;
    
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-family: var(--font-primary);
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
    overflow-x: hidden;
}

body {
    background-color: var(--color-bg-light);
}

h1, h2, h3, h4, h5, h6, .font-display {
    font-family: var(--font-display);
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F3F4F6;
}
::-webkit-scrollbar-thumb {
    background: #D1D5DB;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* Glassmorphism Styles */
.glass-card {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.04);
}

.glass-nav {
    background: #FFFFFF !important;
    border-bottom: 1px solid #E5E7EB;
}

.glass-dark {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navbar Link Underline Animation */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--color-primary);
    transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Gradient Buttons */
.btn-primary-gradient {
    background: linear-gradient(135deg, var(--color-primary) 0%, #D32F2F 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px 0 rgba(229, 57, 53, 0.3);
}
.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(229, 57, 53, 0.45);
    background: linear-gradient(135deg, #EF5350 0%, var(--color-primary) 100%);
}

.btn-secondary-outline {
    background: transparent;
    border: 2px solid var(--color-text-dark);
    color: var(--color-text-dark);
    transition: all 0.3s ease;
}
.btn-secondary-outline:hover {
    background: var(--color-text-dark);
    color: var(--color-bg-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.08);
}

/* Floating Dumbbells Animation */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(8deg);
    }
    100% {
        transform: translateY(0px) rotate(0deg);
    }
}
.floating-dumbbell-1 {
    animation: float 6s ease-in-out infinite;
}
.floating-dumbbell-2 {
    animation: float 8s ease-in-out infinite;
    animation-delay: 1.5s;
}
.floating-dumbbell-3 {
    animation: float 7s ease-in-out infinite;
    animation-delay: 3s;
}

/* Scroll Indicator Mouse */
.mouse-scroll {
    width: 26px;
    height: 44px;
    border: 2px solid var(--color-bg-white);
    border-radius: 20px;
    position: relative;
}
.mouse-scroll::before {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: var(--color-bg-white);
    border-radius: 50%;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    animation: scroll-dot 1.5s infinite;
}
@keyframes scroll-dot {
    0% {
        opacity: 1;
        top: 8px;
    }
    100% {
        opacity: 0;
        top: 28px;
    }
}

/* Button Ripple Effect */
.ripple {
    position: relative;
    overflow: hidden;
}
.ripple-effect {
    position: absolute;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Lift on Hover Cards */
.lift-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.lift-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
}

/* Gallery Masonry & Overlay */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 16px;
}
.gallery-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}
.gallery-item:hover .gallery-img {
    transform: scale(1.08);
}
.gallery-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 70%, rgba(0,0,0,0) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Custom Lightbox Popup */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-img-container {
    max-width: 90%;
    max-height: 80%;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox.active .lightbox-img-container {
    transform: scale(1);
}
.lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Custom Input Float Label styling (Fallbacks/Enhancements) */
.form-group {
    position: relative;
}
.form-input {
    width: 100%;
    padding: 1rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 12px;
    background: transparent;
    transition: all 0.3s ease;
    outline: none;
}
.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.15);
}
.form-label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: #9CA3AF;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background-color: var(--color-bg-white);
    padding: 0 0.25rem;
}
/* When input is focused or not empty, move label up */
.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -0.5rem;
    left: 0.75rem;
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}
.back-to-top:hover {
    background-color: var(--color-primary-dark);
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

/* Success/Error Popup Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* Fallback: if AOS JS fails to load, make sure elements are visible */
html:not(.aos-init) [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}
