/* ==========================================================================
   PREMIUM MOBILE-FIRST APP DESIGN SYSTEM
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS Variables & Theming
   -------------------------------------------------------------------------- */
:root {
    /* Brand Colors - Curated, vibrant, and modern */
    --primary: #4f46e5;
    /* Deep Indigo */
    --primary-light: #818cf8;
    --primary-dark: #3730a3;
    --primary-alpha: rgba(79, 70, 229, 0.1);

    --accent: #ec4899;
    /* Vibrant Pink for special highlights */

    /* Semantic Colors */
    --success: #10b981;
    --success-bg: #d1fae5;
    --success-text: #065f46;

    --warning: #f59e0b;
    --warning-bg: #fef3c7;
    --warning-text: #92400e;

    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;

    --info: #3b82f6;
    --info-bg: #dbeafe;
    --info-text: #1e40af;

    /* Backgrounds & Surfaces */
    --bg-main: #f8fafc;
    /* Off-white/slate base background */
    --surface-main: #ffffff;
    /* Pure white for cards */
    --surface-secondary: #f1f5f9;
    /* Slightly darker surface */

    /* Text Colors */
    --text-primary: #0f172a;
    /* Almost black */
    --text-secondary: #64748b;
    /* Muted slate */
    --text-muted: #94a3b8;
    --text-on-primary: #ffffff;

    /* Borders & Dividers */
    --divider: #e2e8f0;
    --border-light: rgba(0, 0, 0, 0.05);

    /* Elevation / Shadows (Soft, spread, premium look) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-float: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius (Extremely rounded for app feel) */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-pill: 9999px;

    /* Spacing System */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;

    /* Layout */
    --app-bar-height: 64px;
    --bottom-nav-height: 70px;
    --container-padding: 16px;
    --max-mobile-width: 600px;
    /* Keep it strictly mobile layout even on desktop */
}

/* --------------------------------------------------------------------------
   2. CSS Reset & Typography Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    /* Remove tap highlights on mobile */
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    background-color: var(--bg-main);
    /* Ensure outer background is grey on desktop */
}

body {
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* Center the app on larger screens to maintain mobile-first look */
    max-width: var(--max-mobile-width);
    margin: 0 auto;
    position: relative;
    box-shadow: var(--shadow-2xl);
    /* Optional: frame it on desktop */
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* Make room for fixed navs */
    padding-top: var(--app-bar-height);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-4));
}

/* Base Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2rem;
}

/* 32px */
h2 {
    font-size: 1.5rem;
}

/* 24px */
h3 {
    font-size: 1.25rem;
}

/* 20px */
h4 {
    font-size: 1.125rem;
}

/* 18px */

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:active {
    color: var(--primary-dark);
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Material Symbols Global Settings */
.material-symbols-rounded {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    display: inline-block;
    vertical-align: middle;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   3. Layout Containers
   -------------------------------------------------------------------------- */
.container {
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    width: 100%;
}

.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding-top: var(--space-4);
}

.page-header {
    margin-bottom: var(--space-6);
}

.page-header h1 {
    margin-bottom: var(--space-1);
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. App Bar (Top Header)
   -------------------------------------------------------------------------- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--app-bar-height);
    background-color: rgba(255, 255, 255, 0.85);
    /* Glass effect */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-light);

    /* Keep it contained within the mobile width on desktop */
    max-width: var(--max-mobile-width);
    margin: 0 auto;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.nav-brand h1 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0;
    color: var(--primary);
    letter-spacing: -0.03em;
}

/* Hide desktop menu elements that were used before */
.nav-menu {
    display: none !important;
}

/* Mobile App Bar Actions */
.app-bar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.icon-btn:active {
    background-color: var(--surface-secondary);
    transform: scale(0.95);
}

/* User Avatar in Header */
.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    object-fit: cover;
    border: 2px solid white;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

/* Dropdown styling (if we keep it on user avatar tap) */
.user-menu .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: var(--space-2);
    background: var(--surface-main);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    min-width: 200px;
    padding: var(--space-2) 0;
    z-index: 1001;
}

