:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --bg-color: #ffffff;
    --section-bg: #f9fafb;
    --border-color: #e5e7eb;
    --white: #ffffff;
    --max-width: 1200px;
    --header-height: 70px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color);
    position: relative;
    display: block;
    padding: 5px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Dropdown Menu */
.nav-menu ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    min-width: 200px;
    padding: 10px 0;
    z-index: 1001;
}

.nav-menu ul li {
    width: 100%;
}

.nav-menu ul a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    font-size: 0.95rem;
    white-space: nowrap;
}

.nav-menu ul a:hover {
    background-color: var(--section-bg);
    color: var(--primary-color);
}

.nav-menu ul a::after {
    display: none;
}

/* Desktop Hover */
@media screen and (min-width: 769px) {
    .nav-menu li:hover > ul {
        display: block;
    }
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: calc(var(--header-height) + 80px) 0 80px;
    text-align: center;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--text-color);
    font-weight: 800;
}

.hero p {
    font-size: 1.25rem;
    color: var(--light-text);
    max-width: 700px;
    margin: 0 auto 40px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-bg {
    background-color: var(--section-bg);
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Project Grid */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.project-image {
    height: 200px;
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-image i {
    font-size: 4rem;
    color: #d1d5db;
}

.project-content {
    padding: 25px;
}

.project-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
}

.project-title a {
    color: var(--text-color);
}

.project-title a:hover {
    color: var(--primary-color);
}

.project-desc {
    color: var(--light-text);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.project-tags span {
    background-color: #eff6ff;
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Article List */
.article-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.article-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    display: flex;
    gap: 30px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.article-item:hover {
    box-shadow: var(--shadow-md);
}

.article-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    height: 80px;
    background-color: #eff6ff;
    border-radius: var(--radius);
    color: var(--primary-color);
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.9rem;
    text-transform: uppercase;
}

.article-content {
    flex: 1;
}

.article-content h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.article-content h3 a {
    color: var(--text-color);
}

.article-content h3 a:hover {
    color: var(--primary-color);
}

.article-content p {
    color: var(--light-text);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.read-more:hover {
    gap: 8px;
}

.article-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.category-tab {
    padding: 6px 16px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--light-text);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.category-tab:hover, .category-tab.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* Page Header */
.page-header {
    padding: calc(var(--header-height) + 60px) 0 60px;
    background-color: var(--section-bg);
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.breadcrumb {
    color: var(--light-text);
    font-size: 1rem;
}

/* Content Area */
.content-area {
    padding: 60px 0;
}

.article-detail {
    max-width: 800px;
    margin: 0 auto;
    min-height: 500px;
}

.article-meta {
    margin-bottom: 30px;
    color: var(--light-text);
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.article-body {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

.article-body h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--text-color);
}

.article-body p {
    margin-bottom: 20px;
}

.article-body img {
    margin: 30px 0;
    border-radius: var(--radius);
}

/* Pagination */
.pagebar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.pagebar a, .pagebar span {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-weight: 600;
    color: var(--text-color);
}

.pagebar span.now-page {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.pagebar a:hover {
    background-color: #f3f4f6;
    color: var(--text-color);
}


.btn-view-more {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-view-more:hover {
    background-color: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-view-more i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.btn-view-more:hover i {
    transform: translateX(4px);
}

/* Footer */
footer {
    background-color: #111827;
    color: #d1d5db;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 25px;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a:hover {
    color: var(--white);
}

.footer-col i {
    width: 20px;
    text-align: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    margin-right: 10px;
}

.social-links a:hover {
    background-color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Responsive */
@media screen and (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 0; /* Remove gap margin */
        width: 100%;
    }
    
    .nav-link {
        padding: 15px 0;
        width: 100%;
        display: block;
    }

    .nav-link::after {
        display: none;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .article-item {
        flex-direction: column;
    }

    .article-date {
        flex-direction: row;
        width: 100%;
        height: 50px;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    /* Mobile Submenu */
    .submenu-toggle {
        position: absolute;
        right: 20px;
        top: 0;
        height: 50px; /* Match nav-link height approx */
        width: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--text-color);
        z-index: 10;
    }
    
    .submenu-toggle.active {
        transform: rotate(180deg);
    }
    
    .nav-menu ul {
        position: static;
        box-shadow: none;
        padding: 0;
        background-color: #f9fafb;
        display: none;
    }
    
    .nav-menu ul a {
        padding: 12px 0;
        font-size: 0.9rem;
    }
}