/**
 * Additional WordPress Theme Styles for Bar 212
 * Custom styles to enhance WordPress integration
 */

/* WordPress Alignment Classes */
.alignleft {
    float: left;
    margin-right: 1.5em;
    margin-bottom: 1.5em;
}

.alignright {
    float: right;
    margin-left: 1.5em;
    margin-bottom: 1.5em;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1.5em;
}

.alignnone {
    margin-bottom: 1.5em;
}

/* WordPress Image Captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5em;
}

.wp-caption img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

.wp-caption-text {
    text-align: center;
    padding: 0.5em 0;
    font-size: 0.9em;
    font-style: italic;
    color: #999;
}

/* Parallax Background */
.bg-bar-template-blocs-6 {
    background-image: url("https://images.unsplash.com/photo-1514933651103-005eec06c04b?w=1920");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

/* Fallback for mobile devices (fixed attachment doesn't work well) */
@media (max-width: 768px) {
    .bg-bar-template-blocs-6 {
        background-attachment: scroll;
    }
}

/* Custom Logo Support */
.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    max-height: 80px;
    width: auto;
    height: auto;
}

/* Navigation Menu Enhancements */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #fff !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
    color: #fff !important;
}

/* Post Meta Styling */
.post-meta {
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.post-meta a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.post-meta a:hover {
    color: #fff;
    text-decoration: underline;
}

.posted-on,
.byline {
    margin-right: 1rem;
}

/* Post Content Styling */
.post-content,
.page-content {
    line-height: 1.8;
    font-size: 1rem;
}

.post-content h2,
.page-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #fff;
}

.post-content h3,
.page-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #fff;
}

.post-content p,
.page-content p {
    margin-bottom: 1.5rem;
}

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

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

.post-content a,
.page-content a {
    color: #ffd700;
    text-decoration: underline;
}

.post-content a:hover,
.page-content a:hover {
    color: #fff;
}

/* Post Thumbnail */
.post-thumbnail,
.page-thumbnail {
    margin-bottom: 2rem;
}

.post-thumbnail img,
.page-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Comments Section */
.comments-section {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.comment-list {
    list-style: none;
    padding-left: 0;
}

.comment {
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.comment-author {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.comment-meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.5rem;
}

.comment-content {
    margin-top: 1rem;
}

/* Comment Form */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 4px;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.15);
}

.comment-form input[type="submit"] {
    padding: 0.75rem 2rem;
    background-color: transparent;
    border: 2px solid #fff;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.comment-form input[type="submit"]:hover {
    background-color: #fff;
    color: #000;
}

/* Widget Styling */
.widget {
    margin-bottom: 2rem;
}

.widget-title {
    color: #fff;
    margin-bottom: 1rem;
}

.widget ul {
    list-style: none;
    padding-left: 0;
}

.widget li {
    margin-bottom: 0.5rem;
}

.widget a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.widget a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Search Form Widget */
.widget_search .search-form {
    display: flex;
}

.widget_search .search-field {
    flex: 1;
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
}

.widget_search .search-submit {
    padding: 0.5rem 1rem;
    background-color: transparent;
    border: 1px solid #fff;
    color: #fff;
    cursor: pointer;
    margin-left: 0.5rem;
}

/* Responsive Embeds */
.wp-block-embed {
    margin-bottom: 1.5rem;
}

.wp-block-embed iframe {
    max-width: 100%;
}

/* Gallery Blocks */
.wp-block-gallery {
    margin-bottom: 1.5rem;
}

/* Block Editor Styles */
.entry-content > * {
    margin-bottom: 1.5rem;
}

.entry-content > *:last-child {
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    padding: 0;
    list-style: none;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    color: #fff;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

/* Accessibility */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    color: #21759b;
    display: block;
    font-size: 14px;
    font-weight: bold;
    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: "Featured";
    position: absolute;
    top: 0;
    right: 0;
    background-color: #ffd700;
    color: #000;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* Archive Pages */
.archive-header {
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.archive-title {
    color: #fff;
    margin-bottom: 0.5rem;
}

.archive-description {
    color: rgba(255, 255, 255, 0.7);
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #fff;
}

/* Loading Animation */
.lazyload,
.lazyloading {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazyloaded {
    opacity: 1;
}

/* Placeholder for lazy-loaded images */
img[data-src] {
    min-height: 200px;
    background: rgba(255, 255, 255, 0.1);
}

/* Print Styles */
@media print {
    .navbar,
    .comment-form,
    .widget,
    #bloc-4,
    #bloc-6 {
        display: none;
    }

    .post-content,
    .page-content {
        color: #000;
    }
}

/* Dark Mode Support (for devices with preference) */
@media (prefers-color-scheme: dark) {
    /* Theme is already dark, but ensure compatibility */
    body {
        color: #fff;
        background-color: #1a1a1a;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Menu Template Styles */
.menu-section {
    padding: 2rem 0;
}

.menu-item {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #fff;
}

.menu-item .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

.menu-price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ffd700;
    white-space: nowrap;
    margin-left: 1rem;
}

.menu-content-wrapper h2 {
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.menu-content-wrapper h3 {
    color: #fff;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.menu-content-wrapper ul {
    list-style: none;
    padding-left: 0;
}

.menu-content-wrapper li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Menu Styles */
@media (max-width: 768px) {
    .menu-item .d-flex {
        flex-direction: column;
    }

    .menu-price {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}