.user-menu:hover .dropdown,
.user-menu:active .dropdown {
    display: block;
    animation: fadeInDown 0.2s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.user-menu .dropdown a {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    font-weight: 500;
    transition: background-color 0.2s;
}

.user-menu .dropdown a:hover,
.user-menu .dropdown a:active {
    background-color: var(--surface-secondary);
}

.user-menu .dropdown a .material-symbols-rounded {
    color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   5. Bottom Navigation
   -------------------------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background-color: var(--surface-main);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    /* iOS safe area */
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.04);
    z-index: 1000;

    /* Keep it contained */
    max-width: var(--max-mobile-width);
    margin: 0 auto;

    /* Premium touch: slightly float it off the bottom edge on larger screens */
    /* Commented out to stick to the absolute bottom like a real app, but un-comment if desired */
    /* border-top-left-radius: var(--radius-lg); */
    /* border-top-right-radius: var(--radius-lg); */
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    width: 60px;
    /* Give them a defined tap target */
    height: 100%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bottom-nav-item .icon {
    font-size: 24px;
    margin-bottom: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

/* Active State */
.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active .icon {
    font-variation-settings: 'FILL' 1;
    /* Filled icon */
    transform: translateY(-2px) scale(1.1);
}

.bottom-nav-item.active .label {
    opacity: 1;
}

.bottom-nav-item .label {
    opacity: 0.8;
}

/* Indicator pill behind active icon (Optional premium touch) */
.bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 32px;
    background-color: var(--primary-alpha);
    border-radius: var(--radius-pill);
    z-index: -1;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: translateX(-50%) scale(0.8);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) scale(1);
        opacity: 1;
    }
}

/* --------------------------------------------------------------------------
   6. UI Components (Buttons, Forms, Badges)
   -------------------------------------------------------------------------- */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-pill);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    line-height: 1;
    font-family: inherit;
    width: 100%;
    /* Default to full width for mobile */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    transform: translateY(2px);
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

.btn-primary:active {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-secondary {
    background-color: var(--surface-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:active,
.btn-secondary:hover {
    background-color: #e2e8f0;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:active,
.btn-outline:hover {
    background-color: var(--primary-alpha);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
    width: auto;
}

/* Floating Action Button (FAB) */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--space-4));
    right: var(--space-4);
    width: 56px;
    height: 56px;
    border-radius: var(--radius-pill);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-float);
    z-index: 999;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
    text-decoration: none;
}

.fab .material-symbols-rounded {
    font-size: 28px;
}

.fab:active {
    transform: translateY(4px) scale(0.95);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-4);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
textarea {
    width: 100%;
    padding: 16px 20px;
    background-color: var(--surface-secondary);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    transition: all 0.3s ease;
    appearance: none;
    /* Remove native styling */
}

.form-control:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background-color: var(--surface-main);
    box-shadow: 0 0 0 4px var(--primary-alpha);
}

.form-control::placeholder,
input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Search Form */
.search-form {
    display: flex;
    gap: var(--space-2);
}

.search-form input {
    flex: 1;
    padding: 12px 20px;
    border-radius: var(--radius-pill);
}

.search-form .btn {
    width: auto;
    padding: 12px 24px;
}

/* Badges / Chips */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--primary-alpha);
    color: var(--primary);
}

