/* Single Post Specific Styles */
.single-post {
    background: linear-gradient(to bottom, #1a1a1a 0%, #222 100%) !important;
    padding: 32px !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s ease !important;
    margin-bottom: 48px !important;
}

.single-post:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
    background: linear-gradient(to bottom, #1c1c1c 0%, #252525 100%) !important;
}

.single-post h1 {
    font-family: 'Sora', sans-serif !important;
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
    line-height: 1.3 !important;
    color: #e0e0e0 !important; /* Cinza claro suave */
}

.single-post .post-content h2,
.single-post .post-content h3,
.single-post .post-content h4 {
    font-family: 'Sora', sans-serif !important;
    color: #D4AF37 !important;
    margin-top: 32px !important;
    margin-bottom: 16px !important;
    font-weight: 700 !important;
}

.single-post .post-content h2 {
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
}

.single-post .post-content p {
    margin-bottom: 1.1em !important; /* Breathing space */
    line-height: 1.7 !important; /* More spaced line */
    color: #d1d1d1 !important; /* Light gray */
    font-weight: 400 !important; /* Normal weight for reading */
}

.single-post .post-content img {
    border-radius: 12px !important;
    margin: 24px auto !important; /* Centralizar */
    max-width: 100% !important; /* Never exceeds container */
    width: 100% !important; 
    height: auto !important; 
    display: block !important; /* Removes inline spacing */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
    object-fit: contain !important; 
}

/* Force max-width for WordPress images with specific classes */
.single-post .post-content .size-full,
.single-post .post-content .size-large,
.single-post .post-content .size-medium,
.single-post .post-content img[class*="wp-image-"] {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Images inside figure (Gutenberg blocks) */
.single-post .post-content figure {
    max-width: 100% !important;
    margin: 24px 0 !important;
}

.single-post .post-content figure img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Ensure image links don't exceed container */
.single-post .post-content a img {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

/* YouTube embeds and iframes */
.single-post .post-content iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
}

/* Wrapper para manter aspect ratio 16:9 */
.single-post .post-content p:has(iframe) {
    position: relative !important;
    padding-bottom: 56.25% !important; /* 16:9 = 9/16 = 0.5625 */
    height: 0 !important;
    overflow: hidden !important;
    margin: 24px 0 !important;
    border-radius: 12px !important;
    background: #000 !important;
}

/* WordPress embed containers */
.single-post .post-content .wp-block-embed__wrapper {
    position: relative !important;
    padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
    height: 0 !important;
    overflow: hidden !important;
    margin: 24px 0 !important;
    border-radius: 12px !important;
    background: #000 !important;
}

.single-post .post-content .wp-block-embed__wrapper iframe {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
}

/* WordPress video embeds */
.single-post .post-content .wp-video,
.single-post .post-content video {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px !important;
    margin: 24px 0 !important;
    display: block !important;
}

/* Fallback para embeds sem wrapper */
.single-post .post-content .wp-block-embed,
.single-post .post-content .wp-embed-responsive {
    max-width: 100% !important;
    margin: 24px 0 !important;
    position: relative !important;
}

.single-post .post-content .wp-block-embed iframe {
    border-radius: 12px !important; /* ← NOVO */
}

.single-post .post-content ul,
.single-post .post-content ol {
    margin: 20px 0 !important;
    padding-left: 24px !important;
    line-height: 1.7 !important; /* Consistent with paragraphs */
    color: #d1d1d1 !important;
}

.single-post .post-content li {
    margin-bottom: 12px !important; /* More space between items */
    color: #d1d1d1 !important;
}

.single-post .post-content blockquote {
    border-left: 4px solid #D4AF37 !important;
    padding-left: 20px !important;
    margin: 24px 0 !important;
    font-style: italic !important;
    color: #b0b0b0 !important;
    line-height: 1.7 !important;
}

.single-post .post-content a {
    color: #D4AF37 !important;
    text-decoration: underline !important;
    transition: color 0.3s ease !important;
}

.single-post .post-content a:hover {
    color: #C5A028 !important;
}

/* About Author Box */
.about-author {
    display: flex !important;
    gap: 20px !important;
    align-items: center !important;
    margin: 32px 0 !important;
    padding: 24px !important;
    background: linear-gradient(to right, #1c1c1c 0%, #222 100%) !important;
    border-radius: 12px !important;
    border-left: 4px solid #D4AF37 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    transition: all 0.3s ease !important;
}

.about-author:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

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

.author-avatar img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 50% !important;
    border: 3px solid #D4AF37 !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
    transition: transform 0.3s ease !important;
}

.about-author:hover .author-avatar img {
    transform: scale(1.05) !important;
}

.author-info {
    flex: 1 !important;
    min-width: 0 !important;
}

.author-info h3 {
    font-family: 'Sora', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #D4AF37 !important;
    margin: 0 0 8px 0 !important;
    letter-spacing: 0.01em !important;
}

.author-info p {
    color: #b0b0b0 !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin: 0 0 12px 0 !important;
}

.author-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    color: #D4AF37 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.author-link:hover {
    color: #C5A028 !important;
    gap: 8px !important;
    text-decoration: none !important;
}

.author-link svg {
    transition: transform 0.3s ease !important;
}

.author-link:hover svg {
    transform: translateX(2px) !important;
}

/* Post tags styling */
.post-tags {
    margin-top: 32px !important;
    padding-top: 24px !important;
    border-top: 1px solid #333 !important;
}

.post-tags strong {
    color: #D4AF37 !important;
    margin-right: 8px !important;
    font-weight: 600 !important;
}

.post-tags a {
    display: inline-block !important;
    background: #222 !important;
    color: #b0b0b0 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    margin: 4px !important;
    font-size: 0.85rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    border: 1px solid #333 !important;
}

.post-tags a:hover {
    background: #D4AF37 !important;
    color: #000 !important;
    border-color: #D4AF37 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3) !important;
}

/* Post navigation hover */
.post-navigation a:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6) !important;
    background: linear-gradient(to bottom, #1c1c1c 0%, #252525 100%) !important;
    transform: translateY(-2px) !important;
}

