/*
* Dalka Times Web/Mobile Style.
* Universal Box Sizing for consistent layout
*/
html {
    box-sizing: border-box;
}

*, *:before, *:after {
    box-sizing: inherit;
}
/* Root Variables */
:root{
    --app_color: #006ce1;
    --text_black: black;
    --text_white: white;
    --text_red : #7F1D1D;
    --app_border_color: #eaeaea;
}
/* Base Body Styling */
body {
    font-family: sans-serif;
    margin: 0;
    background-color: white;
    color: black;
    line-height: 1.3;
    overflow-x: hidden;
}

/* General Layout & Structure */
.td-main-content-wrap.td-main-page-wrap.td-container-wrap {
    min-height: 4321px;
}

footer {
    margin: auto;
    padding: 24px;
    background: var(--app_color);
    text-align: center;
    color: floralwhite;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.subfooter {
    width: 100%;
    height: 25px;
    background: black;
}

/* Container for main content */
.container {
    width: 100%;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

@media (min-width: 640px) { /* sm breakpoint */
    .container {
        padding: 0;
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .container {
        padding: 0;
    }
}

/* Article Container */
.articles-container {
    padding: 10px;
}

/* Category Section Heading */
.category-section-row h2,.category-section-row h1 {
    color: var(--app_color);
    text-align: left;
    margin: 0;
    font-size: 8vw;
    display: flex;
    align-items: center;
}

.category-section-row h2 svg,.category-section-row h1 svg {
    width: 7rem;
    padding-left: 10px;
    fill: var(--app_color);
}

.section-warka h1 {
    display: none;
}

.category-page-content h1 {
    display: none;
}

/* Article Card Base Styles */
.hero-article-card, .post-item, .post-item-below {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.2s ease;
}

/* Hero Article Card Styling */
.hero-article-card {
    overflow: hidden;
    margin-bottom: 30px;
    border-radius: 0;
    border: none;
}

.hero-article-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.hero-content {
    padding: 20px;
}

.hero-content h2,.hero-content h3 {
    margin: 0 0 0px;
    font-size: 1.5rem;
    line-height: 1.2;
    font-weight: 900 !important;
    letter-spacing: 0.3px;
}

/* Responsive font size for hero heading */
@media (min-width: 640px) { /* sm breakpoint */
    .hero-content h2,.hero-content h3 {
        font-size: 2rem;
    }
}

@media (min-width: 1024px) { /* lg breakpoint */
    .hero-content h2,.hero-content h3 {
        font-size: 2.25rem;
    }
}

.hero-content h2 a,.hero-content h3 a {
    text-decoration: none;
    color: inherit;
    display: block;
}
.hero-date {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 0;
}

/* Small Article Cards Styling */
.small-articles-list {
    display: block;
    min-width: 244px;
    min-height: 348px;
}

.post-item, .post-item-below {
    display: flex;
    align-items: center;
    padding: 0.375rem 0 10px;
    position: relative;
}

.post-item:before, .post-item-below:before {
    position: absolute;
    content: '';
    bottom: 0px;
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: #eaeaea;
    width: 100%;
}

.post-item:last-child, .skeleton-post-item:last-child {
    border-bottom: none;
}

.post-item:hover {
    background-color: #f9fafb;
}

.post-item img, .post-item-below img {
    width: 8rem;
    height: 6rem;
    object-fit: cover;
    flex-shrink: 0;
}

.post-content-area {
    padding-left: 0.5rem;
    flex-grow: 1;
}

.post-content-area h2,.post-content-area h3, .post-content-area h4 {
    margin: 0 0 5px;
    font-size: 1rem;
    line-height: 1.3;
    color: inherit;
}

@media (max-width: 767px) {
    .post-content-area h2,.post-content-area h3, .post-content-area h4 {
        padding-right: 25px;
    }
}

.post-content-area h2 a,.post-content-area h3 a, .post-content-area h4 a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.post-content-area h4 a:hover {
    color: #007bff;
}

.post-content-area p.date {
    font-size: 9.0pt;
    color: #4b5563;
    margin: 0 0 5px;
}

/* Detail Page Styling */
.post-detail {
    padding: 0 1.25rem;
}

.post-detail img.featured-image {
    width: 100%;
    height: 336px;
    object-fit: cover;
}

.post-detail h2 {
    font-size: 1.5rem;
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 1rem 0;
}

.post-detail .date {
    display: flex;
    font-size: 0.875rem;
    font-weight: 400;
    align-items: center;
    color: #374151;
    margin-bottom: 1rem;
}

.post-detail .date svg {
    width: 1rem;
    height: 1rem;
    padding-right: 0.25rem;
    fill: currentColor;
}

.post-detail .date span {
    padding: 0px 10px;
}

.post-detail .date span:first-child {
    display: flex;
    align-items: center;
}

.post-detail .date span:last-child {
    border-left: solid 1px;
    padding-left: 0.5rem;
    border-color: #9ca3af;
}

.post-detail .date span b {
    color: var(--td_theme_color, #006ce1);
}

.post-detail .post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 1px;
    color: black;
    margin-bottom: 1.5rem;
}

.post-detail .post-content p {
    margin-bottom: 1em;
}

.post-detail .post-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.post-detail .post-content a {
    color: #007bff;
    text-decoration: none;
}

.post-detail .post-content a:hover {
    text-decoration: underline;
}

/* Loading and Error Messages */
.loading-message, .error-message {
    text-align: center;
    padding: 50px;
    font-size: 1.2em;
}

.loading-message {
    color: #7f8c8d;
}

.error-message {
    color: #e74c3c;
}

/* Header Styles */
#main-header {
    background-color: var(--app_color);
    color: white;
    padding: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    position: relative;
    top: 0;
    z-index: 50;
}

.header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 1rem;
}

.header-col {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-col.left {
    justify-content: flex-start;
}

.header-col.center {
    justify-content: center;
}

.header-col.right {
    justify-content: flex-end;
}

#hamburger-menu-icon, #openPlayerButton {
    font-size: 1.5rem;
    line-height: 2rem;
    cursor: pointer;
    padding: 0.25rem;
    transition: transform 0.2s ease;
}

#hamburger-menu-icon:hover,
#openPlayerButton:hover{
    transform: scale(1.1);
}

