/* Bootstrap 5.3 - Minimal inline for this project */
/* Full Bootstrap must be downloaded separately */
/* This file contains custom resort styles */

:root {
    --bs-primary: #2E7D32;
    --bs-primary-rgb: 46, 125, 50;
    --primary: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --primary-xlight: #E8F5E9;
    --secondary: #8BC34A;
    --accent: #FF8F00;
    --accent-light: #FFF8E1;
    --neutral-bg: #F9FBF9;
    --sidebar-width: 240px;
    --text-dark: #1a2e1a;
    --text-muted: #6c757d;
    --card-shadow: 0 2px 12px rgba(46,125,50,0.10);
    --transition: all 0.25s ease;
}

/* ===== GLOBAL ===== */
* { box-sizing: border-box; }
body {
    font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
    background: var(--neutral-bg);
    color: var(--text-dark);
    font-size: 15px;
    line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ===== TOPBAR ===== */
#topbar {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    font-size: 0.82rem;
    padding: 6px 0;
}
#topbar a { color: rgba(255,255,255,0.75); }
#topbar a:hover { color: #fff; }

/* ===== HEADER ===== */
#main-header {
    background: #fff;
    border-bottom: 3px solid var(--primary-light);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    position: sticky;
    top: 0;
    z-index: 1000;
}
/* ===== LOGO AREA ===== */
.logo-area {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 14px;
    padding: 8px 16px 8px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.92);
    border: 1px solid rgba(200,230,201,0.6);
    text-decoration: none !important;
    transition: box-shadow .2s, border-color .2s;
    white-space: nowrap;
}
.logo-area:hover {
    box-shadow: 0 4px 16px rgba(27,94,32,0.12);
    border-color: rgba(165,214,167,0.9);
}
.logo-icon-box {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(145deg, var(--primary-dark) 0%, #43A047 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.logo-icon-box::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    border-radius: 14px;
}
.logo-icon-box i {
    font-size: 1.6rem;
    color: #fff;
    position: relative;
    z-index: 1;
}
.logo-divider {
    width: 1px;
    height: 36px;
    background: linear-gradient(to bottom, transparent, #c8e6c9, transparent);
    flex-shrink: 0;
}
.site-logo-text {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.25;
    letter-spacing: -0.3px;
}
.site-logo-text .part2 { color: var(--accent); }
.site-logo-sub {
    font-size: 0.63rem;
    color: var(--text-muted);
    letter-spacing: 1.8px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ===== NAVBAR ===== */
.main-navbar {
    background: var(--primary) !important;
}
.main-navbar .navbar-brand { display: none; }
.main-navbar .nav-link.active {
    color: var(--accent) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--accent);
}
.main-navbar .nav-link {
    color: rgba(255,255,255,0.88) !important;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 10px 10px !important;
    border-radius: 4px;
    white-space: nowrap;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    background: var(--primary-dark);
    color: #fff !important;
}
.main-navbar .nav-link i { font-size: 0.95rem; }
.main-navbar .dropdown-menu {
    background: var(--primary-dark);
    border: none;
    border-radius: 4px;
    margin-top: 0;
    min-width: 180px;
}
.main-navbar .dropdown-item {
    color: rgba(255,255,255,0.85);
    font-size: 0.83rem;
    padding: 8px 16px;
}
.main-navbar .dropdown-item:hover {
    background: var(--primary-light);
    color: #fff;
}

/* ===== SLIDER ===== */
#hero-slider { position: relative; overflow: hidden; }
#hero-slider .carousel-item {
    height: 420px;
    background: var(--primary-dark);
    /* carousel-fade ต้องการ position:relative บน active item */
    position: relative;
}
#hero-slider .carousel-item.active,
#hero-slider .carousel-item-next,
#hero-slider .carousel-item-prev {
    display: block;
}
#hero-slider .slide-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
}
#hero-slider .slide-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-light) 50%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}
.slide-overlay .slide-title {
    color: #fff;
    font-size: 2.2rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    margin-bottom: 10px;
}
.slide-overlay .slide-sub {
    color: rgba(255,255,255,0.88);
    font-size: 1.05rem;
    margin-bottom: 20px;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.carousel-control-prev, .carousel-control-next {
    width: 5%;
}
.carousel-indicators button {
    background: rgba(255,255,255,0.7);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
}
.carousel-indicators button.active { background: #fff; }

/* ===== HIGHLIGHTS ===== */
#highlights-bar {
    background: var(--primary-xlight);
    border-bottom: 2px solid var(--primary-light);
    padding: 10px 0;
    font-size: 0.88rem;
}
.highlight-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-right: 1px solid rgba(46,125,50,0.2);
}
.highlight-item:last-child { border-right: none; }
.highlight-item i { color: var(--primary); font-size: 1.1rem; }

/* ===== LAYOUT ===== */
#content-wrapper { display: flex; gap: 0; min-height: 60vh; overflow: hidden; }

