/* FollowFitness Main Stylesheet */

/* Import Fonts */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Root Variables */
:root {
    /* New fitness-focused blue color scheme */
    --primary: #007bff;  /* Vibrant blue */
    --primary-dark: #0056b3;  /* Darker blue for hover states */
    --secondary: #2b3452;
    --accent: #00d4ff;  /* Light blue accent */
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --light: #f8f9fa;
    --dark: #343a40;
    --gray: #6c757d;
    --body-bg: #ffffff;
    --body-color: #212529;
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow-sm: 0 .125rem .25rem rgba(0, 0, 0, .075);
    --shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, .175);
}

/* Base Styles */
html, body {
    height: 100%;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--body-color);
    background-color: var(--body-bg);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* Header Styles */
.tstbite-header {
    position: sticky;
    top: 0;
    z-index: 1030;
    width: 100%;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    background-color: var(--body-bg);
    padding: 0.5rem 0;
}

.navbar-brand img {
    max-height: 40px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: var(--secondary);
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
}

/* Hero Section */
.discover-hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("/static/images/hero/discover_hero.png");
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    margin-bottom: 2rem;
}

/* Workout Cards */
.workout-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.workout-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.workout-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.workout-card .card-body {
    padding: 1.25rem;
}

.workout-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray);
    font-size: 0.875rem;
}

/* Fitness Progress Elements */
.progress-circle {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) var(--progress), #eee 0deg);
}

.progress-circle::before {
    content: attr(data-progress) '%';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.25rem;
    font-weight: 600;
}

/* Workout Difficulty Badges */
.difficulty-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.difficulty-beginner {
    background-color: #e7faf0;
    color: #00a651;
}

.difficulty-intermediate {
    background-color: #fff3e0;
    color: #ff9800;
}

.difficulty-advanced {
    background-color: #ffe5e5;
    color: #dc3545;
}

/* Filter Pills */
.filter-pill {
    border-radius: 25px;
    padding: 8px 20px;
    margin: 5px;
    transition: all 0.3s;
    border: none;
    box-shadow: var(--shadow-sm);
    background-color: var(--light);
    color: var(--dark);
    cursor: pointer;
}

.filter-pill:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.filter-pill.active {
    background-color: var(--primary);
    color: white;
}

/* Timer Components */
.workout-timer {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    padding: 2rem;
    background: var(--light);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.timer-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Exercise List */
.exercise-list {
    list-style: none;
    padding: 0;
}

.exercise-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.exercise-item:hover {
    background-color: var(--light);
}

.exercise-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    margin-right: 1rem;
}

/* Custom Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

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

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

/* Search Container */
.search-container {
    background: white;
    border-radius: 30px;
    padding: 20px;
    box-shadow: var(--shadow);
    margin-top: -50px;
    position: relative;
    z-index: 100;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Main Content */
main {
    flex: 1 0 auto;
    padding-bottom: 2rem;
}

/* Footer Styles */
footer {
    background-color: var(--secondary);
    color: white;
    padding: 4rem 0 2rem;
    flex-shrink: 0;
    margin-top: auto;
}

footer h5, footer h6 {
    color: var(--accent);
    margin-bottom: 1.5rem;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer ul li {
    margin-bottom: 0.75rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--accent);
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: white;
}

.social-links a:hover {
    color: var(--accent);
}

/* Category Badge */
.category-badge {
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: var(--primary);
    color: white;
}

/* Circle Icon */
.circle-icon {
    background: var(--primary);
    padding: 15px;
    border-radius: 50%;
    color: white;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .tstbite-header {
        position: fixed;
        width: 100%;
    }

    body {
        padding-top: 60px;
    }

    .discover-hero-section {
        padding: 40px 0;
    }

    .workout-card .card-img-top {
        height: 150px;
    }

    .workout-timer {
        font-size: 2rem;
        padding: 1rem;
    }

    .stats-number {
        font-size: 1.5rem;
    }

    .search-container {
        margin-top: -30px;
        padding: 15px;
    }
}

/* HTMX Loading States */
.htmx-indicator {
    opacity: 0;
    transition: opacity 200ms ease-in;
}

.htmx-request .htmx-indicator {
    opacity: 1;
}

.htmx-request.htmx-indicator {
    opacity: 1;
}

/* Animations */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1060;
}

.toast {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 0.75rem;
}

.toast-header {
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
}

.toast-body {
    padding: 1rem;
}

/* Background Light Text Styles */
.bg-light {
    color: var(--dark);
}

.bg-light h1,
.bg-light h2,
.bg-light h3,
.bg-light h4,
.bg-light h5,
.bg-light h6,
.bg-light p,
.bg-light span,
.bg-light a:not(.btn) {
    color: var(--dark);
}

.bg-light a:not(.btn):hover {
    color: var(--primary);
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Focus States */
:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}