/*
Theme Name: CuocSong
Description: Theme tùy chỉnh theo yêu cầu
Author: Bạn
Version: 1.0
*/

        /* --- 1. CẤU HÌNH CHUNG (VARIABLES) --- */
        :root {
            --primary-color: #2c3e50; /* Màu xanh đen sang trọng */
            --accent-color: #d35400;  /* Màu cam đất điểm nhấn */
            --text-color: #333;
            --light-bg: #f9f9f9;
            --white: #ffffff;
            --transition: all 0.4s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
        
         html {
            margin-top: 0px !important;
        }

        body {
            font-family: 'Open Sans', sans-serif;
            color: var(--text-color);
            line-height: 1.6;
            overflow-x: hidden;
        }

        h1, h2, h3, h4 {
            font-family: 'Montserrat', sans-serif;
            font-weight: 700;
        }

        a { text-decoration: none; color: inherit; transition: var(--transition); }
        ul { list-style: none; }
        img { max-width: 100%; display: block; height:auto; }

        /* --- 2. HEADER & MENU (STICKY) --- */
        header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            padding: 20px 50px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            z-index: 1000;
            transition: var(--transition);
            background: rgba(0, 0, 0, 0.2); /* Trong suốt lúc đầu */
        }

        /* Class này sẽ được thêm bằng JS khi cuộn xuống */
        header.sticky {
            background: var(--white);
            padding: 15px 50px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        }

        header.sticky .logo { color: var(--primary-color); }
        header.sticky nav ul li a { color: var(--primary-color); }
        header.sticky .mobile-menu-btn { color: var(--primary-color); }

        .logo {
            font-size: 28px;
            font-weight: 700;
            color: var(--white);
            letter-spacing: 2px;
            text-transform: uppercase;
        }
        .logo span { color: var(--accent-color); }

        nav ul { display: inline-flex; gap: 30px; }
        nav ul li a {
            color: var(--white);
            font-weight: 600;
            font-size: 14px;
            text-transform: uppercase;
            position: relative;
        }

        nav ul li a::after {
            content: '';
            position: absolute;
            width: 0;
            height: 2px;
            background: var(--accent-color);
            bottom: -5px;
            left: 0;
            transition: 0.3s;
        }
        nav ul li a:hover::after { width: 100%; }

        .mobile-menu-btn {
            display: none;
            color: var(--white);
            font-size: 24px;
            cursor: pointer;
        }

        /* --- 3. HERO SLIDER --- */
        .hero {
            position: relative;
            width: 100%;
            height: 100vh;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: var(--white);
        }

        .slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: cover;
            background-position: center;
            opacity: 0;
            transition: opacity 1.5s ease-in-out;
            z-index: -1;
        }

        .slide.active { opacity: 1; transform: scale(1.05); transition: opacity 1.5s ease-in-out, transform 6s linear; }

        /* Lớp phủ đen mờ để chữ dễ đọc */
        .overlay {
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 1;
        }

        .hero-content {
            position: relative;
            z-index: 2;
            max-width: 800px;
            padding: 0 20px;
        }

        .hero-content h2 {
            font-size: 18px;
            letter-spacing: 5px;
            text-transform: uppercase;
            margin-bottom: 20px;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeUp 1s forwards 0.5s;
        }

        .hero-content h1 {
            font-size: 60px;
            line-height: 1.1;
            margin-bottom: 30px;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeUp 1s forwards 0.8s;
        }

        .btn-hero {
            display: inline-block;
            padding: 15px 40px;
            background: var(--accent-color);
            color: var(--white);
            font-weight: 700;
            border-radius: 5px;
            opacity: 0;
            transform: translateY(30px);
            animation: fadeUp 1s forwards 1.1s;
        }
        .btn-hero:hover { background: #e67e22; }

        @keyframes fadeUp {
            to { opacity: 1; transform: translateY(0); }
        }

        /* --- 4. SECTIONS CHUNG (Animation Scroll) --- */
        section { padding: 80px 20px; }
        
        .container {
            max-width: 1200px;
            margin: 0 auto;
        }

        .section-title {
            text-align: center;
            margin-bottom: 60px;
        }
        .section-title h2 { font-size: 36px; color: var(--primary-color); margin-bottom: 10px; }
        .section-title p { color: #777; max-width: 600px; margin: 0 auto; }
        .section-title span { display: block; width: 60px; height: 4px; background: var(--accent-color); margin: 15px auto 0; }

        /* Class để JS kích hoạt animation khi cuộn tới */
        .reveal {
            opacity: 0;
            transform: translateY(50px);
            transition: all 1s ease;
        }
        .reveal.active {
            opacity: 1;
            transform: translateY(0);
        }

        /* --- 5. ABOUT SECTION --- */
        .about-content {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 50px;
            align-items: center;
        }

        .about-text h3 { font-size: 28px; margin-bottom: 20px; color: var(--primary-color); }
        .about-text p { margin-bottom: 20px; color: #555; }
        
        .about-img {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 15px 30px rgba(0,0,0,0.2);
        }
        .about-img img { width: 100%; transition: 0.5s; }
        .about-img:hover img { transform: scale(1.1); }

        /* --- 6. PROJECTS SECTION --- */
        .projects { background-color: var(--light-bg); }
        
        .project-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .project-card {
            position: relative;
            overflow: hidden;
            border-radius: 8px;
            cursor: pointer;
            height: 300px; /* Chiều cao cố định */
        }

        .project-card img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.6s ease;
        }

        .project-info {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            padding: 20px;
            background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
            color: white;
            transform: translateY(100px); /* Ẩn xuống dưới */
            transition: 0.4s;
            opacity: 0;
        }

        .project-card:hover img { transform: scale(1.1); }
        .project-card:hover .project-info { transform: translateY(0); opacity: 1; }

        /* --- 7. CONTACT SECTION --- */
        .contact-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 30px;
            text-align: center;
        }

        .contact-item {
            padding: 30px;
            background: white;
            border-radius: 10px;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            transition: 0.3s;
        }
        .contact-item:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }

        .contact-item i { font-size: 40px; color: var(--accent-color); margin-bottom: 20px; }
        .contact-item h4 { margin-bottom: 10px; }

        /* --- 8. FOOTER --- */
        footer {
            background: #1a252f;
            color: #bdc3c7;
            padding: 50px 20px 20px;
            text-align: center;
        }

        .footer-logo { font-size: 24px; color: white; font-weight: bold; margin-bottom: 20px; display: inline-block; }
        .social-links { margin-bottom: 30px; }
        .social-links a {
            display: inline-flex;
            width: 40px; height: 40px;
            background: rgba(255,255,255,0.1);
            color: white;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            margin: 0 5px;
            font-size: 18px;
        }
        .social-links a:hover { background: var(--accent-color); }
        .copyright { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 14px; }

        /* --- RESPONSIVE (Mobile & Tablet) --- */
        @media (max-width: 768px) {
            header { padding: 15px 20px; background: var(--white); /* Mobile luôn hiện nền trắng */ }
            header.sticky { padding: 15px 20px; }
            .logo { color: var(--primary-color); font-size: 22px; }
            
            .mobile-menu-btn { display: block; color: var(--primary-color); }

            nav {
                position: absolute;
                top: 100%; left: 0; width: 100%;
                background: var(--white);
                border-top: 1px solid #eee;
                max-height: 0;
                overflow: hidden;
                transition: 0.4s ease;
                box-shadow: 0 5px 10px rgba(0,0,0,0.1);
            }
            nav.active { max-height: 300px; }
            nav ul { flex-direction: column; padding: 20px; gap: 15px; }
            nav ul li a { color: var(--primary-color); display: block; }

            .hero h1 { font-size: 32px; }
            .hero-content h2 { font-size: 14px; }
            .about-content { grid-template-columns: 1fr; }
            .about-img { order: -1; margin-bottom: 20px; } /* Ảnh lên trên chữ */
        }
        
        /* --- PHẦN RIÊNG CỦA TRANG PROJECTS --- */
        
        /* Page Header */
        .page-header {
            margin-top: 80px; /* Tránh header che mất */
            background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?q=80&w=1920&auto=format&fit=crop');
            background-size: cover;
            background-position: center;
            padding: 80px 20px;
            text-align: center;
            color: white;
        }
        .page-header h1 { font-size: 40px; margin-bottom: 15px; }
        .page-header p { font-size: 18px; opacity: 0.9; }

        /* Filters */
        .gallery-section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }
        
        .filters {
            display: flex; justify-content: center; gap: 15px; flex-wrap: wrap;
            margin-bottom: 40px;
        }

        .filter-btn {
            padding: 10px 25px;
            border: 2px solid var(--primary-color);
            background: transparent;
            color: var(--primary-color);
            font-weight: 600;
            border-radius: 30px;
            cursor: pointer;
            transition: 0.3s;
            font-family: 'Open Sans', sans-serif;
        }

        .filter-btn:hover, .filter-btn.active {
            background: var(--primary-color);
            color: white;
        }

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

        .gallery-item {
            position: relative;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
            cursor: pointer;
            height: 300px; /* Chiều cao cố định */
            animation: fadeIn 0.5s ease;
        }

        .gallery-item img {
            width: 100%; height: 100%; object-fit: cover;
            transition: transform 0.5s ease;
        }

        .gallery-item:hover img { transform: scale(1.1); }

        .gallery-overlay {
            position: absolute; inset: 0;
            background: rgba(0, 0, 0, 0.6);
            display: flex; flex-direction: column; justify-content: center; align-items: center;
            opacity: 0; transition: 0.3s;
            color: white; text-align: center; padding: 20px;
        }

        .gallery-item:hover .gallery-overlay { opacity: 1; }

        .gallery-overlay h3 { font-size: 22px; margin-bottom: 10px; transform: translateY(20px); transition: 0.4s; }
        .gallery-overlay p { font-size: 14px; color: #ddd; transform: translateY(20px); transition: 0.4s 0.1s; }
        .gallery-item:hover h3, .gallery-item:hover p { transform: translateY(0); }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Lightbox (Xem ảnh phóng to) */
        .lightbox {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.9);
            z-index: 2000;
            display: none;
            justify-content: center; align-items: center;
            padding: 20px;
        }
        .lightbox.active { display: flex; animation: fadeIn 0.3s; }
        .lightbox img { max-width: 90%; max-height: 90vh; border-radius: 5px; box-shadow: 0 0 20px rgba(255,255,255,0.1); }
        .close-lightbox {
            position: absolute; top: 30px; right: 40px;
            color: white; font-size: 40px; cursor: pointer;
        }

        /* Footer Copy */
        footer { background: #1a252f; color: #bdc3c7; padding: 50px 20px 20px; text-align: center; }
        .footer-logo { font-size: 24px; color: white; font-weight: bold; margin-bottom: 20px; display: inline-block; }
        .social-links a { display: inline-flex; width: 40px; height: 40px; background: rgba(255,255,255,0.1); color: white; align-items: center; justify-content: center; border-radius: 50%; margin: 0 5px; }
        .social-links a:hover { background: var(--accent-color); }
        .copyright { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 30px; font-size: 14px; }

        /* Responsive */
        @media (max-width: 768px) {
            header { padding: 15px 20px; }
            .mobile-menu-btn { display: block; }
            nav { position: absolute; top: 100%; left: 0; width: 100%; background: white; max-height: 0; overflow: hidden; transition: 0.4s; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
            nav.active { max-height: 300px; }
            nav ul { flex-direction: column; padding: 20px; }
            .gallery-grid { grid-template-columns: 1fr; }
        }
        
         /* --- PROJECT DETAIL SPECIFIC --- */

        /* 1. Project Hero */
        .project-hero {
            margin-top: 80px;
            height: 80vh;
            position: relative;
            background-image: url('https://images.unsplash.com/photo-1600596542815-e328d4de4bf7?q=80&w=1920&auto=format&fit=crop');
            background-size: cover;
            background-position: center;
            background-attachment: fixed; /* Hiệu ứng Parallax */
        }
        
        .hero-overlay {
            position: absolute; inset: 0;
            background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
            display: flex; align-items: flex-end;
            padding: 0 50px 80px;
        }

        .project-title { color: white; animation: fadeUp 1s ease; }
        .project-title span { color: var(--accent-color); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 14px; display: block; margin-bottom: 10px; }
        .project-title h1 { font-size: 50px; line-height: 1.2; max-width: 800px; }

        /* 2. Project Info Bar */
        .project-info-bar {
            background: var(--primary-color);
            color: white;
            padding: 40px 50px;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 20px;
        }
        
        .info-item h4 { font-size: 14px; opacity: 0.7; margin-bottom: 5px; font-weight: 400; text-transform: uppercase; }
        .info-item p { font-size: 18px; font-weight: 600; }

        /* 3. Project Story (Content) */
        .project-content {
            padding: 80px 50px;
            max-width: 1200px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 3fr 2fr;
            gap: 60px;
            align-items: start;
        }

        .story-text h2 { font-size: 32px; color: var(--primary-color); margin-bottom: 30px; position: relative; }
        .story-text h2::after { content: ''; display: block; width: 60px; height: 4px; background: var(--accent-color); margin-top: 15px; }
        .story-text p { margin-bottom: 20px; color: #555; text-align: justify; }
        
        .story-highlight {
            background: var(--light-bg);
            padding: 30px;
            border-left: 4px solid var(--accent-color);
            font-style: italic;
            color: #444;
            margin: 30px 0;
        }

        .story-images { display: grid; gap: 30px; }
        .story-images img { border-radius: 5px; transition: transform 0.5s; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
        .story-images img:hover { transform: scale(1.02); }

        /* 4. Full Width Gallery */
        .project-gallery { padding: 0 50px 80px; max-width: 1400px; margin: 0 auto; }
        .gallery-header { margin-bottom: 40px; text-align: center; }
        .gallery-header h3 { font-size: 28px; color: var(--primary-color); }

        .gallery-masonry {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
        }
        
        /* Grid Layout phức tạp hơn cho đẹp */
        .gallery-img { height: 300px; object-fit: cover; width: 100%; border-radius: 5px; cursor: pointer; transition: 0.3s; }
        .gallery-img:hover { filter: brightness(0.8); transform: scale(1.02); }
        
        .gallery-img:nth-child(1) { grid-column: span 2; height: 400px; }
        .gallery-img:nth-child(2) { height: 400px; }

        /* --- LIGHTBOX (MỚI) --- */
        .lightbox {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: rgba(0, 0, 0, 0.95);
            z-index: 2000;
            display: none; /* Ẩn mặc định */
            justify-content: center;
            align-items: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .lightbox.active {
            display: flex;
            opacity: 1;
        }

        .lightbox-content {
            position: relative;
            max-width: 90%;
            max-height: 90%;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .lightbox-content img {
            max-width: 100%;
            max-height: 85vh; /* Để chừa chỗ cho caption hoặc nút */
            border-radius: 4px;
            box-shadow: 0 0 20px rgba(255,255,255,0.1);
            object-fit: contain;
        }

        /* Nút đóng */
        .close-btn {
            position: absolute;
            top: 20px;
            right: 30px;
            color: #fff;
            font-size: 40px;
            cursor: pointer;
            z-index: 2001;
            transition: 0.3s;
        }
        .close-btn:hover { color: var(--accent-color); }

        /* Nút điều hướng (Next/Prev) */
        .nav-arrow {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(255, 255, 255, 0.1);
            color: white;
            border: none;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            font-size: 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.3s;
            z-index: 2002;
        }

        .nav-arrow:hover { background: var(--accent-color); }
        .prev-arrow { left: 20px; }
        .next-arrow { right: 20px; }

        /* 5. Navigation Footer */
        .project-nav {
            border-top: 1px solid #eee;
            padding: 60px 50px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .nav-btn { display: flex; align-items: center; gap: 15px; color: #888; transition: 0.3s; cursor: pointer; }
        .nav-btn:hover { color: var(--accent-color); }
        .nav-btn h5 { font-size: 14px; margin-bottom: 5px; }
        .nav-btn span { font-size: 18px; font-weight: 700; color: var(--primary-color); }
        .nav-btn:hover span { color: var(--accent-color); }

        /* Footer Copy */
        footer { background: #1a252f; color: #bdc3c7; padding: 50px 20px 20px; text-align: center; }
        .footer-logo { font-size: 24px; color: white; font-weight: bold; margin-bottom: 20px; display: inline-block; }
        .social-links a { display: inline-flex; width: 40px; height: 40px; background: rgba(255,255,255,0.1); color: white; align-items: center; justify-content: center; border-radius: 50%; margin: 0 5px; }
        .social-links a:hover { background: var(--accent-color); }
        .copyright { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 30px; font-size: 14px; }

        @keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

        /* Responsive */
        @media (max-width: 768px) {
            header { padding: 15px 20px; }
            .mobile-menu-btn { display: block; }
            nav { position: absolute; top: 100%; left: 0; width: 100%; background: white; max-height: 0; overflow: hidden; transition: 0.4s; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
            nav.active { max-height: 300px; }
            nav ul { flex-direction: column; padding: 20px; }
            
            .project-title h1 { font-size: 32px; }
            .project-info-bar { grid-template-columns: 1fr 1fr; gap: 30px; }
            .project-content { grid-template-columns: 1fr; gap: 40px; }
            .gallery-masonry { grid-template-columns: 1fr; }
            .gallery-img:nth-child(1) { grid-column: span 1; height: 300px; }
            .gallery-img:nth-child(2) { height: 300px; }

            /* Mobile Lightbox adjustment */
            .nav-arrow { width: 40px; height: 40px; font-size: 16px; background: rgba(0,0,0,0.5); }
            .prev-arrow { left: 10px; }
            .next-arrow { right: 10px; }
        }
    
    
     /* --- PHẦN RIÊNG CỦA TRANG ARTICLE --- */

        /* 1. Page Title Header (Gọn hơn trang dự án) */
        .article-header {
            margin-top: 80px;
            background: var(--light-bg);
            padding: 60px 20px;
            text-align: center;
            border-bottom: 1px solid #eee;
        }
        .article-header h1 { font-size: 36px; margin-bottom: 10px; }
        .breadcrumb { font-size: 14px; color: #666; }
        .breadcrumb a { color: var(--accent-color); }

        /* 2. Main Content Container */
        .content-container {
            max-width: 800px; /* Giới hạn chiều rộng để dễ đọc */
            margin: 0 auto;
            padding: 60px 20px;
            background: white;
        }

        /* Typography cho bài viết */
        .article-body p { margin-bottom: 20px; text-align: justify; font-size: 16px; color: #444; }
        
        .article-body h2 { 
            font-size: 24px; 
            margin-top: 40px; 
            padding-bottom: 10px;
            border-bottom: 2px solid var(--light-bg);
        }

        .article-body h3 { font-size: 20px; margin-top: 30px; }

        .article-body ul, .article-body ol { margin-bottom: 20px; padding-left: 20px; }
        .article-body li { margin-bottom: 10px; }
        .article-body li::marker { color: var(--accent-color); font-weight: bold; }

        /* Blockquote (Trích dẫn) */
        blockquote {
            background: var(--light-bg);
            border-left: 5px solid var(--accent-color);
            padding: 20px;
            margin: 30px 0;
            font-style: italic;
            color: #555;
        }

        /* Image trong bài viết */
        .article-body figure { margin: 40px 0; }
        .article-body figcaption { text-align: center; font-size: 13px; color: #888; margin-top: 10px; font-style: italic; }

        /* Footer Copy */
        footer { background: #1a252f; color: #bdc3c7; padding: 50px 20px 20px; text-align: center; }
        .footer-logo { font-size: 24px; color: white; font-weight: bold; margin-bottom: 20px; display: inline-block; }
        .social-links a { display: inline-flex; width: 40px; height: 40px; background: rgba(255,255,255,0.1); color: white; align-items: center; justify-content: center; border-radius: 50%; margin: 0 5px; }
        .social-links a:hover { background: var(--accent-color); }
        .copyright { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; margin-top: 30px; font-size: 14px; }

        @media (max-width: 768px) {
            header { padding: 15px 20px; }
            .mobile-menu-btn { display: block; }
            nav { position: absolute; top: 100%; left: 0; width: 100%; background: white; max-height: 0; overflow: hidden; transition: 0.4s; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
            nav.active { max-height: 300px; }
            nav ul { flex-direction: column; padding: 20px; }
            .article-header h1 { font-size: 28px; }
        }