/* Premium Frontend CSS Stylesheet */
:root {
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --text-main: #1e293b; /* Slate-800 */
    --text-muted: #64748b; /* Slate-500 */
    --bg-main: #f8fafc; /* Slate-50 */
    --bg-card: #ffffff;
    --border-color: #e2e8f0; /* Slate-200 */
    --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-size-base: 16px;
    --max-width: 1600px;
    --accent: #f59e0b;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary);
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 4%;
}

/* Header Top Ticker Bar */
.header-ticker {
    background-color: #0b0f19;
    color: #94a3b8;
    font-size: 0.8rem;
    padding: 10px 0;
    border-bottom: 1px solid #1e293b;
    font-weight: 500;
}

@media (max-width: 767px) {
    .header-ticker {
        display: none !important;
    }
}

.ticker-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.ticker-badge {
    background-color: var(--primary);
    color: white;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.ticker-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #cbd5e1;
}

.ticker-right {
    font-size: 0.78rem;
    color: #64748b;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

@media (max-width: 575px) {
    .ticker-right {
        display: none;
    }
}

/* Header & Navigation - Sticky Translucent Style */
header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01), 0 2px 4px -1px rgba(0, 0, 0, 0.01);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
}

.logo a {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--primary) 0%, #a855f7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-icon {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.social-icon:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-toggle-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.search-toggle-btn:hover {
    color: var(--primary);
    transform: scale(1.08);
}

.search-bar-dropdown {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    animation: slideDown 0.25s ease-out;
}

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

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the navigation menu items */
    border-top: 1px solid var(--border-color);
    padding: 14px 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 28px;
    overflow-x: auto;
    scrollbar-width: none;
}

.nav-menu::-webkit-scrollbar {
    display: none;
}

.nav-menu a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-bottom: 4px;
}

.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

/* Mobile Hamburger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--text-main);
    cursor: pointer;
}

@media (max-width: 767px) {
    .menu-toggle {
        display: block !important;
        grid-column: 1;
        justify-self: start;
        padding: 5px;
    }
    
    .header-top {
        display: grid;
        grid-template-columns: 50px 1fr 50px;
        align-items: center;
        width: 100%;
        padding: 15px 0;
    }
    
    .logo {
        grid-column: 2;
        text-align: center;
    }
    
    .logo a {
        font-size: 1.8rem; /* Slightly smaller logo to fit mobile */
        display: block;
    }
    
    .header-actions {
        grid-column: 3;
        justify-self: end;
        gap: 0;
    }
    
    .main-nav {
        display: none; /* Drawer is used instead on mobile */
    }
    
    .social-links {
        display: none; /* Kept inside Drawer on mobile */
    }
}

/* Mobile Slide-Out Drawer Overlay Menu */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 290px;
    height: 100vh;
    background-color: #0b0f19;
    border-left: 1px solid #1e293b;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
    z-index: 1000;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    gap: 35px;
    transform: translateX(100%);
    visibility: hidden; /* Prevent rendering or text selection when closed */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.4s ease;
}

.mobile-drawer.open {
    transform: translateX(0);
    visibility: visible;
}

@media (min-width: 768px) {
    .mobile-drawer {
        display: none !important;
    }
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1e293b;
    padding-bottom: 18px;
}

.drawer-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s ease;
}

.drawer-close:hover {
    color: var(--danger);
}

.drawer-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.drawer-menu a {
    font-size: 1.1rem;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    padding: 4px 0;
}

.drawer-menu a:hover, .drawer-menu a.active {
    color: var(--primary);
    transform: translateX(4px);
}

.drawer-footer {
    margin-top: auto;
    border-top: 1px solid #1e293b;
    padding-top: 25px;
}

/* Main Layout Grid */
.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin: 40px auto;
}

@media (min-width: 992px) {
    .main-layout {
        grid-template-columns: 2.2fr 1fr;
    }
}

/* Fix grid children overflow bug */
.main-content {
    min-width: 0;
}

