:root {
    --brand-primary  : #0284c7;
    /* สีฟ้าสว่างสดใส */
    --brand-secondary: #0369a1;
    /* สีฟ้าน้ำทะเลเข้ม */
    --brand-accent   : #b45309;
    /* สีส้มทองอมน้ำตาลสไตล์พรีเมียม */
    --brand-gold     : #f59e0b;
    /* สีทองอร่ามสดใส */
    --bg-light       : #f8fafc;
    /* สีพื้นหลังสว่างแบบโปร่งสบาย */
    --bg-pure        : #ffffff;
    --text-dark      : #0f172a;
    --text-muted     : #64748b;
    --border-light   : #e2e8f0;
}

html,
body {
    height: 100%;
    margin: 0;
}

body {
    font-family     : 'Sarabun', sans-serif;
    background-color: var(--bg-light);
    color           : var(--text-dark);
    overflow-x      : hidden;
    scroll-behavior : smooth;
    display         : flex;
    flex-direction  : column;
}

main {
    flex: 1;
}

footer {
    background-color: #333;
    text-align      : center;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand,
.nav-link,
.btn {
    font-family: 'Prompt', sans-serif;
}

a {
    font-family: 'Sarabun';
    text-decoration: none;
}

/* Navbar Custom Styling */
.navbar {
    background     : rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom  : 1px solid var(--border-light);
    transition     : all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.navbar-brand img {
    max-height: 55px;
    width     : auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.03);
}

.nav-link {
    color      : var(--text-dark) !important;
    font-weight: 500;
    padding    : 0.5rem 1rem !important;
    transition : color 0.2s ease;
    position   : relative;
}

.nav-link::after {
    content         : '';
    position        : absolute;
    width           : 0;
    height          : 2px;
    bottom          : 0;
    left            : 50%;
    background-color: var(--brand-primary);
    transition      : all 0.3s ease;
    transform       : translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--brand-primary) !important;
}


.navbar .dropdown-menu {
    border          : none !important;
    border-radius   : 14px !important;
    box-shadow      : 0 10px 35px rgba(0, 0, 0, 0.1) !important;
    padding         : 10px !important;
    min-width       : 320px;
    background-color: #ffffff;

    /* ลบ transform ออกจากตัวหลัก เพื่อไม่ให้ตีกับระบบคำนวณตำแหน่งของ Bootstrap */
    box-sizing: border-box !important;
}

/* ตกแต่งแต่ละรายการลิงก์ย่อยภายในเมนู */
.navbar .dropdown-item {
    color        : #334155 !important;
    font-weight  : 500;
    padding      : 11px 16px !important;
    border-radius: 8px !important;
    transition   : all 0.2s ease-in-out;
    font-size    : 0.95rem;
    display      : flex;
    align-items  : center;

    /* ล็อกเส้นขอบซ้ายไว้ตั้งแต่แรกหนา 4px (แต่เป็นสีโปร่งใส) เพื่อไม่ให้ขยับตอน Hover */
    border-left: 4px solid transparent !important;
}

/* เอฟเฟกต์ตอนเอาเมาส์ไปชี้ (Hover) และเมื่อถูกคลิก (Active) */
.navbar .dropdown-item:hover {
    background-color: #f0f4f8 !important;
    color           : #1e3c72 !important;
    /*font-weight     : 600;

     เปลี่ยนจากแก้ padding เป็นใช้ transform ขยับเฉพาะตัวอักษรและไอคอนภายในแทน */
    transform: translateX(2px);

    /* เปลี่ยนสีเส้นขอบซ้ายที่มีอยู่แล้วให้เป็นสีทอง 
    border-left-color: #ffcc00 !important;*/
}

/* ป้องกันปัญหาขอบมนของการ์ด dropdown ตกหล่น */
.navbar .dropdown-item.rounded-bottom {
    border-bottom-left-radius : 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Hero Section Styling */
.hero-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #ffffff 100%);
    padding   : 140px 0 100px 0;
    position  : relative;
    overflow  : hidden;
}

.hero-section::before {
    content   : '';
    position  : absolute;
    width     : 400px;
    height    : 400px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, rgba(255, 255, 255, 0) 70%);
    top       : -100px;
    right     : -100px;
    z-index   : 0;
}

.section-contact {
    padding : 80px 0 100px 0;
    position: relative;
    overflow: hidden;
}

/* Brand Elements */
.btn-brand-blue {
    background-color: var(--brand-primary);
    color           : white;
    border          : none;
    border-radius   : 12px;
    transition      : all 0.3s ease;
}

.btn-brand-blue:hover {
    background-color: var(--brand-secondary);
    color           : white;
    transform       : translateY(-2px);
    box-shadow      : 0 10px 20px rgba(2, 132, 199, 0.2);
}

.btn-outline-brand {
    border       : 2px solid var(--brand-primary);
    color        : var(--brand-primary);
    border-radius: 12px;
    background   : transparent;
    font-weight  : 500;
    transition   : all 0.3s ease;
}

.btn-outline-brand:hover {
    background-color: var(--brand-primary);
    color           : white;
    transform       : translateY(-2px);
}