/* Alerts */
.alert {
    padding: 16px;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.alert-success {
    background-color: var(--success-bg);
    color: var(--success-text);
}

.alert-error {
    background-color: var(--danger-bg);
    color: var(--danger-text);
}

.alert ul {
    margin-left: var(--space-4);
    list-style-type: disc;
}

/* --------------------------------------------------------------------------
   7. Homepage Feed (Categories & Article Cards)
   -------------------------------------------------------------------------- */

/* Horizontal Category Chips */
.categories-scroll {
    display: flex;
    overflow-x: auto;
    gap: var(--space-3);
    padding: 0 var(--container-padding) var(--space-4);
    margin: 0 calc(var(--container-padding) * -1);
    /* Break out of container to edge */
    -ms-overflow-style: none;
    /* Hide scrollbar */
    scrollbar-width: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-chip {
    padding: 10px 20px;
    background-color: var(--surface-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.category-chip.active {
    background-color: var(--text-primary);
    color: var(--surface-main);
}

.category-chip:not(.active):hover,
.category-chip:not(.active):active {
    background-color: #e2e8f0;
}

/* Article List Layout */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* Premium Article Card */
.article-card {
    background-color: var(--surface-main);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.02);
    /* For link wrapper */
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-card:active {
    transform: scale(0.98);
}

/* Wrapper 'a' tag behavior */
.article-card>a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-image-container {
    position: relative;
    width: 100%;
    padding-top: 60%;
    /* 16:9 Aspect Ratio roughly */
    background-color: var(--surface-secondary);
    overflow: hidden;
}

.article-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .article-image {
    transform: scale(1.05);
    /* Slight zoom on hover, mostly for desktop viewing */
}

.article-category-badge {
    position: absolute;
    top: var(--space-3);
    left: var(--space-3);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--primary-dark);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}

.article-content {
    padding: var(--space-4);
}

.article-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    /* Truncate after 2 lines */
    line-clamp: 2;
    /* Standard property for line-clamp */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.article-excerpt {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    /* Standard property for line-clamp */
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--divider);
    padding-top: var(--space-3);
}

.article-author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.author-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-pill);
    object-fit: cover;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.article-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.article-stats {
    display: flex;
    gap: var(--space-3);
    color: var(--text-muted);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
    font-weight: 600;
}

.stat-item .material-symbols-rounded {
    font-size: 18px;
}

/* --------------------------------------------------------------------------
   8. Full Article View (`article.php`)
   -------------------------------------------------------------------------- */
.article-detail {
    background-color: var(--surface-main);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-6);
    /* For immersive reading, no padding on the container itself */
}

/* Article Specific Header inside Detail */
.article-detail-header {
    padding: var(--space-5) var(--space-4);
}

.article-detail-header .badge {
    margin-bottom: var(--space-3);
}

.article-detail-title {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
}

/* Author section within article */
.article-author-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
}

.article-author-card .author-info-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.article-author-card .author-avatar {
    width: 48px;
    height: 48px;
}

