:root {
    --primary: #FF6B35;
    --primary-hover: #e55a2b;
    --secondary: #1A2B4C;
    --accent: #00C9A7;
    --dark: #0F1A2E;
    --light: #F8F9FA;
    --gray: #6B7280;
    --border: #E5E7EB;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
    --radius: 12px;
    --radius-sm: 8px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--secondary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

/* Navbar */
.navbar-tren {
    background: var(--secondary) !important;
    padding: .75rem 0;
}
.navbar-tren .navbar-brand {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -.5px;
}
.navbar-tren .nav-link {
    color: rgba(255,255,255,.8) !important;
    font-weight: 500;
    font-size: .9rem;
    padding: .5rem 1rem !important;
    transition: color .2s;
}
.navbar-tren .nav-link:hover,
.navbar-tren .nav-link.active {
    color: #fff !important;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #ff8a5c);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .6rem 1.5rem;
    border-radius: var(--radius-sm);
    transition: all .3s;
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255,107,53,.3);
}
.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .3s;
}
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:focus-visible {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary) !important;
    transform: translateY(-1px);
}
/* Remove blue focus outline from all buttons */
.btn:focus, .btn:active, .btn:focus-visible {
    box-shadow: none !important;
    outline: none !important;
}

/* Contact button (orange) */
.btn-contact {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .3s ease;
}
.btn-contact:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,53,.3);
}

/* Write button (dark blue, mobile only) */
.btn-write {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .3s ease;
}
.btn-write:hover {
    background-color: #2a3b5c;
    border-color: #2a3b5c;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26,43,76,.3);
}

/* Load-more button (gray outline) */
.btn-load-more {
    background: transparent;
    border: 2px solid #6c757d;
    color: #6c757d;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .3s ease;
}
.btn-load-more:hover {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
    transform: translateY(-2px);
}

.btn-accent {
    background: var(--accent);
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all .3s;
}
.btn-accent:hover {
    background: #00b898;
    transform: translateY(-1px);
}

/* Cards */
.card-tren {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    transition: all .3s ease;
    background: #fff;
}
.card-tren:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.card-tren .card-img-top {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
.card-tren .card-body { padding: 1.25rem; }

/* Hero */
.hero-section {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e3a6e 100%);
    color: #fff;
    padding: 5rem 0 4rem;
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,107,53,.15);
    pointer-events: none;
}
.hero-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 3rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}
.hero-subtitle {
    font-size: 1.1rem;
    opacity: .85;
    margin-bottom: 2rem;
    max-width: 540px;
}

/* Feature blocks */
.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.feature-icon.orange { background: rgba(255,107,53,.12); color: var(--primary); }
.feature-icon.teal { background: rgba(0,201,167,.12); color: var(--accent); }
.feature-icon.blue { background: rgba(26,43,76,.1); color: var(--secondary); }

/* Badges */
.badge-tren {
    font-size: .75rem;
    font-weight: 600;
    padding: .25em .7em;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.badge-vip {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1A2B4C;
}
.badge-verified {
    background: var(--accent);
    color: #fff;
}

/* Rating stars */
.star-rating {
    color: #f59e0b;
    font-size: .9rem;
    letter-spacing: 1px;
}
.star-rating .empty { color: var(--border); }

/* Profile photo */
.profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
}
.profile-photo-sm {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

/* Section headings */
.section-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}
.section-subtitle {
    color: var(--gray);
    font-size: 1rem;
    margin-bottom: 2.5rem;
}

/* CTA section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), #ff8a5c);
    color: #fff;
    padding: 3.5rem 0;
    text-align: center;
}

/* Footer */
.footer-tren {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 2.5rem 0 1.5rem;
    font-size: .9rem;
}
.footer-tren h6 {
    color: #fff;
    font-weight: 600;
    margin-bottom: 1rem;
}
.footer-tren a {
    color: rgba(255,255,255,.7);
    text-decoration: none;
    transition: color .2s;
}
.footer-tren a:hover { color: var(--primary); }

/* Search bar */
.search-bar {
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50px;
    padding: .45rem 1rem .45rem 1.2rem;
    color: #fff;
    font-size: .9rem;
    width: 220px;
    transition: all .3s;
}
.search-bar::placeholder { color: rgba(255,255,255,.6); }
.search-bar:focus {
    outline: none;
    background: rgba(255,255,255,.2);
    width: 280px;
}

