/* Hero Video Section */
.hero-video-container {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

/* Fallback for old hero-image class */
.hero-image {
    position: relative;
    height: 100vh;
    background-image: url('../assets/sowiniec-polo-club-field.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-md);
    transition: opacity 1s ease;
}

.hero-overlay.faded {
    opacity: 0;
}

.hero-overlay h1 {
    font-size: clamp(2.4rem, 5vw, 3.84rem);
    color: var(--color-bg-primary);
    margin-bottom: var(--spacing-sm);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.04em;
    line-height: 1;
    text-shadow: none;
    animation: heroFadeInUp 0.8s ease-out both;
}

.hero-overlay p {
    font-size: clamp(0.9rem, 1.6vw, 0.96rem);
    color: var(--color-bg-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.01em;
    font-weight: var(--font-weight-medium);
    max-width: 600px;
    animation: heroFadeInUp 0.8s ease-out 0.15s both;
}

/* Hero animations */
@keyframes heroFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@media (prefers-reduced-motion: reduce) {
    .hero-overlay h1,
    .hero-overlay p,
    .hero-more-button {
        animation: none;
    }
}

.hero-more-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--color-accent);
    border: 2px solid var(--color-accent);
    color: var(--color-bg-primary);
    padding: 0.7rem 1rem 0.7rem 1.8rem;
    border-radius: 9999px;
    font-weight: var(--font-weight-medium);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
    font-family: var(--font-primary);
    position: relative;
    animation: heroFadeInUp 0.8s ease-out 0.3s both, heroButtonFloat 2.5s ease-in-out 1.1s infinite;
}

.hero-more-button::after {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    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='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E");
    background-size: 50%;
    background-repeat: no-repeat;
    background-position: center;
}

.hero-more-button:hover {
    background-color: var(--color-text-primary);
    border-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    transform: translateY(-2px);
}

.hero-more-button:hover::after {
    transform: translateY(4px);
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
}

/* Welcome Section - Benchmark Style */
.welcome-section {
    background: transparent;
    padding: var(--spacing-xl) var(--spacing-md);
    margin: 0 0 var(--spacing-lg) 0;
}

.welcome-section h2 {
    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;
    border-bottom: none;
    padding-bottom: 0;
}

.welcome-section p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-secondary);
    letter-spacing: -0.01em;
}

/* Button wrapper for right alignment */
.welcome-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.welcome-section h2,
.welcome-section p {
    width: 100%;
    text-align: left;
}

.welcome-section .welcome-image {
    width: 100%;
}

.welcome-button {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    padding: 1rem 1.5rem 1rem 2.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: var(--spacing-md);
    margin-top: var(--spacing-sm);
    letter-spacing: -0.01em;
    position: relative;
}

.welcome-button::after {
    content: '';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    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;
}

.welcome-button:hover {
    background-color: var(--color-text-primary);
    color: var(--color-bg-primary);
    transform: translateY(-2px);
}

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

.welcome-image-wrapper {
    margin-top: var(--spacing-md);
    width: 100%;
}

