/*
Theme Name: FitnessTier
Description: A luxury WordPress theme for FitnessTier Dubai - Where Elite Fitness Meets Timeless Luxury. A sophisticated theme designed for premium gym and spa websites.
Author: FitnessTier Team
Version: 1.0
Text Domain: fitnesstier
*/

/* CSS Variables for Brand Colors */
:root {
    --header-height: 80px; /* Approximate header height */
    --primary-color: #0A4F3C;      /* Deep Emerald Green */
    --secondary-color: #B8860B;     /* Muted Gold */
    --accent-color: #36454F;        /* Charcoal Grey */
    --light-grey: #F5F5F5;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
}

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

body {
    font-family: 'Open Sans', 'Lato', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', 'Oswald', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-alt {
    background-color: var(--light-grey);
}

/* Header Styles */
.site-header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    max-height: 60px;
    width: auto;
}

/* Navigation */
.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-left: 2rem;
}

.main-navigation a {
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.current::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    background-color: rgba(10, 79, 60, 0.1);
    color: var(--secondary-color);
}

.menu-toggle:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Menu toggle animation */
.menu-toggle.active {
    color: var(--secondary-color);
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 79, 60, 0.8), rgba(10, 79, 60, 0.8)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23F5F5F5" width="1200" height="600"/></svg>');
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    padding: 150px 0 100px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero h1 {
    color: var(--white);
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero .subheadline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--light-grey);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    margin: 0.5rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

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

/* Content Sections */
.content-section {
    padding: 80px 0;
}

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

.section-header h2 {
    margin-bottom: 1rem;
}

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

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Highlights */
.highlights {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 60px 0;
}

.highlights h3 {
    color: var(--white);
}

