/*
Theme Name: PinBoard Pro
Theme URI: https://example.com/pinboard-pro
Author: PinBoard Team
Author URI: https://example.com
Description: A lightweight, responsive Pinterest-style WordPress theme with modern design and random post display.
Version: 2.0.0
License: GPL v2 or later
Text Domain: pinboard-pro
*/

/* Reset & Base Styles */
:root {
    --primary-color: #e60023;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --light-text: #666;
    --border-color: #eaeaea;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    max-width: 100vw;
    overflow-x: hidden;
}

/* Header Styles */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 20px 0;
    position: relative;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 20px;
}

.site-branding {
    text-align: center;
    margin-bottom: 25px;
}

.site-title {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary-color);
    text-decoration: none;
    letter-spacing: -1px;
    background: linear-gradient(45deg, #e60023, #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-description {
    color: var(--light-text);
    font-size: 1rem;
    margin-top: 10px;
    font-weight: 500;
}

/* Categories Menu - Only Top Level */
.main-navigation {
    width: 100%;
}

.categories-menu {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.categories-menu > li {
    position: relative;
}

.categories-menu > li > a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 24px;
    border-radius: 25px;
    transition: var(--transition);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
}

.categories-menu > li > a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4);
}

/* Hide sub-categories */
.categories-menu ul {
    display: none !important;
}

/* Pinterest Grid Layout */
.pinterest-grid {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    columns: 5 300px;
    column-gap: 25px;
}

.grid-item {
    break-inside: avoid;
    margin-bottom: 25px;
    position: relative;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.grid-item:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: var(--shadow-hover);
}

.post-thumbnail {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.grid-item:hover .post-thumbnail {
    transform: scale(1.1);
}

/* Hover Overlay */
.hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, 
        rgba(0,0,0,0.9) 0%, 
        rgba(0,0,0,0.5) 50%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    color: white;
}

.grid-item:hover .hover-overlay {
    opacity: 1;
}

.overlay-content h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: white;
    font-weight: 700;
    line-height: 1.4;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animation for grid items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Single Post Styles - Modern Layout */
.single-post-container {
    max-width: 900px;
    margin: 50px auto;
    padding: 0 20px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.post-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #e60023);
}

.post-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #222;
    font-weight: 900;
    background: linear-gradient(45deg, #222, #555);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 30px;
    color: var(--light-text);
    font-size: 0.95rem;
    font-weight: 600;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta i {
    color: var(--primary-color);
}

.post-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
    position: relative;
    font-size: 1.1rem;
    line-height: 1.8;
}

.post-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.post-content h2 {
    color: #222;
    margin: 40px 0 20px;
    font-size: 2rem;
    font-weight: 800;
    position: relative;
    padding-bottom: 10px;
}

.post-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
}

.post-content p {
    margin-bottom: 25px;
    color: #444;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 30px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 0 15px 15px 0;
}

/* Vote Container Styles - After Post */
.vote-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.vote-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.vote-title {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #222;
    font-weight: 700;
}

.vote-count {
    display: flex;
    justify-content: center;
    gap: 60px;
    align-items: center;
}

.likes, .dislikes {
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    transition: var(--transition);
    cursor: pointer;
}

.likes:hover, .dislikes:hover {
    transform: translateY(-5px);
}

.likes {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    box-shadow: 0 10px 20px rgba(67, 233, 123, 0.3);
}

.dislikes {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    box-shadow: 0 10px 20px rgba(250, 112, 154, 0.3);
}

