/*
Theme Name: TSB Tennis
Theme URI: https://tenisbg.org.rs
Description: Custom theme for Teniski savez Beograda (Tennis Association of Belgrade). A modern, clay court-inspired theme built as a child of Twenty Twenty-Five.
Author: Tennis Association of Belgrade
Author URI: https://tenisbg.org.rs
Template: twentytwentyfive
Version: 1.0.0
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tsb-tennis
Tags: tennis, sports, clay-court, block-patterns, full-site-editing, custom-colors, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   TSB Tennis Theme Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   CSS Custom Properties (Variables)
   -------------------------------------------------------------------------- */
:root {
    /* Primary Colors - Clay Court Theme */
    --tsb-primary: #D84315;
    --tsb-primary-dark: #BF360C;
    --tsb-primary-light: #FF5722;
    
    /* Secondary Colors */
    --tsb-secondary: #FFB74D;
    --tsb-secondary-dark: #FF9800;
    
    /* Court Colors */
    --tsb-court-green: #4a7c59;
    --tsb-court-clay: #E64A19;
    --tsb-court-hard: #3d5a80;
    
    /* Neutral Colors */
    --tsb-white: #ffffff;
    --tsb-light-gray: #f5f5f5;
    --tsb-gray: #9e9e9e;
    --tsb-dark-gray: #424242;
    --tsb-black: #212121;
    
    /* Text Colors */
    --tsb-text-primary: #212121;
    --tsb-text-secondary: #757575;
    --tsb-text-light: #ffffff;
    
    /* Spacing */
    --tsb-spacing-xs: 0.25rem;
    --tsb-spacing-sm: 0.5rem;
    --tsb-spacing-md: 1rem;
    --tsb-spacing-lg: 1.5rem;
    --tsb-spacing-xl: 2rem;
    --tsb-spacing-xxl: 3rem;
    
    /* Border Radius */
    --tsb-radius-sm: 4px;
    --tsb-radius-md: 8px;
    --tsb-radius-lg: 12px;
    
    /* Shadows */
    --tsb-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --tsb-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tsb-shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    
    /* Transitions */
    --tsb-transition-fast: 150ms ease;
    --tsb-transition-normal: 300ms ease;
}

/* --------------------------------------------------------------------------
   Base Styles
   -------------------------------------------------------------------------- */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--tsb-text-primary);
}

/* Serbian Cyrillic optimization */
body:lang(sr),
body:lang(sr-RS) {
    font-family: 'Segoe UI', 'DejaVu Sans', Roboto, Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   Header Styles
   -------------------------------------------------------------------------- */
.wp-site-header {
    background: linear-gradient(135deg, var(--tsb-primary-dark) 0%, var(--tsb-primary) 100%);
    box-shadow: var(--tsb-shadow-md);
}

.wp-site-header .wp-block-site-title a {
    color: var(--tsb-white);
    text-decoration: none;
    font-weight: 700;
}

.tsb-header-top {
    background-color: var(--tsb-primary-dark);
    padding: var(--tsb-spacing-xs) var(--tsb-spacing-md);
    font-size: 0.875rem;
    color: var(--tsb-text-light);
}

.tsb-header-top a {
    color: var(--tsb-secondary);
}

/* --------------------------------------------------------------------------
   Navigation Styles
   -------------------------------------------------------------------------- */
.wp-block-navigation {
    font-weight: 500;
}

.wp-block-navigation a {
    color: var(--tsb-white);
    padding: var(--tsb-spacing-sm) var(--tsb-spacing-md);
    transition: var(--tsb-transition-fast);
}

.wp-block-navigation a:hover,
.wp-block-navigation a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--tsb-secondary);
}

.wp-block-navigation .current-menu-item > a {
    background-color: rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid var(--tsb-secondary);
}

/* Mobile Navigation */
.wp-block-navigation__responsive-container.is-menu-open {
    background-color: var(--tsb-primary-dark);
}

/* --------------------------------------------------------------------------
   Tournament Cards
   -------------------------------------------------------------------------- */
