/* --- TelecomByte - Master Components Styles (Optimized & Consolidated) --- */

/* ==========================================================================
   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: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15px; /* Slightly reduced base copy for cleaner news density */
    line-height: 1.5;
    color: #1f2124; /* Google News soft charcoal primary text */
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   2. HEADER & NAVIGATION
   ========================================================================== */
.site-header {
    background: #0F172A;
    padding: 8px 0;
    border-bottom: 2px solid #ffffff;
}

.header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

/* Navigation System */
.main-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

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

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 10px 0;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 14px; /* Reduced from 15px */
    font-weight: 500;
    color: #ffffff;
    white-space: nowrap;
    transition: color .25s ease;
}

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

/* Active Menu States */
.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;
    background: #3b82f6;
    border-radius: 2px;
}

/* ==========================================================================
   3. FRONT PAGE LAYOUT & CARDS
   ========================================================================== */
.magazine-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    align-items: start;
}

.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;
}

/* Frontpage Cards */
.card {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.card__media {
    width: 100%;
}

.card__media img {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.card__body {
    width: 100%;
    padding: 16px;
}

.card__title {
    margin: 0 0 10px;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 18px; /* Balanced reduction from 20px */
    line-height: 1.35;
    font-weight: 500;
    color: #1f2124;
}

.card__title,
.card__title a {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

.card__excerpt {
    font-family: 'Roboto', system-ui, sans-serif;
    margin: 0 0 12px;
    font-size: 13px; /* Reduced from 14px */
    line-height: 1.45;
    color: #5f6368;
}

.card__meta {
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 11px; /* Tighter metadata scale */
    color: #5f6368;
}

.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;
}

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

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

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

/* ==========================================================================
   4. SINGLE POST LAYOUT
   ========================================================================== */
.single-layout-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 40px;
    width: 100% !important;
    max-width: 1200px;
    margin: 40px auto;
    padding-left: 15px !important;
    padding-right: 2% !important;
    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-featured-image img {
    border-radius: 12px;
    width: 100%;
}

.post-content {
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 15px; /* Clean tracking density alignment */
    line-height: 1.5;
    color: #1f2124;
}

.post-content h2 {
    margin-top: 36px;
    margin-bottom: 18px;
    padding-bottom: 8px;
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 20px; /* Reduced slightly from 22px */
    font-weight: 500;
    color: #1f2124;
    letter-spacing: -0.2px;
    border-bottom: 1px solid #e0e3e7;
}

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

.post-highlights {
    background: #f8f9fa;
    border-left: 5px solid #1a73e8;
    padding: 20px;
    margin: 30px 0;
}

blockquote {
    background: #f1f3f4;
    border-left: 4px solid #1a73e8;
    margin: 30px 0;
    padding: 20px;
    font-style: italic;
    font-size: 1.15rem;
    color: #1f2124;
    border-radius: 0 8px 8px 0;
}

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

/* Post Meta Bar (Top) */
.post-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 24px 0;
    padding: 14px 0;
    border-top: 1px solid #e0e3e7;
    border-bottom: 1px solid #e0e3e7;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-author img.avatar {
    width: 36px; /* Scaled down slightly */
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e0e3e7;
}

.author-meta {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.author-meta strong a {
    font-family: 'Outfit', sans-serif;
    font-size: 14px; /* Reduced from 15px */
    font-weight: 500;
    color: #1f2124;
}

.author-meta strong a:hover {
    color: #1a73e8;
}

.author-meta time {
    font-family: 'Roboto', sans-serif;
    font-size: 12px; /* Tighter layout scaling */
    color: #5f6368;
}

.meta-reading span {
    padding: 3px 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 12px; /* Reduced from 13px */
    font-weight: 500;
    color: #1a73e8;
    background: #e8f0fe;
    border-radius: 12px;
}

/* Share Component Layout */
.single-share {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.single-share span {
    margin-right: 4px;
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #5f6368;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px; /* Tighter button container sizing */
    font-family: 'Roboto', sans-serif;
    font-size: 13px; /* Reduced from 14px */
    font-weight: 500;
    color: #3c4043;
    background-color: #f8f9fa;
    border: 1px solid #dadce0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-btn.whatsapp:hover {
    background-color: #e8f5e9;
    border-color: #25d366;
    color: #1b5e20;
}

.share-btn.twitter:hover {
    background-color: #f1f3f4;
    border-color: #000000;
    color: #000000;
}

.share-btn.copy-link:hover,
.share-btn.copy-link.copied {
    background-color: #e8f0fe;
    border-color: #1a73e8;
    color: #1a73e8;
}

/* Author Bio Blocks */
.author-card {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin: 40px 0;
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #1a73e8;
    border-radius: 8px;
}

.author-card h3 {
    margin: 0 0 6px 0;
    font-family: 'Outfit', sans-serif;
    font-size: 17px; /* Reduced from 18px */
    font-weight: 500;
    color: #1f2124;
}

.author-card p {
    margin: 0 0 10px 0;
    font-family: 'Roboto', sans-serif;
    font-size: 13px; /* Reduced from 14px */
    line-height: 1.5;
    color: #3c4043;
}

.author-website {
    display: inline-flex;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #1a73e8;
}

.author-website:hover {
    text-decoration: underline;
}

/* Deprecated Old Author Card Layout Fallbacks */
.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;
}

/* ==========================================================================
   5. TIMELINE & TRENDING SIDEBAR
   ========================================================================== */
.trending-sidebar ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

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

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

.trending-sidebar li a {
    display: inline-block;
    font-family: 'Outfit', system-ui, sans-serif;
    font-weight: 500 !important;
    font-size: 14px !important; /* Swiftly reduced layout wrapper footprint from 15px */
    line-height: 1.4;
    color: #1f2124;
    white-space: normal !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
}

.trending-sidebar li a:hover {
    color: #1a73e8;
}

.trending-sidebar .date {
    margin-bottom: 3px;
    font-family: 'Roboto', system-ui, sans-serif;
    font-size: 11px; /* Scaled down secondary Gray text */
    color: #5f6368;
    letter-spacing: 0.2px;
}

@media (min-width: 993px) {
    .trending-sidebar {
        position: sticky;
        top: 20px;
    }
}

/* ==========================================================================
   6. COMMENT SYSTEM FORMS
   ========================================================================== */
#respond h3 {
    margin-bottom: 6px;
    font-family: 'Outfit', sans-serif;
    font-size: 20px; /* Reduced from 22px */
    font-weight: 500;
    color: #1f2124;
}

.comment-notes {
    font-family: 'Roboto', sans-serif;
    font-size: 13px;
    color: #5f6368;
    margin-bottom: 16px;
}

#commentform textarea,
#commentform input[type="text"],
#commentform input[type="email"] {
    width: 100%;
    padding: 12px; /* Tighter padding */
    background: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 14px; /* Reduced from 15px */
    color: #1f2124;
    border: 1px solid #dadce0;
    border-radius: 8px;
    box-sizing: border-box;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#commentform textarea:focus,
#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus {
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 14px 0;
}