.like-count {
    font-size: 4rem;
    font-weight: 900;
    color: #1a7c3d;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dislike-count {
    font-size: 3.5rem;
    font-weight: 900;
    color: #c53030;
    display: block;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.vote-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-top: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Category Page Styles */
.category-header {
    text-align: center;
    margin: 40px auto;
    max-width: 800px;
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.category-title {
    font-size: 2.5rem;
    color: #222;
    margin-bottom: 20px;
    font-weight: 900;
}

.category-description {
    color: var(--light-text);
    font-size: 1.1rem;
}

/* Modern Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 50px 0;
    flex-wrap: wrap;
}

.pagination a, 
.pagination span {
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    min-width: 50px;
    text-align: center;
}

.pagination a {
    background: white;
    color: var(--text-color);
    box-shadow: var(--shadow);
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
}

.pagination .current {
    background: linear-gradient(135deg, #e60023 0%, #ff6b6b 100%);
    color: white;
    box-shadow: 0 5px 15px rgba(230, 0, 35, 0.4);
}

.pagination .dots {
    background: transparent;
    color: var(--light-text);
    box-shadow: none;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #1a1a2e 100%);
    color: #ccc;
    padding: 60px 20px 30px;
    margin-top: 80px;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #e60023);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-menu h3, 
.footer-about h3 {
    color: white;
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-menu h3::after, 
.footer-about h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary-color);
}

.footer-menu ul {
    list-style: none;
}

.footer-menu li {
    margin-bottom: 12px;
}

.footer-menu a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-menu a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

.footer-about p {
    color: #aaa;
    line-height: 1.8;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 30px;
    text-align: center;
    color: #888;
    font-size: 0.95rem;
}

.footer-bottom p {
    margin-bottom: 10px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pinterest-grid {
        columns: 4 250px;
    }
    
    .post-title {
        font-size: 2.5rem;
    }
    
    .vote-count {
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .pinterest-grid {
        columns: 2 280px;
    }
    
    .site-title {
        font-size: 2.5rem;
    }
    
    .categories-menu {
        gap: 10px;
    }
    
    .categories-menu a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .single-post-container {
        margin: 30px auto;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .post-content {
        padding: 30px;
    }
    
    .vote-count {
        flex-direction: column;
        gap: 20px;
    }
    
    .category-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .pinterest-grid {
        columns: 1 280px;
    }
    
    .site-title {
        font-size: 2rem;
    }
    
    .categories-menu {
        flex-direction: column;
        align-items: center;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}
/* Page-specific Styles */
.page-excerpt {
    font-size: 1.2rem;
    color: var(--light-text);
    margin: 20px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.page-featured-image {
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.page-thumbnail {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    text-align: center;
    font-style: italic;
    color: var(--light-text);
    padding: 10px;
    font-size: 0.9rem;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}

/* Table of Contents */
.table-of-contents {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 40px 0;
    border-left: 4px solid var(--primary-color);
}

.table-of-contents h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #222;
    font-size: 1.5rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 20px;
}

.toc-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.toc-list a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
}

.toc-list a:hover {
    color: var(--primary-color);
    transform: translateX(5px);
}

/* Edit Page Link */
.edit-page-link {
    text-align: center;
    margin: 40px 0;
    padding-top: 20px;
    border-top: 2px dashed var(--border-color);
}

.edit-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: var(--transition);
}

.edit-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(118, 75, 162, 0.4);
    color: white;
}

/* Related Pages */
.related-pages {
    margin-top: 60px;
    padding: 40px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 20px;
}

.related-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: #222;
}

.related-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.related-page-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.related-page-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.related-page-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-page-item h4 {
    color: #222;
    margin-bottom: 10px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.related-excerpt {
    color: var(--light-text);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Page Content Styling */
.page-content-inner h2 {
    font-size: 2rem;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.page-content-inner h3 {
    font-size: 1.5rem;
    margin: 30px 0 15px;
    color: #444;
}

.page-content-inner p {
    margin-bottom: 25px;
    line-height: 1.8;
}

.page-content-inner ul,
.page-content-inner ol {
    margin: 20px 0;
    padding-left: 30px;
}

.page-content-inner li {
    margin-bottom: 10px;
    line-height: 1.6;
}

.page-content-inner blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 25px;
    margin: 30px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0 15px 15px 0;
    font-style: italic;
}

.page-content-inner pre {
    background: #1a1a2e;
    color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 25px 0;
}

.page-content-inner code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.page-content-inner table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
}

.page-content-inner th,
.page-content-inner td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
}

.page-content-inner th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.page-content-inner tr:nth-child(even) {
    background: #f8f9fa;
}

/* Responsive Design for Pages */
@media (max-width: 768px) {
    .page-content-inner {
        padding: 25px;
    }
    
    .related-pages {
        padding: 25px;
    }
    
    .related-pages-grid {
        grid-template-columns: 1fr;
    }
    
    .table-of-contents {
        padding: 20px;
    }
    
    .page-featured-image {
        margin: 20px 0;
    }
}

@media (max-width: 480px) {
    .post-header {
        padding: 25px;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .page-content-inner h2 {
        font-size: 1.6rem;
    }
    
    .page-content-inner h3 {
        font-size: 1.3rem;
    }
}