body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
}


.project-intro {
    width: 100%;
    height: 100vh;
    position: relative;
    background-position: center center;
    background-size: cover;
    background-repeat: no-repeat;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.project-intro::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45); /* darkness level */
    z-index: 1;
}

.project-intro::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
}

.project-first-container {
    position: relative;
    width: min(1400px, 90%);
    margin: 0 auto;
    z-index: 2;
    padding: 0 40px;
}

.p-container {
    position: relative;
}

.left-part {
    padding: 50px;
    max-width: 800px;
}

.heading {
    margin-bottom: 30px;
    position: relative;
}

.heading::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary));
    box-shadow: var(--box-shadow);
}
.left-part h1 {
    font-size: clamp(2rem, 5vw, 4rem); /* make it bigger if needed */
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    overflow: visible;   /* ensure it's not clipped */
    color: #fff;         /* make sure it's visible over dark background */
    position: relative;
    z-index: 3;          /* above overlay */
}



.left-part h1 span {
    display: inline-block;
    transform: translateY(100%);
}

.text-content {
    margin-top: 5rem; /* space from headings */
    position: relative;
    z-index: 3;       /* above overlay */
}


.text-content > p {
  font-size: 1.15rem;
  line-height: 1.9;
  font-weight: 600;
  color: var(--color-text);
  max-width: 750px;
  position: relative;
  bottom: 0;
  padding: 22px 28px;
  background: rgba(20, 20, 20, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(14px);
  border-left: 4px solid var(--color-primary);
  box-shadow: 0 0 20px rgba(228, 54, 54, 0.35);
  border-radius: 14px;
  margin: 1.5rem 0 0 0; /* top margin added */
  opacity: 0;
  transform: translateY(40px);
  animation: fadeInUp 1s 1.2s forwards;
}



@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.text-content > p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 0;
  margin: .7rem;
  background: linear-gradient(180deg, var(--color-primary), var(--accent-neon));
  box-shadow: 0 0 15px var(--color-primary);
  animation: growBar 1s 1.6s ease-out forwards;
}

@keyframes growBar {
  to {
    height: 100px;
  }
}

.text-content a {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 40px;
    background: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    cursor: pointer;
    letter-spacing: 1px;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    transition: var(--animation-smooth);
    box-shadow: var(--glow-primary);
    color: var(--color-text);
}

.text-content a::before {
    content: "";
    position: absolute;
    inset: 0;
    color: var(--color-text);
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}



.text-content a span {
    color: var(--color-text);
    position: relative;
    z-index: 1;
}


.second-section {
    padding: 100px 0;
    background: var(--color-bg-2);
    position: relative;
}

.second-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
    opacity: 0.3;
}


.filter-bar {
    display: flex;
    gap: 15px;
    color: var(--color-text);
    align-items: center;
    margin: 0 auto 60px;
    overflow-x: auto;
    padding: 0 40px 20px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar {
    display: none;

}

.filter-btn {
    padding: 14px 35px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--animation-smooth);
    position: relative;
    background: var(--color-bg-2);
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.filter-btn span {
    position: relative;
    z-index: 2;
    justify-content: center;
    text-align: center;
    align-items: center;
    color: var(--color-text); 
}

.filter-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    color: #fff;
    justify-content: center;
    text-align: center;
    align-items: center;
    background: linear-gradient(135deg, var(--color-primary), #ff4444);
    opacity: 0;
    transition: var(--animation-smooth);
}

.filter-btn:hover {
    border-color: rgba(228, 54, 54, 0.5);
    transform: translateY(-2px);
}

.filter-btn.active {
    color: antiquewhite;
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

.filter-btn.active::before {
    opacity: 1;
    color: #fff;
}

.filter-btn span {
    position: relative;
    z-index: 1;
}


.new-cards-section {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    padding: 0 40px;
    max-width: 1600px;
    margin: 0 auto;
}

.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}


.news-card-container {
    position: relative;
    height: 420px;
    overflow: hidden;
    background: var(--color-bg-alt);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(228, 54, 54, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.news-card-container:hover::before {
    opacity: 1;
}

.news-card-container:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-strong), var(--glow-primary);
}

.news-card-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(0.8) brightness(0.7);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-card-container:hover img {
    filter: grayscale(0) brightness(1);
    transform: scale(1.08);
}


.top-month {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(20px);
    padding: 15px 20px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--animation-smooth);
}