.article-stats-large {
    display: flex;
    gap: var(--space-4);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.article-stats-large span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-stats-large .material-symbols-rounded {
    font-size: 20px;
    color: var(--text-secondary);
}

/* Main Image */
.article-main-image {
    width: 100%;
    /* We don't restrict height rigidly to let native aspect ratio work, but bound it */
    max-height: 400px;
    object-fit: cover;
    background-color: var(--surface-secondary);
}

/* Article Body Text */
.article-body {
    padding: var(--space-5) var(--space-4);
    font-size: 1.0625rem;
    /* 17px - optimal for reading */
    line-height: 1.7;
    color: #334155;
    /* Slightly softer than pure text-primary */
}

.article-body p {
    margin-bottom: var(--space-5);
}

.article-body img {
    border-radius: var(--radius-lg);
    margin: var(--space-4) 0;
}

.article-body h2,
.article-body h3 {
    margin-top: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

/* Article Footer/Actions */
.article-actions {
    padding: 0 var(--space-4) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

/* Interactive Like Button */
.btn-like {
    width: 100%;
    padding: 16px;
    border-radius: var(--radius-pill);
    background-color: var(--surface-secondary);
    border: none;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-like .material-symbols-rounded {
    font-size: 28px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), color 0.3s ease;
}

.btn-like:active {
    transform: scale(0.95);
    background-color: #e2e8f0;
}

.btn-like.liked {
    background-color: var(--primary-alpha);
    color: var(--primary);
}

.btn-like.liked .material-symbols-rounded {
    color: #ef4444;
    /* Heart red */
    transform: scale(1.1);
}

/* Share Section */
.share-section {
    background-color: var(--surface-main);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.share-section h3 {
    font-size: 1rem;
    margin-bottom: var(--space-3);
}

.share-buttons {
    display: flex;
    gap: var(--space-2);
    overflow-x: auto;
    padding-bottom: 8px;
    /* space for scrollbar if needed */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.share-buttons::-webkit-scrollbar {
    display: none;
}

.btn-share {
    flex: 0 0 auto;
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    background-color: var(--surface-secondary);
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.btn-share[data-platform="facebook"] {
    color: #1877F2;
    background: rgba(24, 119, 242, 0.1);
}

.btn-share[data-platform="twitter"] {
    color: #1DA1F2;
    background: rgba(29, 161, 242, 0.1);
}

.btn-share[data-platform="whatsapp"] {
    color: #25D366;
    background: rgba(37, 211, 102, 0.1);
}

.btn-share[data-platform="linkedin"] {
    color: #0A66C2;
    background: rgba(10, 102, 194, 0.1);
}


/* --------------------------------------------------------------------------
   9. Comments Section
   -------------------------------------------------------------------------- */
.comments-section {
    background-color: var(--surface-main);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-4);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
}

.comments-header {
    margin-bottom: var(--space-4);
}

.comments-header h3 {
    font-size: 1.25rem;
}

/* Comment Form */
.comment-form {
    margin-bottom: var(--space-5);
}

.comment-form textarea {
    background-color: var(--bg-main);
    border: 1px solid var(--border-light);
    margin-bottom: var(--space-3);
    min-height: 100px;
}

/* Comments List */
.comment {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--divider);
}

.comment:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-pill);
    object-fit: cover;
    flex-shrink: 0;
}

.comment-content {
    flex-grow: 1;
}

.comment-author {
    font-weight: 700;
    font-size: 0.9375rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.comment-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.comment-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   10. Authentication & Utility Pages (Login, Register, Profile)
   -------------------------------------------------------------------------- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--app-bar-height) - var(--bottom-nav-height) - 40px);
    padding: var(--space-4);
}

.auth-box {
    background: var(--surface-main);
    padding: var(--space-6) var(--space-5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 100%;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.auth-header h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.auth-header h2 {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.auth-footer {
    margin-top: var(--space-6);
    text-align: center;
    font-size: 0.875rem;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9375rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Profile Specifics */
.profile-card {
    background: var(--surface-main);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-photo-large {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-pill);
    object-fit: cover;
    margin-bottom: var(--space-3);
    border: 3px solid var(--surface-main);
    box-shadow: var(--shadow-md);
}

.profile-card h2 {
    margin-bottom: 2px;
}

.profile-card .username {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-card .role-badge {
    display: inline-block;
    background: var(--primary-alpha);
    color: var(--primary);
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    margin-top: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-main {
    background: var(--surface-main);
    border-radius: var(--radius-xl);
    padding: var(--space-5) var(--space-4);
    box-shadow: var(--shadow-sm);
}

.profile-main h3 {
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--divider);
}

hr {
    border: none;
    height: 1px;
    background-color: var(--divider);
    margin: var(--space-6) 0;
}

/* --------------------------------------------------------------------------
   11. Fixes for HTML structures & Cleanups
   -------------------------------------------------------------------------- */
/* Hide sidebar layout elements entirely for mobile first */
aside.sidebar {
    display: none;
}

.main-grid {
    display: flex;
    flex-direction: column;
}

/* No Articles / Empty states */
.no-articles {
    background: var(--surface-main);
    padding: var(--space-8) var(--space-4);
    border-radius: var(--radius-xl);
    text-align: center;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

/* Pagination container */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--surface-main);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-sm);
}

.pagination .page-info {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.pagination .btn {
    padding: 10px 20px;
}

/* Footer (Base) */
.site-footer {
    padding: var(--space-6) 0 calc(var(--bottom-nav-height) + var(--space-6));
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}