/* PTM Device Gallery CSS */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    /* Callout colors */
    --callout-info-bg: #eff6ff;
    --callout-info-border: #3b82f6;
    --callout-tip-bg: #f0fdf4;
    --callout-tip-border: #22c55e;
    --callout-warning-bg: #fffbeb;
    --callout-warning-border: #f59e0b;
    --callout-danger-bg: #fef2f2;
    --callout-danger-border: #ef4444;
    --callout-note-bg: #f5f3ff;
    --callout-note-border: #8b5cf6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.gallery-header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.gallery-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 1rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-wrap: wrap;
    flex: 1;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
}

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

.nav-link.active {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Edit link styling for staff users */
.nav-link.edit-link {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.nav-link.edit-link:hover {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.5);
    color: #1d4ed8;
    transform: translateY(-1px);
}

.nav-link.edit-link svg {
    flex-shrink: 0;
}

/* Floating edit button for staff users */
.floating-edit-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.floating-edit-button:hover {
    opacity: 1;
}

.floating-edit-button .edit-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}

.floating-edit-button .edit-button:hover {
    background: #1d4ed8;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

.floating-edit-button .edit-button svg {
    flex-shrink: 0;
}

/* Dropdown Navigation */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.nav-item-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-dropdown-icon {
    transition: transform 0.2s;
    opacity: 0.6;
}

.nav-item-dropdown:hover .nav-dropdown-icon {
    transform: rotate(180deg);
    opacity: 1;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
    z-index: 1000;
}

.nav-item-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content {
    padding: 0.5rem;
}

.nav-dropdown-item {
    display: block;
    padding: 0.625rem 0.875rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-dropdown-viewall {
    margin-top: 0.25rem;
    border-top: 1px solid var(--border-color);
    padding-top: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
}

/* ==================== */
/* Mobile Hamburger Menu */
/* ==================== */

/* Hamburger button - hidden on desktop */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 101;
}

.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-color);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger animation when menu is open */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav collapse container - desktop: normal flex layout */
.nav-collapse {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

/* Mobile styles */
@media (max-width: 768px) {
    /* Show hamburger on mobile */
    .mobile-menu-toggle {
        display: flex;
        margin-left: auto;
    }

    /* Nav collapse - hidden by default on mobile */
    .nav-collapse {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        padding: 1rem;
        gap: 0;
        z-index: 100;
    }

    /* Show nav when menu is open */
    .nav-collapse.menu-open {
        display: flex;
    }

    /* Gallery nav needs relative positioning for absolute dropdown */
    .gallery-nav {
        position: relative;
        flex-wrap: nowrap;
    }

    /* Nav links - vertical stack on mobile */
    .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 0;
        align-items: stretch;
    }

    .nav-link {
        padding: 0.75rem 1rem;
        text-align: left;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* Dropdown items in mobile */
    .nav-item-dropdown {
        display: block;
        width: 100%;
    }

    .nav-item-dropdown .nav-link {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Show dropdown icon on mobile */
    .nav-dropdown-icon {
        display: block;
        transition: transform 0.2s;
    }

    /* Dropdown menu - hidden by default, shown on tap */
    .nav-dropdown-menu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        margin: 0;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: var(--bg-light);
    }

    /* Show dropdown when open class is added */
    .nav-item-dropdown.dropdown-open .nav-dropdown-menu {
        display: block;
    }

    .nav-item-dropdown.dropdown-open .nav-dropdown-icon {
        transform: rotate(180deg);
    }

    .nav-dropdown-content {
        padding: 0.5rem 0;
    }

    .nav-dropdown-item {
        padding: 0.625rem 1.5rem;
        border-radius: 0;
    }

    /* Search in mobile menu */
    .nav-search {
        width: 100%;
        margin-top: 1rem;
        padding-top: 1rem;
        border-top: 1px solid var(--border-color);
    }

    .header-search-form {
        width: 100%;
    }

    .header-search-input {
        flex: 1;
        width: auto;
    }
}

.nav-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--bg-light);
    border-radius: 8px;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-color);
}

