/* 
 * Pinmaps Blog - Modern Design System
 * Primary Color: #377ca8 (Pinmaps Blue)
 * Secondary Color: #0969da (Action Blue)
 * Accent Color: #2a6082 (Dark Blue)
 */

/* ===================================
   1. CSS VARIABLES & THEME
   =================================== */
:root {
    --pinmaps-primary: #377ca8;
    --pinmaps-primary-dark: #2a6082;
    --pinmaps-primary-light: #74add1;
    --pinmaps-action: #0969da;
    --pinmaps-success: #7fbf4d;
    --pinmaps-gradient-start: #377ca8;
    --pinmaps-gradient-end: #2a6082;
    --pinmaps-h1-hero-start: #ffffff;
    --pinmaps-h1-hero-end: #dddddd;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --border-rad-md: 1.0rem;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   2. GLOBAL RESETS & BASE STYLES
   =================================== */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

a {
    color: var(--pinmaps-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--pinmaps-action);
    text-decoration: none;
}

.container {
    max-width: 1200px;
}

/* ===================================
   3. NAVIGATION BAR
   =================================== */
.navbar {
    background: linear-gradient(135deg, var(--pinmaps-gradient-start) 0%, var(--pinmaps-gradient-end) 100%);
    box-shadow: var(--shadow-md);
    border: none;
    padding: 0.75rem 0;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    letter-spacing: -0.5px;
    transition: transform var(--transition-fast);
}

.navbar-brand:hover {
    transform: translateY(0);
    color: white !important;
}

.navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    margin: 0 0.25rem;
}

.navbar-light .navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transform: translateY(0);
}

.navbar-light .navbar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* Mobile navbar toggle */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.3);
    padding: 0.5rem 0.75rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===================================
   4. HERO SECTION / PAGE HEADER
   =================================== */
.blog-hero {
    /*background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-primary-dark) 100%);*/
    background: linear-gradient(135deg, var(--pinmaps-h1-hero-start) 0%, var(--pinmaps-h1-hero-end) 100%);
    color: #444;
    padding: 0.6rem 0 0 0;
    margin-bottom: 0.2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
    border-radius: var(--border-rad-md);    
}

.blog-hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

h1, .h1 {
    font-size: 2.0rem;
}

.blog-hero h1 {
    font-size: 1.65rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.blog-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 600;
}

/* ===================================
   5. CARD COMPONENTS
   =================================== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    background: var(--bg-white);
    overflow: hidden;
}

.card:hover {
    transform: translateY(0);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-primary-dark) 100%);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Tutorial/Post Cards */
article.card {
    margin-bottom: 2rem;
    border-left: 4px solid var(--pinmaps-primary);
}

article.card .card-title h2 {
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.3;
    transition: color var(--transition-fast);
}

article.card:hover .card-title h2 {
    color: var(--pinmaps-action);
}

/* ===================================
   6. BADGES & LABELS
   =================================== */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    letter-spacing: 0.3px;
    margin-left: 1.25rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-action) 100%) !important;
    box-shadow: 0 2px 4px rgba(55, 124, 168, 0.3);
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%) !important;
}

.badge.bg-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%) !important;
}

/* ===================================
   7. BUTTONS
   =================================== */
.btn {
    border-radius: var(--radius-md);
    padding: 0.625rem 1.25rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, var(--pinmaps-action) 0%, var(--pinmaps-primary) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-primary-dark) 100%);
    transform: translateY(0);
    box-shadow: var(--shadow-md);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--pinmaps-primary);
    color: var(--pinmaps-primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--pinmaps-primary);
    color: white;
    transform: translateY(0);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
}

/* ===================================
   8. SIDEBAR COMPONENTS
   =================================== */
.sidebar .card {
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.sidebar .card-header {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.sidebar .list-group-item:hover {
    background: var(--bg-light);
    padding-left: 1.25rem;
}

.sidebar .list-group-item.active {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-action) 100%);
    color: white;
    border: none;
}

/* ===================================
   9. SEARCH COMPONENT
   =================================== */
.input-group {
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.input-group .form-control {
    border: 2px solid var(--border-color);
    border-right: none;
    padding: 0.625rem 1rem;
}

.input-group .form-control:focus {
    border-color: var(--pinmaps-primary);
    box-shadow: none;
}

.input-group .btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ===================================
   10. PAGINATION
   =================================== */
.pagination {
    gap: 0.5rem;
}

.page-link {
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    color: var(--pinmaps-primary);
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    margin: 0;
}

.page-link:hover {
    background: var(--pinmaps-primary);
    border-color: var(--pinmaps-primary);
    color: white;
    transform: translateY(0);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-action) 100%);
    border-color: var(--pinmaps-primary);
    box-shadow: var(--shadow-md);
}