.comment-form-cookies-consent input[type="checkbox"] {
    margin-top: 3px;
    cursor: pointer;
}

.comment-form-cookies-consent label {
    font-family: 'Roboto', sans-serif;
    font-size: 13px; /* Reduced from 14px */
    color: #3c4043;
    line-height: 1.4;
    cursor: pointer;
}

#submit {
    display: inline-block;
    padding: 8px 20px;
    background: #1a73e8;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: 'Outfit', sans-serif;
    font-weight: 500;
    font-size: 13px; /* Scaled down button copy */
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

#submit:hover {
    background: #1557b0;
    box-shadow: 0 1px 3px rgba(60,64,67,0.3);
}

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

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

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

/* ==========================================================================
   8. MOBILE RESPONSIVENESS MATRIX
   ========================================================================== */
@media (max-width: 992px) {
    .magazine-wrapper,
    .single-layout-wrapper {
        grid-template-columns: 1fr !important;
        padding-right: 15px !important;
    }
    
    .post-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    /* Header Responsive Layouts */
    .header-main-row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        padding: 15px !important;
    }
    
    .mobile-menu-toggle {
        display: block;
        background: none;
        border: 0;
        color: #fff;
        font-size: 24px;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        flex: 0 0 100%;
    }
    
    .main-navigation.is-active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu li a {
        padding: 12px 16px;
        font-size: 13px;
        border-top: 1px solid rgba(255,255,255,.12);
    }

    /* Single Post Responsive Rules */
    .single-layout-wrapper {
        display: block;
        width: 100%;
        max-width: 100%;
        margin: 20px auto;
        padding: 0 12px !important;
    }

    .single-main-content {
        width: 100%;
        max-width: 100%;
        padding: 16px !important;
        margin: 0;
        border-radius: 8px;
        box-sizing: border-box;
    }

    .post-title {
        font-family: 'Google Sans', system-ui, sans-serif;
        font-size: clamp(1.6rem, 4.5vw, 2rem); /* Scaled down headline range */
        font-weight: 400;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .post-meta-top {
        flex-wrap: wrap;
        gap: 8px;
    }

    .post-featured-image img {
        width: 100%;
        height: auto;
    }

    .post-content {
        font-size: 15px;
        line-height: 1.5;
    }

    /* Card Component Mobile Refinements */
    .card {
        width: 100%;
    }
    
    .card__media img {
        height: auto;
    }
    
    .card__body {
        padding: 12px;
    }
    
    .card__title {
        font-size: 16px; /* Reduced from 18px */
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (min-width: 769px) {
    .main-navigation {
        display: flex !important;
    }
    .mobile-menu-toggle {
        display: none !important;
    }
}