/* Hero Section - Benchmark Style */
.clubs-hero {
    position: relative;
    height: 50vh;
    background-image: url('/assets/clubs/hero.webp');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
}

/* Map Animation - Gentle floating with dynamic shadow */
@keyframes mapFloat {
    0%, 100% {
        transform: translateY(0);
        filter: drop-shadow(0 12px 8px rgba(0, 0, 0, 0.35));
    }
    50% {
        transform: translateY(-10px);
        filter: drop-shadow(0 25px 15px rgba(0, 0, 0, 0.4));
    }
}

/* Button Float Animation */
@keyframes buttonFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Map Container Animation - All screen sizes */
.benefit-section .map-container {
    animation: mapFloat 4s ease-in-out infinite;
    margin: 0 auto;
}

/* Disable zoom effect on map */
.benefit-section .benefit-image.img-hover-zoom .map-container img {
    transform: none !important;
    transition: none !important;
}

.benefit-section .benefit-image.img-hover-zoom:hover .map-container img {
    transform: none !important;
}

/* Zobacz kluby button - desktop only */
.benefit-section .about-cta-button {
    display: none;
}

@media (min-width: 1024px) {
    .benefit-section .about-cta-button {
        display: inline-flex;
        animation: buttonFloat 2.5s ease-in-out infinite;
    }

    .benefit-section .about-cta-button:hover {
        animation-play-state: paused;
    }
}

/* Map Container with Markers */
.map-container {
    position: relative;
    display: inline-block;
    max-width: 420px;
    margin: 0 auto;
}

/* Desktop: larger map */
@media (min-width: 1024px) {
    .map-container {
        max-width: 640px;
    }
}

/* Artistic burgundy backdrop shape */
.benefit-section .benefit-image {
    position: relative;
}

/* Geometric shapes - desktop only */
.benefit-section .benefit-image::before,
.benefit-section .benefit-image::after {
    display: none;
}

@media (min-width: 1024px) {
    .benefit-section .benefit-image::before {
        content: '';
        display: block;
        position: absolute;
        bottom: -20px;
        right: -30px;
        width: 180px;
        height: 180px;
        background-color: #711517;
        border-radius: 50%;
        pointer-events: none;
        opacity: 0.08;
    }
}

.map-container img {
    display: block;
    width: 100%;
    height: auto;
}

/* Map Marker */
.map-marker {
    position: absolute;
    width: 24px;
    height: 24px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    text-decoration: none;
}

/* Marker Dot - gold center */
.marker-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: #EDC148;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Pulsing ring animation */
.marker-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background-color: rgba(237, 193, 72, 0.4);
    border-radius: 50%;
    animation: markerPulse 2s ease-out infinite;
}

@keyframes markerPulse {
    0% {
        width: 10px;
        height: 10px;
        opacity: 0.8;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
}

/* Tooltip */
.marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: #711517;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(113, 21, 23, 0.3);
}

.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #711517;
}

/* Marker hover effects */
.map-marker:hover .marker-dot,
.map-marker.tooltip-active .marker-dot {
    transform: translate(-50%, -50%) scale(1.4);
    background-color: #ffffff;
}

.map-marker:hover .marker-tooltip,
.map-marker.tooltip-active .marker-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

.map-marker:hover .marker-pulse,
.map-marker.tooltip-active .marker-pulse {
    animation: none;
    opacity: 0;
}

/* Stagger the pulse animations */
.map-marker:nth-child(2) .marker-pulse { animation-delay: 0.4s; }
.map-marker:nth-child(3) .marker-pulse { animation-delay: 0.8s; }
.map-marker:nth-child(4) .marker-pulse { animation-delay: 1.2s; }
.map-marker:nth-child(5) .marker-pulse { animation-delay: 1.6s; }

/* Mobile: smaller markers and centered map */
@media (max-width: 768px) {
    .benefit-section .benefit-image {
        display: flex;
        justify-content: center;
        overflow: visible;
    }

    .benefit-section,
    .benefit-section-row {
        overflow: visible;
    }

    .map-container {
        max-width: 420px;
        margin-bottom: 20px;
    }

    .marker-dot {
        width: 8px;
        height: 8px;
    }

    .marker-pulse {
        width: 8px;
        height: 8px;
    }

    @keyframes markerPulse {
        0% {
            width: 8px;
            height: 8px;
            opacity: 0.8;
        }
        100% {
            width: 32px;
            height: 32px;
            opacity: 0;
        }
    }

    .marker-tooltip {
        font-size: 0.7rem;
        padding: 4px 8px;
    }
}

.clubs-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
}

