/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap'); /* Đã đổi lại Open Sans theo file bạn gửi */

/* CSS Custom Properties (Variables) */
:root {
    --primary-color: #008080; /* Teal */
    --primary-color-dark: #006666;
    --accent-color: #FF6B6B;
    --light-bg: #F0F7F7;
    --white-color: #ffffff;
    --text-primary: #333333;
    --text-secondary: #555555;
    --border-color: #e0e0e0;
    --footer-bg: #22272B;
    --footer-text: #aeb2b5;

    --header-height-desktop: 86px;
    --header-height-mobile: 121px; /* Cần xem xét lại giá trị này sau khi header mobile xếp chồng */
}

/* Reset & Basic Styles */
body, h1, h2, h3, h4, p, ul, li, a, form, input, textarea, button, img, article, aside, section, header, footer, nav {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif; /* Đã đổi lại Open Sans */
    border: 0;
    border-radius: 0 !important; 
}

html {
    scroll-behavior: smooth;
}

body {
    line-height: 1.7;
    color: var(--text-primary);
    font-size: 16px;
    background-color: var(--white-color);
}

.container {
    width: 90%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 0;
}
.container-main { 
    width: 100%;
    position: relative; 
    z-index: 5;      
}


a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color-dark);
}

/* Header & Navigation */
header {
    background-color: var(--white-color);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    min-height: 65px; /* Dựa trên logo height desktop */
}

header .logo img {
    height: 65px;
    display: block;
}

header nav ul { /* Nav desktop */
    list-style: none;
    display: flex;
    align-items: center;
}

header nav ul li {
    margin-left: 10px;
}

header nav ul li a {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 15px;
    text-decoration: none;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
    border-bottom: 3px solid transparent;
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 0.5px;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    text-decoration: none !important;
}

/* Hero Section */
.hero {
    background: #1a1a20 url('images/Background web.png') no-repeat center center/cover;
    color: var(--white-color);
    text-align: left;
    min-height: calc(85vh - var(--header-height-desktop));
    display: flex;
    align-items: center;
    position: relative; 
    overflow: hidden;
    z-index: 0; 
    margin-top: var(--header-height-desktop);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(10, 20, 20, 0.8) 0%, rgba(10, 20, 20, 0.4) 50%, rgba(10, 20, 20, 0.1) 100%);
    z-index: 1; 
}

.hero .container { 
    position: relative; z-index: 2; padding: 20px;
    max-width: 650px; margin-left: 80px; margin-right: auto;
}

.hero h2, .hero p, .hero .btn { opacity: 0; transform: translateY(30px); }
.hero h2 {
    font-size: 3.2em; font-weight: 700; margin-bottom: 25px; line-height: 1.2;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
    animation: fadeInSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}
.hero p {
    font-size: 1.3em; margin-bottom: 40px; line-height: 1.7;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    animation: fadeInSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s forwards;
}
.hero .btn { animation: fadeInSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s forwards; }
.hero .btn:hover { /* Giữ màu gốc khi hover cho nút explore */
    background-color: var(--primary-color); 
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 80, 80, 0.3);
}

@keyframes fadeInSlideUp { to { opacity: 1; transform: translateY(0); } }

