/**
 * Tournament Single Page Styles
 *
 * Styles for displaying enriched tournament data with modern UX/UI
 *
 * @package PogzTennis
 * @since 1.0.0
 */

/* ===================================
   Tournament Hero Section Spacing
   =================================== */
.tournament-hero {
    margin-bottom: 20px !important;
}

/* ===================================
   Quick Facts Section
   =================================== */
.tournament-quick-facts {
    margin: 0 0 40px 0;
    padding: 0;
}

.quick-facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.fact-card {
    background: var(--dark-bg, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.fact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(191, 254, 45, 0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fact-card:hover {
    border-color: rgba(191, 254, 45, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.fact-card:hover::before {
    opacity: 1;
}

.fact-card--highlight {
    background: linear-gradient(135deg, rgba(191, 254, 45, 0.1), rgba(191, 254, 45, 0.05));
    border-color: rgba(191, 254, 45, 0.3);
}

.fact-card--highlight::before {
    opacity: 1;
    background: linear-gradient(90deg, #BFFE2D, #8bc624);
}

.fact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(191, 254, 45, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BFFE2D;
}

.fact-card--highlight .fact-icon {
    background: rgba(191, 254, 45, 0.2);
}

.fact-content {
    flex: 1;
    min-width: 0;
}

.fact-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    font-weight: 600;
}

.fact-value {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.fact-card--highlight .fact-value {
    font-size: 24px;
}

.fact-sub {
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 4px;
}

/* ===================================
   Tournament Overview Section
   =================================== */
.tournament-overview {
    margin: 0 0 30px 0;
    padding: 0;
}

/* ===================================
   Tournament Details Section
   =================================== */
.tournament-details-section {
    margin: 40px 0;
    padding: 0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.detail-item {
    background: var(--dark-bg, #1a1a1a);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: all 0.3s ease;
}

.detail-item:hover {
    border-color: rgba(191, 254, 45, 0.2);
    background: rgba(191, 254, 45, 0.03);
}

.detail-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(191, 254, 45, 0.8);
}

.detail-content {
    flex: 1;
    min-width: 0;
}

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 6px;
    font-weight: 600;
}

.detail-value {
    font-size: 16px;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.4;
}

.detail-value a {
    color: #BFFE2D;
    text-decoration: none;
    transition: color 0.2s ease;
}

.detail-value a:hover {
    color: #a8e426;
    text-decoration: underline;
}

.link-external {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.link-external svg {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.link-external:hover svg {
    opacity: 1;
}

/* ===================================
   Section Titles
   =================================== */
.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(191, 254, 45, 0.2);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 80px;
    height: 2px;
    background: #BFFE2D;
}

/* ===================================
   Tournament Logo
   =================================== */
.tournament-logo {
    margin-bottom: 24px;
    text-align: center;
}

.tournament-logo-img {
    max-width: 200px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.tournament-logo-img:hover {
    transform: scale(1.05);
}

/* Logo adjustments for light mode */
body.light-mode .tournament-logo-img {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.15));
}

@media (max-width: 768px) {
    .tournament-logo-img {
        max-width: 150px;
        max-height: 90px;
    }
}

/* ===================================
   Tournament Hero Enhancements
   =================================== */
.tournament-hero-content {
    padding: 0 24px;
}

.tournament-category {
    margin-left: 0;
    margin-bottom: 16px;
}

.tournament-meta {
    padding-left: 0;
    margin-left: 0;
}

.tournament-header-row {
    padding-left: 0;
}

.tournament-hero-content .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 6px;
    font-size: 14px;
    margin-right: 8px;
    margin-bottom: 8px;
}

.tournament-hero-content .meta-item svg {
    flex-shrink: 0;
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .quick-facts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fact-card {
        padding: 20px;
    }

    .fact-value {
        font-size: 18px;
    }

    .fact-card--highlight .fact-value {
        font-size: 22px;
    }

    .section-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .fact-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .detail-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

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

/* ===================================
   Dark/Light Mode Support
   =================================== */
body.light-mode .fact-card,
body.light-mode .detail-item {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .fact-card:hover,
body.light-mode .detail-item:hover {
    border-color: rgba(191, 254, 45, 0.4);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

body.light-mode .fact-label,
body.light-mode .detail-label {
    color: rgba(0, 0, 0, 0.6);
}

body.light-mode .fact-value,
body.light-mode .detail-value,
body.light-mode .section-title {
    color: #1a1a1a;
}

body.light-mode .fact-icon,
body.light-mode .detail-icon {
    background: rgba(191, 254, 45, 0.15);
    color: #6b8e23;
}

body.light-mode .section-title {
    border-bottom-color: rgba(191, 254, 45, 0.3);
}

/* ===================================
   Compact Hero Layout
   =================================== */
.tournament-hero--compact {
    min-height: 400px;
    padding: 60px 0 40px;
}

.tournament-header-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 24px;
    margin-bottom: 20px;
}

.tournament-header-row .tournament-title {
    flex: 1;
    margin: 0;
    padding-left: 0;
}

.tournament-logo--compact {
    flex-shrink: 0;
    margin: 0;
    text-align: left;
}

.tournament-logo--compact .tournament-logo-img {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 12px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(191, 254, 45, 0.3);
    transition: all 0.3s ease;
}

.tournament-logo--compact .tournament-logo-img:hover {
    transform: scale(1.05);
    border-color: rgba(191, 254, 45, 0.6);
    box-shadow: 0 6px 24px rgba(191, 254, 45, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .tournament-hero--compact {
        min-height: 350px;
        padding: 40px 0 30px;
    }

    .tournament-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .tournament-logo--compact {
        order: -1;
        text-align: left;
    }

    .tournament-logo--compact .tournament-logo-img {
        max-width: 100px;
        max-height: 100px;
        padding: 10px;
    }
}