.page-item.disabled .page-link {
    border-color: var(--border-color);
    opacity: 0.5;
}

/* ===================================
   11. POST CONTENT STYLES
   =================================== */
.post-content {
    font-size: 1.0rem;
    line-height: 1.6;
    color: var(--text-primary);
}

.post-content h2 {
    color: var(--pinmaps-primary);
    font-size: 1.3rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--pinmaps-primary);
}

.post-content h3 {
    color: var(--pinmaps-primary-dark);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem !important;
}

.post-content p {
    margin-bottom: 0.5rem;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 1.5rem 0;
}

.post-content pre {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--pinmaps-primary);
}

.post-content code {
    background: var(--bg-light);
    color: var(--pinmaps-primary-dark);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.post-content pre code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
}

.post-content blockquote {
    border-left: 4px solid var(--pinmaps-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* ===================================
   12. YOUTUBE EMBED
   =================================== */
.youtube-embed {
    margin: 2rem 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.ratio {
    border-radius: var(--radius-lg);
}

/* ===================================
   13. ALERTS & MESSAGES
   =================================== */
.alert {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.25rem;
}

.alert-info {
    background: linear-gradient(135deg, #e0f2fe 0%, #bfdbfe 100%);
    color: #075985;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* ===================================
   14. BREADCRUMB
   =================================== */
.breadcrumb {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-sm);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--pinmaps-primary);
    font-weight: 500;
}

.breadcrumb-item.active {
    color: var(--text-secondary);
}

/* ===================================
   15. FOOTER
   =================================== */
.footer {
    background: linear-gradient(135deg, var(--pinmaps-gradient-end) 0%, #1a4d66 100%);
    color: rgba(255, 255, 255, 0.9);
    padding: 2rem 0;
    margin-top: 4rem;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--transition-fast);
}

.footer a:hover {
    color: white;
}

/* ===================================
   16. RESPONSIVE DESIGN
   =================================== */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 1.35rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    article.card {
        margin-bottom: 1.5rem;
    }
    
    .post-content {
        font-size: 1rem;
    }
    
    .post-content h2 {
        font-size: 1.25rem;
    }
    
    .post-content h3 {
        font-size: 1.25rem;
    }
}

/* ===================================
   17. UTILITY CLASSES
   =================================== */
.text-primary {
    color: var(--pinmaps-primary) !important;
}

.bg-primary-gradient {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-primary-dark) 100%) !important;
}

.border-primary {
    border-color: var(--pinmaps-primary) !important;
}

.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow-md {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* ===================================
   18. ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Focus states for accessibility */
*:focus {
    outline: 2px solid var(--pinmaps-primary);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--pinmaps-action);
    outline-offset: 2px;
}

/* ===================================
   19. ADDITIONAL UTILITY CLASSES
   =================================== */

/* Featured Image on Index */
.featured-image {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

/* Sidebar Sticky Positioning */
.sidebar-sticky {
    position: sticky;
    top: 20px;
}

/* CTA Card Icon */
.cta-card .cta-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* Category Page Styles */
.category-header {
    margin-bottom: 2rem;
}

.category-header h1 {
    color: var(--pinmaps-primary);
    font-weight: 700;
}

.category-header .lead {
    color: var(--text-secondary);
}

/* Search Page Styles */
.search-header {
    margin-bottom: 2rem;
}

.search-header h1 {
    color: var(--pinmaps-primary);
    font-weight: 700;
}

.search-header .lead {
    color: var(--text-secondary);
}

/* Override */
.lead {
    font-size: 1.35rem !important;
}

.search-header .text-primary {
    color: var(--pinmaps-action) !important;
}

/* Post Detail Page Enhancements */
.post-detail-hero {
    padding: 2rem 0;
}

/* Recent Posts Sidebar Item */
.recent-post-item {
    transition: all var(--transition-fast);
}

.recent-post-item:hover {
    background: var(--bg-light);
    padding-left: 0.5rem;
}

/* Admin Page Styles */
.admin-header {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
}

.admin-card {
    border-left: 4px solid var(--pinmaps-primary);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--pinmaps-primary);
    box-shadow: 0 0 0 0.2rem rgba(55, 124, 168, 0.25);
}

