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

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

/* Page Header - "O Związku" with separator line */
.page-header {
        padding: var(--spacing-xl) 0 var(--spacing-md);
}

.page-header h1 {
    color: var(--color-text-primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
}

.header-separator {
    width: 100%;
    height: 1px;
    background-color: var(--color-border);
    margin-top: 0;
}

/* Section tag styling */
.section-tag {
    color: #999;
    margin-bottom: var(--spacing-sm);
    display: block;
}

/* Benefit Sections - Following benchmark layout */
.benefit-section {
    padding: var(--spacing-md) 0 var(--spacing-xl);
    border-bottom: 1px solid var(--color-border);
}

.benefit-section:last-child {
    border-bottom: none;
}

.benefit-section-no-border {
    border-bottom: none;
}

/* Gray numbers like "01", "02" */
.benefit-number {
    color: var(--color-text-secondary);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: var(--font-weight-normal);
    opacity: 0.3;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.02em;
}

/* Section headings like "Misja", "Historia" */
.benefit-section h2 {
    color: var(--color-text-primary);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-md);
    font-weight: var(--font-weight-black);
    letter-spacing: -0.04em;
    line-height: 1.1;
}

/* Gray descriptive text */
.benefit-section p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.6;
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
    letter-spacing: -0.01em;
    max-width: 900px;
}

/* Benefit images */
.benefit-image {
    width: 100%;
    margin-top: var(--spacing-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
}

.benefit-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* Benefit image overlay - hidden by default */
.benefit-image-overlay {
    display: none;
}

/* CTA Button - Arrow in Circle */
.benefit-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.about-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1.5rem;
    background-color: #711517;
    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-top: var(--spacing-lg);
    letter-spacing: -0.01em;
    position: relative;
    align-self: flex-end;
}

.about-cta-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;
}

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

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

/* Board Table - Benchmark Style */
.board-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-md);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.board-table thead {
    background: var(--color-text-primary);
}

.board-table th {
    color: var(--color-bg-primary);
    padding: 1.2rem 1rem;
    text-align: left;
    font-size: 0.85rem;
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.board-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-weight: var(--font-weight-medium);
}

.board-table tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.board-table tbody tr:last-child td {
    border-bottom: none;
}

/* Board member photo */
.board-table td:first-child {
    overflow: hidden;
    width: 60px;
}

/* Name column - prevent wrapping on desktop */
.board-table th:nth-child(2),
.board-table td:nth-child(2) {
    white-space: nowrap;
}

.board-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center 20%;
    transform: scale(1.15);
}

/* Documents List - Compact Style */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    width: 100%;
}

.document-link {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    background: #ffffff;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
}

.document-link:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-secondary);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.document-icon {
    width: 40px;
    height: 40px;
    margin-right: var(--spacing-sm);
    flex-shrink: 0;
}

.document-info {
    flex: 1;
}

.document-title {
    color: var(--color-text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 0.25rem;
}

.document-description {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.document-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    margin-left: auto;
    flex-shrink: 0;
}

/* Video Play Button */
.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;
}

/* Video image overlay */
.benefit-image-video::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: var(--radius-lg);
}

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