.header-search-input {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    width: 200px;
    outline: none;
    color: var(--text-color);
}

.header-search-input::placeholder {
    color: var(--text-light);
}

.header-search-button {
    padding: 0.5rem 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 38px;
    height: 38px;
}

.header-search-button:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.header-search-button:active {
    transform: scale(0.98);
}

.header-search-button svg {
    display: block;
}

.admin-link {
    color: var(--text-light);
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.admin-link:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

/* Main Content */
.gallery-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero-section {
    margin: -2rem 0 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Page Header */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.page-header .intro {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
}

.page-header time {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Gallery Grid */
.gallery-grid, .info-pages {
    margin-bottom: 4rem;
}

.gallery-grid h2, .info-pages h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.gallery-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.card-content time {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Page Content - StreamField Blocks */
.page-content {
    max-width: 900px;
    margin: 0 auto;
}

.page-content > * {
    margin-bottom: 2rem;
}

/* Image Block */
.block-image {
    margin: 2rem 0;
}

.block-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.block-image figcaption {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Gallery Block */
.block-gallery {
    margin: 3rem 0;
}

.gallery-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.block-gallery-grid .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-item {
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gallery-item img:hover {
    opacity: 0.9;
}

/* YouTube/Video Block */
.block-youtube, .block-video {
    margin: 2rem 0;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe,
.video-container embed,
.video-container object {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.block-video video {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.video-caption {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* GIF Block */
.block-gif {
    margin: 2rem 0;
    text-align: center;
}

.block-gif img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Heading Block */
.block-heading {
    margin: 2rem 0 1rem;
    color: var(--text-color);
}

/* Quote Block */
.block-quote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    font-size: 1.125rem;
    font-style: italic;
}

.block-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-style: normal;
    color: var(--text-light);
}

/* Page Footer */
.page-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Site Footer */
.gallery-footer {
    background-color: var(--bg-light);
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .block-gallery-grid .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Lightbox (basic styling, can be enhanced with a library) */
[data-lightbox] {
    cursor: zoom-in;
}

/* ==================== */
/* Breadcrumbs Navigation */
/* ==================== */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 0.5rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
    content: ">";
    margin-left: 0.5rem;
    color: var(--text-light);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active span {
    color: var(--text-light);
}

/* ==================== */
/* Page Layout with Sidebar */
/* ==================== */
.page-layout {
    display: block;
}

.page-layout.with-sidebar {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
}

.page-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.page-main {
    min-width: 0;
}

.page-layout.with-sidebar .page-header {
    text-align: left;
}

.page-layout.with-sidebar .page-content {
    max-width: none;
}

/* ==================== */
/* Sidebar Navigation */
/* ==================== */
.sidebar-nav {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
}

.sidebar-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-title a {
    color: var(--text-color);
    text-decoration: none;
}

.sidebar-title a:hover {
    color: var(--primary-color);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-item {
    margin-bottom: 0.25rem;
}

.sidebar-item > a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}

.sidebar-item > a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

.sidebar-item.active > a {
    background: var(--primary-color);
    color: white;
}

.sidebar-item.expanded > a {
    color: var(--primary-color);
    font-weight: 500;
}

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0.25rem 0 0.5rem 1rem;
    border-left: 2px solid var(--border-color);
}

.sidebar-submenu .sidebar-item > a {
    padding: 0.375rem 0.75rem;
    font-size: 0.85rem;
}

.child-nav {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.child-nav h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.child-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.child-nav li a {
    display: block;
    padding: 0.375rem 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.child-nav li a:hover {
    color: var(--primary-color);
}

/* ==================== */
/* Table of Contents */
/* ==================== */
.page-toc {
    background: var(--bg-light);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.toc-title {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-item {
    margin-bottom: 0.25rem;
}

.toc-item a {
    display: block;
    padding: 0.25rem 0;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.875rem;
}

.toc-item a:hover {
    color: var(--primary-color);
}

.toc-item.toc-h3 {
    padding-left: 1rem;
}

.toc-item.toc-h4 {
    padding-left: 2rem;
}

.toc-item.active > a {
    color: var(--color-primary);
    font-weight: 600;
    border-left: 3px solid var(--color-primary);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

/* ==================== */
/* Search Page */
/* ==================== */
.search-page {
    max-width: 800px;
    margin: 0 auto;
}

.search-form {
    margin-bottom: 2rem;
}

.search-input-group {
    display: flex;
    gap: 0;
}

.search-input {
    flex: 1;
    padding: 1rem 1.25rem;
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: 8px 0 0 8px;
    outline: none;
    transition: border-color 0.2s;
}

.search-input:focus {
    border-color: var(--primary-color);
}

.search-button {
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.search-button:hover {
    background: var(--secondary-color);
}

.results-count {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.search-result-item {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    transition: box-shadow 0.2s;
}

.search-result-item:hover {
    box-shadow: var(--shadow);
}

.result-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.result-title a {
    color: var(--text-color);
    text-decoration: none;
}

.result-title a:hover {
    color: var(--primary-color);
}

.result-excerpt {
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.result-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.result-type {
    background: var(--bg-color);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.no-results, .search-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* ==================== */
/* Pagination */
/* ==================== */
.pagination {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.pagination-link:hover {
    text-decoration: underline;
}

.pagination-info {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==================== */
/* Callout Blocks */
/* ==================== */
.block-callout {
    margin: 2rem 0;
    padding: 1.25rem;
    border-radius: 8px;
    border-left: 4px solid;
}

.block-callout.callout-info {
    background: var(--callout-info-bg);
    border-color: var(--callout-info-border);
}

.block-callout.callout-tip {
    background: var(--callout-tip-bg);
    border-color: var(--callout-tip-border);
}

.block-callout.callout-warning {
    background: var(--callout-warning-bg);
    border-color: var(--callout-warning-border);
}

.block-callout.callout-danger {
    background: var(--callout-danger-bg);
    border-color: var(--callout-danger-border);
}

.block-callout.callout-note {
    background: var(--callout-note-bg);
    border-color: var(--callout-note-border);
}

.callout-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.callout-icon {
    display: flex;
    align-items: center;
}

.callout-info .callout-icon { color: var(--callout-info-border); }
.callout-tip .callout-icon { color: var(--callout-tip-border); }
.callout-warning .callout-icon { color: var(--callout-warning-border); }
.callout-danger .callout-icon { color: var(--callout-danger-border); }
.callout-note .callout-icon { color: var(--callout-note-border); }

.callout-title {
    font-weight: 600;
}

.callout-content p:last-child {
    margin-bottom: 0;
}

/* ==================== */
/* Cloudflare Video Block */
/* ==================== */
.block-cloudflare-video {
    margin: 2rem 0;
}

.block-cloudflare-video .video-container {
    background: var(--bg-light);
}

/* ==================== */
/* Blog Styles */
/* ==================== */
.blog-listing {
    margin-top: 2rem;
}

/* Blog Category Filters */
.blog-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.category-filter {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    background: var(--bg-light);
    border: 2px solid transparent;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-filter:hover {
    background: var(--bg-color);
    border-color: var(--border-color);
}

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

.category-filter .count {
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Category-specific colors for filter tabs */
.category-filter.category-news.active {
    background: #3b82f6;
    border-color: #3b82f6;
}

.category-filter.category-technical.active {
    background: #8b5cf6;
    border-color: #8b5cf6;
}

.category-filter.category-tips.active {
    background: #22c55e;
    border-color: #22c55e;
}

.category-filter.category-tournament.active {
    background: #f59e0b;
    border-color: #f59e0b;
}

/* Category Badges */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.category-news {
    background: #eff6ff;
    color: #1e40af;
}

.category-technical {
    background: #f5f3ff;
    color: #6b21a8;
}

.category-tips {
    background: #f0fdf4;
    color: #166534;
}

.category-tournament {
    background: #fffbeb;
    color: #b45309;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.blog-card .card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--border-color) 100%);
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.card-intro {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.card-author {
    font-weight: 500;
}

.card-tags, .post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: var(--bg-light);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.no-posts {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* Blog Post Single */
.blog-post .post-header {
    margin-bottom: 2rem;
}

.blog-post .post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.post-author {
    font-weight: 500;
}

.post-intro {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.post-cover {
    margin-bottom: 2rem;
}

.cover-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-footer {
    margin-top: 3rem;
}

.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    margin-bottom: 1.5rem;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.related-card a {
    text-decoration: none;
    color: inherit;
}

.related-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.related-card:hover h4 {
    color: var(--primary-color);
}

.related-card time {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* ==================== */
/* Docs Index Page */
/* ==================== */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.docs-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.docs-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.docs-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 1.5rem;
}

.docs-card .card-title {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.docs-card .card-intro {
    margin-bottom: 1rem;
}

.card-subsections {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.card-subsections li {
    padding: 0.25rem 0;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
}

.card-subsections li.more {
    font-style: italic;
}

.no-docs {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

/* ==================== */
/* Testimonials */
/* ==================== */
.block-testimonial {
    margin: 2rem 0;
}

.testimonial-card {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
    position: relative;
}

.testimonial-featured .testimonial-card {
    background: linear-gradient(135deg, var(--bg-light) 0%, #e0e7ff 100%);
    border: 2px solid var(--primary-color);
}

.testimonial-rating {
    margin-bottom: 1rem;
}

.star {
    font-size: 1.25rem;
    margin-right: 0.125rem;
}

.star-filled {
    color: #f59e0b;
}

.star-empty {
    color: var(--border-color);
}

.testimonial-quote {
    margin: 0 0 1.5rem 0;
    padding: 0;
    border: none;
    font-style: normal;
}

.testimonial-quote p {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-color);
    margin: 0;
    position: relative;
}

.testimonial-quote p::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
    top: -1rem;
    left: -0.5rem;
    font-family: Georgia, serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-photo {
    flex-shrink: 0;
}

.author-photo img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-color);
    box-shadow: var(--shadow);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
}

.author-name a {
    color: var(--primary-color);
    text-decoration: none;
}

.author-name a:hover {
    text-decoration: underline;
}

.author-role {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Testimonial Carousel */
.block-testimonial-carousel {
    margin: 3rem 0;
}

.testimonials-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.testimonials-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonials-track {
    flex: 1;
    overflow: hidden;
}

/* Carousel style */
.testimonial-style-carousel .testimonials-track {
    display: flex;
    transition: transform 0.5s ease;
}

.testimonial-style-carousel .testimonial-slide {
    flex: 0 0 100%;
    padding: 0 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-style-carousel .testimonial-slide.active {
    opacity: 1;
}

/* Grid style */
.testimonial-style-grid .testimonials-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.testimonial-style-grid .testimonial-slide {
    opacity: 1;
}

/* Stacked style */
.testimonial-style-stacked .testimonials-track {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.testimonial-style-stacked .testimonial-slide {
    opacity: 1;
}

/* Carousel navigation */
.carousel-nav {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    color: var(--text-color);
}

.carousel-nav:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.carousel-dot:hover,
.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* ==================== */
/* Responsive Adjustments */
/* ==================== */
@media (max-width: 968px) {
    .page-layout.with-sidebar {
        grid-template-columns: 1fr;
    }

    .page-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 2rem;
    }

    .nav-links {
        gap: 0.125rem;
    }

    .nav-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.875rem;
    }

    .header-search-input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .blog-post .post-header h1 {
        font-size: 2rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-input {
        border-right: 2px solid var(--border-color);
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }

    .search-button {
        border-radius: 8px;
        justify-content: center;
    }

    /* Testimonial responsive */
    .carousel-nav {
        width: 36px;
        height: 36px;
    }

    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }

    .testimonial-style-grid .testimonials-track {
        grid-template-columns: 1fr;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-quote p {
        font-size: 1rem;
    }
}