.tsb-tournament-card {
    background: var(--tsb-white);
    border-radius: var(--tsb-radius-md);
    box-shadow: var(--tsb-shadow-sm);
    overflow: hidden;
    transition: var(--tsb-transition-normal);
    border-left: 4px solid var(--tsb-primary);
}

.tsb-tournament-card:hover {
    box-shadow: var(--tsb-shadow-lg);
    transform: translateY(-2px);
}

.tsb-tournament-card__header {
    background: linear-gradient(135deg, var(--tsb-primary) 0%, var(--tsb-primary-light) 100%);
    color: var(--tsb-white);
    padding: var(--tsb-spacing-md);
}

.tsb-tournament-card__body {
    padding: var(--tsb-spacing-md);
}

.tsb-tournament-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--tsb-spacing-sm);
    margin-bottom: var(--tsb-spacing-sm);
}

.tsb-tournament-card__tag {
    background: var(--tsb-light-gray);
    color: var(--tsb-text-secondary);
    padding: var(--tsb-spacing-xs) var(--tsb-spacing-sm);
    border-radius: var(--tsb-radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.tsb-tournament-card__tag--boys {
    background: #e3f2fd;
    color: #1565c0;
}

.tsb-tournament-card__tag--girls {
    background: #fce4ec;
    color: #c2185b;
}

.tsb-tournament-card__tag--10s {
    background: #fff3e0;
    color: #e65100;
}

/* --------------------------------------------------------------------------
   Age Category Badges
   -------------------------------------------------------------------------- */
.tsb-age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.875rem;
}

.tsb-age-badge--10 { background: #FFCCBC; color: #BF360C; }
.tsb-age-badge--12 { background: #FFE0B2; color: #E65100; }
.tsb-age-badge--14 { background: #FFCC80; color: #EF6C00; }
.tsb-age-badge--16 { background: #FFAB91; color: #D84315; }
.tsb-age-badge--18 { background: #FF8A65; color: #BF360C; }
.tsb-age-badge--senior { background: #BCAAA4; color: #4E342E; }

/* --------------------------------------------------------------------------
   Sidebar Widgets
   -------------------------------------------------------------------------- */
.tsb-sidebar {
    background: var(--tsb-light-gray);
    padding: var(--tsb-spacing-lg);
    border-radius: var(--tsb-radius-md);
}

.tsb-widget {
    background: var(--tsb-white);
    border-radius: var(--tsb-radius-md);
    padding: var(--tsb-spacing-md);
    margin-bottom: var(--tsb-spacing-md);
    box-shadow: var(--tsb-shadow-sm);
}

.tsb-widget__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--tsb-primary-dark);
    margin-bottom: var(--tsb-spacing-md);
    padding-bottom: var(--tsb-spacing-sm);
    border-bottom: 2px solid var(--tsb-primary);
}

.tsb-widget__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tsb-widget__list li {
    padding: var(--tsb-spacing-sm) 0;
    border-bottom: 1px solid var(--tsb-light-gray);
}

.tsb-widget__list li:last-child {
    border-bottom: none;
}

.tsb-widget__list a {
    color: var(--tsb-text-primary);
    text-decoration: none;
    transition: var(--tsb-transition-fast);
}

.tsb-widget__list a:hover {
    color: var(--tsb-primary);
}

/* --------------------------------------------------------------------------
   Download Section
   -------------------------------------------------------------------------- */
.tsb-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--tsb-spacing-md);
}

.tsb-download-item {
    display: flex;
    align-items: center;
    gap: var(--tsb-spacing-md);
    background: var(--tsb-white);
    padding: var(--tsb-spacing-md);
    border-radius: var(--tsb-radius-md);
    box-shadow: var(--tsb-shadow-sm);
    text-decoration: none;
    color: var(--tsb-text-primary);
    transition: var(--tsb-transition-normal);
}

.tsb-download-item:hover {
    box-shadow: var(--tsb-shadow-md);
    background: var(--tsb-light-gray);
}

.tsb-download-item__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tsb-primary);
    color: var(--tsb-white);
    border-radius: var(--tsb-radius-sm);
    font-size: 1.5rem;
}

.tsb-download-item__icon--pdf {
    background: #d32f2f;
}

.tsb-download-item__icon--doc {
    background: #1976d2;
}

.tsb-download-item__icon--xls {
    background: #388e3c;
}

.tsb-download-item__info {
    flex: 1;
}

.tsb-download-item__title {
    font-weight: 600;
    margin-bottom: var(--tsb-spacing-xs);
}

.tsb-download-item__meta {
    font-size: 0.875rem;
    color: var(--tsb-text-secondary);
}

/* --------------------------------------------------------------------------
   Sponsor Banner Area
   -------------------------------------------------------------------------- */
.tsb-sponsors {
    background: var(--tsb-light-gray);
    padding: var(--tsb-spacing-xl) 0;
}

.tsb-sponsors__title {
    text-align: center;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--tsb-text-secondary);
    margin-bottom: var(--tsb-spacing-lg);
}

