:root {
    --ccw-yellow: #ffc107;
    --ccw-red: #dc3545;
    --ccw-dark: #212529;
}

body {
    background-color: #000000;
}

footer#site-footer {
    margin-top: 0 !important;
}

/* Custom Comic Accent Classes */
.bg-comic-red {
    background-color: var(--ccw-red) !important;
}

.text-comic-yellow {
    color: var(--ccw-yellow) !important;
}

.border-comic-red {
    border-color: var(--ccw-red) !important;
}

/* Jumbotron / Primary Header Gradient */
.jumbotron.bg-gradient-primary {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%) !important;
}

/* ==========================================================================
   GLOBAL BOOTSTRAP OVERRIDES (Comic Con Wanderers Theme)
   ========================================================================== */
.text-primary {
    color: var(--ccw-red) !important;
}

.border-primary {
    border-color: var(--ccw-red) !important;
}

.btn-primary:not(.btn-facebook),
.badge-primary {
    background-color: var(--ccw-red) !important;
    border-color: #bd2130 !important;
    color: #fff !important;
}

.btn-primary:not(.btn-facebook):hover {
    background-color: #bd2130 !important;
    border-color: #b21f2d !important;
}

/* Outline Primary Buttons */
.btn-outline-primary {
    color: var(--ccw-red) !important;
    border-color: var(--ccw-red) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    color: #fff !important;
    background-color: var(--ccw-red) !important;
    border-color: var(--ccw-red) !important;
}

.btn-whatsapp {
    background-color: #ffffff;
}


/* ==========================================================================
   1. GLOBAL CONTAINER & LAYOUT STRUCTURE
   ========================================================================== */
nav.container {
    padding: 0;
}

.container.py-4.blog-body-section {
    background-color: #afafaf;
}

.blog-post-body, 
.blog-post-inner-header-wrapper {
    padding: 10px 15px;
}

.blog-post-inner-header-wrapper > h1 {
    font-size: 35px;
}

.blog-post-inner-header-wrapper > h2 {
    font-size: 25px;
}

.blog-post-body {
    position: relative;
    background-color: rgba(255, 255, 255, 0.2);
    overflow-wrap: break-word;
    word-wrap: break-word; /* Legacy support for older browsers */
    word-break: break-word;
}

/* Clearfix for floated images */
.blog-post-body::after {
    content: "";
    display: table;
    clear: both;
}

.blog-cover-container.mb-4 {
    margin-bottom: 10px !important;
}

.blog-post-header.mb-4 {
    margin-bottom: 0px !important;
    background-color: rgba(255, 255, 255, 0.5);
}


/* ==========================================================================
   2. BLOG POST IMAGES
   ========================================================================== */
.blog-post-body img.img-fluid {
    max-width: 100%;        
    width: auto;            
    max-height: 450px;      
    height: auto;           
    object-fit: contain;    
}


/* ==========================================================================
   3. AMAZON AFFILIATE CARDS & LAYOUT
   ========================================================================== */
.amazon-aff-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.25rem;
    margin: 1.5rem 0;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.05);
    padding: 5px;
}

.product-group-disclaimer {
    font-size: 0.82rem;
    color: #000000;
}

.product-card {
    flex: 0 0 300px;
    width: 300px;
    max-width: 100%;
    font-size: 0.88rem;
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.4rem;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
}

.product-card .card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.product-card .card-title {
    font-size: 0.95rem !important;
    line-height: 1.3;
}

.product-card .card-text {
    font-size: 0.8rem !important;
}

.product-card .product-price {
    font-size: 1.1rem !important;
}

.product-card .product-disclosure {
    font-size: 0.75rem !important;
    line-height: 1.2;
}

.product-img-wrapper {
    height: 210px;            
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top-left-radius: calc(0.4rem - 1px);
    border-top-right-radius: calc(0.4rem - 1px);
}

.product-img {
    max-height: 180px;
    max-width: 100%;
    width: auto;
    height: 100% !important;
    object-fit: contain;
    transition: transform 0.3s ease;
}


/* ==========================================================================
   4. INTERACTIVE BUTTONS & MENTIONS
   ========================================================================== */
.hashtag-button {
    background-color: #f8f9fa;
    color: #495057 !important;
    border: 1px solid #ced4da;
    border-radius: 50rem;
    padding: 0.35rem 0.75rem;
    font-size: 0.65rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    display: inline-block;
}

.link-in-blog {
    color: var(--ccw-red);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px dotted var(--ccw-red);
    transition: all 0.2s ease-in-out;
}


