/**
 * Team Page Styles
 * Shared styles for all individual team pages
 */

/* Team Header */
.team-header-bg {
    position: absolute;
    left: 0;
    width: 100%;
    background: linear-gradient(180deg, #172334 0%, #174354 100%);
    z-index: 0;
}

.team-header {
    padding: 90px 20px 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 40px;
    max-width: var(--container-width);
    margin: 0 auto;
    z-index: 1;
}

.team-title-section {
    flex: 1;
    padding-bottom: 30px;
}

.team-country-badge {
    background: #000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.team-country-flag {
    font-size: 18px;
}

.team-country-code {
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
}

.team-title-section h1 {
    font-size: 28px;
    margin: 0;
    font-weight: 700;
    color: white;
    line-height: 1.2;
    letter-spacing: 1px;
}

.team-logo-section {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-bottom: 20px;
    padding-right: 20px;
}

.team-identifier {
    font-size: 120px;
    font-weight: 900;
    background: linear-gradient(180deg, #364B5B 0%, #3A5866 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -5px;
    position: absolute;
    bottom: -15px;
    right: 0;
    z-index: 1;
}

.team-logo-direct {
    width: 140px;
    height: 140px;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

.team-info-box {
    background: #171F36;
    width: 100%;
}

.team-info-box-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 18px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
}

.team-info-item {
    display: flex;
    flex-direction: column;
}

.team-info-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
    font-weight: 600;
}

.team-info-value {
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.team-social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    align-items: flex-start;
}

.team-social-label {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.team-social-icons {
    display: flex;
    gap: 10px;
}

.team-social-link {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #1e293b;
}

.team-social-link:hover {
    background: var(--primary-teal);
    color: white;
    transform: translateY(-2px);
}

.team-social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Team Navigation */
.team-nav {
    background: white;
    border-bottom: 2px solid var(--secondary-light);
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
}

.team-nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 40px;
}

.team-nav-link {
    padding: 18px 0;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 15px;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.team-nav-link:hover,
.team-nav-link.active {
    color: var(--primary-teal);
    border-bottom-color: var(--primary-teal);
}

/* Team Sections */
.team-section {
    display: none;
}

.team-section.active {
    display: block;
}

.team-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-navy);
    margin-bottom: 30px;
}

/* Placeholder Messages */
.placeholder-message {
    background: var(--secondary-light);
    padding: 60px 40px;
    border-radius: 12px;
    text-align: center;
}

.placeholder-message h3 {
    color: var(--primary-navy);
    font-size: 22px;
    margin-bottom: 15px;
    font-weight: 700;
}

.placeholder-message p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.6;
}

/* Statistics Header */
.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.stats-mode-toggle {
    display: flex;
    gap: 0;
    background: var(--secondary-light);
    border-radius: 6px;
    padding: 4px;
}

.stats-mode-btn {
    padding: 10px 24px;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
}

.stats-mode-btn:hover {
    color: var(--primary-navy);
}

.stats-mode-btn.active {
    background: white;
    color: var(--primary-teal);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--secondary-light);
    border-top: 4px solid var(--primary-teal);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Statistics Table */
.stats-table-container {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.stats-table thead {
    background: var(--primary-navy);
    color: white;
}

.stats-table th {
    padding: 16px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    vertical-align: bottom;
}

.stats-table th.number-col {
    width: 60px;
    text-align: center;
}

.stats-table th.photo-col {
    width: 60px;
}

.stats-table th.name-col {
    min-width: 180px;
}

.stats-table th.stat-col {
    width: 80px;
    text-align: center;
}

.stats-table th.stat-category {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    background: rgba(4, 135, 142, 0.15);
    border-left: 2px solid var(--primary-navy);
    border-right: 2px solid var(--primary-navy);
}

.stats-table tbody tr {
    border-bottom: 1px solid var(--secondary-light);
}

.stats-table tbody tr:hover {
    background: rgba(4, 135, 142, 0.05);
}

.stats-table td {
    padding: 16px 14px;
    font-size: 14px;
}

.stats-table td.number-col {
    text-align: center;
    font-weight: 700;
    color: var(--primary-navy);
}

.stats-table td.photo-col {
    padding: 8px;
}

.player-photo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--secondary-light);
}