/* General Button Style */
.btn {
    display: inline-block; background-color: var(--primary-color); color: var(--white-color);
    padding: 16px 35px; text-decoration: none; font-weight: 600; font-size: 1.05em;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: none; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer;
}
.btn:hover {
    background-color: var(--primary-color-dark); text-decoration: none; /* Sẽ bị hero .btn:hover ghi đè nếu selector giống nhau */
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0, 80, 80, 0.3);
}
.btn-secondary {
    background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color);
    padding: 12px 28px; font-weight: 600; margin-top: 10px;
}
.btn-secondary:hover {
    background-color: var(--primary-color); color: var(--white-color); border-color: var(--primary-color);
    transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 80, 80, 0.2);
}
.btn-light {
    background-color: var(--white-color); color: var(--primary-color);
    border: 2px solid var(--white-color); padding: 14px 30px;
}
.btn-light:hover {
    background-color: transparent; color: var(--white-color); border-color: var(--white-color);
    transform: translateY(-2px); box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.btn-block { display: block; width: 100%; text-align: center; }


/* Page Sections Style */
.page-section { padding: 80px 0; position: relative; z-index: 2; }
.page-section > .container > h2 { 
    font-size: 2.6em; font-weight: 700; color: var(--text-primary);
    margin-bottom: 20px; text-align: center; position: relative;
}
.page-section > .container > h2::after {
    content: ''; display: block; width: 60px; height: 4px;
    background-color: var(--primary-color); margin: 25px auto 50px;
}
.page-section h3 { font-size: 1.8em; color: var(--text-primary); font-weight: 600; margin-top: 30px; margin-bottom: 20px; }
.page-section h3::after { display: none; } 
.page-section p, .page-section ul li { font-size: 1.05em; color: var(--text-secondary); margin-bottom: 15px; }
.page-section ul { list-style-position: outside; padding-left: 1.5em; }
.alt-background { background-color: var(--light-bg); }

/* WHO WE ARE SECTION */
#who-we-are .section-intro-text {max-width: 800px; margin-left: auto; margin-right: auto; margin-bottom: 40px; text-align: center; display: flex; flex-direction: column; align-items: center;}
#who-we-are .section-intro-text p { font-size: 1.15em; color: var(--text-secondary); line-height: 1.8; margin-bottom: 30px; }
hr.decorative-line { border: none; height: 2px; width: 80px; background-color: var(--primary-color); margin-top:0; margin-bottom: 0; }
#who-we-are .who-we-are-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 50px; align-items: center; margin-top: 50px; }
#who-we-are .who-we-are-image img { width: 100%; height: auto; box-shadow: 0 5px 20px rgba(0,0,0,0.1); display: block; }
#who-we-are .who-we-are-content h3 { font-size: 2.2em; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; margin-top: 0; text-align: left; }
#who-we-are .who-we-are-content .tagline { font-size: 1.1em; color: var(--text-secondary); font-style: italic; margin-bottom: 25px; }
#who-we-are .who-we-are-content p { font-size: 1.05em; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.8; }
#who-we-are .btn .arrow { margin-left: 8px; transition: transform 0.3s ease; }
#who-we-are .btn-secondary:hover .arrow { transform: translateX(4px); }
#who-we-are .objectives-mission-section h3 { text-align: center; font-size: 1.8em; margin-bottom: 30px; }
#who-we-are .objectives-mission-section h3::after { content: ''; display: block; width: 50px; height: 3px; background-color: var(--primary-color); margin: 15px auto 30px; }
#who-we-are .objectives-mission-section ul { list-style-type: disc; padding-left: 20px; max-width: 700px; margin: 0 auto; }
#who-we-are .objectives-mission-section ul li { margin-bottom: 10px; }

/* RESEARCH SECTION - VUÔNG, IN HOA, LỘ ẢNH, GRID 3x2, TEXT TOP-LEFT */
#research .research-list {
    list-style-type: none; padding-left: 0; max-width: 100%; margin: 0 auto;
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--white-color); border-left: 1px solid var(--white-color);
}
#research .research-list li {
    background-color: var(--light-bg); padding: 20px;
    border-right: 1px solid var(--white-color); border-bottom: 1px solid var(--white-color);
    position: relative; font-weight: 700; color: var(--white-color);
    line-height: 1.3; overflow: hidden;
    transition: color 0.4s ease; background-size: cover; background-position: center center;
    min-height: 180px; display: flex; align-items: flex-start; justify-content: flex-start; text-align: left;
}
#research .research-list li .research-text { position: relative; z-index: 2; text-transform: uppercase; font-size: 1.05em; }
#research .research-list li::after {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 64, 64, 0.7);
    z-index: 1; transition: opacity 0.3s ease-in-out;
}
#research .research-list li:hover::after { opacity: 0; }
#research .research-list li::before { display: none; }