/* Club Map - Mobile */
.club-map {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.club-map img {
    width: 100%;
    height: auto;
    display: block;
}

/* Section Separator */
.section-separator {
    width: 100%;
    height: 1px;
    background-color: var(--color-border);
    margin: var(--spacing-md) 0;
}

/* Members Intro Section */
.members-intro-section {
    margin-bottom: var(--spacing-md);
}

.members-text-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

/* Members Heading - Benchmark Style */
.members-heading {
    color: var(--color-text-primary);
    font-size: clamp(1.8rem, 3.8vw, 2.68rem);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.members-intro {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    max-width: 800px;
}

/* Members Image Content - visible on mobile */
.members-image-content {
    margin-top: var(--spacing-sm);
}

/* Members Overlay - hidden on mobile */
.members-overlay {
    display: none;
}

/* Clubs Grid - 1 col mobile, 2 col tablet, 3 col desktop */
.clubs-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

/* Tablet: 2 columns */
@media (min-width: 768px) and (max-width: 1023px) {
    .clubs-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefit-section .benefit-image {
        display: flex;
        justify-content: center;
    }
}

/* Club Section - White Card with gray border */
.club-section {
    background: #ffffff;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.club-section:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* CTA Card - Join Us */
.club-cta-card {
    background: var(--color-accent);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.club-cta-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(113, 21, 23, 0.3);
}

.club-cta-content {
    text-align: center;
    padding: var(--spacing-lg);
}

.club-cta-icon {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--spacing-md);
}

.club-cta-card h3 {
    color: var(--color-bg-primary);
    font-size: 1.4rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

.club-cta-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: var(--spacing-md);
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
}

.club-cta-button {
    display: inline-block;
    background: var(--color-bg-primary);
    color: var(--color-accent);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.club-cta-button:hover {
    background: var(--color-text-primary);
    color: var(--color-bg-primary);
    transform: scale(1.05);
}

/* Club Header Row - Logo left, Profile link right */
.club-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding: 0 var(--spacing-md);
}

.club-header-row .club-logo {
    margin-bottom: 0;
    width: 112px;
    height: 112px;
}

.club-header-row .club-profile-link {
    margin-top: 0.5rem;
}

.club-profile-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: var(--font-weight-medium);
    border-bottom: 1px solid var(--color-text-primary);
    padding-bottom: 2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.club-profile-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

.club-profile-link.disabled {
    color: #c0c0c0;
    border-color: #d9d9d9;
    cursor: default;
    pointer-events: none;
}

/* Override default animate-on-scroll for smoother club card animations */
.club-section.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Staggered fade-in for elements inside club cards */
.club-section .club-logo,
.club-section .club-profile-link,
.club-section .club-text-content h3,
.club-section .club-description,
.club-section .club-details,
.club-section .more-info-btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.club-section .club-image-container {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

/* When card is visible, animate children with staggered delays */
.club-section.is-visible .club-logo {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.club-section.is-visible .club-profile-link {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.15s;
}

.club-section.is-visible .club-text-content h3 {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.club-section.is-visible .club-description {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.club-section.is-visible .club-details {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.club-section.is-visible .club-image-container {
    opacity: 1;
    transform: none;
    transition-delay: 0.3s;
}

.club-section.is-visible .more-info-btn {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.5s;
}

/* Club Section Content - Side by side layout */
.club-section-content {
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    padding: var(--spacing-md);
}

/* Club Text Content */
.club-text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    align-items: flex-start;
    text-align: left;
}

/* Club Logo - Scaled like main page */
.club-logo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: contain;
    padding: 12px;
    margin-bottom: var(--spacing-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: logoFloat 3s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: var(--color-bg-secondary);
    box-sizing: border-box;
}

.club-logo:hover {
    transform: scale(1.1);
    animation-play-state: paused;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.club-text-content h3 {
    color: var(--color-text-primary);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0;
}

/* Club Details Table */
.club-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-sm);
}

.club-details-table tr {
    border-bottom: 1px solid var(--color-border);
}

.club-details-table tr:last-child {
    border-bottom: none;
}

.club-details-table td {
    padding: 0.75rem 0;
    vertical-align: middle;
}

.club-details-table .detail-label {
    width: 100px;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.club-details-table .detail-value {
    color: var(--color-text-primary);
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: right;
}

.club-website-link {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    transition: color 0.3s ease;
}

.club-website-link:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

.club-location-link {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

.club-location-link:hover {
    color: var(--color-text-primary);
    text-decoration: underline;
}

/* Contact Icons - Email, WhatsApp, Instagram */
.contact-icons {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.contact-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--color-text-secondary);
    background: var(--color-bg-secondary);
    border-radius: 50%;
    transition: color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.contact-icon svg {
    width: 18px;
    height: 18px;
}

.contact-icon:hover {
    color: #711517;
    background-color: rgba(113, 21, 23, 0.1);
    transform: scale(1.15);
}

/* More Information Button - Arrow in Circle Style (20% larger) */
.more-info-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: #711517;
    color: var(--color-bg-primary);
    padding: 0.72rem 0.96rem 0.72rem 1.56rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 1.08rem;
    transition: all 0.3s ease;
    letter-spacing: -0.01em;
    position: relative;
    align-self: flex-end;
}

.more-info-btn::after {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: var(--color-bg-primary);
    border-radius: 50%;
    transition: all 0.3s ease;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23711517' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M12 5l7 7-7 7'/%3E%3C/svg%3E");
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.more-info-btn:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.more-info-btn:hover::after {
    transform: translateX(4px);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

/* Club Image Content - Contains image and button */
.club-image-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    width: 100%;
    align-items: stretch;
}

/* Club Image Container */
.club-image-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    width: 100%;
    position: relative;
    margin: 0;
    padding: 0;
}

.club-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    aspect-ratio: 4/3;
    margin: 0;
    padding: 0;
}

/* Smooth scroll for anchor links */
html {
    scroll-behavior: smooth;
}

/* Desktop: 2-column clubs grid */
@media (min-width: 1024px) {
    /* Benefit Section Row - Map sizing */
    .benefit-section-row .benefit-image {
        max-width: 440px;
        justify-self: end;
    }

    /* Members Intro - Two Column Layout */
    .members-intro-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
        align-items: start;
        margin-bottom: calc(var(--spacing-xl) * 2);
    }

    .members-text-content {
        padding-top: var(--spacing-md);
        gap: var(--spacing-md);
    }

    .members-image-content {
        display: block;
        position: relative;
        overflow: visible;
    }

    .club-map {
        border-radius: var(--radius-lg);
        overflow: hidden;
        margin: 0;
    }

    .club-map img {
        height: 400px;
        width: 100%;
        object-fit: cover;
        border-radius: var(--radius-lg);
    }

    /* Members Overlay - Burgundy card */
    .members-overlay {
        display: flex;
        align-items: center;
        gap: var(--spacing-md);
        position: absolute;
        bottom: -45px;
        right: -30px;
        left: 20%;
        background-color: var(--color-accent);
        padding: var(--spacing-md) var(--spacing-lg);
        border-radius: var(--radius-lg);
        z-index: 10;
        animation: clubsOverlaySlideIn 0.8s ease-out 0.4s both, clubsFloatLeftRight 2.5s ease-in-out 1.2s infinite;
    }

    .members-overlay p {
        color: var(--color-bg-primary);
        font-size: 0.95rem;
        line-height: 1.4;
        margin: 0;
        flex: 1;
        font-weight: var(--font-weight-medium);
    }

    .members-overlay .overlay-plus-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        background-color: var(--color-text-primary);
        color: var(--color-bg-primary);
        border-radius: 50%;
        text-decoration: none;
        font-size: 1.5rem;
        font-weight: var(--font-weight-bold);
        transition: all 0.3s ease;
        line-height: 1;
    }

    .members-overlay .overlay-plus-btn:hover {
        background-color: var(--color-bg-primary);
        color: var(--color-text-primary);
        transform: scale(1.1);
    }

    /* Overlay animations */
    @keyframes clubsOverlaySlideIn {
        0% {
            opacity: 0;
            transform: translateX(30px);
        }
        100% {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes clubsFloatLeftRight {
        0%, 100% {
            transform: translateX(0);
        }
        50% {
            transform: translateX(5px);
        }
    }

    /* Clubs Grid */
    .clubs-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .club-section-content {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
        width: 100%;
    }

    .club-text-content {
        width: 100%;
        align-items: flex-start;
    }

    .club-image-content {
        width: 100%;
        align-items: stretch;
    }

    .club-image-container {
        width: 100%;
    }

    .more-info-btn {
        align-self: flex-end;
    }
}

/* Desktop: Compact sizing and spacing */
@media (min-width: 1024px) {
    .clubs-hero {
        height: 60vh;
        background-position: center bottom;
    }

    .club-text-content h3 {
        font-size: 1.8rem;
    }

    .club-description {
        font-size: 1rem;
    }

    .club-logo {
        width: 140px;
        height: 140px;
    }

    .club-section {
        padding: var(--spacing-lg);
    }
}

/* Tablet/Mobile Responsiveness */
@media (max-width: 1024px) {
    .club-section-content {
        flex-direction: column;
        gap: var(--spacing-lg);
        align-items: stretch;
        width: 100%;
    }

    .club-text-content {
        width: 100%;
        align-items: flex-start;
        text-align: left;
    }

    .club-image-content {
        width: 100%;
        align-items: stretch;
    }

    .club-image-container {
        width: 100%;
    }

    .more-info-btn {
        align-self: flex-end;
    }
}

@media (max-width: 768px) {
    .clubs-hero {
        height: 40vh;
    }

    .club-section {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        overflow: hidden;
    }

    .club-section-content {
        gap: var(--spacing-md);
    }

    .club-text-content {
        gap: var(--spacing-sm);
    }

    .club-logo {
        width: 100px;
        height: 100px;
    }

    .club-cta-content {
        text-align: left;
    }
}
