/* ========================================
   KADENCE CHILD THEME - DIGITAL MAGAZINE
   Premium Magazine Engine with Responsive Design
   ======================================== */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --border-color: #bdc3c7;
    --bg-light: #ecf0f1;
    --bg-dark: #2c3e50;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-heavy: 0 4px 20px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #fff;
}

/* ========================================
   MAIN MAGAZINE LAYOUT
   ======================================== */

.split-magazine-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 25px;
    max-width: 1600px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Left Panel - Magazine */
.mag-left-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.magazine-container {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-heavy);
}

#digital-magazine-viewport {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--bg-light);
    position: relative;
    overflow: hidden;
}

.mag-page-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease;
}

.mag-page-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.magazine-page-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: white;
    overflow: hidden;
}

.static-img-page img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Magazine Page Content */
.mag-featured-wrapper {
    width: 100%;
    height: 40%;
    margin-bottom: 15px;
    border-radius: 6px;
    overflow: hidden;
}

.mag-featured-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    text-align: center;
}

.mag-body-text {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    text-align: justify;
}

/* Magazine Navigation Controls */
.mag-nav-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--bg-light);
    border-top: 1px solid var(--border-color);
}

.mag-nav-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mag-nav-btn:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
}

.mag-nav-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.6;
}

.mag-page-indicator {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
}

/* Right Panel - Blogspot Sidebar */
.mag-right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mag-blogspot-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.mag-blogspot-container h3 {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
}

/* Blog Post Items */
.mag-blogspot-item {
    padding: 15px;
    margin-bottom: 15px;
    background: var(--bg-light);
    border-radius: 6px;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
    cursor: pointer;
}

.mag-blogspot-item:hover {
    background: #d5dbdb;
    transform: translateX(5px);
}

.mag-blogspot-item h4 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.mag-blogspot-item h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.mag-blogspot-item h4 a:hover {
    color: var(--secondary-color);
}

.mag-blogspot-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
    font-size: 12px;
}

.mag-category-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--secondary-color);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.mag-language-flag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.mag-blogspot-excerpt {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* Category Filters */
.mag-category-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--bg-light);
    border-radius: 6px;
}

.tab-btn {
    padding: 8px 16px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    color: var(--text-color);
}

.tab-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.tab-btn.active {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* ========================================
   PAYWALL STYLES
   ======================================== */

/* EmbedPress PDF Lock Overlay */
.locked-pdf-container {
    position: relative;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.pdf-lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 40px;
    text-align: center;
}

.lock-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.pdf-lock-overlay h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.pdf-lock-overlay p {
    color: #666;
    margin-bottom: 20px;
}

.promo-input-wrapper {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.pdf-promo-input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    min-width: 200px;
    transition: var(--transition);
}

.pdf-promo-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.pdf-unlock-btn {
    padding: 10px 20px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.pdf-unlock-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.pdf-preview-blur {
    filter: blur(10px);
    pointer-events: none;
}

.promo-message {
    margin-top: 10px;
    font-size: 14px;
}

.promo-message.success {
    color: #27ae60;
}

.promo-message.error {
    color: var(--accent-color);
}

/* Blog Post Content Paywall */
.content-paywall-wrapper {
    position: relative;
}

.content-preview {
    margin-bottom: 20px;
}

.content-paywall-overlay {
    background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%);
    padding: 60px 20px 40px;
    margin-top: -60px;
}

.paywall-box {
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-heavy);
}

.paywall-box h3 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.paywall-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.content-promo-input {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    min-width: 250px;
    transition: var(--transition);
}

.content-promo-input:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.content-unlock-btn {
    padding: 12px 24px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
}

.content-unlock-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.content-promo-message {
    margin-top: 15px;
    font-size: 14px;
}

.content-promo-message.success {
    color: #27ae60;
}

.content-promo-message.error {
    color: var(--accent-color);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .split-magazine-layout {
        grid-template-columns: 1fr;
    }
    
    .mag-right-panel {
        order: 2;
    }
}

@media (max-width: 768px) {
    .split-magazine-layout {
        padding: 0 10px;
        gap: 15px;
    }
    
    #digital-magazine-viewport {
        aspect-ratio: 4 / 3;
    }
    
    .magazine-page-content {
        padding: 20px;
    }
    
    .mag-title {
        font-size: 20px;
    }
    
    .mag-body-text {
        font-size: 13px;
    }
    
    .mag-nav-controls {
        padding: 10px 15px;
    }
    
    .mag-nav-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .promo-input-wrapper,
    .paywall-input-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .pdf-promo-input,
    .content-promo-input {
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .mag-category-tabs {
        gap: 5px;
    }
    
    .tab-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .mag-blogspot-item {
        padding: 12px;
    }
    
    .paywall-box {
        padding: 20px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}
