
/* =========================================
   GRID SYSTEM (Mobile 4 cols / iPad 8 cols / Desktop 12 cols)
========================================= */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--padding-container, 20px);
    padding-right: var(--padding-container, 20px);
}

.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--grid-gap, 20px);
    width: 100%;
}

/* Mobile defaults (< 768px): 4 cols */
@media (max-width: 767px) {
    .row {
        grid-template-columns: repeat(4, 1fr);
    }
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        grid-column: span 4;
    }
    
    .m-col-1 { grid-column: span 1; }
    .m-col-2 { grid-column: span 2; }
    .m-col-3 { grid-column: span 3; }
    .m-col-4 { grid-column: span 4; }

    .hide-on-mobile {
        display: none !important;
    }
}

/* iPad/Tablet (768px - 1023px): 8 cols */
@media (min-width: 768px) and (max-width: 1023px) {
    .row {
        grid-template-columns: repeat(8, 1fr);
    }
    .col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
        grid-column: span 8;
    }
    
    .t-col-1 { grid-column: span 1; }
    .t-col-2 { grid-column: span 2; }
    .t-col-3 { grid-column: span 3; }
    .t-col-4 { grid-column: span 4; }
    .t-col-5 { grid-column: span 5; }
    .t-col-6 { grid-column: span 6; }
    .t-col-7 { grid-column: span 7; }
    .t-col-8 { grid-column: span 8; }

    .hide-on-tablet {
        display: none !important;
    }
}

/* Desktop (>= 1024px): 12 cols */
@media (min-width: 1024px) {
    .row {
        grid-template-columns: repeat(12, 1fr);
    }
    .col-1 { grid-column: span 1; }
    .col-2 { grid-column: span 2; }
    .col-3 { grid-column: span 3; }
    .col-4 { grid-column: span 4; }
    .col-5 { grid-column: span 5; }
    .col-6 { grid-column: span 6; }
    .col-7 { grid-column: span 7; }
    .col-8 { grid-column: span 8; }
    .col-9 { grid-column: span 9; }
    .col-10 { grid-column: span 10; }
    .col-11 { grid-column: span 11; }
    .col-12 { grid-column: span 12; }
}

