/*
-----------------------------
NEWS PAGE STYLES
-----------------------------
*/

/*
-----------------------------
BODY BACKGROUND
-----------------------------
*/

body {
    background-color: var(--second-color);
    color: var(--third-color);
}



/*
-----------------------------
NAVIGARE
-----------------------------
*/

.image-hero {
    position: relative;
    width: 100%;
    height: 50vh;
    overflow: hidden;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7));
    z-index: 10; /* Higher than hex-canvas z-index: 2 */
}

.hero-background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -10;
}

.over-image-section {
    position: relative;
    z-index: 10;
    height: 100%;
    text-align: center;
}

.nav-section {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0 10px;
}

.navbar-wrap {
    text-align: right;
}

.secondary-menu-navbar {
    display: inline-flex;
    flex-wrap: wrap;
}

.secondary-menu-link-navbar {
    padding: 2px 15px;
}

.secondary-menu-link-navbar a {
    color: var(--first-color);
    font-size: 1.3rem;
    font-weight: 600;
}

.secondary-menu-link-navbar a:hover {
    font-weight: 800;
}

.primary-menu-navbar {
    display: inline-flex;
    flex-wrap: wrap;
}

.primary-menu-link-navbar {
    padding: 5px 15px;
}

.primary-menu-link-navbar a {
    font-size: 1.6rem;
    color: var(--third-color);
    font-weight: 500;
}

.primary-menu-link-navbar a:hover {
    color: var(--first-color);
}

.on-news a{
    color: var(--first-color);
    font-weight: 900;
}

.btn-menu-hamburger{
    display: none;
}

.logo-header-navbar img {
    width: 180px !important;
    max-width: 40vw;
    height: auto;
    display: block;
}

/*
-----------------------------
HERO SECTION
-----------------------------
*/

.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(50vh - 120px);
    text-align: center;
}

.hero-section-wrap {
    margin-top: 2vh;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.hero-section-text {
    width: 100%;
    max-width: 600px;
}

.hero-section-text h1 {
    color: var(--first-color);
    margin-bottom: 18px;
    line-height: 1.1;
}

.hero-section-text p {
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 600;
    line-height: 1.5;
}

.project-meta {
    color: #ffffff;
    font-size: 2rem !important;
    font-weight: 400;
    line-height: 1.8;
    margin-top: 12px;
}

/* Ensure all children inherit the font-size */
.project-meta *,
.project-meta span,
.project-meta time,
.project-meta #proj-location,
.project-meta #proj-date,
.project-meta #proj-tags {
    font-size: 2rem !important;
}

.project-meta .dot { 
    margin: 0 .5rem; 
    opacity: .7; 
    color: var(--first-color);
}

.project-meta span:empty {
    display: none;
}

.project-meta .tag {
    /* color: var(--first-color); */
    font-weight: 500;
}

/*
-----------------------------
MAIN ARTICLE SECTION
-----------------------------
*/

.main-article {
    padding: 8vh 0;
    position: relative;
    z-index: 5;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
}

.article-content h2 {
    margin: 2vh 0 4vh 0;
    text-align: center;
    color: var(--first-color);
}

.article-content p {
    margin-bottom: 4vh;
    text-align: left;
    color: var(--third-color);
}

.article-content .lead {
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 4vh;
    text-align: left;
    color: var(--third-color);
}

.article-content h3 {
    margin: 3vh 0 2vh 0;
    color: var(--first-color);
    font-size: 2.2rem;
    font-weight: 600;
}

.article-content ul {
    font-size: var(--font-size-s);
    margin: 2vh 0 2vh 0;
    padding-left: 3rem;
    color: var(--third-color);
}

.article-content li {
    font-size: var(--font-size-s);
    list-style-type: disc;
    margin-bottom: 1vh;
    line-height: 1.6;
}

/*
-----------------------------
BREADCRUMB
-----------------------------
*/

