/* Main Wrapper */
.ung-wrapper {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    color: #fff;
    background-color: transparent;
    /* Assuming main container background handles the dark theme, or we can enforce it if needed */
    /* padding: 20px; Not strictly needed if full width */
}

/* Tabs Navigation */
.ung-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 2px solid #3f3f3f;
    background-color: #fff;
    /* Dark background for tabs bar */
  
}

.ung-tab {
    cursor: pointer;
    font-weight: 700;
    color: #3f3f3f;
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
   color: #1d0902;
        padding: 0.75rem;
}

.ung-tab:hover {
    color: #3f3f3f;
}

.ung-tab.active {
    color: #fff;
        padding: 0.75rem;
        background-color: #1d0902;
}

.ung-tab.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    /* Align with border-bottom */
    left: 0;
    width: 100%;
    height: 3px;
    background-color: rgb(243, 153, 122);
    /* Accent Blue */
}

/* Content Area */
.ung-content-area {
    min-height: 400px;
    position: relative;
}

.ung-grid {
    display: none;
    grid-gap: 20px;
    animation: fadeIn 0.4s ease-out;
}

.ung-grid.active {
    display: grid;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 
   DESKTOP (Default > 900px) 
   Respects the 3-col / 4-col setting
*/
.ung-wrapper.col-3 .ung-grid {
    grid-template-columns: repeat(3, 1fr);
}

.ung-wrapper.col-4 .ung-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Post Item Card - Desktop (Vertical) */
.ung-post-item {
    background-color: #170000;
    /* Dark card bg */
    border-radius: 0;
    /* Sharp edges as per design usually, or slight radius */
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ung-post-item:hover {
    transform: translateY(-5px);
}

/* Thumbnail */
.ung-thumb {
    position: relative;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
    overflow: hidden;
    background-color: #1f2937;
    flex-shrink: 0;
}

.ung-thumb a {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.ung-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ung-post-item:hover .ung-thumb img {
    transform: scale(1.05);
}

/* Category Label */
.ung-cat-label {
    position: absolute;
    top: 0;
    left: 0;
    background: rgb(243, 153, 122);
    /* Light blue accent */
    color: #1d0902;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

/* Post Details */
.ung-details {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ung-details h3 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    line-height: 1.4;
    font-weight: 700;
}

.ung-details h3 a {
    color: #f3f4f6;
    text-decoration: none;
    transition: color 0.2s;
}

.ung-details h3 a:hover {
    color: rgb(243, 153, 122);
}

.ung-date {
    margin-top: auto;
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
}

/* 
   MOBILE & TABLET (Max Width 900px)
   Force 1 column and Horizontal List View 
*/
@media (max-width: 900px) {

    /* Force 1 Column Grid */
    .ung-wrapper.col-3 .ung-grid,
    .ung-wrapper.col-4 .ung-grid {
        grid-template-columns: 1fr;
        grid-gap: 15px;
    }




.ung-tabs {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 2px solid #3f3f3f;
    background-color: #fff;
    /* Dark background for tabs bar */
  
}

.ung-tab {
    cursor: pointer;
    font-weight: 700;
    color: #3f3f3f;
    position: relative;
    transition: color 0.3s ease;
    text-transform: uppercase;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
   color: #1d0902;
        padding: 0.75rem;
}




    .ung-tabs::-webkit-scrollbar {
        display: none;
    }

    /* Horizontal Card Layout */
    .ung-post-item {
        flex-direction: row;
        align-items: flex-start;
        /* Prevent stretching image height */
        max-height: none;
        /* Let it grow if needed, or keep fixed */
        height: auto;
        background-color: transparent;
        border-bottom: 1px solid #3f3f3f;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .ung-post-item:hover {
        transform: none;
        /* Disable hover lift on mobile */
    }

    .ung-thumb {
width: auto;
        height: 100%;
        padding-top: 0;
        flex-shrink: 0;
        border-radius: 4px;
        flex-basis: 50%;
        aspect-ratio: 3 / 2;
    }

    .ung-thumb a {
        position: relative;
        /* Reset absolute */
        height: 100%;
        display: block;
    }

    .ung-thumb img {
        border-radius: 4px;
        /* Optional */
    }

    .ung-details {
        padding: 5px 0 5px 15px;
        /* Adjust padding */
        justify-content: flex-start;
    }

    .ung-details h3 {
        font-size: 1rem;
        margin-bottom: 5px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        /* Limit to 2 lines */
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ung-cat-label {
        font-size: 0.6rem;
        padding: 2px 6px;
        top: 5px;
        left: 5px;
    }
    .ung-tab.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    /* Align with border-bottom */
    left: 0;
    width: 100%;
    height: 3px;
    background-color:  rgb(243, 153, 122);
    /* Accent Blue */
}
.ung-post-item {
    background-color: #170000;
}
}