/* 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%;
}

/* Gallery Component */
.gallery-container {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.gallery-slides {
    position: relative;
    width: 100%;
    height: 380px;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 60%;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

@media (min-width: 768px) {
    .gallery-slide {
        object-position: center center;
    }
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
    color: var(--color-text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gallery-arrow:hover {
    background: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 12px;
}

.gallery-next {
    right: 12px;
}

@media (min-width: 768px) {
    .gallery-slides {
        height: 420px;
    }
}

/* Features Section - Full Width Burgundy with Rounded Container */
.features-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 1rem 1rem;
    margin-top: var(--spacing-sm);
    margin-bottom: 0;
}

.features-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    background-color: var(--color-accent);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature-item {
    opacity: 0;
    animation: statsFadeInUp 0.6s ease-out forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }
.feature-item:nth-child(4) { animation-delay: 0.4s; }

.feature-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.feature-check {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #EDC148;
    border-radius: 50%;
    flex-shrink: 0;
    color: var(--color-accent);
}

.feature-item h3 {
    color: var(--color-bg-primary);
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    margin: 0;
    letter-spacing: -0.02em;
}

.feature-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* Stats Section - Full Width Burgundy */
.stats-section {
    background-color: var(--color-accent);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    padding: 3rem 1.5rem;
    margin-top: var(--spacing-xl);
    margin-bottom: 0;
}

.stats-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
}

.stats-header {
    margin-bottom: 2.5rem;
}

.stats-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    display: block;
    margin-bottom: 1rem;
    opacity: 0;
    animation: statsFadeInUp 0.6s ease-out forwards;
}

.stats-header h2 {
    color: var(--color-bg-primary);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0;
    max-width: 500px;
    opacity: 0;
    animation: statsFadeInUp 0.6s ease-out 0.15s forwards;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
}

.stat-item {
    padding-left: 1.5rem;
    border-left: 3px solid rgba(255, 255, 255, 0.3);
    opacity: 0;
    animation: statsFadeInUp 0.6s ease-out forwards;
}

.stat-item:nth-child(1) {
    animation-delay: 0.3s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.45s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.6s;
}

.stat-item:nth-child(4) {
    animation-delay: 0.75s;
}

.stat-number {
    display: block;
    color: var(--color-bg-primary);
    font-size: clamp(3.5rem, 12vw, 5rem);
    font-weight: var(--font-weight-bold);
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}

.stat-description {
    display: block;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
}

/* Stats fade-in animation */
@keyframes statsFadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Desktop: Features 4-column layout */
@media (min-width: 1024px) {
    .features-section {
        padding: 1.5rem 1rem;
        margin-top: var(--spacing-md);
        margin-bottom: 0;
    }

    .features-content {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
        padding: 5rem 4rem;
        max-width: 1400px;
    }

    .feature-item h3 {
        font-size: 1.35rem;
    }

    .feature-item p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .feature-check {
        width: 32px;
        height: 32px;
    }

    .feature-check svg {
        width: 18px;
        height: 18px;
    }
}

/* Desktop: Stats grid 2x2 layout */
@media (min-width: 1024px) {
    .stats-section {
        padding: 4rem 2rem;
    }

    .stats-content {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: start;
    }

    .stats-header {
        margin-bottom: 0;
    }

    .stats-header h2 {
        font-size: 2.2rem;
    }

    .stats-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem 2rem;
    }

    .stat-number {
        font-size: 4.5rem;
    }

    .stat-item {
        padding-left: 2rem;
    }
}

/* Desktop: Two-column row for Zarząd & Documents */
@media (min-width: 1024px) {
    .about-hero {
        height: 60vh;
        background-position: center 30%;
    }

    .two-column-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        margin-top: var(--spacing-sm);
    }

    .two-column-row .benefit-section {
        border-bottom: none;
        padding-top: var(--spacing-sm);
        padding-bottom: var(--spacing-md);
        padding-right: var(--spacing-lg);
    }

    .row-full-image {
        border-radius: 0;
        overflow: hidden;
        align-self: stretch;
    }

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

    .two-column-row .about-cta-button {
        align-self: flex-start;
    }

    .two-column-row .benefit-section:last-child {
        display: flex;
        flex-direction: column;
    }

    .two-column-row .documents-list {
        flex: 1;
        justify-content: space-between;
    }
}

/* Desktop: Benefit image overlays */
@media (min-width: 1024px) {
    .benefit-image {
        overflow: visible;
        border-radius: 0;
    }

    .benefit-image.gallery-container {
        overflow: visible;
    }

    .benefit-image.gallery-container .gallery-slides {
        border-radius: var(--radius-lg);
        overflow: hidden;
    }

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

    .benefit-image-overlay {
        display: block;
        position: absolute;
        bottom: -30px;
        right: -20px;
        width: 42%;
        max-width: 300px;
        background-color: var(--color-accent);
        border-radius: var(--radius-lg);
        padding: 1.2rem;
        z-index: 2;
        animation: aboutOverlaySlideIn 0.8s ease-out 0.4s both, aboutFloatLeftRight 2.5s ease-in-out 1.2s infinite;
    }

    .benefit-image-overlay.overlay-left {
        right: auto;
        left: -20px;
        animation: aboutOverlaySlideInLeft 0.8s ease-out 0.4s both, aboutFloatLeftRight 2.5s ease-in-out 1.2s infinite;
    }

    .benefit-image-overlay p {
        color: var(--color-bg-primary);
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
        font-weight: var(--font-weight-medium);
    }

    .benefit-image-overlay .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;
    }

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

