/* Publication-specific Theme Variables */
.pub-st {
    --brand-color: #1d315c;
}

.pub-bt {
    --brand-color: #2b2b2b;
}

.pub-zb, .pub-sm {
    --brand-color: #a80034;
}

.pub-bh {
    --brand-color: #447ab2;
}

.pub-tm, .pub-tabla, .pub-mm, .pub-bm {
    --brand-color: #b10442;
}



/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Layout Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    /* min-height: 100vh; */
}

/* Header */
.header {
    padding: 10px 20px;
    border-bottom: 2px solid #000;
    background: white;
}

.publication-header {
    text-align: center;
    margin: auto;
}

.publication-logo {
    max-height: 50px;
    width: auto;
    max-width: 100%;
}

/* Main Content */
.main-content {
    padding: 0 20px;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 60px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-container p {
    color: #666;
    font-size: 16px;
}

/* Error State */
.error-container {
    text-align: center;
    padding: 60px 20px;
}

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

.error-container h2 {
    color: #dc3545;
    margin-bottom: 10px;
    font-size: 24px;
}

.error-message {
    color: #666;
    font-size: 16px;
    margin-bottom: 10px;
}

.error-details {
    color: #999;
    font-size: 14px;
}

/* Article Content */
.article-container {
    animation: fadeIn 0.3s ease-in-out;
}

#article-iframe{
    width: 100%;
    height: calc(100vh - 135px);
    border: 0;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.article-date {
    font-size: 18px;
    font-weight: 500;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
    text-align: center;
}

.article-image-container {
    text-align: center;
}

.article-image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Article Footer */
.article-footer {
    display: none;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: center;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.social-link svg {
    color: white;
}

.social-link:hover {
    transform: translateY(-2px);
}

.social-link.facebook {
    background-color: #1877f2;
}

.social-link.facebook:hover {
    background-color: #166fe5;
}

.social-link.twitter {
    background-color: #000000;
}

.social-link.twitter:hover {
    background-color: #333333;
}



/* Apply brand colors */
.header {
    border-bottom-color: var(--brand-color, #000);
}


/* Responsive Design */
@media (max-width: 768px) {
    .container {
        margin: 0;
    }
    
    .publication-header {
        text-align: center;
    }
    
    .article-title {
        font-size: 26px;
    }
    
    .article-date {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 12px;
    }
    
    .main-content {
        padding: 12px;
    }

    #article-iframe{
    height: calc(100vh - 160px);
    }
    
    .article-title {
        font-size: 22px;
    }
    
    .article-content {
        font-size: 15px;
    }
    
    .loading-container,
    .error-container {
        padding: 40px 15px;
    }
}