/* --- TelecomByte - Master Components Styles (Finalized) --- */

/* 1. Global Reset & Strict Containment */
* {
    box-sizing: border-box !important;
}

html,
body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/*====================================================
  2. HEADER & NAVIGATION
====================================================*/

.site-header {
    background: #0F172A;
    padding: 8px 0;
    border-bottom: 2px solid #ffffff;
}

.header-main-row {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.site-logo img,
.custom-logo {
    max-height: 36px;
    width: auto;
    display: block;
}

/* Navigation */

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;   /* Moves menu to the right */
    align-items: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    list-style: none;
    gap: 32px;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 0;
    transition: color .25s ease;
    white-space: nowrap;
}

.nav-menu li a:hover {
    color: #60a5fa;
}

/* Active Menu */

.current-menu-item > a,
.current-menu-parent > a,
.current_page_item > a,
.current_page_parent > a,
.current-menu-ancestor > a {
    color: #3b82f6 !important;
}

.current-menu-item > a::after,
.current-menu-parent > a::after,
.current_page_item > a::after,
.current_page_parent > a::after,
.current-menu-ancestor > a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    border-radius: 2px;
    background: #3b82f6;
}

/* 3. Front Page Layout */
.magazine-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: start;
}

/* Timeline Sidebar */
.trending-sidebar ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.trending-sidebar li {
    margin-bottom: 25px !important;
    position: relative !important;
    padding-left: 20px !important;
}

.trending-sidebar li::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #10b981;
    border: 3px solid #fff;
    box-shadow: 0 0 0 1px #e5e7eb;
}

.trending-sidebar li a {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

.trending-sidebar .date {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 4px;
}

/* Hero & Grid */
.hero-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    height: 400px;
}

.hero-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.grid-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

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

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
}

.pagination-wrapper .current {
    background: #000;
    color: #fff;
    border-color: #000;
}

/* 4. Single Post Layout */
.single-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 50px;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    margin: 40px auto;
    max-width: 1200px;
    align-items: start;
}

.single-main-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.post-meta-top {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    font-weight: 500;
    color: #4b5563;
}

.author-avatar img {
    border-radius: 50%;
}

.post-highlights {
    background: #f9fafb;
    border-left: 5px solid #2563eb;
    padding: 20px;
    margin: 30px 0;
}

.post-content {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #1f2937;
}

.post-content h2 {
    font-size: 1.8rem;
    margin-top: 40px;
    margin-bottom: 20px;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 10px;
}

.post-content a {
    color: #2563eb;
    text-decoration: none;
    border-bottom: 1px solid #bfdbfe;
}

.post-featured-image img {
    border-radius: 12px;
    width: 100%;
}

.cta-link {
    font-weight: 500;
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin: 30px 0;
}

.author-bio-card {
    display: flex;
    gap: 25px;
    align-items: center;
    background: #f9fafb;
    padding: 30px;
    border-radius: 12px;
    margin: 40px 0;
}

.bio-avatar img {
    border-radius: 12px;
}

.role-badge {
    background: #000;
    color: #fff;
    padding: 2px 8px;
    font-size: 0.7rem;
    border-radius: 4px;
    margin-left: 10px;
}

blockquote {
    border-left: 4px solid #2563eb;
    background: #eff6ff;
    padding: 20px;
    margin: 30px 0;
    font-style: italic;
    font-size: 1.25rem;
    color: #1e40af;
    border-radius: 0 8px 8px 0;
}

/* Sticky Sidebar for Single Post */
@media (min-width: 993px) {
    .trending-sidebar {
        position: sticky;
        top: 20px;
    }
}

/* 5. Comment Form Styling */
#commentform textarea,
#commentform input {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
    box-sizing: border-box;
    margin-bottom: 15px;
}

#submit {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

/* 6. Footer */
.site-footer {
    background-color: #0F172A;
    color: #94a3b8;
    padding: 40px 0;
    text-align: center;
    margin-top: 50px;
}

.footer-links {
    display: flex;
    justify-content: center;
    list-style: none !important;
    padding: 0 !important;
    margin: 15px 0 0 0 !important;
    gap: 20px;
}

.footer-links li a {
    color: #94a3b8 !important;
}

/* 7. Mobile Optimization */
@media (max-width: 992px) {
    .magazine-wrapper,
    .single-layout-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-main-row {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px !important;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}