/* ============================================
   CoachZone Custom Styles
   ============================================ */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

/* ============================================
   General Styles
   ============================================ */

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    /* Fallback за стари браузъри */
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('../branding/app.webp');
    /* Modern WebP формат за по-бързо зареждане */
    background-image: linear-gradient(rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.7)), url('../branding/app.webp');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 1;
}

main {
    flex: 1;
}

/* ============================================
   Auth Pages Special Styling
   ============================================ */

.auth-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* Fallback за стари браузъри */
    background-image: linear-gradient(rgba(0, 51, 153, 0.3), rgba(0, 0, 0, 0.6)), url('../branding/app.webp');
    /* Modern WebP формат за по-бързо зареждане */
    background-image: linear-gradient(rgba(0, 51, 153, 0.3), rgba(0, 0, 0, 0.6)), url('../branding/app.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 100vh;
    width: 100vw;
    position: fixed;
    top: 0;
    left: 0;
    padding: 0;
    margin: 0;
    overflow-y: scroll;
    z-index: 100;
}

.auth-wrapper .container {
    flex: 1;

    padding-top: 6rem;
    padding-bottom: 3rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Navbar Customization
   ============================================ */

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand i {
    color: #ffc107;
}

/* ============================================
   Cards & Posts
   ============================================ */

.card {
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.post-card {
    margin-bottom: 1.5rem;
}

.post-card .card-header {
    background-color: white;
    border-bottom: 1px solid #dee2e6;
}

.post-card .card-footer {
    background-color: #f8f9fa;
}

/* ============================================
   Profile Images
   ============================================ */

.profile-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-image-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Badges
   ============================================ */

.subscription-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

.subscription-badge.paid {
    background-color: #ffc107;
    color: #000;
}

.subscription-badge.free {
    background-color: #6c757d;
    color: #fff;
}

/* ============================================
   Forms
   ============================================ */

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

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

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* ============================================
   Chat Styles
   ============================================ */

.chat-container {
    height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.chat-message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.chat-message.own {
    background-color: #e3f2fd;
    margin-left: 20%;
}

.chat-message.other {
    background-color: #f8f9fa;
    margin-right: 20%;
}

.chat-input-container {
    margin-top: 1rem;
}

/* ============================================
   Comments
   ============================================ */

.comment {
    border-left: 3px solid var(--primary-color);
    padding-left: 1rem;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* ============================================
   Loading Spinner
   ============================================ */

.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* ============================================
   Utilities
   ============================================ */

.text-muted-light {
    color: #6c757d;
    font-size: 0.9rem;
}

.hover-shadow:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 768px) {

    .chat-message.own,
    .chat-message.other {
        margin-left: 0;
        margin-right: 0;
    }

    .profile-image-large {
        width: 80px;
        height: 80px;
    }
}

/* ============================================
   Animation
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* ============================================
   Footer
   ============================================ */

footer {
    margin-top: auto;
}

/* ============================================
   Mobile Ads Banner
   ============================================ */

.mobile-ads-banner {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mobile-ads-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 5px;
}

.mobile-ads-scroll::-webkit-scrollbar {
    display: none;
}

.mobile-ad-card {
    flex: 0 0 auto;
    width: 140px;
    scroll-snap-align: start;
    border-radius: 10px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.mobile-ad-card:hover {
    transform: scale(1.02);
}

.mobile-ad-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.mobile-ad-card img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.mobile-ad-card .ad-title {
    padding: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-ad-placeholder {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

/* Sponsored label */
.mobile-ads-banner::before {
    content: "Sponsored";
    display: block;
    font-size: 0.7rem;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