/* ==========================================================================
   5. STREAMILY CONTAINER
   ========================================================================== */
.streamily-aff-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.streamily-aff .btn-primary {
    background-color: var(--ccw-red) !important;
    border-color: #bd2130 !important;
}

/* ==========================================================================
   CAROUSEL LAYOUT (Uniform Fixed Height & Clean Bottom Caption Style)
   ========================================================================== */
#myCarousel {
    position: relative;
    width: 100%;
    margin-bottom: 0 !important;
}

.jumbotron.jumbotron-fluid {
    padding: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.btn-comic-yellow {
    background-color: #ffc107 !important;
    border-color: #e0a800 !important;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.btn-comic-yellow:hover {
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
    transform: translateY(-2px);
}

/* Blog Post Meta Cell Layout */
.blog-post-meta {
    row-gap: 4px;
}

.blog-meta-item {
    white-space: nowrap;
}

.blog-meta-item i {
    font-size: 0.9rem;
}

/* Stylized Share Group Label */
.share-label {
    display: inline-flex;
    align-items: center;
    font-size: 0.9rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Smooth interaction states for related post cards */
.related-thumbnail {
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
}

.related-thumbnail .card-img-top {
    transition: transform 0.35s ease;
}

a.card-hover-link:hover .related-thumbnail {
    transform: translateY(-4px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

a.card-hover-link:hover .related-thumbnail .card-img-top {
    transform: scale(1.04);
}

a.card-hover-link:active .related-thumbnail {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1) !important;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.related-thumbnail .card-title {
    transition: color 0.2s ease;
}

a.card-hover-link:hover .related-thumbnail .card-title {
    color: #007bff !important;
}

/* Container for the parsed topic chips */
.blog-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

/* Individual modern chip style */
.blog-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.blog-tag-chip:hover {
    background-color: #e9ecef;
    color: #1d2124;
    border-color: #adb5bd;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

.blog-tag-chip:active {
    background-color: #dde2e6;
    transform: translateY(0);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}

.blog-tag-chip:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.fb-facebook-messenger {
    color: #0084FF !important;
}

.whts {
    color: #25D366 !important;
}

.btn-copy {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-copy:active {
    transform: scale(0.95);
}

/* Container alignment */
.blog-post-footer.share-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.4);
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Uniform Size & Typography Lock for all share buttons */
.uniform-share-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 31px !important;
    padding: 0.25rem 0.6rem !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    vertical-align: middle;
    box-sizing: border-box;
    transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.uniform-share-btn i {
    font-size: 1rem !important;
}

.fb-facebook-messenger {
    background-color: #ffffff !important;
    color: #0084FF !important;
    border: 1px solid #ced4da !important;
}
.fb-facebook-messenger:hover {
    background-color: #f8f9fa !important;
    color: #006dd6 !important;
}

.whts {
    background-color: #ffffff !important;
    color: #25D366 !important;
    border: 1px solid #ced4da !important;
}
.whts:hover {
    background-color: #f8f9fa !important;
    color: #1ebe5d !important;
}

.uniform-share-btn:hover {
    transform: translateY(-2px);
}

.uniform-share-btn:active {
    transform: translateY(0);
}

/* ==========================================================================
   6. ACCORDION WRAPPING & MULTI-LINE FIX
   ========================================================================== */
.card-header,
.accordion .card-header a,
.accordion .card-header button,
[data-toggle="collapse"] {
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: left;
}

/* Ensure flex containers inside accordions wrap correctly */
.card-header .d-flex,
.accordion .card-header .d-flex {
    flex-wrap: wrap !important;
}

/* ==========================================================================
   7. ACCORDION FLEX & ROTATION FIX
   ========================================================================== */

/* Make the card header a flex container so content stays on the left and the chevron stays on the right */
.card-header > .btn-link,
.card-header > button[data-toggle="collapse"],
.card-header > a[data-toggle="collapse"] {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

/* Base style for the chevron with smooth transition */
.card-header svg.svg-inline--fa {
    transition: transform 0.3s ease-in-out !important;
    flex-shrink: 0 !important;
    margin-left: 10px !important;
}

/* 
  CLOSED STATE:
  Points DOWN (0deg) when aria-expanded="false" or when .collapsed class is present.
*/
.card-header button[aria-expanded="false"] svg.svg-inline--fa,
.card-header button.collapsed svg.svg-inline--fa {
    transform: rotate(0deg) !important;
}

/* 
  OPENED STATE:
  Points UP (180deg) ONLY when aria-expanded="true".
*/
.card-header button[aria-expanded="true"] svg.svg-inline--fa {
    transform: rotate(180deg) !important;
}

.submissions-scroll-container {
    max-height: 650px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #495057 #212529;
}

/* Custom Webkit Scrollbar Styling for Dark Theme */
.submissions-scroll-container::-webkit-scrollbar {
    width: 8px;
}

.submissions-scroll-container::-webkit-scrollbar-track {
    background: #212529;
    border-radius: 4px;
}

.submissions-scroll-container::-webkit-scrollbar-thumb {
    background: #495057;
    border-radius: 4px;
}

.submissions-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #6c757d;
}

/* ==========================================================================
   8. RESPONSIVE MEDIA EMBEDS (YouTube, Instagram, Facebook)
   ========================================================================== */

/* Standardize YouTube and Horizontal Video Embeds (16:9) */
.embed-responsive-container iframe,
.embed-responsive-container div[style*="aspect-ratio: 16/9"] iframe {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 16 / 9 !important;
}

/* Force Vertical Facebook Video Embeds to Proper 9:16 Portrait Geometry */
.embed-responsive-container.vertical-video iframe,
.embed-responsive-container div[style*="aspect-ratio: 9/16"] iframe {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 9 / 16 !important;
}

/* Ensure Instagram Embed Wrapper Keeps Proper Proportion */
.instagram-embed-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: 400 / 480 !important;
}

/* Force Facebook Vertical Video Wrapper to be Tall */
.embed-responsive-container.vertical-video div[style*="aspect-ratio: 9/16"] {
    width: 100% !important;
    max-width: 360px !important;
    height: 640px !important;
    aspect-ratio: 9 / 16 !important;
}

/* Ensure the iframe fills that tall vertical box completely */
.embed-responsive-container.vertical-video iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 640px !important;
    border: none !important;
}

/* Safe area padding for iOS full-screen mode to prevent header overlap with the phone notch */
@supports(padding: max(0px)) {
  body {
    padding-top: env(safe-area-inset-top);
  }
}

.social-icon {
    transition: color 0.2s ease-in-out, transform 0.2s ease-in-out;
    display: inline-block;
}

/* ==========================================================================
   9. CONTACT SUBMISSIONS ADMIN VIEW (Badge Alignment)
   ========================================================================== */
.submission-badge {
    width: 140px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-shrink: 0;
}

/* ==========================================================================
   RESPONSIVE HOVER & TOUCH INTERACTIONS
   ========================================================================== */

/* Mobile Adjustments & Small Screen Optimization */
@media (max-width: 575.98px) {
    .youtube-embed-wrapper,
    .instagram-embed-wrapper,
    .facebook-video-embed-wrapper {
        padding-left: 5px;
        padding-right: 5px;
    }

    .instagram-embed-wrapper > div,
    .facebook-video-embed-wrapper.vertical-video > div,
    .youtube-embed-wrapper .ratio,
    .facebook-video-embed-wrapper.horizontal-video .ratio {
        max-width: 100% !important;
    }
}

@media (hover: hover) and (pointer: fine) {
    .link-in-blog:hover {
        color: #a71d2a;
        border-bottom-style: solid;
        background-color: rgba(220, 53, 69, 0.05);
        padding: 0.1rem 0.2rem;
        border-radius: 0.2rem;
    }

    .hashtag-button:hover {
        background-color: var(--ccw-red);
        color: #ffffff !important;
        border-color: var(--ccw-red);
        text-decoration: none;
        transform: translateY(-2px);
        box-shadow: 0 0.25rem 0.5rem rgba(220, 53, 69, 0.25);
    }

    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.15) !important;
        border-color: rgba(255, 193, 7, 0.5);
    }
    
    .product-card:hover .product-img {
        transform: scale(1.03);
    }
}

@media (hover: none), (pointer: coarse) {
    .link-in-blog:active {
        color: #a71d2a;
        background-color: rgba(220, 53, 69, 0.1);
    }

    .hashtag-button:active {
        background-color: var(--ccw-red);
        color: #ffffff !important;
        border-color: var(--ccw-red);
        transform: scale(0.96);
    }

    .product-card:active {
        transform: scale(0.98);
        box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1) !important;
        background-color: #f8f9fa;
    }
}

@media (max-width: 767.98px) {
    .jumbotron h1.display-4 {
        font-size: 2rem !important;
        line-height: 1.3;
    }
}