/* Filter sidebar */
.filter-section {
    background: #fff;
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.filter-section h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Pagination */
.pagination-tren .page-link {
    border: none;
    color: var(--secondary);
    font-weight: 500;
    padding: .5rem .9rem;
    border-radius: var(--radius-sm);
    margin: 0 2px;
}
.pagination-tren .page-item.active .page-link {
    background: var(--primary);
    color: #fff;
}
.pagination-tren .page-item.disabled .page-link {
    color: var(--border);
}

/* Club banner */
.club-banner {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: var(--radius);
}
.club-logo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 16px;
    border: 3px solid #fff;
    box-shadow: var(--shadow-md);
    margin-top: -60px;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 2.2rem; }
    .hero-section { padding: 3rem 0; }
    .search-bar { width: 100%; margin-top: .5rem; }
    .search-bar:focus { width: 100%; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 1.8rem; }
    .card-tren .card-img-top { height: 180px; }
    .club-banner { height: 200px; }
    .club-logo { width: 80px; height: 80px; margin-top: -50px; }
}

/* Alerts */
.alert-error, .alert-danger {
    background: rgba(255,107,53,.12);
    color: #d9430e;
    border: 1px solid rgba(255,107,53,.3);
}
.alert-success {
    background: rgba(0,201,167,.12);
    color: #008f79;
    border: 1px solid rgba(0,201,167,.3);
}

/* Post content */
.post-content h1, .post-content h2, .post-content h3 { margin-top: 1.5rem; margin-bottom: .75rem; }
.post-content p { margin-bottom: 1rem; line-height: 1.7; }
.post-content ul, .post-content ol { margin-bottom: 1rem; }
.post-content img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }

/* Write button visibility: hidden on desktop */
@media (min-width: 992px) {
    .btn-write-trainer { display: none !important; }
}

/* Social links */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light);
    color: var(--secondary);
    transition: all .2s;
}
.social-link:hover {
    background: var(--primary);
    color: #fff;
}

/* Portrait trainer card */
.trainer-card-portrait {
    aspect-ratio: 2 / 3;
    max-height: 480px;
    display: flex;
    flex-direction: column;
    position: relative;
    border: none;
    border-radius: var(--radius) !important;
    overflow: hidden;
    background: var(--secondary);
}
.trainer-card-portrait:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}
.trainer-card-portrait .trainer-photo-wrap {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
.trainer-card-portrait .trainer-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
.trainer-card-portrait .trainer-photo-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a6e 0%, var(--secondary) 100%);
    font-size: 4rem;
    color: rgba(255,255,255,.15);
}
.trainer-card-portrait .trainer-photo-placeholder i {
    font-size: 5rem;
}
.trainer-card-portrait .trainer-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,.75));
    padding: 48px 16px 14px;
    color: #fff;
    z-index: 1;
    pointer-events: none;
}
.trainer-card-portrait .trainer-info-overlay h6 {
    color: #fff;
    margin-bottom: 2px;
    font-weight: 700;
    font-size: 1rem;
}
.trainer-card-portrait .trainer-info-overlay .trainer-city {
    color: rgba(255,255,255,.75);
}
.trainer-card-portrait .trainer-info-overlay .badge-overlay {
    background: rgba(255,255,255,.18);
    color: #fff;
    font-weight: 500;
    backdrop-filter: blur(4px);
}
.trainer-card-portrait .trainer-info-overlay .leads-badge {
    color: rgba(255,255,255,.6);
}
.trainer-card-portrait .trainer-vip-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: var(--secondary);
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}
@media (max-width: 575px) {
    .trainer-card-portrait .trainer-info-overlay {
        padding: 40px 12px 12px;
    }
    .trainer-card-portrait .trainer-info-overlay h6 {
        font-size: .95rem;
    }
}

/* trainer card image handled inline in template */

/* Password toggle */
.password-field-wrapper .form-control {
    padding-right: 45px;
}
.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    cursor: pointer;
    padding: 5px;
    color: #6c757d;
    line-height: 1;
    z-index: 10;
}
.toggle-password:hover { color: var(--dark); }
.toggle-password:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--dark);
    color: #fff;
    padding: 12px 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,.3);
}
.cookie-banner-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.cookie-banner-content p { margin-bottom: 0; }
.cookie-banner-content a { color: var(--accent); }
@media (max-width: 576px) {
    .cookie-banner-content { flex-direction: column; text-align: center; }
}

/* Gallery lightbox */
.gallery-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 9999;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.gallery-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
}
.gallery-close {
    position: absolute;
    top: 16px; right: 16px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    background: none;
    border: none;
    padding: 8px 12px;
    line-height: 1;
}
.gallery-prev, .gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
    background: rgba(255,255,255,.1);
    border: none;
    border-radius: 4px;
    padding: 16px 8px;
    line-height: 1;
}
.gallery-prev { left: 16px; }
.gallery-next { right: 16px; }
.gallery-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: .9rem;
}
