/*
Theme Name: Drelix Comic Theme
Template: kadence              
Version: 1.1
*/

/* Base Container Styles */
.entry-content .comic-container, 
.single-post .content-container {
    padding: 0 !important;
    max-width: none;
}

.comic-container {
    max-width: 1024px;
    width: 90%;
    margin: 0 auto;
}

/* Image Styles */
.comic-image-wrapper {
    width: 100%;
    max-width: 1024px;
   margin: 0 auto 5px auto; /* Reduced bottom margin */
    position: relative;
    
}

.comic-image-wrapper img,
.comic-image,
.wp-post-image {
    width: 100%;
 
    max-width: none !important;
    display: block;
}

/* Patreon Messages */
.patreon-message {
    padding: 12px 20px;
    margin: 0 0 20px 0;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: white;
}

.patreon-message a {
    color: white !important;
    text-decoration: none;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

[data-series="project-n"] .patreon-message {
    background: linear-gradient(to bottom, #FFD700, #ff6600);
    border-left: 4px solid #ff8c00;
}

[data-series="neoshock"] .patreon-message {
    background: linear-gradient(to bottom, #4CAF50, #2E7D32);
    border-left: 4px solid #81C784;
}

/* Navigation Styles */
.comic-nav {
    width: 100%;
    margin: 5px 0 10px 0; /* Reduced top and bottom margins */
    padding: 10px 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    justify-items: center;
    gap: 5px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: ;
}

.comic-button {
    display: flex;
    align-items: center;
    justify-content: center;
     width: 60px; /* Reduced width */
    height: 80px; /* Reduced height */
    text-indent: -9999px;
    overflow: hidden;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: all 0.3s ease;
}

.comic-button:hover {
    transform: scale(1.1);
}

.comic-button[data-clicked="true"] {
    opacity: 0.5 !important;
}

/* Button Positioning */
.comic-first {
    grid-column: 1;
    justify-self: start;
}

.comic-prev {
    grid-column: 2;
}

.comic-archive {
    grid-column: 3;
    width: 100px;
    height: 100px;
    margin-top: 20px;
}

.comic-next {
    grid-column: 4;
}

.comic-latest {
    grid-column: 5;
    justify-self: end;
}

/* Disabled State */
.nav-item.disabled {
    opacity: 0.5;
}

.nav-item.disabled .comic-button {
    cursor: not-allowed;
}

/* Series-specific Button Images */
[data-series="project-n"] {
    .comic-prev { background-image: url('images/previous.webp'); }
    .comic-next { background-image: url('images/next.webp'); }
    .comic-first { background-image: url('images/first.webp'); }
    .comic-latest { background-image: url('images/latest.webp'); }
    .comic-archive { background-image: url('images/archive.webp'); }
    
    .comic-button:hover {
        filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.8)) !important;

    }
}

[data-series="neoshock"] {
    .comic-prev { background-image: url('images/neoshock-prev.png'); }
    .comic-next { background-image: url('images/neoshock-next.png'); }
    .comic-first { background-image: url('images/neoshock-first.png'); }
    .comic-latest { background-image: url('images/neoshock-latest.png'); }
    .comic-archive { background-image: url('images/neoshock-archive.png'); }
}

@keyframes pulse-orange {
    from { filter: drop-shadow(0 0 8px rgba(255, 165, 0, 0.8)); }
    to { filter: drop-shadow(0 0 15px rgba(255, 165, 0, 1)); }
}

/* Patreon Popup Styles */
.patreon-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

.popup-content {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border: 2px solid #FF8C00;
    width: 90%;
    max-width: 600px;
    padding: min(5vw, 40px);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.popup-content h3 {
    color: #333;
    font-size: clamp(24px, 3vw, 32px);
    margin-bottom: 15px;
}

.popup-content p {
    color: #555;
    font-size: clamp(16px, 2vw, 20px);
    margin-bottom: 25px;
}

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.patreon-button {
    background: #FF424D;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s;
}

.patreon-button:hover {
    transform: translateY(-2px);
}

.redirect-icon {
    margin-left: 8px;
    font-size: 18px;
}

.close-popup {
    background: white;
    border: 1px solid #ccc;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
}

.close-popup:hover {
    background: rgba(0,0,0,0.05);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Archive Styles */
#comic-archive,
.comic-archive-series {
    background: #000000;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.series-header {
    width: 100%;
    padding: 0;
}

.series-logo-container {
    width: 100%;
    overflow: hidden;
}

.series-logo {
    width: 100%;
    height: auto;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0;
    padding: 0;
}

.page-card {
    padding: 5%;
    border-radius: 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.page-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
    object-fit: fill;
}

.page-card:hover img {
    transform: scale(1.03);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

[data-series="project-n"] .page-card h4 {
    color: #ffee00;
    margin: 8px 0 0;
    text-decoration: none !important;
    text-align: center;
    padding: 8px 0;
    font-weight: bold;
}

.page-card a {
    text-decoration: none !important;
}

.volume-title,
.issue-title {
    display: block;
    text-transform: uppercase;
    text-align: center;
    margin: 15px 0;
}

.pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.issues-container {
    display: flex;
    flex-direction: column;
}

.no-pages {
    color: #777;
    font-style: italic;
    grid-column: 1 / -1;
    text-align: center;
    padding: 20px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
       .comic-button {
        width: 50px; /* Even more compact on mobile */
        height: 50px;
    }
    
    .comic-archive {
        width: 60px;
        height: 60px;
    }
    
    .comic-nav {
        gap: 3px; /* Tighter gap on mobile */
    }
}

    
    .patreon-message {
        font-size: 14px;
        padding: 10px 15px;
    }
    
    .pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .series-logo {
        margin-bottom: -90px;
        margin-top: -50px;
    }


@media (min-width: 769px) and (max-width: 1024px) {
    .series-logo {
        margin-bottom: -90px;
        margin-top: -50px;
    }
}

@media (min-width: 1025px) {
    .series-logo {
        display: none;
    }
    
    .volume-title,
    .issue-title {
        font-size: 40px;
    
    }   
    
 .perfecty-push-subscribe-button {
    cursor: pointer;
    padding: 8px 15px;
    color: inherit;
    text-decoration: none;
}

.perfecty-push-subscribe-button.subscribed {
    opacity: 0.7;
    pointer-events: none;
}}