.tsb-sponsors__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--tsb-spacing-xl);
}

.tsb-sponsors__item {
    max-width: 180px;
    opacity: 0.7;
    transition: var(--tsb-transition-normal);
    filter: grayscale(100%);
}

.tsb-sponsors__item:hover {
    opacity: 1;
    filter: grayscale(0%);
}

/* --------------------------------------------------------------------------
   Club Listing
   -------------------------------------------------------------------------- */
.tsb-clubs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--tsb-spacing-md);
}

.tsb-club-item {
    background: var(--tsb-white);
    border-radius: var(--tsb-radius-md);
    padding: var(--tsb-spacing-lg);
    box-shadow: var(--tsb-shadow-sm);
    border-left: 4px solid var(--tsb-court-green);
}

.tsb-club-item__name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tsb-primary-dark);
    margin-bottom: var(--tsb-spacing-sm);
}

.tsb-club-item__info {
    font-size: 0.875rem;
    color: var(--tsb-text-secondary);
}

.tsb-club-item__info p {
    margin: var(--tsb-spacing-xs) 0;
    display: flex;
    align-items: center;
    gap: var(--tsb-spacing-sm);
}

/* --------------------------------------------------------------------------
   Contact Sections
   -------------------------------------------------------------------------- */
.tsb-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--tsb-spacing-lg);
}

.tsb-contact-card {
    background: var(--tsb-white);
    border-radius: var(--tsb-radius-md);
    padding: var(--tsb-spacing-lg);
    box-shadow: var(--tsb-shadow-sm);
    text-align: center;
}

.tsb-contact-card__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--tsb-spacing-md);
    background: var(--tsb-primary);
    color: var(--tsb-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.tsb-contact-card__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--tsb-primary-dark);
    margin-bottom: var(--tsb-spacing-sm);
}

.tsb-contact-card__email a {
    color: var(--tsb-primary);
    text-decoration: none;
}

.tsb-contact-card__email a:hover {
    text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.tsb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--tsb-spacing-sm);
    padding: var(--tsb-spacing-sm) var(--tsb-spacing-lg);
    border-radius: var(--tsb-radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: var(--tsb-transition-fast);
    cursor: pointer;
    border: none;
}

.tsb-btn--primary {
    background: var(--tsb-primary);
    color: var(--tsb-white);
}

.tsb-btn--primary:hover {
    background: var(--tsb-primary-dark);
}

.tsb-btn--secondary {
    background: var(--tsb-secondary);
    color: var(--tsb-black);
}

.tsb-btn--secondary:hover {
    background: var(--tsb-secondary-dark);
}

.tsb-btn--outline {
    background: transparent;
    border: 2px solid var(--tsb-primary);
    color: var(--tsb-primary);
}

.tsb-btn--outline:hover {
    background: var(--tsb-primary);
    color: var(--tsb-white);
}

.tsb-btn--register {
    background: var(--tsb-secondary);
    color: var(--tsb-black);
    font-size: 1rem;
    padding: var(--tsb-spacing-md) var(--tsb-spacing-xl);
}

