/* Teams Archive Grid Layout */
.teams-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.team-card {
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    /* Override Astra theme styles */
    width: 100% !important;
    max-width: none !important;
    flex-basis: auto !important;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.team-card-image {
    width: 100%;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f5f5f5;
    padding: 15px 0 0 0;
}

.team-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

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

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

.team-card-content {
    padding: 30px 30px 35px 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    align-items: center;
    text-align: center;
}

.team-card-title {
    margin: 0;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
}

.team-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.team-card-title a:hover {
    color: var(--ast-global-color-1);
}

.team-read-more {
    display: inline-flex;
    align-items: center;
    background-color: var(--ast-global-color-1);
    color: var(--ast-global-color-5);
    padding: 15px 25px;
    text-decoration: none;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    line-height: 1em;
    transition: all 0.3s ease;
    border: 0;
}

.team-read-more:hover {
    background-color: var(--ast-global-color-4);
    color: var(--ast-global-color-5);
}

/* Teams Archive Responsive */
@media (max-width: 992px) {
    .teams-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 600px) {
    .teams-archive-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Teams Single Page Layout */
.custom-teams-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0px;
}

.teams-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* Left Column Styles */
.team-title-section {
    margin-bottom: 30px;
}

.team-title {
    color: #333;
    font-size: 1.6rem;
    font-weight: 600;
    margin: 0 0 20px 0;
    border-bottom: 5px solid #e53e3e;
    padding-bottom: 10px;
    display: inline-block;
}

.team-description {
    line-height: 1.6;
    margin-bottom: 0;
}

.teams-left-column h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    display: inline-block;
}

.team-description {
    margin-bottom: 30px;
    line-height: 1.6;
}

.team-about-details {
    margin-bottom: 40px;
}

.team-about-details h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
}

.about-grid {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.about-row {
    display: table-row;
    border-bottom: 1px solid #bebebe;
}

.about-row:last-child {
    border-bottom: none;
}

.about-row strong {
    display: table-cell;
    font-weight: 600;
    color: #333;
    padding: 10px 15px;
    width: 30%;
    background: #e2e2e2;
    vertical-align: top;
    font-size: 14px;
}

.about-row span {
    display: table-cell;
    color: #666;
    padding: 10px 15px;
    background: white;
    vertical-align: top;
    font-size: 14px;
}

/* Coaches Section */
.team-coaches {
    margin-bottom: 40px;
}

.coaches-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.coach-card {
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    width: 200px;
    flex-shrink: 0;
}

.coach-card:hover {
    transform: translateY(-5px);
}

.coach-image {
    width: 100%;
    height: 220px;
    background: #f5f5f5;
    border: 8px solid #1a1a1a;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.coach-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3a3a3a;
    padding: 20px;
}

.coach-image-placeholder img {
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.6;
}

.coach-info {
    padding: 10px 20px;
    color: white;
    background: #2a2a2a;
    flex: 1;
}

.coach-info h3 {
    margin: 0 0 0 0;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.coach-info p {
    margin: 0;
    color: #ccc;
    font-size: 14px;
}

.coach-info p strong {
    display: none;
}

/* Right Column Styles */
.teams-right-column {
    position: sticky;
    top: 20px;
}

.team-photo {
    margin-bottom: 30px;
}

.team-main-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Team Sponsor */
.team-sponsor h2 {
    color: #333;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    display: inline-block;
}

.sponsor-content {
    text-align: left;
}

.sponsor-item {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #e2e2e2;
}

.sponsor-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sponsor-logo {
    margin-bottom: 20px;
}

.sponsor-logo img {
    max-width: 200px;
    height: auto;
}

.sponsor-text {
    margin-bottom: 15px;
    line-height: 1.6;
}

.sponsor-link a {
    color: #e53e3e;
    text-decoration: none;
    font-weight: 500;
}

.sponsor-link a:hover {
    text-decoration: underline;
}

/* Team Navigation */
.team-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e2e2e2;
}

.team-nav-link {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 48%;
}

.team-nav-prev {
    align-items: flex-start;
}

.team-nav-next {
    align-items: flex-end;
    text-align: right;
}

.team-nav-link:hover {
    background: var(--ast-global-color-1);
}

.team-nav-link:hover .team-nav-label,
.team-nav-link:hover .team-nav-title,
.team-nav-link:hover .team-nav-arrow {
    color: #fff;
}

.team-nav-arrow {
    font-size: 24px;
    font-weight: bold;
    color: var(--ast-global-color-1);
    transition: color 0.3s ease;
}

.team-nav-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    color: #666;
    transition: color 0.3s ease;
}

.team-nav-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.team-nav-placeholder {
    flex: 1;
    max-width: 48%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .teams-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .teams-right-column {
        position: static;
    }

    .custom-teams-content {
        padding: 20px 15px;
    }

    .team-navigation {
        flex-direction: column;
        gap: 15px;
    }

    .team-nav-link,
    .team-nav-placeholder {
        max-width: 100%;
    }
}