.form-select:focus {
    border-color: var(--pinmaps-primary);
    box-shadow: 0 0 0 0.2rem rgba(55, 124, 168, 0.25);
}

/* YouTube Help Card */
.youtube-help-card {
    background: var(--bg-light);
    border-radius: var(--radius-lg);
}

.youtube-help-card .card-header {
    background: linear-gradient(135deg, #FF0000 0%, #CC0000 100%);
}

/* Selection Color */
::selection {
    background: var(--pinmaps-primary);
    color: white;
}

::-moz-selection {
    background: var(--pinmaps-primary);
    color: white;
}

.reading-time {
    padding-left:10px;
}

/* ===================================
   20. VIEW-SPECIFIC STYLES
   =================================== */

/* Featured Image Sizing */
.featured-image {
    max-height: 400px;
    width: 100%;
    object-fit: cover;
}

/* Sidebar Sticky */
.sidebar-sticky {
    position: sticky;
    top: 20px;
}

/* CTA Card Styling */
.cta-card .cta-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* Related Posts Hover Effect */
.hover-lift {
    transition: all var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(0);
    box-shadow: var(--shadow-xl);
}

.hover-lift .card-title a {
    transition: color var(--transition-fast);
}

.hover-lift:hover .card-title a {
    color: var(--pinmaps-action) !important;
}

/* Admin Create Page Help Card */
.youtube-help-card .card-header.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%) !important;
}

.help-code-block {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    font-family: 'Courier New', Courier, monospace;
    margin: 0.5rem 0;
    overflow-x: auto;
}

.help-code-block code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
}

/* Admin Pages Specific */
.admin-wrapper {
    padding: 2rem;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 2rem 0;
}

.admin-table {
    width: 100%;
    margin-top: 1.5rem;
}

.admin-table th {
    background: linear-gradient(135deg, var(--pinmaps-primary) 0%, var(--pinmaps-primary-dark) 100%);
    color: white;
    padding: 0.75rem;
    font-weight: 600;
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-table tr:hover {
    background: var(--bg-light);
}

/* ===================================
   21. READING PROGRESS BAR
   =================================== */

.reading-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pinmaps-primary) 0%, var(--pinmaps-action) 100%);
    width: 0%;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(55, 124, 168, 0.5);
}

/* Reading Time Badge */
.reading-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
}

.reading-time-badge i {
    font-size: 1rem;
}

/* Reading Time in Cards */
.card .reading-time {
    color: var(--text-muted);
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.card .reading-time i {
    color: var(--pinmaps-primary);
}

/* ===================================
   22. INDEX PAGE SPECIFIC STYLES
   =================================== */

/* Post Content Styling for Index Page */
.index-page .post-content {
    font-size: 1.05rem;
    line-height: 1.7;
}

.index-page .post-content h2 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
    font-weight: 600;
}

.index-page .post-content h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.index-page .post-content ul,
.index-page .post-content ol {
    margin-bottom: 1rem;
}

.index-page .post-content li {
    margin-bottom: 0.5rem;
}

.index-page .post-content p {
    margin-bottom: 1rem;
}

.index-page .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin: 1rem 0;
}

.index-page .post-content pre {
    background: #f4f4f4;
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
}

.index-page .post-content code {
    background: #f4f4f4;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
}

.index-page article.card {
    transition: box-shadow 0.3s ease;
}

.index-page article.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.index-page .youtube-embed {
    margin: 1.5rem 0;
}

/* ===================================
   23. CATEGORY & SEARCH PAGE STYLES
   =================================== */

/* Card Image Object Fit */
.category-page-card-img {
    max-height: 300px;
    object-fit: cover;
}

.search-page-card-img {
    max-height: 250px;
    object-fit: cover;
}

/* Tag Badges in Search */
.search-tag-badge {
    font-size: 0.9rem;
}

/* ===================================
   24. ADMIN PAGE INLINE STYLES
   =================================== */

/* Admin Index - Empty State Icon */
.admin-empty-icon {
    font-size: 3rem;
    color: #ccc;
}

/* Admin Index - Display Inline for Forms */
.admin-inline-form {
    display: inline;
}

/* ===================================
   25. ADMIN CATEGORIES PAGE STYLES
   =================================== */

/* Categories Page Empty Icon */
.categories-empty-icon {
    font-size: 3rem;
    color: #ccc;
}

/* ===================================
   26. ADMIN ANALYTICS PAGE STYLES
   =================================== */

/* Analytics Icon Sizing */
.analytics-icon {
    font-size: 2.5rem;
}

