/* --- CSS VARIABLES --- */
:root {
    --primary-color: #0c2340; /* Dark Navy */
    --secondary-color: #1a365d; /* Lighter Navy */
    --accent-color: #D4A017; /* Gold */
    --accent-hover: #b8860b; /* Darker Gold */
    --text-light: #f8f9fa;
    --text-muted: #adb5bd;
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --bg-card: rgba(30, 41, 59, 0.7);
    --border-color: rgba(212, 160, 23, 0.2);
    --transition: all 0.3s ease;
    --font-heading: 'Roboto', sans-serif;
    --font-body: 'Noto Sans', sans-serif;
}

/* --- RESET & BASIC SETUP --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-light);
    background-color: var(--bg-darker);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--primary-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    font-size: 0.875rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info-top a {
    color: var(--text-light);
    margin-right: 1.5rem;
    transition: var(--transition);
}

.contact-info-top a:hover,
.top-bar-right a:hover {
    color: var(--accent-color);
}

.contact-info-top i,
.top-bar-right i {
    color: var(--accent-color);
    margin-right: 0.3rem;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-bar-right a {
    color: var(--text-light);
    transition: var(--transition);
}

/* GTranslate widget override - Force bottom right float for launcher button only */
.gtranslate_wrapper,
.gt_float_switcher,
.gt_switcher_wrapper,
body > .gtranslate_wrapper {
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 999999 !important;
    margin: 0 !important;
}

/* Fix dropdown options popup styling and background */
.gt_float_switcher .gt-options,
.gt_switcher_wrapper .gt-options,
div[class*="gt_options"] {
    background-color: #1e293b !important;
    border: 1px solid rgba(212, 160, 23, 0.4) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8) !important;
    padding: 6px 0 !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

.gt_float_switcher .gt-options a,
.gt_switcher_wrapper .gt-options a,
div[class*="gt_options"] a {
    color: #f8f9fa !important;
    background-color: transparent !important;
    font-size: 14px !important;
    font-family: var(--font-body) !important;
    padding: 8px 14px !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
    transition: background 0.2s ease !important;
}

.gt_float_switcher .gt-options a:hover,
.gt_switcher_wrapper .gt-options a:hover,
div[class*="gt_options"] a:hover {
    background-color: #334155 !important;
    color: var(--accent-color) !important;
}


/* --- HEADER / NAVBAR --- */
.header {
    background-color: rgba(12, 35, 64, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.header.scrolled {
    padding: 0.5rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.header.scrolled .navbar {
    height: 60px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: calc(100% - 60px);
}

.logo-img {
    height: 48px;
    width: 48px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    transition: var(--transition);
    flex-shrink: 0;
}

.header.scrolled .logo-img {
    height: 38px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-left: 0;
    min-width: 0;
}

.logo-org {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    color: #ffffff;
    line-height: 1.1;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--accent-color);
    line-height: 1.15;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
    font-style: italic;
    letter-spacing: 0.2px;
    margin-top: 0.1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    position: relative;
    padding: 0.5rem 0;
    color: #fff;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--accent-color);
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--primary-color) 100%);
    overflow: hidden;
}

/* Animated gradient background simulating police theme */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212,160,23,0.1) 0%, transparent 60%);
    animation: pulse 15s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0IiBoZWlnaHQ9IjQiPgo8cmVjdCB3aWR0aD0iNCIgaGVpZ2h0PSI0IiBmaWxsPSIjZmZmIiBmaWxsLW9wYWNpdHk9IjAuMDUiLz4KPC9zdmc+') repeat;
    opacity: 0.3;
}

/* Watermark logo chìm trong hero */
.hero-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 480px;
    height: 480px;
    background: url('https://xuatnhapcanh.gov.vn/logos/LogoNew.png') center center / contain no-repeat;
    opacity: 0.06;
    pointer-events: none;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    letter-spacing: 1px;
}

.hero h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    font-style: italic;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-darker);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