.breadcrumb {
    padding: 2vh 0;
    position: relative;
    z-index: 5;
    margin-top: 2vh;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    font-size: var(--font-size-xs);
}

.breadcrumb a,
.breadcrumb span {
    color: var(--third-color);
    font-size: var(--font-size-xs);
    text-decoration: none;
    margin: 0 4px;
}

.breadcrumb a:hover {
    color: var(--first-color);
}

.breadcrumb span {
    color: var(--first-color);
}

/*
-----------------------------
THUMBNAIL GALLERY
-----------------------------
*/

.thumbnail-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 4vh 0;
}

.thumbnail-item {
    text-align: center;
}

.thumbnail-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail-img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    /* border-color: var(--first-color); */
}

/* --- Thumbnail slider: 3 visible + peek --- */
.thumb-slider {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
    margin: 1rem 0 0.5rem;
}

.thumb-track {
    --thumb-gap: 16px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--thumb-gap)) / 3);
    gap: var(--thumb-gap);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    align-items: stretch;
    padding-bottom: 6px;
    /* show a small peek of next thumb */
    padding-right: calc(((100% - 2 * var(--thumb-gap)) / 3) * 0.25);
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.thumb-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.thumb-item {
    flex: 0 0 auto;
    width: 220px;
    scroll-snap-align: start;
}

.thumb-item img {
    display: block;
    width: 95%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thumb-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.thumbnail-item { 
    scroll-snap-align: start; 
    height: 150px;
}

.thumbnail-item img { 
    width: 100%; 
    height: 100%; 
    cursor: zoom-in; 
    border-radius: 8px; 
    display: block; 
    object-fit: cover; 
}

.thumb-nav {
    appearance: none; 
    border: 1px solid rgba(0,0,0,.12); 
    background: #fff;
    border-radius: 999px; 
    width: 36px; 
    height: 36px; 
    font-size: 20px;
    display: grid; 
    place-items: center; 
    cursor: pointer;
    color: var(--second-color);
    transition: all 0.3s ease;
}

.thumb-nav:hover:not(:disabled) {
    background: var(--first-color);
    border-color: var(--first-color);
    color: #fff;
}

.thumb-nav:disabled { 
    opacity: .4; 
    cursor: default; 
}

/* Hide nav buttons on mobile - allow horizontal scrolling */
@media (max-width: 767px) {
    .container .thumb-slider {
        width: 100%;
    }

    .thumb-nav {
        display: none;
    }
    
    .thumb-slider {
        grid-template-columns: 1fr;
    }
    
    /* Make thumbnails bigger on mobile - show 1.5 at a time for better size */
    .thumb-track {
        grid-auto-columns: calc((100% - var(--thumb-gap)) / 1.5);
        padding-right: calc(((100% - var(--thumb-gap)) / 1.5) * 0.3);
    }
    
    .thumb-item {
        width: auto; /* Let grid control width on mobile */
    }

    .thumb-item img {
        width: 100%;
        aspect-ratio: 16 / 9; /* Maintain landscape aspect ratio */
    }
    
    .thumbnail-item {
        height: 220px;
    }

    .thumbnail-item img {
        height: 100%;
    }
}

.thumb-dots { 
    margin-top: 10px; 
    display: flex; 
    padding: 10px 0;
    height: 25px;
    justify-content: center; 
    align-items: center;
    gap: 8px; 
}

.thumb-dot { 
    width: 8px; 
    height: 8px; 
    border-radius: 50%; 
    border: 0; 
    background: rgba(255, 255, 255, 0.3); 
    cursor: pointer; 
    transition: all 0.3s ease;
    padding: 0;
    appearance: none;
}

.thumb-dot:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: scale(1.2);
}

.thumb-dot.active { 
    background: var(--first-color); 
    width: 10px;
    height: 10px;
}

/*
-----------------------------
FEATURED IMAGE
-----------------------------
*/

.featured-image {
    margin: 4vh 0;
    text-align: center;
}

