/* Modern & Responsive Overrides */
/* Font Import */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-green: #009B4D;
    --primary-blue: #1E3D8F;
    --accent-yellow: #F4E04D;
    --text-dark: #2D3748;
    --text-light: #718096;
    --bg-light: #F7FAFC;
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-blue);
}

/* Navbar overrides */
.navbar-default {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-green);
    box-shadow: var(--shadow-md);
}

.navbar-default .navbar-brand {
    color: var(--primary-blue) !important;
    font-weight: 700;
}

.navbar-default .navbar-nav li a {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.navbar-default .navbar-nav li a:hover,
.navbar-default .navbar-nav li.active a {
    color: var(--primary-green) !important;
    background: transparent;
}

.navbar-default .navbar-nav li.appointment-btn a {
    background: var(--primary-green) !important;
    color: var(--white) !important;
    border-radius: 50px;
    padding: 10px 25px !important;
    box-shadow: var(--shadow-md);
    transform: translateY(0);
}

.navbar-default .navbar-nav li.appointment-btn a:hover {
    background: var(--primary-blue) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Buttons */
.section-btn,
.btn {
    background: var(--primary-green);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: none;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.section-btn:hover,
.btn:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-blue {
    background: var(--primary-blue);
}

/* Hero Section */
.slider .item {
    position: relative;
}

.slider .caption {
    background: linear-gradient(to right, rgba(30, 61, 143, 0.8), rgba(0, 155, 77, 0.6));
}

.slider .caption h3 {
    color: var(--accent-yellow);
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

/* Sections */
#about,
#team,
#news,
#appointment {
    position: relative;
    background: var(--white);
}

#service {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
}

#service .fa {
    color: var(--primary-green);
    box-shadow: var(--shadow-md);
}

/* Cards & Thumbs */
.news-thumb,
.team-thumb,
.service-thumb {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 30px;
}

.news-thumb:hover,
.team-thumb:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-thumb img {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Footer */
footer {
    background: var(--text-dark);
    /* distinct dark footer */
    color: #edf2f7;
    padding-top: 60px;
}

footer h4 {
    color: var(--accent-yellow);
    margin-bottom: 20px;
}

footer p {
    color: #cbd5e0;
}

footer .social-icon li a {
    color: var(--white);
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

footer .social-icon li a:hover {
    background: var(--primary-green);
    transform: rotate(360deg);
}

/* Forms */
.form-control {
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    padding: 12px;
    height: auto;
    background: var(--bg-light);
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(0, 155, 77, 0.1);
}

#cf-submit {
    background: var(--primary-green);
    color: var(--white);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

#cf-submit:hover {
    background: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

/* Mobile Responsiveness Improvements */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }

    h3 {
        font-size: 1.5em;
    }

    .navbar-default .navbar-toggle {
        border-color: transparent;
    }

    .navbar-default .navbar-toggle .icon-bar {
        background-color: var(--primary-blue);
    }

    .slider .caption {
        padding: 0 20px;
    }

    .container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Improve table responsiveness if any */
    .table-responsive {
        border: 0;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-sm);
    }

    #appointment .col-md-6 {
        margin-bottom: 15px;
    }

    .navbar-collapse {
        background: var(--white);
        padding: 20px;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
        box-shadow: var(--shadow-lg);
    }
}

/* --- Bootstrap 5 Compatibility Utilities --- */

/* Flexbox utilities */
.d-flex {
    display: flex !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.gap-3 {
    gap: 1rem !important;
}

/* Spacing utilities */
.m-0 {
    margin: 0 !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.p-2 {
    padding: 0.5rem !important;
}

.p-3 {
    padding: 1rem !important;
}

.p-4 {
    padding: 1.5rem !important;
}

.px-4 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.me-2 {
    margin-right: 0.5rem !important;
}

/* Text utilities */
.fw-bold {
    font-weight: 700 !important;
}

.text-center {
    text-align: center !important;
}

/* Border utilities */
.rounded-pill {
    border-radius: 50rem !important;
}

.rounded {
    border-radius: var(--radius-md) !important;
}

/* Card Component (Backport) */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white);
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .05);
    border-radius: var(--radius-lg);
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--primary-blue);
}

/* Shadows */
.shadow-sm {
    box-shadow: var(--shadow-sm) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

/* Mobile JKN Button Specifics */
.btn-mobile-jkn {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px 15px;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s;
}

.btn-mobile-jkn:hover {
    border-color: var(--primary-green);
    box-shadow: var(--shadow-sm);
}