/* Premium Cards Design */
.premium-card {
    background   : var(--bg-pure);
    border       : 1px solid var(--border-light);
    border-radius: 24px;
    box-shadow   : 0 10px 30px rgba(15, 23, 42, 0.02);
    transition   : all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-card:hover {
    transform   : translateY(-8px);
    box-shadow  : 0 20px 40px rgba(15, 23, 42, 0.06);
    border-color: rgba(2, 132, 199, 0.2);
}

/* Section Title Divider */
.section-title {
    position     : relative;
    margin-bottom: 50px;
}

.title-divider {
    width        : 60px;
    height       : 4px;
    background   : var(--brand-primary);
    border-radius: 2px;
    margin       : 15px auto 0 auto;
}

/* Service Image Container in Card style */
.service-card-img-container {
    width   : 100%;
    height  : 220px;
    overflow: hidden;
    position: relative;
}

.service-card-img-container img {
    width     : 100%;
    height    : 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-card:hover .service-card-img-container img {
    transform: scale(1.08);
}

/* Custom Interactive Calculator CSS */
.calc-form-select {
    border-radius   : 12px;
    padding         : 12px;
    border          : 1px solid var(--border-light);
    font-size       : 0.95rem;
    color           : var(--text-dark);
    background-color: var(--bg-light);
    transition      : all 0.3s ease;
}

.calc-form-select:focus {
    border-color    : var(--brand-primary);
    box-shadow      : 0 0 0 4px rgba(2, 132, 199, 0.15);
    background-color: var(--bg-pure);
}

.indicator-card {
    background   : var(--bg-light);
    border-radius: 16px;
    padding      : 16px;
    border-left  : 5px solid var(--brand-primary);
    transition   : all 0.3s ease;
}

/* Floating Toast Alert CSS */
.custom-toast {
    position     : fixed;
    bottom       : 30px;
    right        : 30px;
    z-index      : 9999;
    background   : var(--bg-pure);
    border-radius: 16px;
    border-left  : 6px solid var(--brand-primary);
    box-shadow   : 0 20px 40px rgba(15, 23, 42, 0.12);
    padding      : 20px;
    max-width    : 380px;
    display      : none;
    animation    : slideInRight 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-toast.show {
    display    : flex;
    align-items: center;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity  : 0;
    }

    to {
        transform: translateX(0);
        opacity  : 1;
    }
}

/* Floating Dialing Icon for Mobile */
.floating-call {
    position        : fixed;
    bottom          : 30px;
    left            : 30px;
    width           : 65px;
    height          : 65px;
    background-color: #22c55e;
    border-radius   : 50%;
    display         : flex;
    align-items     : center;
    justify-content : center;
    color           : white;
    font-size       : 28px;
    box-shadow      : 0 10px 25px rgba(34, 197, 94, 0.3);
    z-index         : 999;
    text-decoration : none;
    transition      : all 0.3s ease;
}

.floating-call:hover {
    transform: scale(1.1);
    color    : white;
}

.pulse-ring {
    position     : absolute;
    width        : 100%;
    height       : 100%;
    border-radius: 50%;
    border       : 2px solid #22c55e;
    animation    : pulse 1.8s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity  : 1;
    }

    100% {
        transform: scale(1.4);
        opacity  : 0;
    }
}

/* News Cards Design */
.news-card {
    border-radius : 20px;
    overflow      : hidden;
    background    : var(--bg-pure);
    border        : 1px solid var(--border-light);
    box-shadow    : 0 8px 24px rgba(15, 23, 42, 0.01);
    transition    : all 0.4s ease;
    height        : 100%;
    display       : flex;
    flex-direction: column;
}

.news-card:hover {
    transform   : translateY(-5px);
    box-shadow  : 0 16px 35px rgba(15, 23, 42, 0.05);
    border-color: rgba(226, 232, 240, 1);
}

.news-img-container {
    position: relative;
    height  : 200px;
    overflow: hidden;
}

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

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

.news-tag {
    position     : absolute;
    top          : 15px;
    right        : 15px;
    background   : rgba(255, 255, 255, 0.95);
    color        : var(--brand-primary);
    padding      : 5px 12px;
    border-radius: 30px;
    font-size    : 0.75rem;
    font-weight  : 600;
    box-shadow   : 0 4px 12px rgba(0, 0, 0, 0.05);
}

.line-clamp-3 {
    display           : -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp        : 3;
    /* standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow          : hidden;
}

/* PREMIUM SCROLL REVEAL EFFECTS (ตั้งแต่ Our Services เป็นต้นไป) */
.reveal-on-scroll {
    opacity    : 0;
    transform  : translateY(50px);
    transition : opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1), transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
}

.reveal-on-scroll.revealed {
    opacity  : 1;
    transform: translateY(0);
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

.text-secondary-2,
.text-secondary {
    --bs-text-opacity: 1;
    color            : rgb(87 88 90) !important;
}

.text-dark-2 {
    --bs-text-opacity: 1;
    color            : #454c57;
}

.btn-close {
    box-shadow: none !important;
}

.dayContainer,
.flatpickr-weekdaycontainer {
    padding: 1rem !important;
}