@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Lao:wght@300;400;500;600;700&family=Phetsarath:wght@400;700&display=swap');

:root {
    --primary-blue: #0d3b66;
    --primary-dark: #072340;
    --accent-gold: #c99700;
    --accent-gold-light: #f4d06f;
    --accent-gold-dark: #9e7600;
    --navy-light: #1f4e79;
    --bg-light: #f8fafc;
}

body {
    font-family: 'Noto Sans Lao', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #f1f5f9;
    color: #1e293b;
    line-height: 1.7;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Noto Sans Lao', 'Phetsarath', sans-serif;
    font-weight: 700;
}

/* National Motto Header Style */
.motto-banner {
    background: linear-gradient(135deg, #091e3a 0%, #0d3b66 100%);
}

/* NUOL Style Header Gradient */
.nuol-header {
    background: linear-gradient(to right, #09203f, #1e3c72);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hero Carousel */
.slide-item {
    display: none;
    transition: opacity 0.6s ease-in-out;
}
.slide-item.active {
    display: block;
    opacity: 1;
}

/* Marquee / News Ticker */
.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
}
.ticker-move {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 35s linear infinite;
}
.ticker-move:hover {
    animation-play-state: paused;
}
@keyframes ticker {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

/* Submenu dropdown animations */
.nav-item:hover .dropdown-menu {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badge styles */
.badge-urgent {
    background: #ef4444;
    color: #ffffff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 9999px;
    font-weight: 600;
}

/* Card hover lift */
.hover-card {
    transition: all 0.25s ease;
}
.hover-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(13, 59, 102, 0.15);
}

/* Custom table styling */
.doc-table th {
    background-color: #0d3b66;
    color: white;
    padding: 12px 16px;
    font-weight: 600;
    text-align: left;
}
.doc-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.doc-table tr:hover td {
    background-color: #f8fafc;
}

/* Quick access widget icon background */
.icon-box {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(13, 59, 102, 0.08);
    color: #0d3b66;
    transition: all 0.2s;
}
.hover-card:hover .icon-box {
    background: #0d3b66;
    color: #ffffff;
}

/* ============================================================
   Visual On-Page Live Editor (ໂໝດແກ້ໄຂໜ້າເວັບຈິງ)
   ============================================================ */
.visual-edit-bar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: #07192f;
    border-bottom: 3px solid #f59e0b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.visual-editable {
    position: relative;
    transition: all 0.2s ease;
}

body.visual-edit-mode .visual-editable:hover {
    outline: 2px dashed #f59e0b;
    outline-offset: 4px;
}

.visual-edit-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 30;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 11px;
    font-weight: 700;
    color: #020617;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border: 1px solid #fde68a;
    border-radius: 9999px;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4), 0 2px 4px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.visual-edit-btn:hover {
    transform: scale(1.06);
    background: linear-gradient(135deg, #fef08a 0%, #fbbf24 100%);
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

.visual-edit-btn-sm {
    padding: 4px 10px;
    font-size: 10px;
    top: 8px;
    right: 8px;
}

body:not(.visual-edit-mode) .visual-edit-btn,
body:not(.visual-edit-mode) .visual-edit-btn-sm,
body:not(.visual-edit-mode) .section-drag-toolbar {
    display: none !important;
}

/* Section Drag & Drop Toolbar */
.section-drag-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #091e3a, #0d3b66);
    color: white;
    padding: 6px 14px;
    border-radius: 12px 12px 0 0;
    margin-bottom: 2px;
    border: 1px solid #3b82f6;
    border-bottom: none;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    font-size: 11px;
    font-weight: 600;
    user-select: none;
}

.drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    padding: 3px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}
.drag-handle:active {
    cursor: grabbing;
}
.drag-handle:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.homepage-section.dragging {
    opacity: 0.45;
    transform: scale(0.98);
}

.homepage-section.drag-over {
    border: 3px dashed #f59e0b !important;
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.05);
}

/* Drag and Drop File Upload Dropzone */
.image-dropzone {
    border: 2px dashed #93c5fd;
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.image-dropzone:hover, .image-dropzone.dragover {
    border-color: #2563eb;
    background: #eff6ff;
}

/* Section Insert Divider */
.section-insert-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 8px 0;
    padding: 6px;
    cursor: pointer;
    border: 2px dashed #94a3b8;
    border-radius: 12px;
    background: rgba(241, 245, 249, 0.6);
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    transition: all 0.2s ease;
}
.section-insert-divider:hover {
    border-color: #f59e0b;
    background: #fffbeb;
    color: #b45309;
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.homepage-section.section-hidden-preview {
    opacity: 0.55;
    position: relative;
    outline: 2px dashed #ef4444 !important;
    outline-offset: 4px;
}

body:not(.visual-edit-mode) .section-insert-divider {
    display: none !important;
}
body:not(.visual-edit-mode) .section-hidden-preview {
    display: none !important;
}

/* Custom Section Styles */
.rotate-180 {
    transform: rotate(180deg);
}
.custom-faq-item button {
    cursor: pointer;
}