/* Ultra-wide Desktop (>= 1441px) Fluid Container & Grid */
@media (min-width: 1441px) {
    .container {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    .row {
        gap: 20px;
    }
}



/* =========================================
   HEADER STYLES
========================================= */
.header-desktop {
    display: none;
}
@media (min-width: 1024px) {
    .header-desktop {
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        width: 100%;
        padding: 16px 20px;
        box-sizing: border-box;
        z-index: 100;
        pointer-events: none;
    }
    .header-mobile {
        display: none !important;
    }
}

.hdr-group-left, .hdr-group-right {
    display: flex;
    align-items: center;
    pointer-events: auto;
}

.hdr-nav-box {
    display: flex;
    gap: 6px;
    align-items: center;
}
.hdr-nav-box .hdr-nav-item {
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: var(--c-primary, #2b2825);
    background-color: transparent;
    text-decoration: none;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
}
.hdr-nav-box .hdr-nav-item:hover {
    opacity: 0.7;
}


/* =========================================
   FOOTER STYLES
========================================= */
/* Footer Wrapper */
.footer-wrapper {
    width: 100%;
    padding: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
}
.footer-inner {
    background-color: var(--c-primary, #2b2825);
    color: var(--c-white);
    overflow: hidden;
    font-family: var(--font-primary);
}

/* CSS Grid Layout */
.footer-grid-container {
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 40px 20px;
}

/* Grid areas definition */
.fg-intro { grid-column: 1 / span 4; }
.fg-nav { grid-column: 5 / span 4; }
.fg-newsletter { grid-column: 10 / span 3; }
.fg-bottom { 
    grid-column: 1 / span 12; 
    display: flex; 
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid rgba(247, 243, 236,0.1); 
    padding-top: 20px; 
    margin-top: 40px; 
    font-size: 13px;
    color: rgba(247, 243, 236,0.6);
}

/* Nav Links Grid */
.nav-links-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 20px;
}
.footer-nav-btn {
    padding: 12px 16px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 400;
    color: rgba(247, 243, 236,0.8);
    background-color: rgba(247, 243, 236,0.05);
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.footer-nav-btn:hover {
    background-color: rgba(247, 243, 236,0.1);
    color: var(--c-white);
}

/* CTA Button */
.footer-cta-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    color: #1a1a1a;
    text-decoration: none;
    padding: 16px 20px;
    border-radius: 0;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.3s ease;
}
.footer-cta-btn:hover { opacity: 0.9; }
.cta-arrow {
    background-color: #def2fd;
    color: #1a1a1a;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
}

/* Newsletter Card */
.newsletter-card {
    background-color: rgba(247, 243, 236,0.05);
    border-radius: 0;
    padding: 16px;
    box-sizing: border-box;
    width: 100%;
}
.newsletter-input::placeholder {
    color: rgba(247, 243, 236, 0.7);
    opacity: 1; /* Firefox */
}

/* Bottom elements */
.fg-social-links {
    display: flex;
    gap: 10px;
}
.right-bottom-links {
    justify-content: flex-end;
}
.social-box {
    width: 36px;
    height: 36px;
    background-color: rgba(247, 243, 236,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    color: rgba(247, 243, 236,0.6);
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}
.social-box:hover {
    background-color: rgba(247, 243, 236,0.1);
    color: var(--c-white);
}
.social-box-text {
    height: 36px;
    padding: 0 16px;
    background-color: rgba(247, 243, 236,0.05);
    display: flex;
    align-items: center;
    border-radius: 0;
    color: rgba(247, 243, 236,0.6);
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}
.social-box-text:hover {
    background-color: rgba(247, 243, 236,0.1);
    color: var(--c-white);
}

.fg-copyright {
    flex: 1;
    text-align: center;
}
.fg-madeby {
    flex: 1;
    text-align: right;
}

/* Tablet (iPad) -> 8 columns */
@media (max-width: 1023px) and (min-width: 768px) {
    .footer-wrapper {
        padding: 0;
    }
    .footer-grid-container {
        grid-template-columns: repeat(8, 1fr);
        padding: 20px;
    }
    .fg-intro { grid-column: 1 / span 4; }
    .fg-nav { grid-column: 5 / span 4; }
    .fg-newsletter { grid-column: 1 / span 8; }
    .fg-bottom { 
        grid-column: 1 / span 8; 
        flex-direction: column;
        gap: 15px;
    }
    .right-bottom-links {
        justify-content: flex-start;
    }
}

/* Mobile -> 4 columns */
@media (max-width: 767px) {
    .footer-wrapper {
        padding: 0;
    }
    .footer-grid-container {
        grid-template-columns: repeat(4, 1fr);
        padding: 10px;
        gap: 30px 10px;
    }
    
    .fg-intro { grid-column: 1 / span 4; }
    
    /* 2 2 split for navs as well */
    .fg-nav { grid-column: 1 / span 4; }
    .nav-links-grid { grid-template-columns: 1fr 1fr; }
    
    .fg-newsletter { grid-column: 1 / span 4; }
    
    .fg-bottom { 
        grid-column: 1 / span 4; 
        flex-direction: column; 
        gap: 15px; 
        text-align: center; 
        align-items: stretch;
    }
    .fg-social-links { justify-content: center; flex-wrap: wrap; }
    .right-bottom-links { justify-content: center; }
}

/* =========================================
   PROJECTS INDEX STYLES
========================================= */
    .article-card {
        transition: transform 0.3s ease;
    }
    .article-card:hover {
        transform: translateY(-5px);
    }
    .article-card:hover img {
        transform: scale(1.05);
    }
    .article-card img {
        transition: transform 0.6s cubic-bezier(0.16,1,0.3,1);
    }
    .content-offset {
        margin-top: -66.66vh;
    }
    @media (max-width: 1023px) {
        .news-title-col {
            grid-column: 2 / span 2 !important;
        }
        .sort-filter-col {
            grid-column: 4 !important;
            justify-self: end;
        }
    }
    .news-title-col {
        grid-column: 5 / span 2;
    }
    .sort-filter-col {
        grid-column: 5;
    }
    .row2-align {
        align-self: end;
        margin-bottom: var(--space-md);
    }
    @media (max-width: 1023px) {
        .row2-align {
            align-self: start !important;
            margin-bottom: 0 !important;
            margin-top: var(--space-md) !important;
        }
        .icon-col-mobile {
            margin-top: calc(var(--space-md) + 24px) !important;
        }
        .badges-col-mobile {
            margin-top: calc(var(--space-md) + 18px) !important;
        }
    }

/* =========================================
   PROJECTS SHOW STYLES
========================================= */
    .project-hero {
        height: 80vh;
        position: relative;
        overflow: hidden;
    }
    .project-hero img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    .project-info-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4rem var(--space-md);
        border-bottom: 1px dashed var(--c-primary);
    }
    @media(min-width: 1024px) {
        .project-info-grid {
            grid-template-columns: 1fr 2fr;
        }
    }

/* ============================================================ */
/* Text Blur Reveal Animation (Used by buttons & nav items) */
/* ============================================================ */
.digifi-char {
    display: inline-block;
}

/* Kích hoạt khi hover vào button (.digifi-btn) hoặc phần tử chung (.hover-blur-reveal) */
.digifi-btn:hover .digifi-char,
.hover-blur-reveal:hover .digifi-char {
    animation: blurReveal 0.4s cubic-bezier(0.2, 0.6, 0.2, 1) forwards;
}

@keyframes blurReveal {
    0% {
        filter: blur(5px);
        opacity: 0;
        transform: translateX(-5px);
    }
    100% {
        filter: blur(0);
        opacity: 1;
        transform: translateX(0);
    }
}