#header-logo {
    width: 180px;
    max-width: 315px;
    height: auto;
    display: block;
}

#openPlayerButton svg {
    fill: white;
    width: 25px;
}

/* Header Category Navigation (Second Row) */
#header-category-nav {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#header-category-nav::-webkit-scrollbar {
    display: none;
}

#header-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    white-space: nowrap;
}

#header-category-list li {
    padding: 0 0.5rem;
}

#header-category-list li a {
    text-decoration: none;
    color: white;
    font-weight: 400;
    font-size: 1em;
    line-height: 18px;
    transition: color 0.2s ease;
    font-variant-caps: all-petite-caps;
}

#header-category-list li a:hover {
    color: #fff;
}

/* Style for the 'current' class */
#header-category-list li.current a,
#popup-category-list li.current a {
    color: #fff;
    font-weight: 700;
    border-bottom: 2px solid #fff;
    padding-bottom: 3px;
}

/* --- Navigation Menu Popup Styles --- */
#nav-menu-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background-color: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    box-sizing: border-box;
    overflow-y: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#nav-menu-popup.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    color: var(--app_color);
    font-size: 1.8em;
    font-weight: bold;
}

#close-popup-btn {
    font-size: 2.5em;
    cursor: pointer;
    line-height: 1;
}

#close-popup-btn:hover {
    color: #e74c3c;
}

#popup-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

#popup-category-list li {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#popup-category-list li:last-child {
    border-bottom: none;
}

#popup-category-list li a {
    text-decoration: none;
    color: var(--app_color);
    font-size: 1.25rem;
    display: block;
    transition: color 0.2s ease;
}

#popup-category-list li a:hover {
    color: #555;
}

/* New Top Header Styles */
#top-header {
    background-color: white;
    color: var(--app_color);
    border-bottom: 1px solid #eaeaea;
    padding: 0 10px;
    display: none; /* Hidden by default, shown on larger screens */
}

