:root {
    --primary: #ff6b00;
    --primary-dark: #e65100;
    --secondary: #2d3748;
    --light: #f7fafc;
    --dark: #1a202c;
    --dark-secondary: #2d3748;
    --text-light: #f7fafc;
    --text-dark: #2d3748;
    --card-light: #ffffff;
    --card-dark: #2d3748;
}

[data-theme="dark"] {
    --light: #1a202c;
    --secondary: #f7fafc;
    --text-light: #1a202c;
    --text-dark: #f7fafc;
    --card-light: #2d3748;
    --card-dark: #1a202c;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

body {
    background: var(--light);
    overflow-x: hidden;
    color: var(--text-dark);
}

.theme-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1001;
    background: var(--primary);
    border: none;
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--card-light);
    z-index: 1000;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

[data-theme="dark"] .navbar {
    background: var(--card-dark);
}

.logo {
    height: 40px;
    vertical-align: middle;
    margin-right: 10px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
    transition: max-height 0.3s ease-in-out;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}


.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    padding: 0;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    content: '';
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.toggle .hamburger {
    transform: rotate(45deg);
}

.toggle .hamburger::before {
    transform: rotate(90deg) translateX(0);
    opacity: 0;
}

.toggle .hamburger::after {
    transform: rotate(-45deg) translateY(-8px);
}

.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('image/cover.png') center/cover no-repeat;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 1;
    padding: 3rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    max-width: 800px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s forwards;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s 0.3s forwards;
    line-height: 1.6;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.introduction {
    padding: 8rem 2rem;
    background: var(--card-light);
    position: relative;
    overflow: hidden;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 4rem;
    align-items: center;
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.about-shape {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 20px;
    left: 20px;
    background: var(--primary);
    opacity: 0.1;
    border-radius: 20px;
    z-index: -1;
    transition: transform 0.3s ease;
}

.about-image:hover .about-shape {
    transform: translate(10px, 10px);
}

.about-content {
    flex: 1;
    padding-left: 2rem;
}

.about-content h2 {
    color: var(--primary);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.about-content h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--primary);
}

.about-text {
    margin-bottom: 2rem;
}

.about-text p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.about-values {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.value-item {
    background: var(--card-light);
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.value-item span {
    color: var(--primary);
    font-weight: 600;
}


.search-section {
    padding: 2rem;
    background: var(--light);
    text-align: center;
}

.search-bar {
    margin: 0 auto;
    max-width: 600px;
    width: 90%;
    display: flex;
    justify-content: center;
}

.search-bar input {
    width: 100%;
    padding: 15px 25px;
    border: 2px solid var(--primary);
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background: var(--card-light);
    color: var(--text-dark);
}

.search-bar input:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(255, 107, 0, 0.3);
}


.departments {
    padding: 5rem 2rem;
    background: var(--light);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 3rem;
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.department-card {
    background: var(--card-light);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    position: relative;
}

.department-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, transparent 400px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.department-card:hover::before {
    opacity: 0.1;
}

.department-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.department-image {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.department-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(0,0,0,0.2), transparent);
}

.department-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.department-card:hover .department-image img {
    transform: scale(1.1);
}

.department-content {
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.department-content h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    position: relative;
}

.department-content h3::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.department-card:hover .department-content h3::after {
    width: 100px;
}

.department-content p {
    color: var(--secondary);
    font-size: 1.1rem;
    line-height: 1.6;
    opacity: 0.9;
}


footer {
    background-color: #2d3748;
    color: #aaa;
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    text-align: center;
    max-width: 1200px;
    margin: auto;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-section h3 {
    color: #fff;
    margin-bottom: 1.5rem;
}

.footer-section a {
    color: #aaa;
    text-decoration: none;
    display: block;
    margin-bottom: 0.8rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
}


@media (max-width: 1024px) {
    .about-container {
        flex-direction: column;
        gap: 3rem;
    }
    
    .about-content {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--card-light);
        flex-direction: column;
        width: 200px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }

    .nav-links.nav-active {
        max-height: 500px; 
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid #ddd;
    }

    .nav-link:last-child {
        border-bottom: none;
    }


    .about-values {
        justify-content: center;
    }
    
    .value-item {
        flex: 0 0 100%;
        text-align: center;
    }


    .department-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 480px) {

    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }

    .introduction,
    .departments,
    .search-section {
        padding: 4rem 1rem;
    }


    .about-values {
        flex-direction: column;
        gap: 1rem;
    }
    
    .value-item {
        width: 100%;
    }


    .department-content h3 {
        font-size: 1.5rem;
    }


    .footer-content {
        flex-direction: column;
        gap: 2rem;
    }
}