.stats-table td.name-col {
    font-weight: 600;
}

.player-name-link {
    color: var(--primary-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

.player-name-link:hover {
    color: var(--primary-teal);
    text-decoration: underline;
}

.stats-table td.stat-col {
    text-align: center;
    font-weight: 600;
}

.stat-dual {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-avg {
    font-size: 16px;
    color: var(--primary-navy);
}

.stat-total {
    font-size: 11px;
    color: var(--text-light);
    margin-top: 2px;
}

.stats-legend {
    margin-top: 20px;
    padding: 18px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.stats-legend p {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.7;
}

/* Photo Gallery */
.photo-album {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.album-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.album-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-navy);
    margin: 0;
}

.album-meta {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* Carousel Container */
.photo-carousel-wrapper {
    position: relative;
    padding: 0 60px 40px;
}

.photo-carousel {
    display: flex;
    gap: 20px;
    overflow: hidden;
    scroll-behavior: smooth;
}

.photo-carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--secondary-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    flex-shrink: 0;
    flex-grow: 0;
    width: calc((100% - 40px) / 3); /* 3 photos: 100% width minus 2 gaps (40px total) divided by 3 */
}

.photo-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.photo-item:hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
}

.photo-img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid var(--secondary-light);
    color: var(--primary-navy);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-nav:hover {
    background: var(--primary-teal);
    color: white;
    border-color: var(--primary-teal);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.carousel-prev {
    left: 0;
}

.carousel-next {
    right: 0;
}

/* Carousel Indicators */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: var(--primary-teal);
    width: 24px;
    border-radius: 4px;
}

.carousel-indicator:hover {
    background: var(--primary-navy);
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    width: 90vw;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 40px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10002;
    line-height: 1;
    padding: 0;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-image-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-height: 100%;
    min-height: 0;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.lightbox-info {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px 30px;
    border-radius: 8px;
    text-align: center;
    max-width: 600px;
    flex-shrink: 0;
}

.lightbox-caption {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.lightbox-credit {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-style: italic;
    margin-bottom: 8px;
}

.lightbox-counter {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin-top: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .photo-carousel-wrapper {
        padding: 0 50px 40px;
    }

    .photo-item {
        width: calc((100% - 40px) / 3); /* 3 photos: 100% width minus 2 gaps (40px total) divided by 3 */
        flex-shrink: 0;
        flex-grow: 0;
    }

    .photo-img {
        height: 240px;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .team-header {
        padding: 70px 0 0;
    }

    .team-title-section {
        padding-bottom: 20px;
    }

    .team-logo-section {
        align-self: flex-end;
        margin-top: 20px;
    }

    .team-title-section h1 {
        font-size: 22px;
    }

    .team-identifier {
        font-size: 80px;
        bottom: -10px;
    }

    .team-logo-direct {
        width: 100px;
        height: 100px;
    }

    .team-info-box-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .team-social-links {
        margin-left: 0;
    }

    .team-nav-container {
        overflow-x: auto;
        gap: 25px;
    }

    .team-nav-link {
        white-space: nowrap;
    }

    .stats-table {
        font-size: 12px;
    }

    .stats-table th,
    .stats-table td {
        padding: 12px 10px;
    }

    .photo-carousel-wrapper {
        padding: 0 50px 40px;
    }

    .photo-item {
        width: calc((100% - 20px) / 2) !important; /* 2 photos: 100% width minus 1 gap (20px) divided by 2 */
        min-width: 70%; /* Ensure consistent minimum width across all albums */
        flex-shrink: 0;
        flex-grow: 0;
    }

    .photo-img {
        height: 240px;
        width: 100%;
    }

    .album-title {
        font-size: 20px;
    }

    .carousel-prev {
        left: 0;
    }

    .carousel-next {
        right: 0;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }

    .lightbox-nav {
        width: 50px;
        height: 50px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 35px;
    }

    .lightbox-info {
        padding: 15px 20px;
    }

    .lightbox-caption {
        font-size: 16px;
    }

    .lightbox-credit {
        font-size: 13px;
    }
}
