/* Global Styles */
:root {
    --primary-color: #104778;
    --primary-light: #1868a7;
    --primary-dark: #083458;
    --secondary-color: #10b981;
    --accent-color: #2579d1;
    --light-color: #f9fafb;
    --dark-color: #1f2937;
    --gray-color: #6b7280;
    --border-color: #e5e7eb;
    --font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
    --border-radius: 0.5rem;
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    --gradient-secondary: linear-gradient(135deg, var(--secondary-color), #0d9488);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --fast-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --medium-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --slow-transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --bounce-transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    background-image: linear-gradient(to bottom, #f1f5f9, #ffffff);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.container {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 24px;
    transition: var(--slow-transition);
}

.section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.section:nth-child(even) {
    background-color: #f3f4f6;
    background-image: linear-gradient(120deg, #f3f4f6 0%, #ffffff 100%);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    color: var(--gray-color);
}

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

a:hover {
    color: var(--primary-dark);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(16, 71, 120, 0.3);
    text-align: center;
    will-change: transform, box-shadow;
    min-height: 44px; /* Minimum touch target for accessibility */
    -webkit-tap-highlight-color: transparent; /* Remove default mobile tap highlight */
    touch-action: manipulation; /* Improve touch responsiveness */
    /* Enhanced mobile support */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: -1;
}

.btn:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, #083458, #1868a7);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    z-index: -2;
    border-radius: 50px;
}

.btn:hover {
    color: white;
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 25px rgba(16, 71, 120, 0.5);
}

.btn:hover:before {
    left: 100%;
}

.btn:hover:after {
    opacity: 1;
}

.btn:active {
    transform: translateY(-1px);
    transition: transform 0.1s;
    box-shadow: 0 5px 15px rgba(16, 71, 120, 0.4);
}

.btn i {
    margin-right: 8px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    object-fit: cover;
    transition: var(--medium-transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    will-change: transform;
    background-color: #f3f4f6;
    background-image: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
                      linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
                      linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

img.loaded {
    background-image: none;
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: opacity, transform;
}

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

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    transition: padding 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

header.scrolled .navbar {
    padding: 15px 0;
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    transition: var(--bounce-transition);
    text-decoration: none;
    margin-right: 50px;
}

.logo:hover {
    transform: scale(1.05);
    color: var(--primary-color);
}

.logo-icon {
    margin-right: 10px;
    font-size: 2rem;
    animation: wave 3s infinite cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes wave {
    0%, 100% { transform: translateY(0) rotate(0); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    50% { transform: translateY(0) rotate(0); }
    75% { transform: translateY(-3px) rotate(5deg); }
}

.logo-image {
    height: 60px;
    width: auto;
    margin-right: 10px;
    object-fit: contain;
    box-shadow: none;
    transition: var(--bounce-transition);
}

.logo-image.error {
    display: none;
}

@media (max-width: 768px) {
    .logo-image {
        height: 45px;
    }
    
    .nav-menu {
        margin-left: 0; /* Reset margin for mobile view */
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 15px;
    margin-left: 140px;
}

.nav-item {
    margin-left: 15px;
    position: relative;
}

.nav-link {
    color: var(--dark-color);
    font-weight: 600;
    transition: var(--medium-transition);
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

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

.nav-link:hover::after {
    width: 100%;
}

/* Navigation link active states */
.nav-link.active {
    color: var(--primary-color);
    font-weight: 700;
}

.nav-link.active::after {
    width: 100%;
    background-color: var(--accent-color);
    height: 3px;
}

/* Click highlight effect */
.nav-link.clicked {
    background-color: rgba(16, 71, 120, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    margin: -8px -12px;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Mobile active states */
@media screen and (max-width: 768px) {
    .nav-link.active {
        background-color: rgba(16, 71, 120, 0.1);
        border-radius: 8px;
        color: var(--primary-color);
        font-weight: 700;
    }
    
    .nav-link.clicked {
        background-color: rgba(16, 71, 120, 0.2);
        transform: scale(1.05);
    }
}

.hamburger {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 20px;
    position: relative;
    transition: var(--fast-transition);
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: var(--fast-transition);
}

.hamburger span:nth-child(1) {
    top: 0px;
}

.hamburger span:nth-child(2) {
    top: 9px;
}

.hamburger span:nth-child(3) {
    top: 18px;
}

.hamburger.open span:nth-child(1) {
    top: 9px;
    transform: rotate(135deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger.open span:nth-child(3) {
    top: 9px;
    transform: rotate(-135deg);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    transition: background-position 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    will-change: background-position;
}

.hero::before {
    content: none;
}

.hero::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 24px;
    animation: fadeInUp 1.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
    width: 100%;
    will-change: opacity, transform;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
    line-height: 1.1;
    transform: translateZ(0);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.9;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: white;
}

.hero .btn {
    padding: 14px 32px;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2.5s infinite cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scroll-indicator i {
    color: white;
    font-size: 2rem;
    opacity: 0.8;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: var(--bounce-transition);
}

.scroll-indicator:hover i {
    transform: translateY(-5px);
    opacity: 1;
}

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

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    font-weight: 800;
    transition: var(--slow-transition);
    will-change: transform;
}

.section-title:after {
    content: '';
    display: block;
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 20px auto 0;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(16, 71, 120, 0.2);
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.section-title:hover:after {
    width: 150px;
}

/* About Section */
.about {
    position: relative;
    margin-top: 0;
    padding-top: 140px;
    background-color: #f3f4f6;
    background-image: linear-gradient(120deg, #f3f4f6 0%, #ffffff 100%);
    z-index: 10;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 20px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), transparent);
    z-index: 1;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Info Section */
.info {
    position: relative;
}

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

.info-card {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 35px;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    height: 100%;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.info-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.info-card:hover::before {
    opacity: 1;
}

.info-card h3 {
    display: flex;
    align-items: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.info-card h3 i {
    margin-right: 15px;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2rem;
    transition: var(--bounce-transition);
    will-change: transform;
}

.info-card:hover h3 i {
    transform: scale(1.2);
}

/* Rules Section */
.rules {
    position: relative;
}

.rules-list {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: none;
    position: relative;
}

.rules-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.rules-list ul {
    margin: 30px 0;
    list-style: none;
}

.rules-list li {
    margin-bottom: 20px;
    padding-left: 35px;
    position: relative;
    font-size: 1.05rem;
}

.rules-list li:before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
    font-weight: bold;
    width: 25px;
    height: 25px;
    text-align: center;
    line-height: 25px;
}

/* Membership Section */
.membership {
    position: relative;
}

.membership-options {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-bottom: 60px;
    perspective: 1000px;
}

.membership-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px 30px;
    width: 320px;
    box-shadow: var(--card-shadow);
    text-align: center;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

.membership-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: height 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.membership-card:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.membership-card:hover::before {
    height: 12px;
}

.membership-card h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    transform: translateZ(10px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.membership-card:hover h3 {
    transform: translateZ(20px);
}

.price {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--dark-color);
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-dark), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding: 5px 0;
    transform: translateZ(15px);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.membership-card:hover .price {
    transform: translateZ(30px) scale(1.1);
}

.membership-card p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    transform: translateZ(5px);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.membership-card:hover p {
    transform: translateZ(10px);
}

.membership-card p i {
    color: var(--secondary-color);
    margin-right: 10px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.membership-card:hover p i {
    transform: scale(1.2);
}

/* Add highlight glow effect */
.membership-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    opacity: 0;
    transform: scale(0.5);
    transition: opacity 0.8s ease, transform 0.8s ease;
    pointer-events: none;
}

.membership-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.membership-steps {
    max-width: 800px;
    margin: 0 auto;
    background-color: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    border: none;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
                box-shadow 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.membership-steps:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.membership-steps h3 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    position: relative;
}

.membership-steps h3::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 15px auto 0;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.membership-steps:hover h3::after {
    width: 100px;
}

.step {
    display: flex;
    margin-bottom: 30px;
    align-items: flex-start;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.step:hover {
    transform: translateX(10px);
}

.step-number {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-right: 20px;
    box-shadow: 0 8px 15px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.step:hover .step-number {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 20px rgba(37, 99, 235, 0.4);
}

.step-content {
    flex: 1;
}

/* Booking Section */
.booking {
    position: relative;
}

.booking-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border: none;
    position: relative;
}

.booking-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 16px 16px 0 0;
}

.booking-content ul {
    margin: 30px 0;
    list-style: none;
}

.booking-content li {
    margin-bottom: 20px;
    padding-left: 35px;
    position: relative;
    font-size: 1.05rem;
}

.booking-content li:before {
    content: '→';
    position: absolute;
    left: 0;
    top: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    width: 25px;
    height: 25px;
    text-align: center;
    line-height: 25px;
}

.booking-content .btn {
    margin-top: 20px;
    font-size: 1.05rem;
    padding: 14px 32px;
    /* Enhanced mobile touch support */
    position: relative;
    z-index: 10;
    -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3);
    tap-highlight-color: rgba(79, 195, 247, 0.3);
}

/* Specific style for the booking/holdsport button */
.booking-content .btn {
    font-size: 0.95rem;
    padding: 12px 24px;
    /* Ensure proper mobile interaction */
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    /* Enhanced mobile touch support */
    position: relative;
    z-index: 100;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3);
    tap-highlight-color: rgba(79, 195, 247, 0.3);
    /* Ensure minimum touch target on all devices */
    min-height: 48px;
    min-width: 120px;
}

/* Gallery Section */
.gallery {
    position: relative;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 250px;
    cursor: pointer;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, box-shadow;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    z-index: 5;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), 
                filter 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, filter;
}

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

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px;
    color: white;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    will-change: transform, opacity;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
    opacity: 1;
}

/* Contact Section */
.contact {
    position: relative;
}

.contact-info {
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 16px;
    padding: 40px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border: none;
    position: relative;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.contact-method {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    position: relative;
    z-index: 10;
}

.contact-icon {
    margin-right: 15px;
    margin-top: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    flex-shrink: 0;
    align-self: center;
}

.contact-method p {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Enhanced mobile support for contact links */
.contact-method a {
    position: relative;
    z-index: 20;
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(79, 195, 247, 0.3);
    tap-highlight-color: rgba(79, 195, 247, 0.3);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    margin: -4px -8px;
    border-radius: 4px;
    text-decoration: underline;
    color: var(--primary-color);
    transition: background-color 0.2s ease;
}

.contact-method a:hover {
    background-color: rgba(79, 195, 247, 0.1);
    text-decoration: underline;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #104778, #083458);
    color: white;
    padding: 60px 0 40px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color), var(--secondary-color));
}

.footer-content {
    text-align: center;
}

.footer-content p {
    color: #cbd5e1;
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    margin-bottom: 30px;
}

.footer-links li {
    margin: 0 10px;
}

.footer-links a {
    color: #cbd5e1;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    color: white;
}

.footer-links a i {
    margin-right: 8px;
}

.footer-copy {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 40px;
}

/* Background shapes */
.shape {
    position: absolute;
    opacity: 0.07;
    z-index: 0;
    filter: blur(2px);
    transition: transform 3s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}

.shape-1 {
    top: 0;
    right: 0;
    width: 350px;
    height: 350px;
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    background-color: var(--primary-color);
    animation: morph 12s linear infinite alternate;
    will-change: border-radius;
}

.shape-2 {
    bottom: 0;
    left: 0;
    width: 300px;
    height: 300px;
    border-radius: 62% 38% 46% 54% / 38% 30% 70% 62%;
    background-color: var(--secondary-color);
    animation: morph 10s linear infinite alternate;
    will-change: border-radius;
}

@keyframes morph {
    0% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
    25% {
        border-radius: 40% 60% 70% 30% / 60% 40% 30% 70%;
    }
    50% {
        border-radius: 60% 40% 30% 70% / 50% 60% 70% 40%;
    }
    75% {
        border-radius: 70% 30% 50% 50% / 30% 30% 70% 70%;
    }
    100% {
        border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    }
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 50px;
        background-color: white;
        transition: 0.4s;
        z-index: 999;
        overflow-y: auto; /* Allow scrolling if menu is too tall */
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        margin: 20px 0;
    }
    
    .nav-link {
        font-size: 1.2rem; /* Larger font for better touch targets */
        padding: 12px 20px; /* Larger touch area */
    }
    
    .nav-link::after {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    .hero {
        height: 90vh; /* Slightly shorter on mobile */
    }
    
    .hero h1 {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 24px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0; /* Less padding on mobile */
    }
    
    .about {
        padding-top: 100px; /* Adjusted for mobile */
    }
    
    /* Make membership cards full width on mobile */
    .membership-card {
        width: 90%;
        max-width: 400px;
        margin-bottom: 30px;
    }
    
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .step-number {
        margin-bottom: 15px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px; /* Smaller gap for mobile */
    }
    
    .gallery-item {
        height: 200px; /* Smaller height for mobile */
    }
    
    .membership-options {
        flex-direction: column;
        align-items: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    /* Improved mobile contact section */
    .contact-method {
        flex-direction: column;
        margin: 20px 0;
        align-items: center;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 10px;
        font-size: 2rem;
    }
    
    /* Footer adjustments */
    .footer-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-links a {
        justify-content: center;
    }
    
    /* Button adjustments for mobile */
    .btn {
        padding: 14px 24px;
        width: auto;
        max-width: 280px;
        font-size: 1rem;
        min-height: 44px; /* iOS recommended minimum touch target */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Special button size for booking button */
    .booking-content .btn {
        padding: 16px 28px;
        width: auto;
        max-width: 300px;
        font-size: 1rem;
        min-height: 48px; /* Larger touch target for important button */
    }
}

/* Additional media query for even smaller screens */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 16px; /* Smaller padding for tiny screens */
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.7rem;
    }
    
    .about {
        padding-top: 80px; /* Even less padding for small screens */
    }
    
    .info-card, .membership-card, .booking-content, .contact-info, .membership-steps {
        padding: 25px 20px; /* Less padding on small screens */
    }
    
    .gallery-item {
        height: 180px; /* Even smaller for tiny screens */
    }
    
    .logo {
        font-size: 1.3rem;
        margin-right: 0;
    }
    
    .logo-image {
        height: 35px;
    }
    
    /* Ensure form elements are properly sized */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    /* Make price stand out even on small screens */
    .price {
        font-size: 2rem;
    }
    
    /* Make buttons even smaller on tiny screens */
    .btn {
        padding: 12px 20px;
        width: auto;
        max-width: 260px;
        font-size: 0.95rem;
        min-height: 44px; /* Maintain minimum touch target */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Booking button remains well-sized on tiny screens */
    .booking-content .btn {
        padding: 14px 24px;
        width: auto;
        max-width: 280px;
        font-size: 0.95rem;
        min-height: 48px; /* Keep larger touch target for important button */
    }
}

/* Fix for iOS 100vh issue */
@supports (-webkit-touch-callout: none) {
    .hero {
        height: -webkit-fill-available;
    }
    
    .nav-menu {
        height: calc(100vh - 70px);
        height: calc(-webkit-fill-available - 70px);
    }
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top i {
    font-size: 1.2rem;
}

.back-to-top:hover, .back-to-top:active {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-5px);
}

@media screen and (max-width: 768px) {
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        left: 15px;
    }
}

/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .animate-on-scroll {
        transition: none !important;
    }
    
    .animate-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Performance optimizations */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
}

/* Improve GPU acceleration for animations */
.animate-on-scroll,
.gallery-item,
.info-card,
.membership-card,
.btn {
    transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Loading states for images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    object-fit: cover;
    transition: var(--medium-transition);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    will-change: transform;
    background-color: #f3f4f6;
    background-image: linear-gradient(45deg, #f3f4f6 25%, transparent 25%), 
                      linear-gradient(-45deg, #f3f4f6 25%, transparent 25%), 
                      linear-gradient(45deg, transparent 75%, #f3f4f6 75%), 
                      linear-gradient(-45deg, transparent 75%, #f3f4f6 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

img.loaded {
    background-image: none;
}

/* Skeleton loading for cards */
.info-card.loading,
.membership-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Better focus indicators for accessibility */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.btn:focus,
.gallery-item:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 3px;
}

.nav-link:focus {
    outline: none;
}

/* Additional mobile optimizations */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 120px;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Touch optimizations */
.gallery-item,
.btn,
.nav-link,
.back-to-top {
    touch-action: manipulation;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

/* Prevent iOS zoom on input focus */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    font-size: 16px;
    line-height: 1.5;
    padding: 12px;
}

/* Better contrast for accessibility */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0d3d5f;
        --secondary-color: #0e8c5f;
        --gray-color: #4a5568;
    }
}

/* Additional mobile touch fixes */
@media screen and (max-width: 768px) {
    /* Ensure booking button is always clickable on mobile */
    .booking-content .btn {
        position: relative !important;
        z-index: 1000 !important;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.4) !important;
        min-height: 50px !important;
        padding: 16px 24px !important;
        margin: 20px auto !important;
        display: inline-block !important;
        clear: both !important;
    }
    
    /* Ensure contact links are always clickable on mobile */
    .contact-method a {
        position: relative !important;
        z-index: 1000 !important;
        touch-action: manipulation !important;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(79, 195, 247, 0.4) !important;
        min-height: 48px !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 8px 12px !important;
        margin: -8px -12px !important;
    }
    
    /* Prevent any interference from parent elements */
    .booking-content,
    .contact-method {
        position: relative !important;
        z-index: 100 !important;
        pointer-events: auto !important;
    }
} 