.news-card-container:hover .top-month {
    background: rgba(228, 54, 54, 0.95);
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
    transform: scale(1.05);
}

.top-month h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.top-month h1 {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.9);
}


.news-details {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.95) 50%);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
}

.news-card-container:hover .news-details {
    transform: translateY(0);
    opacity: 1;
}

.new-details-text p {
    font-size: 0.85rem;
    color: white;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.new-details-text h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: wheat;
    line-height: 1.4;
}

.new-arrow {
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--animation-smooth);
    position: relative;
    overflow: hidden;
}

.new-arrow::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-text);
    transform: translateY(100%);
    transition: var(--animation-smooth);
}



.new-arrow a {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-arrow img {
    width: 20px;
    height: 20px;
    filter: invert(1);
    transition: var(--animation-smooth);
}

.new-arrow:hover img {
    filter: invert(0);
    transform: translate(3px, -3px);
}


.new-card-right {
    background: var(--color-bg-2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    position: sticky;
    top: 100px;
    height: fit-content;
}


.search-box {
    display: flex;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: var(--animation-smooth);
}

.search-box:focus-within {
    border-color: var(--color-primary);
    box-shadow: var(--glow-primary);
}

.search-box input {
    flex: 1;
    border: 5px solid (--color-primary);
    outline: none;
    padding: 18px 20px;
    font-size: 1rem;
    background: var(--color-bg-2);
    color: var(--color-text);
}

.search-box input::placeholder {
    color: var(--color-text);
}

.search-box button {
    background: var(--color-primary);
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: var(--animation-smooth);
    position: relative;
    overflow: hidden;
}

.search-box button::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #ff4444, var(--color-primary));
    opacity: 0;
    transition: var(--animation-smooth);
}

.search-box button:hover::before {
    opacity: 1;
}

.search-box button i {
    color: var(--color-text);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}


.categories h1,
.recent-post h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--color-text);
    position: relative;
    padding-bottom: 15px;
}

.categories h1::after,
.recent-post h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--color-primary), transparent);
}

.categories-list {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.categories-list:hover {
    padding-left: 10px;
}

.categories-left-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.circle {
    width: 12px;
    height: 12px;
    border: 2px solid rgb(85, 85, 85);
    border-radius: 50%;
    transition: var(--animation-smooth);
    position: relative;
}

.circle::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--color-primary);
    transform: scale(0);
    transition: var(--animation-smooth);
}

.circle.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 15px rgba(228, 54, 54, 0.6);
}

.circle.active::before {
    transform: scale(1);
}

.categories-list p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    transition: var(--animation-smooth);
}

.categories-list:hover p {
    color: var(--color-text);
}


.recent-posts {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recent-posts:hover {
    padding-left: 10px;
}

.recent-posts img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: var(--animation-smooth);
}

.recent-posts:hover img {
    transform: scale(1.05);
    box-shadow: var(--glow-primary);
}

.recent-post-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    line-height: 1.4;
    transition: var(--animation-smooth);
}

.recent-posts:hover h4 {
    color: var(--color-primary);
}

.desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}


#loadMoreBtn {
    padding: 16px 50px;
    background: transparent;
    color: var(--color-text);
    border: 2px solid var(--color-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--animation-smooth);
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    margin: 60px auto 0;
    display: block;
}

#loadMoreBtn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--color-primary), #ff4444);
    transform: translateY(100%);
    transition: var(--animation-smooth);
}

#loadMoreBtn span {
    position: relative;
    z-index: 1;
}

#loadMoreBtn:hover {
    box-shadow: var(--glow-primary);
    transform: translateY(-3px);
}


#news-results.loading {
    opacity: 0.4;
    pointer-events: none;
    position: relative;
    min-height: 400px;
}

#news-results.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    border: 3px solid rgba(228, 54, 54, 0.2);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#news-results.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}


@media (max-width: 1400px) {
    .project-first-container {
        width: 90%;
        padding: 0 30px;
    }
    
    .new-cards-section {
        padding: 0 30px;
    }
}


@media (max-width: 1200px) {
    .project-intro {
        height: 80vh;
    }

    .new-cards-section {
        grid-template-columns: 1fr;
        padding: 0 25px;
    }

    .new-card-right {
        position: relative;
        top: 0;
        margin-top: 40px;
    }

    .filter-bar {
        padding: 0 25px 20px;
    }
}