.sidebar {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

/* Sidebar Widgets styling */
.widget {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

/* Category Homepage Blocks layout */
.homepage-block {
    margin-bottom: 50px;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 12px;
}

.block-title {
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    margin-bottom: 0;
}

.block-title a {
    color: var(--text-main);
}

.block-title::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    width: 70px;
    height: 3px;
    background-color: var(--primary);
}

.block-more-link {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.block-more-link:hover {
    color: var(--primary-hover);
    transform: translateX(3px);
}

/* Block 1: Grid Layout - Premium Editorial Style */
.style-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

@media (min-width: 576px) {
    .style-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Post Cards styling - Magazine Layout */
.post-card {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

.post-thumb {
    position: relative;
    padding-bottom: 58%; /* Balanced ratio */
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    display: block;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.post-thumb img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover .post-thumb img {
    transform: scale(1.05);
}

.post-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: var(--primary);
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.post-details {
    padding: 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: flex;
    gap: 14px;
    font-weight: 500;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 10px;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.post-title a:hover {
    color: var(--primary);
}

.post-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0;
}

/* Block 2: Simple List Layout - Clean Editorial Feed */
.style-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.post-list-item {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--border-color);
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    align-items: flex-start;
    transition: none;
}

.post-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.post-list-item:hover {
    border-color: var(--primary);
    transform: none;
    box-shadow: none;
}

.post-list-thumb {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.post-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.post-list-item:hover .post-list-thumb img {
    transform: scale(1.04);
}

.post-list-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 2px;
}

.post-list-title {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 6px;
    letter-spacing: -0.2px;
}

/* Block 3: Featured Big Card + Side List Layout */
.style-featured-side {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

@media (min-width: 768px) {
    .style-featured-side {
        grid-template-columns: 1.25fr 1fr;
    }
}

.side-posts-column {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Block 4: Slider / Carousel Layout */
.style-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 5px 5px 20px 5px;
    scrollbar-width: thin;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.style-slider::-webkit-scrollbar {
    height: 6px;
}

.style-slider::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 10px;
}

.style-slider::-webkit-scrollbar-thumb {
    background-color: rgba(99, 102, 241, 0.15);
    border-radius: 10px;
}

.slider-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
}

@media (min-width: 576px) {
    .slider-card {
        flex: 0 0 320px;
    }
}

/* Single Article layout - Premium Editorial design */
.article-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
    .article-container {
        padding: 50px;
    }
}

.article-header {
    margin-bottom: 30px;
}

.article-category {
    display: inline-block;
    margin-bottom: 15px;
}

.article-category a {
    color: var(--primary);
    background-color: rgba(99, 102, 241, 0.08);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.article-category a:hover {
    background-color: var(--primary);
    color: white;
}

.article-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 18px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

@media (min-width: 768px) {
    .article-title {
        font-size: 2.8rem;
    }
}

.article-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
    font-weight: 400;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.88rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 18px 0;
}

.author-avatar-mini {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.article-featured-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 35px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.image-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 12px;
    font-style: italic;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155; /* Slate-700 for optimal reading contrast */
}

.article-body p {
    margin-bottom: 24px;
}

.article-body h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 45px 0 20px 0;
    color: var(--text-main);
    letter-spacing: -0.3px;
}

.article-body h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 35px 0 15px 0;
    color: var(--text-main);
}

/* Premium Blockquotes */
.article-body blockquote {
    border-left: 4px solid var(--primary);
    padding: 12px 24px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-muted);
    background-color: rgba(99, 102, 241, 0.03);
    border-radius: 0 12px 12px 0;
}

/* Related section */
.related-posts {
    margin-top: 50px;
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Social media channels buttons */
.share-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 35px 0;
    padding: 18px 0;
    border-top: 1px dashed var(--border-color);
    border-bottom: 1px dashed var(--border-color);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.share-facebook { background-color: #1877f2; }
.share-twitter { background-color: #1da1f2; }
.share-linkedin { background-color: #0077b5; }
.share-whatsapp { background-color: #25d366; }

/* Comments list Cards Redesign */
.comments-section {
    margin-top: 60px;
}

.comment-list {
    list-style: none;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.comment-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.01);
}

@media (max-width: 576px) {
    .comment-item {
        flex-direction: column;
        gap: 6px;
    }
}

.comment-avatar-wrapper {
    flex-shrink: 0;
}

.comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.comment-content-area {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    flex-wrap: wrap;
    gap: 5px;
}

.comment-author {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-main);
}

.comment-date {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.comment-body {
    font-size: 0.85rem;
    color: #475569; /* Slate-600 */
    line-height: 1.4;
}

/* Comment Form structure */
.comment-form {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.03);
}

.comment-form h3 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 24px;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="url"],
.form-field textarea {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.btn-submit {
    align-self: flex-start;
    background: linear-gradient(135deg, var(--primary) 0%, #4f46e5 100%);
    color: white;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
    transition: all 0.2s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(99, 102, 241, 0.3);
}

/* Footer structure - Premium Obsidian Dark Layout */
footer {
    background-color: #0b0f19;
    color: #94a3b8;
    padding: 75px 0 35px 0;
    margin-top: 80px;
    border-top: 1px solid #1e293b;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 50px;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

.footer-widget h4 {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.footer-widget p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-widget ul li {
    margin-bottom: 12px;
}

.footer-widget ul li a {
    color: #94a3b8;
    font-weight: 500;
}

.footer-widget ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 30px;
    text-align: center;
    font-size: 0.85rem;
    color: #64748b;
}

/* Pagination navigation bar */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-num {
    padding: 8px 16px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-num:hover, .page-num.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
}
