/* ==============================================================================
   GYM MOBILE WEBSITE & ADMIN PANEL - STYLESHEET
   Theme: Professional Light Slate Grey & Clean Crisp Aesthetics
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Oswald:wght@500;600;700&display=swap');

:root {
    /* Color Palette - Elegant Light Slate & Soft Grey */
    --bg-dark: #F8FAFC;           /* Base App Page Background (Soft Ice Grey) */
    --bg-surface: #FFFFFF;        /* Header & Nav Background (Clean White) */
    --bg-card: #FFFFFF;           /* Card Containers (Crisp White) */
    --bg-card-hover: #F1F5F9;     /* Subtle Card Hover State */
    --bg-input: #F8FAFC;          /* Form Input Fields */
    
    /* Borders & Dividers */
    --border-subtle: #E2E8F0;     /* Soft Grey Divider */
    --border-highlight: #CBD5E1;  /* Card Border */
    
    /* Primary Text & Accents */
    --text-primary: #0F172A;       /* Deep Slate Charcoal for High Readability */
    --text-secondary: #475569;     /* Slate Grey Subtitles */
    --text-muted: #64748B;         /* Muted Labels */
    
    /* Professional Accent Highlight (Ocean Slate Blue) */
    --accent-blue: #0284C7;        /* Primary Accent Action Color */
    --accent-blue-hover: #0369A1;  /* Darker Blue Hover */
    --accent-silver: #94A3B8;      /* Light Silver Text */
    --accent-glow: rgba(2, 132, 199, 0.15);
    
    /* Status Colors */
    --status-success: #059669;
    --status-warning: #D97706;
    --status-danger: #DC2626;

    /* Fonts */
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Dimensions & Radius */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --nav-height: 68px;
    --header-height: 64px;
}

/* 1. Global Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: #E2E8F0; /* Outer page grey background */
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: calc(var(--nav-height) + 20px);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    outline: none;
}

/* Container Wrapper (Mobile Centered on Desktop) */
.app-container {
    max-width: 480px;
    margin: 0 auto;
    background-color: var(--bg-dark);
    min-height: 100vh;
    position: relative;
    box-shadow: 0 0 35px rgba(15, 23, 42, 0.08);
}

@media (min-width: 768px) {
    .app-container {
        border-left: 1px solid var(--border-subtle);
        border-right: 1px solid var(--border-subtle);
    }
}