/* Reading Time Statistics Box */
.reading-time-stat {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-light);
}

.reading-time-stat h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

/* Progress Bar Heights */
.analytics-progress {
    height: 20px;
}

/* ===================================
   27. POST DETAIL PAGE STYLES
   =================================== */

/* Related Post Card Images */
.related-post-image {
    height: 180px;
    object-fit: cover;
}

/* Related Post Default Icon Background */
.related-post-default-icon {
    height: 180px;
}

.related-post-icon {
    font-size: 3rem;
}

/* ===================================
   28. USER MANAGEMENT PAGE STYLES
   =================================== */

/* User Management Empty Icon */
.user-management-empty-icon {
    font-size: 3rem;
    color: #ccc;
}

/* ===================================
   29. ADMIN CREATE/EDIT PAGE STYLES
   =================================== */

/* YouTube Help Card Specific */
.youtube-help-card .help-example {
    margin: 0.5rem 0;
}

/* Code Examples in Help Cards */
.help-card-code {
    background: #2d3748;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 0.5rem 0;
}

.help-card-code code {
    background: transparent;
    color: #e2e8f0;
    padding: 0;
}

/* Form Field Spacing */
.admin-form .mb-3,
.admin-form .mb-4 {
    margin-bottom: 1.5rem !important;
}

/* Character Counter */
.char-counter {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.char-counter.text-warning {
    color: #f59e0b !important;
}

.char-counter.text-danger {
    color: #ef4444 !important;
}

/* ===================================
   30. TABLE OF CONTENTS
   =================================== */

.toc-container {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid var(--pinmaps-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--pinmaps-primary);
}

.toc-header i {
    font-size: 1.5rem;
    color: var(--pinmaps-primary);
}

.toc-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pinmaps-primary-dark);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin: 0.5rem 0;
}

.toc-list ul {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.toc-link {
    color: var(--pinmaps-primary-dark);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-fast);
    display: inline-block;
    padding: 0.25rem 0;
}

.toc-link:hover {
    color: var(--pinmaps-action);
    transform: translateX(0);
    text-decoration: underline;
}

.toc-link:before {
    content: "\2192";
    margin-right: 0.5rem;
    color: var(--pinmaps-primary);
    font-weight: bold;
}

/* TOC Level-specific indentation */
.toc-level-2 {
    font-size: 1rem;
}

.toc-level-3 {
    font-size: 0.95rem;
}

.toc-level-4 {
    font-size: 0.9rem;
    opacity: 0.9;
}

