/* Modern Academic Theme (PVL Lab) */
:root {
    /* Color Palette */
    --primary: #003366;
    /* Deep UTC Blue */
    --secondary: #1E40AF;
    /* Bright Blue */
    --accent: #EAB308;
    /* Gold/Yellow for Highlights */
    --text-dark: #1F2937;
    /* Dark Gray */
    --text-light: #6B7280;
    /* Light Gray */
    --bg-light: #F9FAFB;
    /* Off-white */
    --white: #FFFFFF;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 5rem 0;

    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent);
    border-radius: 2px;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-dark);
}

.nav-links a:hover {
    color: var(--secondary);
}

/* Hero Section */
.hero {
    margin-top: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 8rem 0;
    text-align: center;
}

.hero-title {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: var(--radius);
    font-weight: 600;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background-color: #FCD34D;
    /* Light Gold */
    transform: translateY(-2px);
}

/* About Section */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.mission-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

.mission-card:hover {
    transform: translateY(-5px);
}

.mission-card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

/* Research Section */
.research-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.research-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--secondary);
}

.research-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.research-card ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--text-light);
}

.research-card ul li {
    margin-bottom: 0.5rem;
}

/* Team Section */
.team-leader {
    text-align: center;
    margin-bottom: 4rem;
}

.leader-card {
    display: inline-block;
    background: var(--white);
    padding: 2rem 4rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    border-top: 4px solid var(--primary);
}

.leader-info h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.role {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.social-links {
    margin-top: 1rem;
}

.social-links a {
    color: var(--primary);
    margin: 0 0.5rem;
    border-bottom: 1px solid transparent;
}

.social-links a:hover {
    border-color: var(--primary);
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--radius);
    text-align: center;
}

.member-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.member-card p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.partners {
    margin-top: 4rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #E5E7EB;
}

/* Publications */
.pub-list {
    max-width: 100%;
    margin: 0 auto;
}

.pub-year-group {
    margin-bottom: 2rem;
}

.year-header {
    font-size: 1.5rem;
    color: var(--primary);
    border-bottom: 2px solid #E5E7EB;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.pub-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    align-items: baseline;
    text-align: justify;
}

.pub-item p {
    flex: 1;
}

.pub-item a {
    font-style: italic;
    color: var(--secondary);
    text-decoration: none;
}

.pub-item a:hover {
    text-decoration: underline;
}

.pub-item:last-child {
    margin-bottom: 0;
}

/* Reusing .year class if needed, but we switched to group headers */
.type {
    font-weight: 700;
    color: var(--accent);
    min-width: 80px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.subsection-title {
    text-align: center;
    margin: 3rem 0 2rem;
    font-size: 1.5rem;
    color: var(--text-dark);
}

/* Footer */
footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 4rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.footer-col p {
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

.footer-col i {
    width: 20px;
    color: var(--accent);
    margin-right: 0.5rem;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Responsiveness */
@media (max-width: 768px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .nav-links {
        display: none;
        /* Simple hide for now, would need JS toggler ideally */
    }

    .nav-container {
        justify-content: center;
    }

    .leader-card {
        padding: 2rem 1rem;
        width: 100%;
    }
}

/* Logo Image */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    margin-right: 1rem;
}

.logo-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
    max-width: 250px;
}

/* Projects Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    table-layout: fixed;
    /* Fix column widths */
}

.table th,
.table td {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    word-wrap: break-word;
    /* Ensure long text doesn't break layout */
}

.table th {
    background-color: var(--primary);
    color: var(--white);
    font-weight: 600;
    text-align: center;
    /* Headers always centered */
    white-space: nowrap;
    /* Prevent headers from wrapping weirdly */
}

/* Specific Column Adjustments via nth-child for Projects Table */
/* Assuming Projects Table is the first one or generic rule */
/* We can add specific classes in HTML for better control, but let's try generic first or target by ID if needed */

#projectsTable th:nth-child(1),
#projectsTable td:nth-child(1) {
    width: 60px;
    text-align: center;
}

/* ID */
#projectsTable th:nth-child(2),
#projectsTable td:nth-child(2) {
    width: 20%;
}

/* Tên Dự Án */
#projectsTable th:nth-child(3),
#projectsTable td:nth-child(3) {
    width: auto;
}

/* Mô Tả - takes remaining space */
#projectsTable th:nth-child(4),
#projectsTable td:nth-child(4) {
    width: 120px;
    text-align: center;
}

/* Ngày Bắt Đầu */
#projectsTable th:nth-child(5),
#projectsTable td:nth-child(5) {
    width: 120px;
    text-align: center;
}

/* Ngày Kết Thúc */

/* Transactions Table */
#transactionsTable th:nth-child(1),
#transactionsTable td:nth-child(1) {
    width: 60px;
    text-align: center;
}

/* ID */
#transactionsTable th:nth-child(2),
#transactionsTable td:nth-child(2) {
    width: 80px;
    text-align: center;
}

/* Project ID */
#transactionsTable th:nth-child(3),
#transactionsTable td:nth-child(3) {
    width: 120px;
    text-align: center;
}

/* Date */
#transactionsTable th:nth-child(4),
#transactionsTable td:nth-child(4) {
    width: 80px;
    text-align: center;
}

/* Type */
#transactionsTable th:nth-child(5),
#transactionsTable td:nth-child(5) {
    width: 150px;
    text-align: right;
}

/* Amount */
#transactionsTable th:nth-child(6),
#transactionsTable td:nth-child(6) {
    width: auto;
}

/* Note */

/* Summary Table */
#summaryTable th:nth-child(1),
#summaryTable td:nth-child(1) {
    width: 25%;
}

/* Name */
#summaryTable th:nth-child(2),
#summaryTable td:nth-child(2) {
    width: 110px;
    text-align: center;
}

/* Start */
#summaryTable th:nth-child(3),
#summaryTable td:nth-child(3) {
    width: 110px;
    text-align: center;
}

/* End */
#summaryTable th:nth-child(4),
#summaryTable td:nth-child(4),
#summaryTable th:nth-child(5),
#summaryTable td:nth-child(5),
#summaryTable th:nth-child(6),
#summaryTable td:nth-child(6) {
    width: 15%;
    text-align: right;
}

/* Money columns */


.table tr:nth-child(even) {
    background-color: var(--bg-light);
}

.table tr:hover {
    background-color: #f3f4f6;
}

/* Form Styles */
input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
}

/* Floating Contact Buttons */
.floating-contact {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
    background-color: #fff;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    position: relative;
}

.contact-btn:hover {
    transform: scale(1.1);
}

.zalo-btn {
    background: #0068FF;
    /* Zalo Blue */
    padding: 0;
}

.zalo-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Assuming the uploaded image is a full icon */
    border-radius: 50%;
}

.phone-btn {
    background-color: #4CAF50;
    color: white;
    font-size: 26px;
    animation: phone-shake 3s infinite;
}

@keyframes phone-shake {
    0% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(10deg);
    }

    10% {
        transform: rotate(-10deg);
    }

    15% {
        transform: rotate(10deg);
    }

    20% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Pulse rings for phone */
.phone-btn::before,
.phone-btn::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid #4CAF50;
    left: 0;
    top: 0;
    opacity: 0;
    z-index: -1;
    animation: pulse-ring 2s infinite;
}

.phone-btn::after {
    animation-delay: 0.5s;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}