.top-header-left, .top-header-right {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.top-header-left {
    justify-content: flex-start;
    flex: 1;
}

.top-header-right {
    justify-content: flex-end;
    flex: 1;
    flex-wrap: nowrap;
    font-size: 0.875rem;
}

.social-icons a {
    color: var(--app_color);
    margin-right: 15px;
    font-size: 1.2em;
    transition: color 0.2s ease;
}

.social-icons a:hover {
    color: #555;
}

.social-icons svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.date-info {
    font-size: 0.9em;
}

.header-links a {
    color: var(--app_color);
    text-decoration: none;
    font-size: 0.9em;
    margin: 0 8px;
    transition: color 0.2s ease;
}

.header-links a:hover {
    color: #555;
}

/* Skeleton Loader Styles */
.skeleton-loader {
    padding: 20px;
    background-color: #fff;
}

.skeleton-hero-image {
    width: 100%;
    height: 300px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite linear;
    margin-bottom: 20px;
    border-radius: 8px;
}

.skeleton-line {
    height: 1.2em;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite linear;
    margin-bottom: 10px;
    border-radius: 4px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

.skeleton-post-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.skeleton-post-image {
    width: 140px;
    height: 100px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite linear;
    flex-shrink: 0;
    border-radius: 4px;
}

.skeleton-post-content {
    padding-left: 10px;
    flex-grow: 1;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Ad Unit Styles */
.category-section-ad,
.in-content-ad,
#header-ad-unit {
    background-color: #f9f9f9;
    border: 1px dashed #d1d5db;
    text-align: center;
    margin: 1.25rem auto;
    font-size: 0.9em;
    color: #555;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 768px;
    width: 100%;
    padding: 1.25rem;
}

/* Sticky Side sidebar Styling */
.left-sidebar, .right-sidebar {
    position: fixed;
    display: none;
}

/* Misc */
.share {
    width: 22px;
    position: absolute;
    fill: #9f9f9f;
    right: 5px;
}

/* Color Styles (often applied to specific sections/themes) */
.color-style .post-item:hover, .color-style .post-item:hover {
    color: black;
}

.color-style h2 {
    color: white;
    fill: white !important;
}

.color-style svg {
    fill: white !important;
}

.colum-2 p.date, .colum-2 p.hero-date {
    color: #4A4A4A;
}

/* Responsive Adjustments for Mobile, Tablet, and Desktop */

/* Mobile specific layout (max-width: 767px) */
@media (max-width: 767px) {
     /* Hide sticky sidebar on mobile */
    #top-header,.left-sidebar, .right-sidebar {
        display: none;
    }
    #main-header {
        padding: 0px 10px;
    }
    .post-featured-image {
    margin: 0 -1.25rem 0px -1.25rem;
}
   
}

/* Extra Small Mobile View (max-width: 250px) */
@media (max-width: 250px) {
    .header-col.left {
        max-width: 5%;
        margin-left: -15px;
    }

    #header-logo {
        width: 80%;
    }
    .header-col.right {
        max-width: 5%;
        justify-content: flex-start;
    }
}

/* iPad/Tablet View (min-width: 768px and max-width: 1427px) */
@media (min-width: 768px) and (max-width: 1427px) {
    #top-header {
        display: none;
    }

}

/* Desktop specific layout (min-width: 1024px) */
@media (min-width: 1024px) {
    .header-main-row {
        padding: 0.5rem 1rem;
    }
    
    .header-col.left,.share {
        display: none; /* Hide hamburger menu on larger screens */
    }

    .header-col.right {
        right: 10px;
        position: absolute;
    }

    #main-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    #header-logo {
        width: 315px;
    }

    header#main-header:before, .color-style:before {
        width: 100vw;
        height: 100%;
        background: var(--app_color);
        content: '';
        position: absolute;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: -1;
    }

    .header-row.header-bottom-row {
        margin-right: 40px;
    }

    .header-bottom-row ul li a {
        font-variant-caps: normal !important;
        font-size: 17px !important;
        line-height: 80px !important;
        font-weight: 700 !important;
    }
    
    .category-section {
        flex: 1;
        display: flex;
        align-items: flex-start;
    }

    .hero-article-card {
        max-width: 60%;
        padding-right: 10px;
    }

    .hero-article-card img {
        height: 500px;
    }

    .articles-container, #main-header {
        max-width: 1600px;
        margin: auto;
        padding: 0 24px;
    }
    .articles-container {
    padding-top: 24px;
}
    .small-articles-list {
        max-width: 40%;
        padding-left: 10px;
    }

    .post-item-below {
        display: inline-flex;
        flex-wrap: nowrap;
        max-width: 33%;
    }

    .category-section-row h3, .category-section-row h1 {
    font-size: 3rem;
    flex-basis: 100%;
    margin-top: 20px;
}

    .post-detail {
        max-width: 1600px;
        margin: auto;
        margin-top: 10px;
    }

    .post-content-area h2,.post-content-area h3, .post-content-area h4 {
        font-size: 20px;
    }
    
