/* CZ Gallery Custom Styles */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Gallery item transitions */
.gallery-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2);
}

/* WordPress content styles */
.prose img {
    border-radius: 0.75rem;
    margin: 1.5rem 0;
}

.prose h2,
.prose h3,
.prose h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

.prose a {
    color: hsl(var(--primary));
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    opacity: 0.8;
}

.prose blockquote {
    border-left: 4px solid hsl(var(--border));
    padding-left: 1rem;
    font-style: italic;
    color: hsl(var(--muted-foreground));
}

.prose ul,
.prose ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Navigation menu styles */
.menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu li {
    display: inline-block;
}

.menu li a {
    display: block;
    padding: 0.5rem 0;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.hidden {
    display: none;
}

/* Pagination styles */
.pagination,
.page-numbers {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-numbers li {
    margin: 0;
}

.page-numbers a,
.page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-numbers a {
    background-color: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
}

.page-numbers a:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.page-numbers span.current {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.page-numbers .dots {
    background: none;
    color: hsl(var(--muted-foreground));
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid hsl(var(--input));
    border-radius: 0.5rem;
    background-color: transparent;
    color: hsl(var(--foreground));
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover,
input[type="submit"]:hover {
    background-color: hsl(var(--primary) / 0.9);
}

/* Screen reader text */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: hsl(var(--background));
    clip: auto;
    clip-path: none;
    color: hsl(var(--foreground));
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Sticky post */
.sticky {
    position: relative;
}

.sticky::before {
    content: '置顶';
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
}

/* Comments */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment-list .comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.comment-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.comment-author {
    font-weight: 600;
}

.comment-metadata {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.comment-content {
    margin-left: 3rem;
}

/* Gallery shortcode */
.gallery {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gallery-item {
    margin: 0;
}

.gallery-icon img {
    border-radius: 0.5rem;
    width: 100%;
    height: auto;
}