@media (max-width: 768px) {
    .project-intro {
        height: 70vh;
    }

    .project-first-container {
        padding: 0 20px;
    }

    .left-part > p {
        font-size: 1rem;
        padding: 18px 22px;
    }

    .left-part a {
        padding: 14px 30px;
        font-size: 0.9rem;
    }

    .second-section {
        padding: 60px 0;
    }

    .filter-bar {
        padding: 0 20px 15px;
        gap: 10px;
    }

    .filter-btn {
        padding: 12px 25px;
        font-size: 0.85rem;
    }

    .new-cards-section {
        padding: 0 20px;
        gap: 30px;
    }

    .news-card-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .news-card-container {
        height: 380px;
    }

    .new-card-right {
        padding: 30px 20px;
        gap: 35px;
    }

    .categories h1,
    .recent-post h1 {
        font-size: 1.3rem;
    }

    .recent-posts {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }

    .recent-posts img {
        height: 80px;
    }

    #loadMoreBtn {
        padding: 14px 40px;
        font-size: 0.9rem;
        margin: 40px auto 0;
    }
}


@media (max-width: 480px) {
    .project-intro {
        height: 60vh;
        min-height: 500px;
    }

    .project-first-container {
        padding: 0 15px;
    }

    .left-part h1 {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
    }

    .left-part > p {
        font-size: 0.9rem;
        line-height: 1.7;
        padding: 16px 18px;
        margin: 0.2rem;
    }

    .left-part > p::before {
        display: none;
    }

    .left-part a {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 0.85rem;
    }

    .second-section {
        padding: 40px 0;
    }

    .filter-bar {
        padding: 0 15px 15px;
        gap: 8px;
        justify-content: flex-start;
    }

    .filter-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
    }

    .new-cards-section {
        padding: 0 15px;
        gap: 25px;
    }

    .news-card-grid {
        gap: 20px;
    }

    .news-card-container {
        height: 350px;
    }

    .top-month {
        padding: 12px 16px;
    }

    .top-month h2 {
        font-size: 1.5rem;
    }

    .top-month h1 {
        font-size: 0.75rem;
    }

    .news-details {
        padding: 20px;
    }

    .new-details-text p {
        font-size: 0.75rem;
    }

    .new-details-text h2 {
        font-size: 1.1rem;
    }

    .new-arrow {
        width: 40px;
        height: 40px;
    }

    .new-arrow img {
        width: 16px;
        height: 16px;
    }

    .new-card-right {
        padding: 25px 15px;
        gap: 30px;
    }

    .search-box input {
        padding: 14px 15px;
        font-size: 0.9rem;
    }

    .search-box button {
        padding: 0 20px;
    }

    .search-box button i {
        font-size: 1rem;
    }

    .categories h1,
    .recent-post h1 {
        font-size: 1.2rem;
        margin-bottom: 20px;
    }

    .categories-list {
        padding: 12px 0;
    }

    .categories-list p {
        font-size: 0.85rem;
    }

    .recent-posts {
        grid-template-columns: 70px 1fr;
        gap: 12px;
        padding: 15px 0;
    }

    .recent-posts img {
        height: 70px;
    }

    .recent-post-text h4 {
        font-size: 0.9rem;
    }

    .desc {
        font-size: 0.8rem;
    }

    #loadMoreBtn {
        width: 100%;
        padding: 12px 30px;
        font-size: 0.85rem;
        margin: 30px auto 0;
    }

    
    .news-card-container:hover {
        transform: none;
    }

    .news-card-container:hover img {
        transform: scale(1.02);
    }

    .categories-list:hover,
    .recent-posts:hover {
        padding-left: 5px;
    }
}


@media (max-width: 360px) {
    .left-part h1 {
        font-size: 1.6rem;
    }

    .left-part > p {
        font-size: 0.85rem;
        padding: 14px 16px;
    }

    .left-part a {
        font-size: 0.8rem;
        padding: 10px 15px;
    }

    .filter-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    .news-card-container {
        height: 320px;
    }

    .new-card-right {
        padding: 20px 12px;
    }

    .categories h1,
    .recent-post h1 {
        font-size: 1.1rem;
    }

    .recent-posts {
        grid-template-columns: 60px 1fr;
        gap: 10px;
    }

    .recent-posts img {
        height: 60px;
    }
}


@media (max-height: 600px) and (orientation: landscape) {
    .project-intro {
        height: auto;
        min-height: 100vh;
        padding: 80px 0 40px;
    }

    .left-part > p {
        margin-bottom: 15px;
    }
}