.btn-outline {
    background-color: transparent;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.btn-outline:hover {
    background-color: var(--accent-color);
    color: var(--bg-darker);
}

/* --- SECTIONS --- */
.section {
    padding: 5rem 0;
}

.section-alt {
    background-color: var(--bg-dark);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.section-header-info {
    text-align: left;
    max-width: 750px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.section-divider {
    height: 3px;
    width: 80px;
    background-color: var(--accent-color);
    margin: 0 0 1.5rem 0;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--accent-color);
    border-radius: 50%;
}
.section-divider::before { left: -15px; }
.section-divider::after { right: -15px; }

.section-desc {
    color: var(--text-muted);
    max-width: 600px;
}

.btn-see-all {
    margin-bottom: 0.5rem;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .section-header-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .section-header-info {
        text-align: center !important;
        margin: 0 auto;
    }
    .section-divider {
        margin: 0 auto 1.5rem !important;
    }
    .section-desc {
        margin: 0 auto;
    }
}

/* --- CARDS GRID --- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Glassmorphism Card */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 160, 23, 0.1);
}

.card-img-wrap {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

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

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent-color);
    color: var(--bg-darker);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-heading);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--accent-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    line-height: 1.4;
    color: #fff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.card:hover .card-title {
    color: var(--accent-color);
}

.card-summary {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-action {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-read-more i {
    transition: transform 0.3s ease;
}

.btn-read-more:hover {
    color: #fff;
}

.btn-read-more:hover i {
    transform: translateX(5px);
}

/* --- FOOTER --- */
.footer {
    background-color: var(--primary-color);
    padding: 4rem 0 0;
    border-top: 2px solid var(--accent-color);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 70px;
}

.footer-logo h3 {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.1rem;
    line-height: 1.2;
}

.footer-logo p {
    font-size: 0.9rem;
    color: #fff;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-heading {
    font-family: var(--font-heading);
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: var(--accent-color);
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.contact-list i {
    color: var(--accent-color);
    margin-top: 0.3rem;
}

.map-container {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.map-link {
    color: var(--accent-color);
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.map-link:hover {
    text-decoration: underline;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* --- BACK TO TOP --- */
.back-to-top {
    position: fixed;
    bottom: 25px;
    right: 90px;
    width: 45px;
    height: 45px;
    background-color: var(--accent-color);
    color: var(--bg-darker);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #fff;
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .hero h1 { font-size: 2rem; }
    .hero h2 { font-size: 1.5rem; }
}

@media (max-width: 768px) {
    .header { padding: 0.3rem 0; }
    .header.scrolled { padding: 0.2rem 0; }
    .navbar { height: 56px; }
    .header.scrolled .navbar { height: 50px; }
    
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        flex-direction: column;
        gap: 0;
        padding: 0.8rem 0;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease-in-out;
        box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        border-bottom: 1px solid var(--accent-color);
    }
    
    .nav-links a {
        padding: 0.8rem 1.2rem;
        display: block;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .nav-links a::after { display: none; }
    
    .logo-area { gap: 0.5rem; }
    .logo-img { height: 36px; }
    .header.scrolled .logo-img { height: 32px; }
    .logo-text { border-left-width: 1.5px; padding-left: 0.5rem; margin-left: 0.1rem; }
    .logo-org { font-size: 0.7rem; }
    .logo-title { font-size: 0.78rem; }
    .logo-subtitle { display: none; }
    
    .hero { min-height: 380px; height: 55vh; }
    .hero h1 { font-size: 1.5rem; }
    .hero h2 { font-size: 1.05rem; }
    .hero p { font-size: 0.85rem; }
    .hero-buttons { flex-direction: column; padding: 0 1.5rem; gap: 0.8rem; }
    
    .section-title { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .navbar { height: 52px; }
    .logo-img { height: 32px; }
    .logo-org { font-size: 0.65rem; }
    .logo-title { font-size: 0.72rem; }
    .grid-cards { grid-template-columns: 1fr; }
}