/* NEWS & EVENTS SECTION - BỐ CỤC MỚI, VUÔNG */
.news-events-layout { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; }
.main-news-column { grid-column: span 8; }
.sidebar-news-column { grid-column: span 4; }
.news-detail-item { background-color: var(--white-color); border: 1px solid var(--border-color); }
.news-detail-item .news-item-content { padding: 25px; }
.news-detail-item .news-item-meta { font-size: 0.85em; color: var(--text-secondary); margin-bottom: 10px; }
.news-detail-item .news-item-title { font-size: 1.6em; font-weight: 700; color: var(--text-primary); margin-bottom: 15px; line-height: 1.3; }
.news-detail-item .news-item-excerpt { font-size: 1em; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.news-detail-item .btn-read-more { display: inline-block; color: var(--primary-color); font-weight: 600; text-decoration: none; }
.news-detail-item .btn-read-more:hover { color: var(--primary-color-dark); }
.news-detail-item .btn-read-more .arrow { margin-left: 5px; transition: transform 0.3s ease; }
.news-detail-item .btn-read-more:hover .arrow { transform: translateX(3px); }
.featured-article-sidebar { background-color: var(--primary-color); color: var(--white-color); padding: 25px; display: flex; flex-direction: column; }
.featured-article-sidebar .featured-article-content { flex-grow: 1; display: flex; flex-direction: column; }
.featured-article-sidebar .featured-article-content h4 { font-size: 1.4em; color: var(--white-color); margin-bottom: 15px; line-height: 1.3; font-weight: 700; }
.featured-article-sidebar .featured-article-content p { font-size: 0.95em; line-height: 1.6; margin-bottom: 20px; color: rgba(255,255,255,0.9); flex-grow: 1; }
.featured-article-sidebar .btn { background-color: var(--white-color); color: var(--primary-color); margin-top: auto; }
.featured-article-sidebar .btn:hover { background-color: var(--light-bg); color: var(--primary-color-dark); }
#news-events .main-news-column > p:only-child { text-align: center; width: 100%; font-size: 1.2em; color: var(--text-secondary); padding: 40px 0; }

/* ARTICLE DETAIL PAGE STYLES */
.article-page-section { padding-top: 40px; padding-bottom: 60px; background-color: var(--white-color); position: relative; z-index: 5; }
.article-container { max-width: 800px; margin: 0 auto; padding: 0 20px; position: relative; }
.article-header { margin-bottom: 30px; padding-bottom: 30px; position: relative; border: none !important; outline: none !important; box-shadow: none !important; }
.article-header::after { content: ''; display: block; width: 100%; height: 1px; background-color: var(--border-color); position: absolute; bottom: 0; left: 0; }
.breadcrumbs { margin-bottom: 25px; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; font-size: 0.9em; }
.breadcrumbs li { margin-right: 5px; color: var(--text-secondary); }
.breadcrumbs li:not(:last-child)::after { content: '>'; margin-left: 8px; color: var(--text-secondary); }
.breadcrumbs a { color: var(--primary-color); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.article-main-title { font-size: 2.8em; color: var(--text-primary); margin-bottom: 15px; line-height: 1.2; font-weight: 700; }
.article-subtitle { font-size: 1.3em; color: var(--text-secondary); line-height: 1.6; margin-bottom: 20px; font-weight: 400; }
.article-meta-detail { font-size: 1em; color: var(--text-secondary); line-height: 1.6; }
.article-meta-detail p { margin-bottom: 5px; } .article-meta-detail p:last-child { margin-bottom: 0; }
.article-meta-detail span.article-info strong { color: var(--text-primary); }
.article-featured-image { margin-bottom: 40px; }
.article-featured-image img { width: 100%; height: auto; display: block; }
.article-featured-image figcaption { font-size: 0.85em; color: var(--text-secondary); text-align: center; margin-top: 10px; font-style: italic; }
.article-content { font-size: 1.1em; line-height: 1.8; color: var(--text-primary); }
.article-content p { margin-bottom: 1.5em; }
.article-content h2 { font-size: 1.8em; color: var(--text-primary); margin-top: 2em; margin-bottom: 1em; font-weight: 600; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.3em; }
.article-content h2::after { display: none; }
.article-content ul, .article-content ol { margin-bottom: 1.5em; padding-left: 2em; }
.article-content ul li, .article-content ol li { margin-bottom: 0.5em; }
.article-content blockquote { border-left: 4px solid var(--primary-color); padding-left: 1.5em; margin: 2em 0; font-style: italic; font-size: 1.1em; color: var(--text-secondary); }
.article-content blockquote p { margin-bottom: 0; }
.article-content a { color: var(--primary-color); text-decoration: underline; font-weight: 600; }
.article-content a:hover { color: var(--primary-color-dark); text-decoration: none; }
.article-footer { margin-top: 50px; padding-top: 30px; border-top: 1px solid var(--border-color); text-align: left; }
.article-footer .btn .arrow { margin-right: 5px; }

/* CONTACT SECTION */
#contact .contact-info-simple p { margin-bottom: 12px; font-size: 1.1em; line-height: 1.7; }
#contact .contact-info-simple p strong { color: var(--text-primary); }
#contact .contact-info-simple a { color: var(--primary-color); font-weight: 600; }
#contact .contact-info-simple a:hover { color: var(--primary-color-dark); }

/* PRE-FOOTER */
.pre-footer-cta { background-color: var(--primary-color); color: var(--white-color); padding: 50px 0; text-align: center; }
.pre-footer-cta .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.pre-footer-cta .cta-content { flex-basis: 65%; text-align: left; }
.pre-footer-cta .cta-content h3 { font-size: 1.8em; font-weight: 700; margin-bottom: 8px; color: var(--white-color); text-align: left; }
.pre-footer-cta .cta-content h3::after { display: none; }
.pre-footer-cta .cta-content p { font-size: 1.1em; margin-bottom: 0; color: rgba(255, 255, 255, 0.9); }
.pre-footer-cta .cta-button { flex-basis: 30%; text-align: right; }

/* FOOTER */
footer { color: var(--footer-text); text-align: left; margin-top: 0; }
.footer-main { background-color: var(--footer-bg); padding: 60px 0 40px; }
.footer-main > .container { padding-left: 30px; padding-right: 30px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.footer-logo-link { display: inline-block; margin-bottom: 15px; }
.footer-logo { height: 65px; display: block; margin: 0 auto; }
.footer-widget p { font-size: 0.95em; line-height: 1.7; margin-bottom: 12px; color: var(--footer-text); }
.footer-widget p:last-child { margin-bottom: 0; }
.footer-widget h4 { font-size: 1.2em; font-weight: 600; color: var(--white-color); margin-bottom: 20px; text-transform: capitalize; position: relative; padding-bottom: 10px; }
.footer-widget h4::after { content: ''; position: absolute; left: 0; bottom: 0; width: 40px; height: 2px; background-color: var(--primary-color); }
.footer-widget ul { list-style: none; padding-left: 0; }
.footer-widget ul li { margin-bottom: 10px; }
.footer-widget ul li a { color: var(--footer-text); text-decoration: none; transition: color 0.3s ease, padding-left 0.3s ease; font-size: 0.95em; }
.footer-widget ul li a:hover { color: var(--white-color); padding-left: 5px; }
.footer-widget .social-icons { margin-top: 20px; }
.footer-widget .social-icons a { color: var(--footer-text); font-size: 1.3em; margin-right: 15px; transition: color 0.3s ease, transform 0.2s ease; display: inline-block; }
.footer-widget .social-icons a:hover { color: var(--primary-color); transform: scale(1.1); }
.footer-widget .social-icons a:last-child { margin-right: 0; }
.footer-bottom { background-color: #1c2023; padding: 20px 0; font-size: 0.9em; border-top: 1px solid #30353a; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.footer-bottom p { margin-bottom: 0; color: var(--footer-text); }
.footer-bottom .back-to-top-container { text-align: right; }
footer .back-to-top { color: var(--footer-text); text-decoration: none; font-size: 0.9em; transition: color 0.3s ease; }
footer .back-to-top:hover { color: var(--white-color); }

/* Responsive adjustments */
@media (max-width: 992px) { /* Tablet */
    .hero .container { max-width: 90%; margin-left: auto; }
    #research .research-list { grid-template-columns: repeat(2, 1fr); }
    #research .research-list li { min-height: 160px; }
    .news-events-layout { grid-template-columns: 7fr 5fr; gap: 25px; }
    .article-main-title { font-size: 2.5em; }
    .article-subtitle { font-size: 1.2em; }
}

@media (max-width: 768px) { /* Mobile */
    header .container {
        flex-direction: column; /* Xếp chồng logo và nav */
        align-items: center; /* Căn giữa theo chiều ngang */
        padding-bottom: 10px; /* Thêm padding dưới nếu cần */
        min-height: 0; /* Bỏ min-height cố định */
    }
    header .logo {
        margin-bottom: 10px; /* Khoảng cách giữa logo và nav */
    }
    header .logo img {
        height: 55px; /* Giảm kích thước logo trên mobile */
    }
    header nav ul {
        margin-top: 0;
        flex-wrap: wrap; /* Cho phép các mục menu xuống dòng */
        justify-content: center; /* Căn giữa các mục menu */
        padding-left: 0;
    }
    header nav ul li {
        margin: 5px; /* Khoảng cách giữa các mục menu */
    }
    header nav ul li a {
        padding: 8px 10px; /* Giảm padding của link menu */
    }

    /* Điều chỉnh Hero Section cho mobile */
    .hero {
        text-align: center; /* Căn giữa text trong hero */
        margin-top: var(--header-height-mobile); /* Sử dụng biến chiều cao header mobile */
    }
    .hero .container {
        margin-left: auto; /* Căn giữa container trong hero */
        margin-right: auto;
    }
    .hero h2 { font-size: 2.2em; }
    .hero p { font-size: 1.1em; margin-bottom: 30px; }
    .btn { padding: 14px 28px; font-size: 1em; }

    .page-section { padding: 60px 0; }
    .page-section > .container > h2 { font-size: 2em; }
    .page-section > .container > h2::after { margin: 20px auto 40px; }

    /* "Who We Are" Section Responsive */
    #who-we-are .who-we-are-grid {
        grid-template-columns: 1fr; /* 1 cột trên mobile */
        gap: 20px;
        margin-top: 30px;
    }
    #who-we-are .who-we-are-image {
        margin-bottom: 15px;
        max-width: 90%; /* Điều chỉnh max-width cho ảnh */
        margin-left: auto;
        margin-right: auto;
    }
    #who-we-are .who-we-are-content {
        text-align: center; /* Căn giữa text trong content */
    }
    #who-we-are .who-we-are-content h3 { font-size: 1.8em; }
    #who-we-are .who-we-are-content p { font-size: 1em; }
    #who-we-are .btn-secondary { padding: 10px 24px; }
    #who-we-are .objectives-mission-section h3 { font-size: 1.6em; }

    /* Research Section Responsive */
    #research .research-list { grid-template-columns: 1fr; }
    #research .research-list li { min-height: 140px; font-size: 1em; padding: 15px; }
    #research .research-list li .research-text { font-size: 1em; }
    
    /* News & Events Responsive */
    .news-events-layout { grid-template-columns: 1fr; }
    .sidebar-news-column { margin-top: 30px; }
    .featured-article-sidebar .featured-article-content p { -webkit-line-clamp: 3; }
    .news-detail-item .news-item-title { font-size: 1.4em; }
    
    .pre-footer-cta .cta-content { flex-basis: 100%; text-align: center; } /* Căn giữa text CTA */
    .pre-footer-cta .cta-button { flex-basis: 100%; margin-top: 20px; text-align: center; }
    
    .footer-widget h4::after { left: 50%; transform: translateX(-50%); }
    .footer-widget { text-align: center; }

    /* Article Detail Page Responsive */
    .article-main-title { font-size: 2em; }
    .article-subtitle { font-size: 1.1em; }
    .article-content { font-size: 1em; }
    .article-content h2 { font-size: 1.5em; }
}