/* About page overlay animations */
@keyframes aboutOverlaySlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes aboutOverlaySlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Desktop: Two-column layout for benefit sections */
@media (min-width: 1024px) {
    .benefit-section-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
        align-items: start;
    }

    .benefit-section-row .benefit-image {
        margin-top: 0;
    }

    .benefit-section-row .benefit-image img {
        height: 100%;
        min-height: 350px;
    }

    /* Stretch image to match content height */
    .benefit-section-row:has(.benefit-image-stretch) {
        align-items: stretch;
    }

    .benefit-image-stretch {
        position: relative;
    }

    .benefit-image-stretch img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
}

/* Desktop: Compact sizing and spacing */
@media (min-width: 1024px) {
    .page-header {
        padding: var(--spacing-lg) 0 var(--spacing-sm);
    }

    .page-header h1 {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-sm);
    }

    .benefit-section {
        padding: var(--spacing-sm) 0 var(--spacing-lg);
    }

    .benefit-number {
        font-size: 2.5rem;
        margin-bottom: var(--spacing-xs);
    }

    .benefit-section h2 {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }

    .benefit-section p {
        font-size: 1.05rem;
        margin-bottom: var(--spacing-md);
        max-width: 800px;
    }

    .benefit-image {
        margin-top: var(--spacing-sm);
    }

    .benefit-image img {
        height: 350px;
    }

    .about-cta-button {
        margin-top: var(--spacing-md);
        padding: 0.8rem 1.2rem 0.8rem 2rem;
        font-size: 1rem;
    }

    .about-cta-button::after {
        width: 40px;
        height: 40px;
    }

    .board-table th,
    .board-table td {
        padding: 1rem 0.8rem;
    }

    .board-photo {
        width: 50px;
        height: 50px;
    }

    .documents-list {
        gap: 0.25rem;
        margin-top: var(--spacing-sm);
        width: 100%;
    }

    .document-link {
        padding: 2.4rem 1.2rem;
        width: 100%;
    }

    .document-icon {
        width: 32px;
        height: 32px;
    }

    .document-title {
        font-size: 0.95rem;
    }

    .document-description {
        font-size: 0.85rem;
    }
}

/* Mobile & Tablet Responsiveness - stack before desktop grid */
@media (max-width: 1023px) {
    .features-section {
        padding: 1rem 1rem;
        margin-bottom: 0;
    }

    .benefit-section {
        padding: var(--spacing-sm) 0;
        width: 100%;
    }

    .benefit-section-row {
        display: block;
        width: 100%;
    }

    .benefit-section-row .benefit-text {
        width: 100%;
    }

    .benefit-section-row .board-table {
        width: 100%;
    }

    /* Reverse order on mobile: text first, image second */
    .benefit-section-row-mobile-reverse {
        display: flex;
        flex-direction: column;
    }

    .benefit-section-row-mobile-reverse .benefit-text {
        order: 1;
    }

    .benefit-section-row-mobile-reverse .benefit-image {
        order: 2;
    }

    .documents-list {
        width: 100%;
        align-self: stretch;
    }

    .document-link {
        width: 100%;
        box-sizing: border-box;
    }

    .board-table {
        font-size: 0.9rem;
    }
}

/* Mobile-only adjustments */
@media (max-width: 768px) {
    .about-hero {
        height: 40vh;
    }

    .page-header {
        padding: var(--spacing-lg) 0 var(--spacing-xs);
    }

    .benefit-number {
        font-size: 2rem;
    }

    .board-table th,
    .board-table td {
        padding: 0.9rem 0.7rem;
    }

    /* Column widths on mobile */
    .board-table th:nth-child(2),
    .board-table td:nth-child(2) {
        width: 40%;
    }

    .board-table th:nth-child(3),
    .board-table td:nth-child(3) {
        width: 45%;
    }

    /* Taller stretch images on mobile */
    .benefit-image-stretch img {
        height: 500px;
        position: relative;
    }
}

/* Stack table on very small screens */
