/* ============================================ */
/* GLOBAL STYLES (Common to all pages) */
/* ============================================ */

.top-divider {
    height: 80px;
}

.sponsored-grid-wrapper p:not(.sponsored-content p) {
    text-align: left!important;
}

.sidebar-widget .sponsored-grid-wrapper p:not(.sidebar-widget .sponsored-content p) {
    margin-bottom: 20px!important;
}

.hero-blur-circle {
    display: none!important;
}

/* Divider between hero and content */
.hero-content-divider,
.hero-swiper-divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* Results Layout */
.results-container {
    display: flex;
    gap: 1.5rem;
    max-width: 1400px;
    width: 90%;
    margin: 0 auto 2rem;
    padding: 0 1rem;
    min-height: calc(100vh - 200px);
}

/* Left Sidebar Filters - Desktop */
.filters-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 0.25rem;
    transition: all 0.3s ease;
}

/* Hide scrollbar but keep functionality */
.filters-sidebar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.filters-sidebar::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.filter-section {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.filter-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-color);
}

.filter-item:hover {
    background: var(--border-color);
    border-color: var(--accent-color);
}

.filter-item.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.filter-item span {
    flex: 1;
    font-size: 0.95rem;
}

/* Right Side Sticky Section */
.create-new-sticky {
    position: sticky;
    top: 90px;
    width: 250px;
    flex-shrink: 0;
    height: fit-content;
    transition: all 0.3s ease;
}

/* Right Side Create New & Blog Section - NARROW HEIGHT (for templates.php & index.php) */
.create-new-card {
    background: linear-gradient(135deg, var(--accent-color) 0%, #0056b3 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
    min-height: 140px;
}

.create-new-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.3);
}

.create-new-card i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.create-new-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    line-height: 1.2;
}

.create-new-card p {
    font-size: 0.85rem;
    opacity: 0.9;
    line-height: 1.3;
    margin: 0;
}

/* Blog Section Styles */
.blog-sidebar {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-bottom: 1.5rem;
    border: none;
}

.blog-sidebar h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem; /* Narrow gap between h3 and blog posts */
    color: var(--text-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0 0.25rem 0; /* Reduced bottom padding */
}

.blog-sidebar h3 i {
    color: var(--accent-color);
}

/* Blog Post with background and styling */
.blog-post {
    display: flex;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.blog-post:last-child {
    margin-bottom: 0;
}

.blog-post:hover {
    background: var(--border-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-post-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.blog-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-post-content {
    flex: 1;
    min-width: 0;
}

.blog-post-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.1rem;
    line-height: 1.3;
}

.blog-post-date {
    font-size: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-post-date i {
    font-size: 0.8rem;
}

/* Results Panel - FIXED LEFT GAP ISSUE */
.results-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0 3rem;
    margin-left: 0; /* Default - no negative margin */
}

/* When filters sidebar is hidden, adjust layout */
.results-container:has(.filters-sidebar[style*="display: none"]),
.results-container:has(.filters-sidebar:not(:visible)),
.results-container:not(:has(.filters-sidebar)) {
    .results-panel {
        margin-left: -20px; /* Compensate for the gap when filters sidebar is hidden */
    }
    
    .create-new-sticky {
        width: 280px; /* Bigger width when filters sidebar is hidden */
    }
}

/* Main Content Panel (for designs.php & blog-post.php) */
.content-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 0 3rem;
}

.results-header {
    margin-bottom: 2rem;
}

.results-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.results-meta {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Templates Grid (for templates.php & index.php) */
.templates-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

.template-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

.template-item:not(.ad-container):hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* New Template Content Structure */
.template-item-header {
    padding: 1.25rem 1.25rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-wrapper .template-item-header {
    align-items: flex-start; /* Changed from center to flex-start */
}

.template-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.blog-wrapper .template-user-avatar {
    margin-top: 2px; /* Added to align with top of text */
}

.template-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-user-info {
    flex: 1;
}

.blog-wrapper .template-user-info {
    display: flex;
    flex-direction: column;
}

.template-user-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.1rem;
}

.blog-wrapper .template-user-name {
    margin-bottom: 0.3rem; /* Increased spacing */
}

.template-item.sponsored-card .template-user-name {
    font-size: 0.7rem;
    font-weight: normal;
}

.template-item-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.2;
    margin-top: 0.1rem;
}

/* FIXED: Template item title - increased font size */
.blog-wrapper .template-item-title {
    font-size: 1.1rem; /* Increased from 0.95rem */
    font-weight: 700; /* Increased weight */
    line-height: 1.3; /* Better line height */
    margin-bottom: 0.5rem; /* Added space below title */
}

/* Added for sponsored ads */
.template-item-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
    line-height: 1.3;
}