/* 2. Top Header & Announcement */
.top-announcement {
    background: linear-gradient(90deg, #0F172A, #1E293B, #0F172A);
    color: #F8FAFC;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo i {
    font-size: 1.5rem;
    color: var(--accent-blue);
}

.brand-logo .brand-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.brand-logo .brand-tag {
    font-size: 0.65rem;
    color: var(--text-secondary);
    display: block;
    font-family: var(--font-body);
    letter-spacing: 0.05em;
}

.header-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--status-success);
    background: rgba(5, 150, 105, 0.1);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.status-dot {
    width: 7px;
    height: 7px;
    background-color: var(--status-success);
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* 3. Hero Carousel (Swiper.js) */
.hero-swiper {
    width: 100%;
    height: 320px;
    position: relative;
}

.hero-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.8) 75%, rgba(15, 23, 42, 0.92) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 24px 20px;
    width: 100%;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 8px;
    color: #FFFFFF;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-subtitle {
    font-size: 0.85rem;
    color: #E2E8F0;
    margin-bottom: 16px;
    max-width: 90%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--accent-blue);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.85rem;
    padding: 12px 22px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-primary:active, .btn-primary:hover {
    background-color: var(--accent-blue-hover);
    color: #FFFFFF;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #F1F5F9;
    color: var(--text-primary);
    border: 1px solid var(--border-highlight);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 11px 20px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-secondary:active, .btn-secondary:hover {
    background-color: #E2E8F0;
    border-color: var(--accent-blue);
}

/* 4. Section Blocks */
.section-block {
    padding: 24px 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 0.78rem;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    display: block;
    margin-bottom: 2px;
}

/* Stats Counter Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    background-color: var(--bg-surface);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.stat-card {
    text-align: center;
}

.stat-card .stat-num {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--accent-blue);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-top: 4px;
    font-weight: 600;
}

/* Category Filter Pills */
.category-pills {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 16px;
    scrollbar-width: none;
}

.category-pills::-webkit-scrollbar {
    display: none;
}

.pill-item {
    white-space: nowrap;
    background-color: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.pill-item.active, .pill-item:active {
    background-color: var(--accent-blue);
    color: #FFFFFF;
    border-color: var(--accent-blue);
}

/* Cards (Classes, Trainers, Pricing) */
.class-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.class-card:hover {
    border-color: var(--border-highlight);
}

.class-img {
    height: 160px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.class-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(15, 23, 42, 0.85);
    color: #38BDF8;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.class-content {
    padding: 16px;
}

.class-title {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.class-meta {
    display: flex;
    gap: 14px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.class-meta i {
    color: var(--accent-blue);
    margin-right: 4px;
}

.class-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Trainer Card */
.trainer-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    text-align: center;
    padding: 20px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.trainer-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 12px;
    border: 2px solid var(--accent-blue);
    box-shadow: 0 0 15px var(--accent-glow);
}

.trainer-name {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.trainer-spec {
    font-size: 0.75rem;
    color: var(--accent-blue);
    font-weight: 700;
    margin-bottom: 8px;
}

.trainer-bio {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.35;
    margin-bottom: 12px;
}

.trainer-social {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: #F1F5F9;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

/* Pricing Cards */
.pricing-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.pricing-card.popular {
    border-color: var(--accent-blue);
    box-shadow: 0 4px 20px rgba(2, 132, 199, 0.15);
    background: linear-gradient(180deg, #FFFFFF 0%, #F0F9FF 100%);
}

.popular-ribbon {
    position: absolute;
    top: -12px;
    right: 20px;
    background-color: var(--accent-blue);
    color: #FFFFFF;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.plan-name {
    font-size: 1.25rem;
    margin-bottom: 8px;
}

.plan-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 16px;
}

.plan-price {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.plan-period {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.plan-features {
    list-style: none;
    margin-bottom: 20px;
}

.plan-features li {
    font-size: 0.83rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li i {
    color: var(--accent-blue);
    font-size: 0.9rem;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-item {
    height: 130px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-subtle);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    inset-x: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88) 0%, transparent 100%);
    padding: 8px 10px;
    font-size: 0.72rem;
    color: #FFFFFF;
    font-weight: 600;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    background-color: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.88rem;
    transition: border-color 0.2s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* 5. Fixed Bottom Navigation Bar (Mobile Touch Bar) */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    width: 20%;
    height: 100%;
    transition: color 0.2s ease;
}

.nav-link i {
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.nav-link.active {
    color: var(--accent-blue);
}

.nav-link.active i {
    transform: translateY(-2px);
}

/* 6. Admin Panel UI Specifics */
.admin-header {
    background-color: var(--bg-surface);
    padding: 16px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 6px;
    padding: 12px 16px;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    background: #F1F5F9;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1 1 auto;
    justify-content: center;
}

.tab-btn:hover {
    background: #E2E8F0;
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent-blue);
    color: #FFFFFF;
    border-color: var(--accent-blue);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.admin-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.image-preview-box {
    width: 100%;
    height: 140px;
    border: 2px dashed var(--border-highlight);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.image-preview-box i {
    font-size: 1.8rem;
    margin-bottom: 6px;
    color: var(--accent-blue);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.data-table th {
    background-color: #F1F5F9;
    color: var(--text-secondary);
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    text-transform: uppercase;
    font-size: 0.7rem;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
    vertical-align: middle;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #F1F5F9;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-icon.edit { color: var(--accent-blue); }
.btn-icon.delete { color: var(--status-danger); }

/* Utilities */
.hidden { display: none !important; }
.text-accent { color: var(--accent-blue) !important; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* 7. Persistent Floating WhatsApp Button */
.floating-whatsapp {
    position: fixed;
    bottom: calc(var(--nav-height) + 16px);
    right: 16px;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    color: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    z-index: 1001;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: wa-pulse 2.5s infinite;
}

.floating-whatsapp:hover, .floating-whatsapp:active {
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(37, 211, 102, 0.65);
    color: #FFFFFF;
}

@keyframes wa-pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