.toc-level-5,
.toc-level-6 {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Sticky TOC on Desktop */
@media (min-width: 992px) {
    .toc-container.sticky-toc {
        position: sticky;
        top: 100px;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
    }
}

/* Mobile TOC */
@media (max-width: 768px) {
    .toc-container {
        margin: 1rem 0;
        padding: 1rem;
    }
    
    .toc-header h3 {
        font-size: 1.1rem;
    }
    
    .toc-list ul {
        padding-left: 1rem;
    }
}

/* Active TOC Link (for scroll spy) */
.toc-link.active {
    color: var(--pinmaps-action);
    font-weight: 700;
    border-left: 3px solid var(--pinmaps-action);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

/* ===================================
   31. CODE SYNTAX HIGHLIGHTING
   =================================== */

/* Enhanced Code Blocks */
.post-content pre[class*="language-"],
.post-content code[class*="language-"] {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
    line-height: 1.5;
    tab-size: 4;
}

.post-content pre[class*="language-"] {
    background: #2d3748;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--pinmaps-primary);
    margin: 1.5rem 0;
    position: relative;
}

/* Code Language Label */
.post-content pre[class*="language-"]:before {
    content: attr(data-language);
    position: absolute;
    top: 0;
    right: 0;
    background: var(--pinmaps-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0 var(--radius-md) 0 var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Syntax Highlighting Colors */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #718096;
}

.token.punctuation {
    color: #cbd5e0;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f687b3;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #9ae6b4;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #90cdf4;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #fbb6ce;
}

.token.function,
.token.class-name {
    color: #fbd38d;
}

.token.regex,
.token.important,
.token.variable {
    color: #fc8181;
}

/* Copy Button for Code Blocks */
.code-block-wrapper {
    position: relative;
    margin: 1.5rem 0;
}

.code-copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.code-copy-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

.code-copy-button:active {
    transform: scale(0.95);
}

.code-copy-button.copied {
    background: var(--pinmaps-success);
    border-color: var(--pinmaps-success);
}

/* Line Numbers */
.line-numbers .line-numbers-rows {
    position: absolute;
    pointer-events: none;
    top: 0;
    font-size: 100%;
    left: -3.8em;
    width: 3em;
    letter-spacing: -1px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    user-select: none;
}

.line-numbers-rows > span {
    display: block;
    counter-increment: linenumber;
}

.line-numbers-rows > span:before {
    content: counter(linenumber);
    color: #718096;
    display: block;
    padding-right: 0.8em;
    text-align: right;
}

/* ===================================
   32. PRINT STYLESHEET
   =================================== */

@media print {
    /* Hide non-content elements */
    header,
    nav,
    .navbar,
    .sidebar,
    .sidebar-sticky,
    footer,
    .social-share-buttons,
    .btn,
    .alert,
    .toc-container,
    .reading-progress-container,
    .code-copy-button,
    .breadcrumb,
    .related-posts-section,
    form,
    .no-print {
        display: none !important;
    }
    
    /* Reset colors for print */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.5;
    }
    
    /* Remove backgrounds and shadows */
    * {
        background: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Ensure main content is visible */
    .container,
    .post-content,
    article {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Typography for print */
    h1, h2, h3, h4, h5, h6 {
        color: black !important;
        page-break-after: avoid;
        page-break-inside: avoid;
        font-weight: bold;
    }
    
    h1 {
        font-size: 24pt;
        margin-top: 0;
        margin-bottom: 12pt;
    }
    
    h2 {
        font-size: 18pt;
        margin-top: 12pt;
        margin-bottom: 6pt;
        border-bottom: 2px solid black;
        padding-bottom: 6pt;
    }
    
    h3 {
        font-size: 14pt;
        margin-top: 10pt;
        margin-bottom: 6pt;
    }
    
    h4, h5, h6 {
        font-size: 12pt;
        margin-top: 8pt;
        margin-bottom: 4pt;
    }
    
    /* Paragraphs */
    p {
        orphans: 3;
        widows: 3;
        margin-bottom: 8pt;
    }
    
    /* Links - show URL */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        font-style: italic;
    }
    
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
    
    /* Images */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
        page-break-after: avoid;
    }
    
    /* Code blocks */
    pre,
    code {
        border: 1px solid #ccc !important;
        background: #f5f5f5 !important;
        page-break-inside: avoid;
        font-family: 'Courier New', monospace;
        font-size: 10pt;
    }
    
    pre {
        padding: 10pt !important;
        margin: 10pt 0 !important;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    code {
        padding: 2pt 4pt !important;
    }
    
    /* Lists */
    ul, ol {
        page-break-inside: avoid;
    }
    
    li {
        page-break-inside: avoid;
    }
    
    /* Tables */
    table {
        border-collapse: collapse;
        width: 100%;
        page-break-inside: avoid;
    }
    
    table, th, td {
        border: 1px solid #ddd;
    }
    
    th, td {
        padding: 8pt;
        text-align: left;
    }
    
    th {
        background: #f0f0f0 !important;
        font-weight: bold;
    }
    
    /* Blockquotes */
    blockquote {
        border-left: 4px solid #ccc;
        padding-left: 12pt;
        margin: 12pt 0;
        font-style: italic;
        page-break-inside: avoid;
    }
    
    /* Page breaks */
    .page-break {
        page-break-before: always;
    }
    
    /* Page setup */
    @page {
        margin: 2cm;
        size: auto;
    }
    
    @page :first {
        margin-top: 1cm;
    }
    
    /* Logo/Branding for print */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 20pt;
        padding-bottom: 10pt;
        border-bottom: 2px solid black;
    }
    
    .print-header h1 {
        font-size: 20pt;
        margin: 0;
    }
    
    .print-footer {
        display: block !important;
        text-align: center;
        margin-top: 20pt;
        padding-top: 10pt;
        border-top: 1px solid #ccc;
        font-size: 9pt;
    }
}

/* ===================================
   33. SEMANTIC HTML ENHANCEMENTS
   =================================== */

/* Article Structure */
article {
    position: relative;
}

article header {
    margin-bottom: 2rem;
}

article footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

/* Time Element */
time {
    font-style: normal;
    color: var(--text-secondary);
}

/* Mark Element for Highlights */
mark {
    background: linear-gradient(120deg, #fef3c7 0%, #fde68a 100%);
    padding: 0.1em 0.3em;
    border-radius: var(--radius-sm);
}

/* Kbd Element for Keyboard Keys */
kbd {
    background: #f7fafc;
    border: 1px solid #cbd5e0;
    border-radius: var(--radius-sm);
    padding: 0.2em 0.5em;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

/* Figure and Figcaption */
figure {
    margin: 2rem 0;
}

figcaption {
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    font-size: 0.9em;
}

/* Details and Summary */
details {
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin: 1rem 0;
    background: var(--bg-light);
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pinmaps-primary);
    user-select: none;
    transition: color var(--transition-fast);
}

summary:hover {
    color: var(--pinmaps-action);
}

details[open] summary {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Horizontal Rule */
hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

/* Abbreviation */
abbr[title] {
    text-decoration: underline dotted;
    cursor: help;
    border-bottom: 1px dotted var(--pinmaps-primary);
}

/* ===================================
   34. MOBILE OPTIMIZATIONS
   =================================== */

@media (max-width: 768px) {
    /* Typography adjustments */
    body {
        font-size: 16px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Spacing adjustments */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.25rem;
    }
    
    /* Post content */
    .post-content {
        font-size: 1rem;
    }
    
    .post-content pre {
        padding: 1rem;
        font-size: 0.85rem;
    }
    
    .post-content code {
        font-size: 0.85rem;
    }
    
    /* Tables scroll horizontally */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Navigation */
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        padding: 1rem;
        border-radius: var(--radius-md);
        margin-top: 0.5rem;
        box-shadow: var(--shadow-md);
    }
    
    .navbar-light .navbar-nav .nav-link {
        color: var(--pinmaps-primary) !important;
        padding: 0.75rem 1rem;
    }
    
    .navbar-light .navbar-nav .nav-link:hover {
        background: var(--bg-light);
    }
    
    /* Footer */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
    
    /* TOC mobile optimization */
    .toc-container {
        font-size: 0.9rem;
    }
    
    /* Sidebar stacks on mobile */
    .sidebar-sticky {
        position: static;
    }
    
    /* YouTube embeds */
    .youtube-embed {
        margin: 1rem 0;
    }
    
    /* Touch targets */
    a, button, .btn, .nav-link {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .blog-hero {
        padding: 1.5rem 0;
    }
    
    .blog-hero h1 {
        font-size: 1.35rem;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .post-content {
        font-size: 1.0625rem;
    }
}

/* ===================================
   35. ACCESSIBILITY ENHANCEMENTS
   =================================== */

/* Skip to content link */
.skip-to-content {
    position: absolute;
    left: -9999px;
    top: 20px;
    z-index: 999;
    padding: 1rem 1.5rem;
    background: var(--pinmaps-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
}

.skip-to-content:focus {
    left: 20px;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--pinmaps-action);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #2d3748;
        --pinmaps-primary: #2a6082;
        --border-color: #000000;
    }
    
    .card,
    .btn,
    .alert {
        border: 2px solid black;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode variables would go here */
    /* This is a placeholder for future dark mode support */
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Admin Dashboard Styles */
.admin-empty-icon {
    font-size: 5rem;
    color: #dee2e6;
}

.admin-inline-form {
    display: inline;
}

.admin-table-text tbody td {
    font-size: 1.0rem;
}

.admin-table-text tbody td small {
    font-size: 1rem;
}

.admin-table-text tbody td .badge {
    font-size: 0.875rem;
}

/* Image Upload & Preview Styles */
#featuredImagePreview {
    display: none;
}

#featuredImagePreview img {
    max-width: 100%;
    max-height: 200px;
}

#uploadProgress {
    display: none;
    height: 25px;
}

#progressBar {
    width: 0%;
}

/* Performance & SEO Progress Bars */
.performance-progress {
    height: 30px;
}

.cache-progress {
    height: 20px;
}

.db-metric-progress {
    height: 15px;
}

.link-relevance-progress {
    height: 8px;
}

/* Revision Empty State */
.revision-empty-icon {
    font-size: 3rem;
    color: #ccc;
}

/* Revision Diff Viewer */
.diff-viewer {
    max-height: 400px;
}

/* Print Only Elements */
.print-only {
    display: none;
}

/* User Details Badge */
.user-details-badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Fix btn-group button shifting on hover and form button styling */
.btn-group .btn {
    margin-right: 0;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child),
.btn-group > form:not(:first-child) .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

/* Handle forms inside button groups */
.btn-group > form {
    display: inline-block;
}

.btn-group > form .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: -1px;
}

/* Ensure last form button has no right border radius */
.btn-group > form:last-child .btn {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