.tsb-btn--register:hover {
    background: var(--tsb-secondary-dark);
    transform: scale(1.02);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.wp-site-footer {
    background: var(--tsb-dark-gray);
    color: var(--tsb-text-light);
}

.tsb-footer-main {
    padding: var(--tsb-spacing-xxl) 0;
}

.tsb-footer-bottom {
    background: var(--tsb-black);
    padding: var(--tsb-spacing-md) 0;
    font-size: 0.875rem;
    text-align: center;
}

.tsb-footer-bottom a {
    color: var(--tsb-secondary);
}

.tsb-social-links {
    display: flex;
    gap: var(--tsb-spacing-md);
}

.tsb-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--tsb-white);
    transition: var(--tsb-transition-fast);
}

.tsb-social-links a:hover {
    background: var(--tsb-primary);
}

/* --------------------------------------------------------------------------
   Responsive Design
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .tsb-tournament-card {
        margin-bottom: var(--tsb-spacing-md);
    }
}

@media (max-width: 768px) {
    :root {
        --tsb-spacing-lg: 1rem;
        --tsb-spacing-xl: 1.5rem;
        --tsb-spacing-xxl: 2rem;
    }
    
    .tsb-downloads {
        grid-template-columns: 1fr;
    }
    
    .tsb-clubs-list {
        grid-template-columns: 1fr;
    }
    
    .tsb-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tsb-header-top {
        text-align: center;
    }
    
    .tsb-sponsors__grid {
        flex-direction: column;
    }
}

/* --------------------------------------------------------------------------
   Clay Court Theme Decorations
   -------------------------------------------------------------------------- */
.tsb-hero {
    position: relative;
    background: linear-gradient(135deg, var(--tsb-primary-dark) 0%, var(--tsb-primary) 50%, var(--tsb-primary-light) 100%);
    overflow: hidden;
}

.tsb-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('assets/images/pattern-clay.svg');
    background-size: 100px 100px;
    opacity: 0.1;
    pointer-events: none;
}

.tsb-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-image: url('assets/images/player-silhouette.svg');
    background-repeat: no-repeat;
    background-position: bottom right;
    background-size: contain;
    opacity: 0.15;
    pointer-events: none;
}

.tsb-section-clay {
    background: linear-gradient(180deg, var(--tsb-primary) 0%, var(--tsb-primary-dark) 100%);
    position: relative;
}

.tsb-section-clay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('assets/images/court-lines.svg');
    background-size: cover;
    background-position: center;
    opacity: 0.05;
}

/* Decorative tennis ball */
.tsb-tennis-ball-decoration {
    width: 60px;
    height: 60px;
    background-image: url('assets/images/tennis-ball.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Belgrade skyline decoration */
.tsb-belgrade-skyline {
    background-image: url('assets/images/belgrade-skyline.svg');
    background-repeat: repeat-x;
    background-position: bottom;
    background-size: auto 100px;
    min-height: 100px;
    opacity: 0.3;
}

/* Icon styles using SVG assets */
.tsb-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.tsb-icon--download { background-image: url('assets/images/icon-download.svg'); }
.tsb-icon--calendar { background-image: url('assets/images/icon-calendar.svg'); }
.tsb-icon--location { background-image: url('assets/images/icon-location.svg'); }
.tsb-icon--email { background-image: url('assets/images/icon-email.svg'); }
.tsb-icon--phone { background-image: url('assets/images/icon-phone.svg'); }

/* Trophy decoration for achievements */
.tsb-trophy-icon {
    width: 50px;
    height: 60px;
    background-image: url('assets/images/trophy.svg');
    background-size: contain;
    background-repeat: no-repeat;
}

/* Logo placeholder */
.tsb-logo {
    background-image: url('assets/images/logo-tsb.svg');
    background-size: contain;
    background-repeat: no-repeat;
    width: 200px;
    height: 80px;
}

/* Warm clay accents */
.has-clay-background {
    background: linear-gradient(135deg, #E64A19 0%, #BF360C 100%);
}

.has-warm-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,183,77,0.1) 0%, rgba(191,54,12,0.2) 100%);
    pointer-events: none;
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .wp-site-header,
    .wp-site-footer,
    .tsb-sidebar,
    .tsb-sponsors {
        display: none;
    }
    
    .tsb-tournament-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .tsb-hero::before,
    .tsb-hero::after {
        display: none;
    }
}