.featured-image img {
    width: 100%;
    max-width: 600px;
    margin: auto;
    height: auto;
    border-radius: 8px;
    margin-bottom: 15px;
}

.featured-image figcaption {
    font-size: 1.4rem;
    color: var(--third-color);
    font-style: italic;
    opacity: 0.8;
}

/*
-----------------------------
NEWS CARDS SECTION
-----------------------------
*/

.news-cards {
    padding: 8vh 0;
    background-color: rgba(0, 0, 0, 0.05);
    position: relative;
    z-index: 9;
}

.news-cards-title {
    text-align: center;
    margin-bottom: 6vh;
}

.news-cards-title h2 {
    color: var(--first-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4vh 3%;
}

.news-card {
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 16px;
    overflow: hidden;
    text-align: center;
    border: 1px solid rgba(144, 144, 144, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.news-card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.05);
}

.news-card-content {
    padding: 3vh 2vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
}

.news-card-content h3 {
    color: var(--third-color);
    margin-bottom: 3vh;
    font-size: var(--font-size-m);
    line-height: 1.3;
}

.news-card .btn-yellow {
    align-self: center;
    margin-top: auto;
}

/*
-----------------------------
MODAL
-----------------------------
*/

/* --- Modal navigation --- */
.modal { 
    position: fixed; 
    inset: 0; 
    display: none; 
    background: rgba(0,0,0,.75); 
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 14000;
}

.modal[style*="display: block"],
.modal[style*="display: flex"],
.modal.show {
    display: flex !important;
}

.modal .modal-content { 
    max-width: min(92vw, 1200px); 
    max-height: 82vh; 
    margin: auto; 
    display: block; 
    object-fit: contain;
    border-radius: 8px;
}

.modal-nav {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    appearance: none; 
    border: none; 
    background: rgba(255,255,255,.9);
    width: 44px; 
    height: 44px; 
    border-radius: 999px; 
    font-size: 24px;
    display: grid; 
    place-items: center; 
    cursor: pointer; 
    color: var(--second-color);
    transition: all 0.3s ease;
    z-index: 1001;
}

.modal-prev { 
    left: 24px; 
}

.modal-next { 
    right: 24px; 
}

@media (hover:hover) {
    .modal-nav:hover { 
        background: #fff;
        color: var(--first-color);
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: var(--first-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.close:hover,
.close:focus {
    color: var(--third-color);
    text-decoration: none;
}

/*
-----------------------------
FOOTER
-----------------------------
*/

footer {
    text-align: center;
    padding: 50px 0;
    background-color: var(--second-color);
    position: relative;
}

.footer-section-wrap {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
}

.footer-section-first-content {
    width: 300px;
    text-align: left;
}

.footer-section-first-content-logo {
    margin-bottom: 30px;
}

.footer-section-first-content-text {
    margin-bottom: 30px;
}

.footer-section-first-content-text p {
    color: #ffffff;
}

.footer-section-first-content-social-media {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-section-second-content {
    width: 220px;
    text-align: left;
}

.footer-section-second-content a {
    font-family: var(--font-family);
    font-size: var(--font-size-s);
    color: #ffffff;
    line-height: 3.5rem;
}

.footer-section-third-content {
    width: 220px;
    text-align: left;
}

.footer-section-third-content a {
    font-family: var(--font-family);
    font-size: var(--font-size-s);
    color: #ffffff;
    line-height: 3.5rem;
}

.footer-section-fourth-content {
    width: 300px;
    text-align: left;
}

.footer-section-fourth-content-text a{
    font-family: var(--font-family);
    font-size: 1.4rem;
    color: #ffffff;
    line-height: 2.4rem;
}

.footer-section-fourth-content-img img{
    margin-top: 24px;
}

.footer-img img{
    margin-top: 20px;
}

/*
-----------------------------
RESPONSIVE DESIGN
-----------------------------
*/

@media (max-width: 1100px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4vh 4%;
    }
    
    .thumbnail-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1023px) {
    .container {
        width: 90%;
        padding: 0 20px;
    }
    
    /* Navigation */
    /* .nav-section {
        padding: 20px 0 10px;
    } */
    
    .logo-header-navbar img {
        width: 150px !important;
    }
    
    /* Hero Section */
    .image-hero {
        height: 80vh;
    }

    .hero-section-wrap {
        margin-top: 7vh;
        min-height: 50vh;
        justify-content: center;
        padding-top: 4vh;
    }
    
    .hero-section-text {
        max-width: 90vw;
    }

    .hero-section-text h1 {
        font-size: 2.1rem;
    }
    
    .hero-section-text p {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-section-wrap {
        gap: 20px;
    }
    
    .footer-section-first-content-text p {
        font-size: 1.3rem;
    }
    
    .footer-section-second-content a,
    .footer-section-third-content a {
        font-size: 2rem;
        line-height: 3.5rem;
    }
    
    .footer-section-fourth-content-text a {
        font-size: 1.4rem;
        line-height: 2.5rem;
    }
}

@media (max-width: 767px) {
    .nav-section {
        padding: 40px 0 10px;    
    }
    
    .navbar-wrap {
        display: none;
    }
    
    .btn-menu-hamburger {
        display: block;
        cursor: pointer;
    }
    
    .logo-header-navbar img {
        width: 150px !important;
    }

    /* Hero Section */
    .image-hero {
        height: 70vh;
    }

    .hero-section-wrap {
        margin-top: 4vh;
        min-height: 40vh;
        padding-top: 2vh;
    }

    .hero-section-text {
        max-width: 95vw;
    }

    .hero-section-text h1 {
        font-size: 3rem;
    }

    .hero-section-text p {
        font-size: var(--font-size-s);
    }

    .project-meta {
        font-size: 1.4rem;
    }
      
      .breadcrumb {
          padding: 1.5vh 0;
      }
      
      .breadcrumb a,
      .breadcrumb span {
          font-size: 1.2rem;
      }
    
    .main-article {
        padding: 6vh 0;
    }
    
    /* .article-content {
        padding: 0 20px;
    } */
    
    .thumbnail-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .thumbnail-img {
        height: 200px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 3vh;
    }
    
    .modal {
        z-index: 14000;
    }

    .news-card {
        min-height: 250px;
    }
    
    .news-card-image {
        height: 150px;
    }
    
    .news-card-content {
        padding: 2vh 1.5vh;
    }
    
    .news-cards {
        padding: 6vh 0;
    }
    
    .news-cards-title {
        margin-bottom: 4vh;
    }
}

/*
-----------------------------
PROJECT PAGER
-----------------------------
*/

.project-pager {
    padding: 4vh 0;
    position: relative;
    z-index: 5;
    background-color: var(--second-color);
}

.pager-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.pager-link {
    color: var(--third-color);
    font-size: 1.6rem;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid var(--third-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.pager-link:hover {
    color: var(--first-color);
    border-color: var(--first-color);
    background-color: rgba(253, 202, 11, 0.1);
}

.pager-link[hidden] {
    display: none;
}

@media (max-width: 767px) {
    .project-pager {
        padding: 3vh 0;
    }
    
    .pager-wrap {
        flex-direction: column;
        gap: 20px;
    }
    
    .pager-link {
        width: 100%;
        text-align: center;
        max-width: 300px;
    }
}

@media (max-width: 767px) {
    .hero {
        height: calc(100vh - 100px);
    }
    
    .article-content h2 {
        font-size: var(--font-size-l);
    }
    
    .article-content .lead {
        font-size: 1.6rem;
    }
    
    .main-article {
        padding: 4vh 0;
    }
    
    .news-cards {
        padding: 4vh 0;
    }
    
    .project-pager {
        padding: 2vh 0;
    }
    
    .pager-link {
        font-size: 1.4rem;
        padding: 10px 20px;
    }
}