/* }
 Desktop View (min-width: 1024px)
@media (min-width: 1024px) { */

    #top-header {
        display: flex;
        width: 100%;
        align-items: center;
        justify-content: space-between;
        max-width: 1600px;
        margin: auto;
        padding: 0 24px;
    }

.date-info {
        padding-right: 1rem;
    }

    #top-header-menu-lang {
        display: flex;
        gap: 5px;
    }

    /* Show both sticky sidebar on desktop */
    .left-sidebar, .right-sidebar {
        display: block;
        position: sticky; /* Sticky is only effective if there's a scrolling container */
        padding: 0px 10px;
    }

    .article {
        display: flex;
        position: relative;
        margin: 0;
        padding: 0;
    }

    .Article-info {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-evenly;
        flex-direction: row-reverse;
        flex-direction: column;
    }

    .title-date-author {
        padding: 0px 35px;
        width: 100%;
    }
    .title-date-author h1 {
    font-size: 2.5rem;
    line-height: 1.3;
    font-weight: 700;
    margin: 10px 0;
}
    .post-detail h2 {
        font-size: 45px !important;
        line-height: 1.2 !important;
        font-weight: 900 !important;
        letter-spacing: 0.5px !important;
    }
    .colum-2 .hero-article-card {
    width: 50%;
}
.colum-2 .small-articles-list {
    width: 25%;
}
}

/* Column 2 Specific Styles (nested responsive rules) */
.colum-2 .hero-article-card {
    width: 100%;
}

.colum-2 .small-articles-list {
    max-width: 100%;
}

.colum-2 .post-item,.colum-2 .first-post {
    display: flex;
    flex-wrap: wrap;
    min-height: 120px;
}

.colum-2 .first-post img {
    width: 100%;
    height: 15rem;
}

.colum-2 .post-list img {
    display: none;
}

.colum-2 p.date, .colum-2 p.hero-date {
    color: #4A4A4A;
}
.hero-content h2, .hero-content h3 {
    color: inherit;
}
/* Sidebar Blocks*/
.block-item {
    margin-bottom: 10px;
  }

  .block-header {
    background-color: var(--app_color);
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #d1d5db;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .block-header svg {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
  }

  .block-content {
    background-color: white;
    padding: 1rem 1.5rem;
    border: 1px solid #d1d5db;
    border-top: none;
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    overflow: visible;
    max-height: none;
  }
  #top-header-menu-lang a.somali {
    width: 42px;
    align-content: center;
    text-align: center;
    color: var(--app_color);
    font-weight: bold;
    border: solid 1px var(--app_color);
    text-decoration: none;
}
#top-header-menu-lang a.english {
    width: 42px;
    align-content: center;
    text-align: center;
    color: var(--text_red);
    font-weight: bold;
    border: solid 1px var(--app_color);
    text-decoration: none;
}
#progress-container {
    top: 0px!important;
    background-color: var(--app_color);
    z-index: 2;
    position: sticky;
    border-top: solid 1px var(--app_color);
}
.reading-progress {
    position: relative;
    background: #00e2ff;
    height: 9px;
    width: 0;
    padding-left: 0!important;
    padding-right: 0!important;
}
.category-section-row h1 {
    border-bottom: solid;
    margin-bottom: 10px;
}
iframe {
    width: 100%;
    height: calc(5em * 6);
    border: solid 10px black;
    border-radius: 10px;
}

/* General SVG Icon Styling */
        .svg-icon {
            fill: currentColor; /* Inherit color from parent */
            display: inline-block;
            vertical-align: middle;
        }
        .svg-icon.icon-small {
            width: 1.2em;
            height: 1.2em;
        }
        .svg-icon.icon-medium {
            width: 1.8em;
            height: 1.8em;
        }
        .svg-icon.icon-large {
            width: 2.5em;
            height: 2.5em;
        }
        .svg-icon.icon-footer-small {
            width: 1.2em;
            height: 1.2em;
        }
        .svg-icon.icon-footer-medium {
            width: 1.8em;
            height: 1.8em;
        }