.highlights .card {
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.highlights .card:hover {
    background-color: rgba(255,255,255,0.15);
}

/* Footer */
.site-footer {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.footer-section a {
    color: var(--light-grey);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-grey);
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
    margin: 2rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .main-navigation ul {
        display: none; /* Hidden by default on mobile */
        position: fixed; /* Use fixed positioning for full viewport coverage */
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height)); /* Full height minus header */
        background-color: var(--white);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        flex-direction: column;
        padding: 1rem;
        z-index: 999; /* Ensure it's below the header but above content */
        border-top: 1px solid var(--border-color);
        overflow-y: auto; /* Allow scrolling if content is long */
        animation: slideDown 0.3s ease-out;
    }
    
    .main-navigation.active ul {
        display: flex !important; /* Show when active */
    }
    
    .main-navigation li {
        margin: 0;
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .main-navigation li:last-child {
        margin-bottom: 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 0.75rem 1rem;
        border-radius: 4px;
        transition: all 0.3s ease;
    }
    
    .main-navigation a:hover {
        background-color: var(--light-grey);
        color: var(--primary-color);
    }
    
    .main-navigation a::after {
        display: none;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .subheadline {
        font-size: 1.2rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .content-section {
        padding: 60px 0;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero .subheadline {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.hidden {
    display: none;
}

.visible {
    display: block;
}



/* Enhanced Mobile Styles and Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Custom viewport height for mobile browsers */
:root {
    --header-height: 80px; /* Approximate header height */
    --vh: 1vh;
}

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
}

/* Enhanced mobile menu styles */
@media (max-width: 768px) {
    .menu-toggle.active {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }
    
    .main-navigation {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        will-change: transform;
    }
    
    .main-navigation.active {
        transform: translateX(0);
    }
    
    .main-navigation ul {
        padding: 2rem 1rem;
    }
    
    .main-navigation li {
        margin-bottom: 1.5rem;
        opacity: 0;
        transform: translateX(-20px);
        animation: slideInLeft 0.3s ease forwards;
    }
    
    .main-navigation.active li:nth-child(1) { animation-delay: 0.1s; }
    .main-navigation.active li:nth-child(2) { animation-delay: 0.2s; }
    .main-navigation.active li:nth-child(3) { animation-delay: 0.3s; }
    .main-navigation.active li:nth-child(4) { animation-delay: 0.4s; }
    .main-navigation.active li:nth-child(5) { animation-delay: 0.5s; }
    
    .main-navigation a {
        font-size: 1.2rem;
        padding: 1rem 0;
        display: block;
        border-bottom: 1px solid rgba(10, 79, 60, 0.1);
    }
    
    .main-navigation a:hover {
        background-color: rgba(10, 79, 60, 0.05);
        padding-left: 1rem;
        transition: all 0.3s ease;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Enhanced header scroll effects */
.site-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.site-header.header-hidden {
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.site-header {
    transition: all 0.3s ease;
    will-change: transform, background-color;
}

/* Animation keyframes */
@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll-triggered animations */
.card, .service-item, .facility-item, .membership-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.card.animate-in, 
.service-item.animate-in, 
.facility-item.animate-in, 
.membership-card.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced card hover effects */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, box-shadow;
}

.card:hover,
.card.card-hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

/* Touch-friendly button styles */
.btn {
    position: relative;
    overflow: hidden;
    min-height: 48px; /* Minimum touch target size */
    min-width: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Ripple effect for buttons */
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Enhanced mobile hero section */
@media (max-width: 768px) {
    .hero {
        min-height: calc(var(--vh, 1vh) * 100);
        padding: 100px 0 60px;
    }
    
    .hero-content {
        animation: fadeInUp 1s ease 0.3s both;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Improved touch interactions */
@media (hover: none) and (pointer: coarse) {
    .card:hover {
        transform: none;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
    
    .btn:hover {
        transform: none;
    }
    
    .main-navigation a:hover::after {
        width: 0;
    }
}

/* Enhanced grid responsiveness */
@media (max-width: 480px) {
    .grid {
        gap: 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .hero-buttons .btn {
        padding: 15px 20px;
        font-size: 0.9rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--primary-color);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.main-navigation a:focus,
.menu-toggle:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Loading states */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Enhanced membership card styles for mobile */
@media (max-width: 768px) {
    .elite-membership {
        transform: none;
        margin-top: 2rem;
        border-width: 3px;
    }
    
    .elite-badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
    
    .membership-features {
        text-align: center;
    }
}

/* Contact section mobile optimization */
@media (max-width: 768px) {
    .contact-details .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .contact-details .contact-item i {
        font-size: 1.5rem;
        margin-top: 0;
    }
    
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
}

/* Improved form styles for mobile */
input, textarea, select {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: border-color 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* Safe area insets for devices with notches */
@supports (padding: max(0px)) {
    .site-header {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .container {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* Performance optimizations */
.hero,
.card,
.btn {
    will-change: transform;
}

/* Smooth scrolling for supported browsers */
@supports (scroll-behavior: smooth) {
    html {
        scroll-behavior: smooth;
    }
}

/* Dark mode support (if needed in future) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .btn,
    .menu-toggle {
        display: none;
    }
    
    .hero {
        background: none;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}



/* Ensure mobile menu is visible and positioned correctly when active */
.main-navigation.active ul {
    display: flex !important;
    position: absolute;
        top: var(--header-height); /* Position below the header */
    left: 0;
    right: 0;
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    flex-direction: column;
    padding: 1rem;
    z-index: 999; /* Ensure it's below the header but above content */
    border-top: 1px solid var(--border-color);
    animation: slideDown 0.3s ease-out;
}

/* Animation for slide down */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Adjust header z-index to be higher than the menu */
.site-header {
    z-index: 1000;
}

/* Ensure the menu toggle is always visible on mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        z-index: 1001; /* Ensure toggle is above everything */
    }
    .main-navigation ul {
        display: none; /* Hidden by default on mobile */
    }
    .main-navigation.active ul {
        display: flex;
    }
}



/* Fix for header overlap: Add padding to body to offset fixed header */
body {
    padding-top: 80px; /* Adjust this value based on actual header height */
}

/* Adjust hero section padding for smaller screens to account for header */
@media (max-width: 768px) {
    .hero {
        padding-top: 120px; /* More padding for hero on mobile */
    }
}







@media (max-width: 768px) {
    .main-navigation.active {
        height: 100%;
    }
}



@media (max-width: 768px) {
    .main-navigation.active {
        min-height: calc(100vh - var(--header-height));
    }
}