/* ===== LEFT SIDEBAR ===== */
#left-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: #fff;
    border-right: 1px solid #e8f5e9;
    padding: 16px 0;
}
.sidebar-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 8px 16px 4px;
    margin-top: 8px;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: var(--text-dark);
    font-size: 0.88rem;
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--primary-xlight);
    color: var(--primary-dark);
    border-left-color: var(--primary);
}
.sidebar-menu a i { width: 18px; color: var(--primary); font-size: 1rem; }
.sidebar-menu .sub-menu { padding-left: 12px; }
.sidebar-menu .sub-menu a { font-size: 0.82rem; padding: 6px 16px; }

/* ===== MAIN CONTENT ===== */
#main-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
}

/* ===== RIGHT SIDEBAR ===== */
#right-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: #fff;
    border-left: 1px solid #e8f5e9;
    padding: 16px;
    overflow: hidden;
    overflow-y: auto;
}
.widget-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 6px;
    margin-bottom: 10px;
}
.widget-link-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 0;
    color: var(--text-dark);
    font-size: 0.83rem;
    border-bottom: 1px solid #f0f0f0;
}
.widget-link-item:hover { color: var(--primary); }
.widget-link-item i { color: var(--primary); }

/* ===== CARDS ===== */
.resort-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    position: relative;
    isolation: isolate;
}
.resort-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46,125,50,0.18);
}
.resort-card .card-img-top {
    height: 180px;
    object-fit: cover;
    width: 100%;
}
.resort-card .card-img-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    color: rgba(255,255,255,0.5);
    font-size: 3rem;
}
.resort-card .card-body { padding: 14px; }
.resort-card .card-title { font-size: 0.95rem; font-weight: 600; margin-bottom: 6px; }
.resort-card .card-text { font-size: 0.83rem; color: var(--text-muted); }
.resort-card .price-tag {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
}
.resort-card .price-tag .original {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* ===== PRICE TAG (global) ===== */
.price-tag {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    white-space: nowrap;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-xlight);
}
.section-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}
.section-header h2 i { color: var(--primary-light); margin-right: 8px; }

/* ===== BUTTONS ===== */
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-outline-primary { color: var(--primary); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: #fff; }
.btn-success { background: var(--primary-light); border-color: var(--primary-light); }
.btn-sm-icon { padding: 4px 10px; font-size: 0.8rem; }

/* ===== BADGES ===== */
.badge-green { background: var(--primary); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; }
.badge-accent { background: var(--accent); color: #fff; padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; }
.badge-free { background: #43A047; color: #fff; padding: 3px 8px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; }

/* ===== STATS CARDS ===== */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--primary-light);
}
.stat-card .stat-icon { font-size: 2rem; color: var(--primary); margin-bottom: 8px; }
.stat-card .stat-number { font-size: 1.8rem; font-weight: 700; color: var(--primary-dark); }
.stat-card .stat-label { font-size: 0.82rem; color: var(--text-muted); }

/* ===== ROOM FILTER ===== */
.branch-tabs .nav-link {
    color: var(--primary);
    border-color: var(--primary-light);
    font-size: 0.85rem;
}
.branch-tabs .nav-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ===== TABLE ===== */
.table thead th { background: var(--primary-xlight); color: var(--primary-dark); font-size: 0.85rem; font-weight: 600; }
.table-hover tbody tr:hover { background: var(--primary-xlight); }

/* ===== FORM ===== */
.form-label { font-size: 0.88rem; font-weight: 600; color: var(--text-dark); }
.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.15rem rgba(76,175,80,0.25);
}
.required-mark { color: #e53935; }

/* ===== FORUM ===== */
.forum-topic {
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    border-left: 4px solid var(--primary-light);
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}
.forum-topic:hover { border-left-color: var(--primary-dark); }
.forum-topic.pinned { border-left-color: var(--accent); background: var(--accent-light); }

/* ===== WEBBOARD SOCIAL FEED ===== */
.social-feed-item {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--card-shadow);
    border: 1px solid #e8f5e9;
}
.social-feed-item .platform-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}
.platform-facebook { background: #1877F2; color: #fff; }
.platform-instagram { background: #E1306C; color: #fff; }
.platform-line { background: #06C755; color: #fff; }
.platform-twitter { background: #1DA1F2; color: #fff; }
.platform-youtube { background: #FF0000; color: #fff; }

/* ===== CART ===== */
.cart-item {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid #e8f5e9;
    display: flex;
    gap: 12px;
    align-items: center;
}
.cart-img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

/* ===== PAYMENT ===== */
.payment-method-card {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.payment-method-card:hover, .payment-method-card.selected {
    border-color: var(--primary);
    background: var(--primary-xlight);
}
.payment-method-card i { font-size: 2rem; color: var(--primary); display: block; margin-bottom: 6px; }

/* ===== SURVEY ===== */
.survey-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}
.survey-question {
    background: var(--neutral-bg);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary-light);
}

/* ===== CONTACT ===== */
.contact-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    border-top: 4px solid var(--primary-light);
    height: 100%;
}
.contact-card h5 { color: var(--primary-dark); font-weight: 700; }
.contact-info-item { display: flex; gap: 10px; padding: 6px 0; font-size: 0.88rem; align-items: flex-start; }
.contact-info-item i { color: var(--primary); margin-top: 3px; flex-shrink: 0; }

/* ===== FOOTER ===== */
#main-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.85);
    padding: 40px 0 0;
    margin-top: 30px;
}
#main-footer h5 { color: #fff; font-weight: 700; margin-bottom: 14px; font-size: 0.95rem; }
#main-footer a { color: rgba(255,255,255,0.7); display: block; margin-bottom: 5px; font-size: 0.83rem; }
#main-footer a:hover { color: var(--secondary); }
.footer-bottom {
    background: var(--primary-dark);
    border-top: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    padding: 14px;
    color: rgba(255,255,255,0.5);
    font-size: 0.8rem;
    margin-top: 30px;
}
.footer-social a {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    margin-right: 6px;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary-light); }

/* ===== ADMIN ===== */
.admin-sidebar {
    width: 240px;
    background: var(--primary-dark);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    overflow: hidden;
    z-index: 100;
    display: flex;
    flex-direction: column;
}
.admin-sidebar .sidebar-brand {
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.admin-sidebar .sidebar-brand h4 { color: #fff; margin: 0; font-size: 0.95rem; font-weight: 700; }
.admin-sidebar .sidebar-brand small { color: rgba(255,255,255,0.6); font-size: 0.75rem; }
.admin-nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 40px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-track { background: transparent; }
.admin-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    color: rgba(255,255,255,0.75);
    font-size: 0.85rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}
.admin-nav a:hover, .admin-nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--secondary);
}
.admin-nav a i { width: 18px; }
.admin-nav .nav-section {
    font-size: 0.68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    padding: 12px 16px 4px;
    font-weight: 700;
}
.admin-main {
    margin-left: 240px;
    background: #f8f9fa;
    min-height: 100vh;
}
.admin-topbar {
    background: #fff;
    padding: 12px 24px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.admin-content { padding: 24px; }
.admin-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.07);
    margin-bottom: 20px;
}