.welcome-image {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.welcome-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* News Section - Benchmark Style */
.news-section {
    margin: var(--spacing-xs) 0;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
    padding: 0 var(--spacing-xs);
}

.news-section h2 {
    color: var(--color-text-primary);
    font-size: clamp(1.8rem, 4.5vw, 3.15rem);
    text-align: left;
    margin-bottom: 0;
    font-weight: var(--font-weight-black);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.news-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    display: inline-block;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--color-text-primary);
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.news-link:hover {
    opacity: 0.7;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.news-card {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none !important;
    color: var(--color-text-primary) !important;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    text-decoration: none !important;
}

.news-card h3,
.news-card p {
    color: var(--color-text-primary);
}

.news-card .news-date {
    color: var(--color-text-secondary);
}

.news-image-placeholder {
    width: 100%;
    height: 240px;
    background: var(--color-text-primary);
    position: relative;
}

.news-image {
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card h3 {
    color: var(--color-text-primary);
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    letter-spacing: -0.02em;
    line-height: 1.3;
    /* 3 lines (4.875rem) + padding top 1.5rem + padding bottom 0.5rem */
    min-height: 6.875rem;
}

.news-date {
    color: var(--color-text-secondary);
    padding: 0 1.5rem;
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    opacity: 0.7;
}

.news-card p:last-child {
    padding: 0.5rem 1.5rem 1.5rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    /* 4 lines (5.76rem) + padding top 0.5rem + padding bottom 1.5rem */
    min-height: 7.76rem;
}

.news-section-button {
    display: flex;
    justify-content: flex-end;
    margin-top: var(--spacing-lg);
}

/* Tournaments Section - Two-Part Layout (Mobile First) */
.tournaments-section {
    display: flex;
    flex-direction: column;
    margin: var(--spacing-xl) 0;
    /* Break out of container to full width */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

/* Part 1: Text Block */
.tournaments-text {
    background-color: var(--color-accent);
    color: var(--color-bg-primary);
    padding: 3.1rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 380px;
    justify-content: center;
}

.tournaments-label {
    font-size: 1.1rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
    opacity: 0.8;
}

.tournaments-text h2 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0;
    color: var(--color-bg-primary);
}

.tournaments-link {
    color: var(--color-bg-primary);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: var(--font-weight-medium);
    display: inline-block;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-bg-primary);
    transition: opacity 0.3s ease;
    align-self: flex-start;
    margin-top: auto;
}

.tournaments-link:hover {
    opacity: 0.7;
}

/* Part 2: Image Block */
.tournaments-image {
    position: relative;
    min-height: 490px;
    overflow: hidden;
}

.tournaments-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1;
}

.tournaments-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.tournaments-image-content {
    position: relative;
    z-index: 2;
    height: 100%;
    min-height: 490px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    padding: 2rem 1.5rem;
}

.tournaments-image h3 {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: var(--font-weight-black);
    color: var(--color-bg-primary);
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.tournaments-image-box {
    display: contents;
}

.tournaments-keywords {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.tournaments-keywords span {
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-bg-primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.tournaments-keywords span:nth-child(2) {
    margin-left: 3rem;
}

.tournaments-keywords span:nth-child(3) {
    margin-left: 6rem;
}

/* Tournaments Desktop Layout */
@media (min-width: 1024px) {
    .tournaments-section {
        flex-direction: row;
    }

    .tournaments-text {
        flex: 0 0 50%;
        width: 50%;
        min-height: 600px;
        padding: 3rem 4rem;
        /* Align content with page container */
        padding-left: calc((100vw - var(--container-max-width)) / 2 + var(--spacing-md));
        box-sizing: border-box;
    }

    .tournaments-image {
        flex: 0 0 50%;
        width: 50%;
        min-height: 600px;
    }

    .tournaments-image-content {
        min-height: 600px;
        padding: 3rem;
        /* Match container's right edge */
        padding-right: calc((100vw - var(--container-max-width)) / 2);
        justify-content: space-between;
        align-items: flex-start;
    }

    .tournaments-image-box {
        display: contents;
    }

    .tournaments-image-box h3 {
        text-align: left;
    }

    .tournaments-image-box .welcome-button {
        margin-top: 0;
        margin-bottom: 0;
        align-self: flex-end;
    }

    .tournaments-text h2 {
        font-size: clamp(1.8rem, 2.5vw, 2.2rem);
    }

    .tournaments-link {
        font-size: 1.6rem;
    }

    .tournaments-image h3 {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
    }
}

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

/* Members Section - Benchmark Style */
.members-section {
    margin: var(--spacing-xl) 0;
    overflow: hidden;
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: calc(var(--spacing-lg) * 1.5);
    padding: 0 var(--spacing-xs);
}

.members-section h2 {
    color: var(--color-text-primary);
    font-size: clamp(1.8rem, 4.5vw, 3.15rem);
    text-align: left;
    margin-bottom: 0;
    font-weight: var(--font-weight-black);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.members-link {
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    display: inline-block;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid var(--color-text-primary);
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.members-link:hover {
    opacity: 0.7;
}

.members-scroll-container {
    overflow: hidden;
}

.members-grid {
    display: flex;
    gap: var(--spacing-lg);
    padding: var(--spacing-xs);
    width: max-content;
    animation: scrollMembers 18s linear infinite;
}

@keyframes scrollMembers {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Desktop: No animation, show only 5 logos spread across full width */
@media (min-width: 1024px) {
    .members-header {
        padding: 0;
    }

    .members-grid {
        animation: none;
        justify-content: space-between;
        width: 100%;
        padding: 0;
    }

    /* Hide duplicate logos on desktop */
    .members-grid .member-card:nth-child(n+6) {
        display: none;
    }
}

.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    text-decoration: none;
    cursor: pointer;
}

.member-card:hover .member-logo {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.member-logo {
    background: var(--color-bg-secondary);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.member-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.member-logo picture {
    width: 80%;
    height: 80%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.member-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.member-name {
    font-size: 1.2rem;
    font-weight: var(--font-weight-semibold);
    color: var(--color-text-primary);
    text-align: center;
    margin-top: 0.5rem;
}

.member-city {
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    color: var(--color-text-secondary);
    text-align: center;
}

.logo-placeholder {
    color: var(--color-text-primary);
    font-weight: var(--font-weight-bold);
    font-size: 1.2rem;
}

/* Video play button - shown on mobile, hidden on desktop */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: var(--color-accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 4px 20px rgba(113, 21, 23, 0.4);
    animation: playBtnFloat 2.5s ease-in-out infinite;
}

@keyframes playBtnFloat {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, calc(-50% - 4px));
    }
}

.video-play-btn:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 30px rgba(113, 21, 23, 0.5);
    animation-play-state: paused;
}

.video-play-btn .play-icon {
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 15px 0 15px 24px;
    border-color: transparent transparent transparent white;
    margin-left: 5px;
}

.welcome-image {
    position: relative;
}

/* Disable zoom effect on video images */
.welcome-image.img-hover-zoom:hover img {
    transform: none;
}

/* Video thumbnail overlay - mobile only */
.welcome-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(113, 21, 23, 0.25) 0%,
        rgba(0, 0, 0, 0.35) 100%
    );
    z-index: 1;
    pointer-events: none;
    border-radius: inherit;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
}

@media (min-width: 1024px) {
    .video-modal-content {
        width: 85%;
        max-width: 1400px;
    }
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.video-modal-close:hover {
    opacity: 0.7;
}

.video-modal-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
}

.video-modal-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Welcome image overlay - hidden on mobile, shown on desktop */
.welcome-image-overlay {
    display: none;
}

/* Desktop: Welcome section side-by-side layout */
@media (min-width: 1024px) {
    .welcome-section {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: var(--spacing-xl);
        align-items: start;
    }

    .welcome-section h2,
    .welcome-section p {
        grid-column: 1;
        width: auto;
    }

    .welcome-section .welcome-button {
        display: none;
    }

    .welcome-section .welcome-image-wrapper {
        grid-column: 2;
        grid-row: 1 / span 4;
        margin-top: 0;
        width: auto;
        position: relative;
    }

    .welcome-section .welcome-image {
        overflow: visible;
        border-radius: 0;
    }

    .video-play-btn {
        display: flex;
    }

    .welcome-image::before {
        border-radius: var(--radius-lg);
    }

    .welcome-section .welcome-image img {
        border-radius: var(--radius-lg);
    }

    .welcome-image-overlay {
        display: block;
        position: absolute;
        bottom: -75px;
        right: -30px;
        width: 45%;
        margin-top: 0;
        background-color: var(--color-accent);
        border-radius: var(--radius-lg);
        padding: 1.5rem;
        z-index: 2;
        animation: overlaySlideIn 0.8s ease-out 0.4s both, floatLeftRight 2.5s ease-in-out 1.2s infinite;
    }

    .welcome-image-overlay p {
        color: var(--color-bg-primary);
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        font-weight: var(--font-weight-medium);
        font-style: normal;
    }

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

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

    .news-card h3 {
        font-size: 1.15rem;
        /* 3 lines (4.485rem) + padding 2rem */
        min-height: 6.485rem;
    }
}

/* Overlay animations */
@keyframes overlaySlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .hero-video-container {
        height: 100vh;
    }

    .hero-image {
        height: 100vh;
    }

    .welcome-section {
        margin-top: 0;
    }

    .welcome-section .welcome-button {
        align-self: flex-start;
    }

    .news-section {
        margin-bottom: var(--spacing-md);
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .member-logo {
        width: 150px;
        height: 150px;
    }
}