/* Image Container */
.template-image-container {
    position: relative;
    width: 100%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1rem;
    min-height: 180px;
}

.blog-wrapper .template-image-container {
    min-height: 220px; /* Increased minimum height */
}

.template-image-container::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.template-image-container.loaded::before {
    display: none;
}

.template-image {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    display: block;
    opacity: 0;
    position: relative;
    z-index: 2;
    transition: opacity 0.3s ease, transform 0.3s ease!important;
}

.template-image.loaded {
    opacity: 1;
}

.template-item:hover .template-image.loaded {
    transform: scale(1.05);
}

/* Loading */
.loading-container {
    text-align: center;
    padding: 3rem;
}

.loading-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-secondary);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-secondary);
}

/* Load More Button */
.load-more-container {
    text-align: center;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.load-more-btn {
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.load-more-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.load-more-btn:disabled {
    background: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ============================================ */
/* HERO SECTION (for index.php) */
/* ============================================ */
.hero-wrapper {
    position: relative;
    padding: 0;
    margin-bottom: 2rem;
    background: transparent;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    align-items: start;
    gap: 2rem;
}

.hero-logo {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-text-content {
    flex: 1;
    text-align: left;
}

.hero-text-content h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--accent-color), #6c63ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1.2;
}

.hero-text-content h2 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.4;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Swiper Container - Full Width */
.swiper-container-wrapper {
    width: 100%;
    margin-top: 0.5rem; /* Reduced top margin for narrow gap */
    overflow: hidden;
}

#canvas-template-swiper {
    width: 100%;
    padding: 1rem 0 2rem;
}

/* ============================================ */
/* TEMPLATE PAGE SPECIFIC (for designs.php) */
/* ============================================ */

/* Template Container */
.template-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Template Header */
.template-header {
    padding: 2rem 2rem 1rem;
}

.template-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.template-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.template-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.template-author-info {
    flex: 1;
}

.template-author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.template-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.template-date i {
    font-size: 0.85rem;
}

.template-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

/* Template Image */
.template-image-wrapper {
    width: 100%;
    max-width: 100%;
    height: 400px;
    padding: 20px;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
}

.template-image-wrapper::before {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.template-image-wrapper.loaded::before {
    display: none;
}

.template-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
    position: relative;
    z-index: 2;
}

.template-image.loaded {
    opacity: 1;
}

/* Action Buttons */
.template-actions {
    padding: 1.5rem 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-action {
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-use-template {
    background: var(--accent-color);
    color: white!important;
}

.btn-use-template:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.btn-download {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

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

/* Template Content */
.template-content {
    padding: 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.template-content p {
    margin-bottom: 1.5rem;
}

.template-content h1,
.template-content h2,
.template-content h3,
.template-content h4,
.template-content h5,
.template-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.template-content ul,
.template-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.template-content li {
    margin-bottom: 0.5rem;
}

/* Template Specifications */
.template-specs {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.template-specs h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.spec-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--border-color);
    border-radius: 8px;
}

.spec-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.spec-value {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.9rem;
}

/* Tags Section */
.template-tags {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.template-tags h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.5rem 1rem;
    background: var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

/* Related Templates Section */
.related-templates {
    margin-top: 3rem;
}

.related-templates h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

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

.related-template-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.related-template-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--border-color);
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-template-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.related-template-card:hover .related-template-image img {
    transform: scale(1.05);
}

.related-template-content {
    padding: 1.25rem;
}

.related-template-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================ */
/* BLOG POST PAGE SPECIFIC (for blog-post.php) */
/* ============================================ */

/* Article Container */
.article-container {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

/* Article Header */
.article-header {
    padding: 2rem 2rem 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.article-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.article-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-author-info {
    flex: 1;
}

.article-author-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.article-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.article-date i {
    font-size: 0.85rem;
}

.article-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Article Image */
.article-image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    background: var(--border-color);
}

.article-image-container img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Article Content */
.article-content {
    padding: 2rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content h1,
.article-content h2,
.article-content h3,
.article-content h4,
.article-content h5,
.article-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.article-content a {
    color: var(--accent-color);
    text-decoration: underline;
}

.article-content a:hover {
    text-decoration: none;
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.article-content code {
    background: var(--border-color);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
    font-family: 'Courier New', monospace;
}

.article-content pre {
    background: var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.article-content pre code {
    background: none;
    padding: 0;
}

/* Article Tags Section */
.article-tags {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
}

.article-tags h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Related Posts Section */
.related-posts {
    margin-top: 3rem;
}

.related-posts h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

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

.related-post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-color);
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--border-color);
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.05);
}

.related-post-content {
    padding: 1.25rem;
}

.related-post-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-post-date i {
    font-size: 0.8rem;
}

/* ============================================ */
/* MOBILE FILTERS - COMMON TO ALL PAGES */
/* ============================================ */

.filters-sidebar-mobile {
    display: none;
    position: fixed;
    top: 60px; /* Navbar height */
    left: 0;
    right: 0;
    z-index: 90;
    padding: 0px;
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 50px; /* Fixed 50px height */
    overflow: hidden;
}

.mobile-filters-swiper {
    width: 100%;
    height: 100%;
    padding: 0px 1rem; /* 7px top+bottom = 14px, leaving 36px for content */
}

.mobile-filters-swiper .swiper {
    width: 100%;
    height: 100%;
}

.mobile-filters-swiper .swiper-wrapper {
    height: 100%;
    padding: 0px;
    align-items: center;
}

.mobile-filters-swiper .swiper-slide {
    width: auto !important;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-filter-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.25rem 0.9rem;
    background: var(--border-color);
    border-radius: 18px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.8rem;
    height: 36px; /* 36px height fits in 50px container with 7px padding */
    min-width: fit-content;
    line-height: 1;
}

.mobile-filter-item:hover,
.mobile-filter-item.active {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.mobile-filter-item span {
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1;
}

/* Mobile/Tab Create New & Blog Section (shown on tablet/mobile) */
.mobile-sticky-section {
    display: none;
}

/* ============================================ */
/* RESPONSIVE BREAKPOINTS */
/* ============================================ */

/* Large Desktop (1201px and above) - SHOW BOTH SIDEBARS */
@media (min-width: 1201px) {
    .filters-sidebar {
        display: block;
    }
    
    .create-new-sticky {
        display: block;
        width: 250px;
    }
    
    .filters-sidebar-mobile {
        display: none;
    }
    
    .results-panel,
    .content-panel {
        padding: 0 2rem;
        margin-left: 0;
    }
    
    .mobile-sticky-section {
        display: none;
    }
}

/* Medium Desktop (1024px - 1200px) - SMALL DESKTOP */
@media (min-width: 1024px) and (max-width: 1200px) {
    .filters-sidebar {
        display: none; /* Hide filters sidebar */
    }
    
    .create-new-sticky {
        display: block; /* Show create-new-sticky */
        width: 280px; /* Bigger width when filters sidebar is hidden */
    }
    
    .blog-sidebar {
        display: block;
    }
    
    .filters-sidebar-mobile {
        display: block; /* Show mobile filter */
    }
    
    .top-divider {
        height: 110px;
    }
    
    .results-panel {
        padding: 0 1.5rem;
        margin-left: -20px; /* Compensate for gap when filters sidebar is hidden */
    }
    
    .content-panel {
        padding: 0 1.5rem;
    }
    
    .results-container {
        width: 95%;
        padding: 0 1.5rem;
        gap: 1.5rem;
    }
    
    /* Template specific adjustments */
    .template-title {
        font-size: 2.2rem;
    }
    
    .template-image-wrapper {
        height: 350px;
    }
    
    .article-title {
        font-size: 2.2rem;
    }
    
    /* Template image adjustments */
    .template-image-container {
        padding: 1rem;
        min-height: 160px;
    }
    
    .template-image {
        max-height: 320px;
    }
    
    /* Hero section adjustments */
    .hero-content {
        width: 95%;
        padding: 2.5rem 1.5rem 1.5rem;
        gap: 1.75rem;
    }
    
    .hero-logo {
        width: 90px;
        height: 90px;
    }
    
    .hero-text-content h1 {
        font-size: 2.25rem;
    }
    
    .hero-text-content h2 {
        font-size: 1.35rem;
    }
}

/* Tablet (768px - 1023px) - CREATE-NEW-STICKY IS NOW VISIBLE */
@media (min-width: 768px) and (max-width: 1023px) {
    .filters-sidebar {
        display: none;
    }
    
    .create-new-sticky {
        display: block !important; /* Force show create-new-sticky on tablet */
        width: 100%; /* Full width on tablet */
        position: static; /* Not sticky on tablet */
        margin-top: 1rem;
    }
    
    .blog-sidebar {
        display: block;
        width: 100%;
        position: static;
        margin-top: 1rem;
    }
    
    .filters-sidebar-mobile {
        display: block;
    }
    
    .top-divider {
        height: 120px;
    }
    
    .results-panel {
        padding: 0 1rem;
        margin-left: 0; /* No negative margin needed on tablet - full width */
    }
    
    .content-panel {
        padding: 0 1rem;
    }
    
    .results-container {
        flex-direction: column;
        gap: 1rem;
        width: 95%;
        margin-top: 0;
        padding: 0 1rem;
    }
    
    /* Template specific adjustments */
    .template-title {
        font-size: 2rem;
    }
    
    .template-header {
        padding: 1.5rem;
    }
    
    .template-content {
        padding: 1.5rem;
    }
    
    .template-image-wrapper {
        height: 300px;
    }
    
    .template-actions {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-header {
        padding: 1.5rem;
    }
    
    .article-content {
        padding: 1.5rem;
    }
    
    /* Template image adjustments */
    .template-image-container {
        padding: 1rem;
        min-height: 150px;
    }
    
    .template-image {
        max-height: 280px;
    }
    
    /* Hero section adjustments */
    .hero-content {
        width: 95%;
        padding: 2rem 1.5rem 1.5rem;
        gap: 1.5rem;
    }
    
    .hero-logo {
        width: 80px;
        height: 80px;
    }
    
    .hero-text-content h1 {
        font-size: 2rem;
    }
    
    .hero-text-content h2 {
        font-size: 1.25rem;
    }
}

/* Mobile (below 768px) */
@media (max-width: 767px) {
    .filters-sidebar {
        display: none;
    }
    
    .create-new-sticky {
        display: block; /* Show create-new-sticky on mobile */
        width: 100%; /* Full width on mobile */
        position: static; /* Not sticky on mobile */
        margin-top: 1rem;
    }
    
    .blog-sidebar {
        display: block;
        width: 100%;
        position: static;
        margin-top: 1rem;
    }
    
    .filters-sidebar-mobile {
        display: block;
    }
    
    .top-divider {
        height: 130px;
    }
    
    .results-panel {
        padding: 0 0.75rem;
        margin-left: 0; /* No negative margin on mobile */
    }
    
    .content-panel {
        padding: 0 0.75rem;
    }
    
    .results-container {
        flex-direction: column;
        gap: 1rem;
        width: 95%;
        margin-top: 0;
        padding: 0 1rem;
    }
    
    /* START OF CHANGES FOR MOBILE DEVICES */
    /* Hide hero-logo on mobile */
    .hero-logo {
        display: none;
    }
    
    /* Make template-user-avatar bigger on mobile */
    .template-user-avatar {
        width: 40px; /* Increased from 28px */
        height: 40px; /* Increased from 28px */
    }
    
    /* Make template-user-info text bigger on mobile */
    .template-user-name {
        font-size: 0.95rem; /* Increased from 0.85rem */
    }
    
    .template-item-title {
        font-size: 1rem; /* Increased from 0.9rem */
    }
    
    .template-item-description {
        font-size: 0.85rem; /* Increased for mobile */
    }
    
    /* Make template-image-container height bigger on mobile */
    .template-image-container {
        padding: 1rem; /* Increased from 0.75rem */
        min-height: 200px; /* Increased from 140px */
    }
    
    .template-image {
        max-height: 300px; /* Increased from 220px */
    }
    /* END OF CHANGES FOR MOBILE DEVICES */
    
    .template-item-header {
        padding: 1rem 1rem 0.5rem;
    }
    
    /* Template specific adjustments */
    .template-title {
        font-size: 1.75rem;
    }
    
    .template-header {
        padding: 1.25rem;
    }
    
    .template-content {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    .template-image-wrapper {
        height: 250px;
    }
    
    .template-actions {
        grid-template-columns: 1fr;
    }
    
    .related-templates-grid,
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .article-description {
        font-size: 1rem;
    }
    
    .article-header {
        padding: 1.25rem;
    }
    
    .article-content {
        padding: 1.25rem;
        font-size: 1rem;
    }
    
    /* Hero section adjustments */
    .hero-content {
        width: 95%;
        padding: 1.5rem 1rem;
        gap: 1rem;
    }
    
    .hero-text-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-text-content h2 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
}

/* Extra Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .content-panel,
    .results-panel {
        padding: 0px!important;
        margin-left: 0; /* No negative margin on mobile */
    }
    
    .results-container {
        width: 99%;
    }
    
    /* Template specific adjustments */
    .template-title {
        font-size: 1.5rem;
    }
    
    .template-header {
        padding: 1rem;
    }
    
    .template-content {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .template-tags {
        padding: 1rem;
    }
    
    .template-specs {
        padding: 1rem;
    }
    
    .template-image-wrapper {
        height: 200px;
        padding: 15px;
    }
    
    .article-title {
        font-size: 1.5rem;
    }
    
    .article-header {
        padding: 1rem;
    }
    
    .article-content {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .article-tags {
        padding: 1rem;
    }
    
    /* Keep the mobile changes from above and adjust further for extra small screens */
    .template-image-container {
        padding: 0.75rem; /* Slightly less padding on very small screens */
        min-height: 180px; /* Adjusted from 120px to be bigger */
    }
    
    .template-image {
        max-height: 260px; /* Adjusted from 180px to be bigger */
    }
    
    .template-item-header {
        padding: 0.75rem 0.75rem 0.5rem;
    }
    
    .results-header h1 {
        font-size: 1.5rem;
    }
    
    .mobile-filters-swiper {
        padding: 7px 0.75rem;
    }
    
    .mobile-filter-item {
        padding: 0.2rem 0.7rem;
        font-size: 0.75rem;
        height: 36px;
    }
    
    .create-new-sticky {
        margin-top: 0.5rem;
    }
    
    .blog-sidebar {
        margin-top: 0.5rem;
    }
    
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1rem;
    }
    
    .hero-logo {
        display: none; /* Keep hidden */
    }
    
    .hero-text-content {
        width: 100%;
    }
    
    .hero-text-content h1 {
        font-size: 1.25rem;
    }
    
    .hero-text-content h2 {
        font-size: 0.9rem;
    }
}

/* Very Small Mobile (max-width: 360px) */
@media (max-width: 360px) {
    .content-panel,
    .results-panel {
        padding: 0px!important;
        margin-left: 0; /* No negative margin on mobile */
    }
    
    /* Template specific adjustments */
    .template-title {
        font-size: 1.35rem;
    }
    
    .template-header {
        padding: 0.75rem;
    }
    
    .template-content {
        padding: 0.75rem;
    }
    
    .template-image-wrapper {
        height: 180px;
    }
    
    .article-title {
        font-size: 1.35rem;
    }
    
    .article-header {
        padding: 0.75rem;
    }
    
    .article-content {
        padding: 0.75rem;
    }
    
    .template-image-container {
        padding: 0.5rem;
        min-height: 160px; /* Adjusted from 100px to be bigger */
    }
    
    .template-image {
        max-height: 220px; /* Adjusted from 150px to be bigger */
    }
    
    .template-item-header {
        padding: 0.5rem 0.5rem 0.25rem;
    }
    
    .template-user-avatar {
        width: 36px; /* Increased from 24px */
        height: 36px; /* Increased from 24px */
    }
    
    .template-user-name {
        font-size: 0.9rem; /* Increased from 0.8rem */
    }
    
    .template-item-title {
        font-size: 0.95rem; /* Increased from 0.85rem */
    }
    
    .template-item-description {
        font-size: 0.8rem; /* Adjusted for very small screens */
    }
    
    .mobile-filter-item {
        padding: 0.15rem 0.6rem;
        font-size: 0.7rem;
    }
    
    .create-new-card {
        padding: 0.75rem 1rem;
        min-height: 120px;
    }
    
    .create-new-card i {
        font-size: 2rem;
    }
    
    .create-new-card h3 {
        font-size: 1rem;
    }
    
    .hero-content {
        padding: 0.75rem;
    }
    
    .hero-text-content h1 {
        font-size: 1.1rem;
    }
    
    .hero-text-content h2 {
        font-size: 0.85rem;
    }
}