/* ===== UTILITIES ===== */
.text-primary-dark { color: var(--primary-dark) !important; }
.bg-primary-light { background: var(--primary-light) !important; }
.bg-xlight { background: var(--primary-xlight) !important; }
.border-primary { border-color: var(--primary) !important; }
.icon-circle {
    width: 48px; height: 48px;
    background: var(--primary-xlight);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.3rem;
    flex-shrink: 0;
}

/* ===== LOADING ===== */
.loading-spinner {
    display: flex;
    justify-content: center;
    padding: 40px;
}
.spinner-border-green { border-color: var(--primary); border-right-color: transparent; }

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    #left-sidebar, #right-sidebar { display: none; }
    #hero-slider .carousel-item { height: 260px; }
    .slide-overlay .slide-title { font-size: 1.5rem; }
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
}
@media (max-width: 768px) {
    #main-content { padding: 14px; }
    #hero-slider .carousel-item { height: 220px; }
}

/* ===== NATURE SERVICES SECTION Z-INDEX FIX ===== */
.nature-section { position: relative; z-index: 10; }
.packages-row { overflow: hidden; }

/* packages-row: คลิปเนื้อหาให้อยู่ใน boundary */
.packages-row .resort-card { overflow: hidden; }
.packages-row .resort-card .d-flex { flex-wrap: nowrap; overflow: hidden; }

/* ============================================================
   Rich Content (Summernote output) — รองรับวิดีโอ Embed
   ============================================================ */
.rich-content iframe,
.rich-content .note-video-clip {
    max-width: 100%;
}
.rich-content iframe[src*="youtube"],
.rich-content iframe[src*="youtu.be"],
.rich-content iframe[src*="vimeo"],
.rich-content .note-video-clip iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 8px;
    display: block;
    margin: 1rem 0;
}
.rich-content img {
    max-width: 100%;
    height: auto;
}

/* Video tag จาก upload — ป้องกัน Summernote override width */
.rich-content video,
.rich-content div > video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    display: block;
    background: #000;
    max-width: 720px;
    margin: 0.75rem auto;
}
.rich-content div:has(> video) {
    max-width: 720px;
    margin: 0.75rem auto;
}
/* Summernote editor preview */
.note-editable video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    max-width: 720px;
    border-radius: 8px;
    background: #000;
}

/* ============================================================
   Video Upload — Wrapper + Resize handle (frontend display)
   ============================================================ */
.sn-video-wrap {
    position: relative;
    display: block;
    width: 100%;
    max-width: 720px;
    margin: 0.75rem auto;
}
.sn-video-wrap video {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    display: block;
    background: #000;
}
/* ซ่อน resize handle บนหน้า frontend (แสดงเฉพาะใน editor) */
.sn-video-wrap .sn-resize-handle {
    display: none;
}
