/*
Theme Name: Periodical Elegant Ultra
Author: Gemini AI
Description: High-end magazine layout for periodicals. Sky blue bg, white boxes, slider, and category grids.
Version: 5.1
*/

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary-blue: #0073aa;
    --bg-sky: #eef8fc;
    --box-white: #ffffff;
    --text-main: #333;
    --text-meta: #777;
    --border: #e0e0e0;
}

/* Base Styles */
body { 
    font-family: 'Open Sans', sans-serif; 
    background: var(--bg-sky); 
    color: var(--text-main); 
    margin: 0; 
    line-height: 1.6; 
}

a { color: inherit; text-decoration: none; transition: 0.3s; }
a:hover { color: var(--primary-blue); }
.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* Header & Navigation */
header { background: #fff; padding: 40px 0 0; border-bottom: 5px solid var(--primary-blue); }
.magazine-header { text-align: center; margin-bottom: 30px; }
.magazine-name { font-family: 'Playfair Display', serif; font-size: 4rem; text-transform: uppercase; margin: 0; letter-spacing: -1px; }
.magazine-subline { font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; color: var(--text-meta); }

.category-nav-bar { background: #fff; border-top: 1px solid var(--border); padding: 12px 0; text-align: center; }
.category-nav-bar a { margin: 0 15px; font-weight: 700; font-size: 0.8rem; text-transform: uppercase; color: #555; }

/* Layout Split */
.site-main-wrapper { display: flex; gap: 40px; margin-top: 40px; }
#primary { flex: 3; min-width: 0; }
#secondary { flex: 1; min-width: 300px; }

/* Featured Slider */
.hero-slider { position: relative; height: 500px; overflow: hidden; border-radius: 12px; margin-bottom: 40px; background: #000; }
.slider-item { height: 100%; width: 100%; background-size: cover; background-position: center; display: flex; align-items: flex-end; }
.slider-caption { background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; padding: 40px; width: 100%; }

/* Article Grid & Category Sections */
.category-section { margin-bottom: 50px; }
.section-title { font-size: 1rem; text-transform: uppercase; border-bottom: 2px solid #000; margin-bottom: 25px; padding-bottom: 5px; }
.article-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }

.article-box {
    background: var(--box-white);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: 0.3s ease;
}
.article-box:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }

.article-thumb img { width: 100%; height: 220px; object-fit: cover; border-radius: 10px; display: block; }
.article-title { font-size: 1.4rem; font-weight: 700; margin: 0; line-height: 1.2; }
.article-meta { font-size: 0.75rem; color: var(--text-meta); text-transform: uppercase; letter-spacing: 1px; }
.article-meta a { color: var(--primary-blue); font-weight: 700; }
.article-excerpt { font-size: 0.95rem; color: #555; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Sidebar Widgets */
.widget { background: var(--box-white); padding: 25px; border-radius: 15px; margin-bottom: 30px; border: 1px solid var(--border); box-shadow: 0 4px 15px rgba(0,0,0,0.03); }
.widget-title { border-bottom: 2px solid var(--primary-blue); padding-bottom: 10px; margin-bottom: 20px; font-size: 0.9rem; text-transform: uppercase; }

/* Comments Section Styling */
.comments-wrapper { margin-top: 50px; padding: 30px; background: var(--box-white); border-radius: 12px; border: 1px solid var(--border); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment {
    background: #f9fdf2; /* Subtle tint to distinguish from container */
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
}
.comment-author .avatar { border-radius: 50%; margin-right: 15px; float: left; }
.comment-metadata { font-size: 0.8rem; color: #999; margin-bottom: 15px; text-transform: uppercase; }
.comment-content { clear: both; font-size: 1rem; margin-top: 10px; }
.reply { margin-top: 15px; }
.comment-reply-link { background: var(--primary-blue); color: #fff; padding: 5px 15px; border-radius: 4px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }

/* Comment Form */
#reply-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; display: block; }
.comment-form textarea { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 15px; font-family: inherit; margin-bottom: 15px; box-sizing: border-box; }
.comment-form input[type="text"], .comment-form input[type="email"] { width: 100%; border: 1px solid #ddd; border-radius: 8px; padding: 12px; margin-bottom: 15px; box-sizing: border-box; }
.submit { background: var(--primary-blue); color: #fff; border: none; padding: 12px 30px; border-radius: 8px; cursor: pointer; font-weight: 700; text-transform: uppercase; transition: 0.3s; }
.submit:hover { background: #005a87; }

/* Pagination */
.pagination { text-align: center; margin: 40px 0; }
.page-numbers { background: #fff; padding: 8px 15px; border-radius: 4px; border: 1px solid var(--border); margin: 0 3px; }
.page-numbers.current { background: var(--primary-blue); color: #fff; border-color: var(--primary-blue); }

/* Responsive */
@media (max-width: 900px) {
    .site-main-wrapper { flex-direction: column; }
    .article-grid { grid-template-columns: 1fr; }
    .magazine-name { font-size: 2.5rem; }
}