.post-navigation .nav-label {
    color: #888 !important;
    font-size: 0.8rem !important;
    margin-bottom: 4px !important;
}

.post-navigation .nav-title {
    color: #e0e0e0 !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .single-post {
        padding: 16px !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }
    
    .single-post h1 {
        font-size: 1.8rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    /* Ensure post content doesn't overflow */
    .single-post .post-content {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }
    
    /* Images on mobile */
    .single-post .post-content img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Figures on mobile */
    .single-post .post-content figure {
        max-width: 100% !important;
        width: 100% !important;
        margin: 16px 0 !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }
    
    .single-post .post-content figure img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
    
    /* Links with images */
    .single-post .post-content a {
        max-width: 100% !important;
        display: block !important;
        overflow: hidden !important;
    }
    
    .single-post .post-content a img {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .about-author {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
    }
    
    .author-avatar {
        width: 60px !important;
        height: 60px !important;
    }
    
    .author-info h3 {
        font-size: 1.1rem !important;
    }
    
    .post-navigation {
        flex-direction: column !important;
    }
    
    .nav-next {
        text-align: left !important;
    }
    
    .post-navigation a {
        justify-content: flex-start !important;
    }
}

/* ========================================
   IMAGE LIGHTBOX
======================================== */

#image-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: zoom-out;
}

#image-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    animation: lightboxZoom 0.3s ease;
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    cursor: default;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid #D4AF37;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(212, 175, 55, 0.4);
    transform: rotate(90deg) scale(1.1);
}

.lightbox-close svg {
    color: #D4AF37;
    transition: color 0.3s ease;
}

.lightbox-close:hover svg {
    color: #fff;
}

/* Image hover effects removed - images now have default browser behavior */

/* Responsive lightbox */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
    
    .lightbox-close svg {
        width: 24px;
        height: 24px;
    }
    
    .lightbox-image {
        max-height: 80vh;
    }
}

/* ==========================================
   GALLERY CAROUSEL STYLES
   ========================================== */

.gallery-carousel {
    position: relative;
    width: 100%;
    margin: 32px 0;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}

.carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    transition: transform 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
    will-change: transform;
}

.carousel-slide {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.carousel-slide img {
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* Navigation Arrows */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.carousel-btn:hover {
    background: rgba(212, 175, 55, 0.3);
    border-color: #D4AF37;
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    color: #fff;
    transition: color 0.3s ease;
}

.carousel-btn:hover svg {
    color: #D4AF37;
}

.carousel-btn-prev {
    left: 12px;
}

.carousel-btn-next {
    right: 12px;
}

/* Dots Indicator */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 16px 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-dot.active {
    background: #D4AF37;
    width: 24px;
    border-radius: 4px;
}

/* Counter */
.carousel-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-family: 'Sora', sans-serif;
    font-weight: 500;
    backdrop-filter: blur(8px);
    z-index: 10;
}

.carousel-counter span {
    color: #D4AF37;
}

/* Thumbnail Strip (optional) */
.carousel-thumbnails {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.4);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #D4AF37 #1a1a1a;
}

.carousel-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 2px;
}

.carousel-thumb {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.carousel-thumb:hover {
    opacity: 0.8;
}

.carousel-thumb.active {
    opacity: 1;
    border-color: #D4AF37;
}

.carousel-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive Carousel */
@media (max-width: 768px) {
    .carousel-slide {
        padding: 15px;
    }
    
    .carousel-slide img {
        max-height: 350px;
    }
    
    .carousel-btn {
        width: 36px;
        height: 36px;
    }
    
    .carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .carousel-btn-prev {
        left: 8px;
    }
    
    .carousel-btn-next {
        right: 8px;
    }
    
    .carousel-counter {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    
    .carousel-thumbnails {
        padding: 8px;
        gap: 6px;
    }
    
    .carousel-thumb {
        width: 50px;
        height: 50px;
    }
}