/* PolQuant Main Page Styles */
/* Adapted from PPA main-page.css with PolQuant design system */

/* Hero Section */
.hero-image {
    position: relative;
    height: 100vh;
    background: linear-gradient(135deg, #0a0e1a 0%, var(--color-accent) 40%, color-mix(in srgb, var(--color-accent) 80%, #1a2744) 70%, #011b3c 100%);
    background-size: cover;
    background-position: center;
}

.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.1;
}

/* Hero Lottie Animation */
.hero-lottie-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.hero-lottie {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.hero-logo {
    position: relative;
    z-index: 1;
    max-width: 280px;
    height: auto;
    animation: heroFadeInUp 0.8s ease-out both;
}

@media (min-width: 1024px) {
    .hero-logo {
        max-width: 350px;
    }

    .hero-lottie {
        width: 650px;
        height: 650px;
    }
}

@media (max-width: 480px) {
    .hero-lottie {
        width: 380px;
        height: 380px;
    }
}

.hero-overlay p {
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    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: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    color: #ffffff;
    padding: 0.4rem 0.6rem 0.4rem 1.2rem;
    border-radius: 9999px;
    font-weight: var(--font-weight-medium);
    font-size: 0.8rem;
    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: 30px;
    height: 30px;
    background-color: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    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='%23ffffff' 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: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    color: #ffffff;
    transform: translateY(-2px);
}

.hero-more-button:hover::after {
    transform: translateY(4px);
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.7);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M5 12l7 7 7-7'/%3E%3C/svg%3E");
}

/* Welcome Section */
.welcome-section {
    background: transparent;
    padding: var(--spacing-xl) var(--spacing-md);
    margin: 0 0 var(--spacing-lg) 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.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;
    width: 100%;
    text-align: left;
}

.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;
    width: 100%;
    text-align: left;
}

.welcome-section .welcome-image,
.welcome-section .welcome-image-wrapper {
    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='%233a3a3a' 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-accent);
    color: var(--color-bg-primary);
    transform: translateY(-2px);
}

.welcome-button:hover::after {
    transform: translateX(4px);
}

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

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

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

/* Placeholder Images */
.placeholder-image {
    width: 100%;
    height: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #e8e6e0 0%, #d5d2ca 50%, #e8e6e0 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #aaa;
    border-radius: var(--radius-lg);
}

.placeholder-image svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.placeholder-image span {
    font-size: 0.9rem;
    font-weight: var(--font-weight-medium);
    letter-spacing: 0.02em;
    opacity: 0.6;
}

.placeholder-image-welcome {
    min-height: 400px;
}

.placeholder-image-dark {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 50%, #2a2a2a 100%);
    color: #666;
    border-radius: 0;
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* News Section */
.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-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: block;
    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-accent);
    position: relative;
}

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

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

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

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

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

/* Tournaments / Services Section - Two-Part Layout */
.tournaments-section {
    display: flex;
    flex-direction: column;
    margin: var(--spacing-xl) 0;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
}

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

.tournaments-image {
    position: relative;
    min-height: 490px;
    overflow: hidden;
}

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

.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;
        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;
        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-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 / Focus Areas Section */
.members-section {
    margin: var(--spacing-xl) 0;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .members-section {
        overflow: visible;
    }
}

.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-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 items */
@media (min-width: 1024px) {
    .members-header {
        padding: 0;
    }

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

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

    .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 img {
    width: 80%;
    height: 80%;
    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;
}

/* Focus Area Icons */
.focus-icon {
    width: 60px;
    height: 60px;
    color: var(--color-accent);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.member-card:hover .focus-icon {
    transform: scale(1.15) rotate(-5deg);
    color: var(--color-text-primary);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

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

    .welcome-section .welcome-image img,
    .welcome-section .welcome-image .placeholder-image {
        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;
    }
}

/* 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-image {
        height: 100vh;
    }

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

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

    .placeholder-image-welcome {
        min-height: 280px;
    }

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

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

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