/*
|--------------------------------------------------------------------------
| Local Guide Chamarajanagar
| Shared application stylesheet
|--------------------------------------------------------------------------
*/

:root {
    --lg-primary: #083f33;
    --lg-primary-dark: #052e24;
    --lg-primary-light: #0d5946;
    --lg-accent: #ffc857;
    --lg-accent-dark: #ffbd38;

    --lg-text: #18241f;
    --lg-heading: #12201a;
    --lg-muted: #6f7d76;
    --lg-border: #dfe8e4;

    --lg-background: #ffffff;
    --lg-surface: #ffffff;
    --lg-surface-soft: #f5f8f7;
    --lg-soft: #f3f7f5;
    --lg-cream: #f8f6f0;

    --lg-success: #18794e;
    --lg-warning: #c27b0c;
    --lg-danger: #bf3439;
    --lg-info: #23769b;

    --lg-radius-sm: 10px;
    --lg-radius-md: 15px;
    --lg-radius-lg: 20px;
    --lg-radius-xl: 27px;

    --lg-shadow-sm:
        0 7px 20px rgba(18, 58, 50, .06);

    --lg-shadow-md:
        0 14px 38px rgba(18, 58, 50, .09);

    --lg-shadow-lg:
        0 24px 65px rgba(18, 58, 50, .14);

    --lg-transition:
        color .2s ease,
        background-color .2s ease,
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

/*
|--------------------------------------------------------------------------
| Base
|--------------------------------------------------------------------------
*/

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    color: var(--lg-text);
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    background: var(--lg-background);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

main {
    min-height: 45vh;
}

img {
    max-width: 100%;
}

a {
    color: var(--lg-primary-light);
    transition: var(--lg-transition);
}

a:hover {
    color: var(--lg-primary);
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn,
a {
    -webkit-tap-highlight-color: transparent;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--lg-heading);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.02em;
}

p:last-child {
    margin-bottom: 0;
}

::selection {
    color: #203129;
    background: rgba(255, 200, 87, .65);
}

:focus-visible {
    outline: 3px solid rgba(255, 200, 87, .65);
    outline-offset: 2px;
}

/*
|--------------------------------------------------------------------------
| Bootstrap refinements
|--------------------------------------------------------------------------
*/

.container {
    --bs-gutter-x: 1.5rem;
}

.text-secondary {
    color: var(--lg-muted) !important;
}

.bg-light {
    background-color: var(--lg-soft) !important;
}

.border {
    border-color: var(--lg-border) !important;
}

.rounded-4 {
    border-radius: var(--lg-radius-lg) !important;
}

.shadow-sm {
    box-shadow: var(--lg-shadow-sm) !important;
}

.form-label {
    margin-bottom: .5rem;
    color: #35433c;
    font-size: .88rem;
    font-weight: 700;
}

.form-control,
.form-select {
    min-height: 47px;
    border: 1px solid var(--lg-border);
    border-radius: 12px;
    color: var(--lg-text);
    background-color: #fff;
    box-shadow: none;
    transition: var(--lg-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: #70ad98;
    box-shadow:
        0 0 0 .22rem
        rgba(23, 107, 86, .11);
}

.form-control::placeholder {
    color: #9aa6a0;
}

.form-control-lg,
.form-select-lg {
    min-height: 54px;
    border-radius: 14px;
    font-size: .98rem;
}

textarea.form-control {
    min-height: 125px;
    resize: vertical;
}

.form-check-input {
    border-color: #b7c5bf;
    box-shadow: none !important;
}

.form-check-input:checked {
    border-color: var(--lg-primary-light);
    background-color: var(--lg-primary-light);
}

.input-group-text {
    border-color: var(--lg-border);
    color: var(--lg-muted);
    background: var(--lg-soft);
}

.alert {
    border-radius: 14px;
}

.badge {
    padding: .45em .7em;
    font-weight: 700;
    letter-spacing: .01em;
}

.dropdown-menu {
    border-color: var(--lg-border);
    box-shadow: var(--lg-shadow-md);
}

.dropdown-item {
    transition: var(--lg-transition);
}

.dropdown-item:active {
    color: #fff;
    background: var(--lg-primary-light);
}

/*
|--------------------------------------------------------------------------
| Buttons
|--------------------------------------------------------------------------
*/

.btn {
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-radius: 11px;
    font-weight: 700;
    transition: var(--lg-transition);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--lg-primary-light);
    --bs-btn-border-color: var(--lg-primary-light);

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lg-primary);
    --bs-btn-hover-border-color: var(--lg-primary);

    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--lg-primary-dark);
    --bs-btn-active-border-color: var(--lg-primary-dark);

    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--lg-primary-light);
    --bs-btn-disabled-border-color: var(--lg-primary-light);
}

.btn-outline-primary {
    --bs-btn-color: var(--lg-primary-light);
    --bs-btn-border-color: #80ad9e;

    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--lg-primary-light);
    --bs-btn-hover-border-color: var(--lg-primary-light);
}

.btn-accent {
    color: #24342d;
    border-color: var(--lg-accent);
    background: var(--lg-accent);
    font-weight: 800;
}

.btn-accent:hover,
.btn-accent:focus {
    color: #1d2d26;
    border-color: var(--lg-accent-dark);
    background: var(--lg-accent-dark);
}

.btn-success {
    --bs-btn-bg: #16865a;
    --bs-btn-border-color: #16865a;
    --bs-btn-hover-bg: #116f4a;
    --bs-btn-hover-border-color: #116f4a;
}

.btn-light {
    border-color: #edf1ef;
}

/*
|--------------------------------------------------------------------------
| Navbar and branding
|--------------------------------------------------------------------------
*/

.main-navbar {
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--lg-primary-dark),
            var(--lg-primary)
        );
    box-shadow:
        0 8px 30px
        rgba(0, 0, 0, .09);
}

.brand-pin {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    color: #203128;
    background: var(--lg-accent);
}

/*
|--------------------------------------------------------------------------
| Hero
|--------------------------------------------------------------------------
*/

.hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 103px;
    color: #fff;
    background:
        radial-gradient(
            circle at 82% 9%,
            rgba(255, 200, 87, .32),
            transparent 34%
        ),
        radial-gradient(
            circle at 9% 95%,
            rgba(255, 255, 255, .08),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            var(--lg-primary-dark) 0%,
            var(--lg-primary) 55%,
            #24715f 100%
        );
}

.hero h1,
.hero h2,
.hero h3 {
    color: #fff;
}

.hero h1 {
    max-width: 920px;
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: -.05em;
}

.hero p {
    color: rgba(255, 255, 255, .73);
}

.hero-search {
    position: relative;
    z-index: 2;
    padding: 8px;
    border-radius: 19px;
    background: #fff;
    box-shadow:
        0 22px 65px
        rgba(0, 0, 0, .22);
}

.hero-search .form-control,
.hero-search .form-select {
    min-height: 53px;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
}

.hero-search .btn {
    min-height: 53px;
    border-radius: 13px;
}

/*
|--------------------------------------------------------------------------
| Shared sections
|--------------------------------------------------------------------------
*/

.soft-section {
    background:
        linear-gradient(
            180deg,
            var(--lg-cream),
            #fff
        );
}

.section-kicker {
    display: inline-block;
    color: var(--lg-primary-light);
    font-size: .75rem;
    font-weight: 850;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.section-title {
    margin-top: .55rem;
    font-size: clamp(1.75rem, 3vw, 2.6rem);
    font-weight: 800;
}

.section-description {
    max-width: 720px;
    color: var(--lg-muted);
    line-height: 1.75;
}

.section-divider {
    width: 58px;
    height: 4px;
    margin-top: 14px;
    border-radius: 999px;
    background: var(--lg-accent);
}

/*
|--------------------------------------------------------------------------
| Cards
|--------------------------------------------------------------------------
*/

.category-card,
.business-card,
.metric-card,
.panel-card,
.table-card,
.form-card {
    border: 1px solid rgba(223, 232, 228, .8);
    border-radius: var(--lg-radius-lg);
    background: #fff;
    box-shadow: var(--lg-shadow-md);
}

.category-card,
.business-card {
    overflow: hidden;
    transition: var(--lg-transition);
}

.category-card:hover,
.business-card:hover {
    border-color: #c4d8cf;
    box-shadow: var(--lg-shadow-lg);
    transform: translateY(-4px);
}

.panel-card {
    overflow: hidden;
}

.category-icon {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 18px;
    color: var(--lg-primary-light);
    font-size: 1.5rem;
    background:
        linear-gradient(
            145deg,
            #eaf5f0,
            #f7fbf9
        );
}

.business-cover {
    width: 100%;
    height: 210px;
    display: block;
    object-fit: cover;
    background: #e7ecea;
}

.business-placeholder {
    width: 100%;
    height: 210px;
    display: grid;
    place-items: center;
    color: #8ca09a;
    font-size: 3rem;
    background:
        linear-gradient(
            135deg,
            #e9efed,
            #f8f8f3
        );
}

.business-card .card-body {
    padding: 1.25rem;
}

.business-card-title {
    color: var(--lg-heading);
    text-decoration: none;
}

.business-card-title:hover {
    color: var(--lg-primary-light);
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    color: var(--lg-success);
    font-size: .84rem;
    font-weight: 750;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .52rem .8rem;
    margin: .18rem;
    border: 1px solid #dce9e3;
    border-radius: 999px;
    color: #3d5047;
    font-size: .8rem;
    font-weight: 650;
    background: #eef6f2;
}

/*
|--------------------------------------------------------------------------
| Business profile
|--------------------------------------------------------------------------
*/

.detail-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 100% 0,
            rgba(255, 200, 87, .12),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #eef5f2,
            #f8faf9
        );
}

.detail-cover {
    width: 100%;
    height: min(54vw, 470px);
    display: block;
    object-fit: cover;
    border-radius: 23px;
    background: #e7ecea;
    box-shadow: var(--lg-shadow-md);
}

.detail-placeholder {
    width: 100%;
    height: min(54vw, 470px);
    display: grid;
    place-items: center;
    border: 1px solid #dce7e2;
    border-radius: 23px;
    color: #8aa097;
    font-size: 5rem;
    background:
        linear-gradient(
            135deg,
            #e3ece8,
            #faf9f4
        );
}

.action-card {
    position: sticky;
    top: 105px;
}

.gallery-image {
    width: 100%;
    height: 190px;
    display: block;
    object-fit: cover;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--lg-transition);
}

.gallery-image:hover {
    filter: brightness(.94);
    transform: translateY(-2px);
}

.offer-card {
    height: 100%;
    padding: 1.1rem;
    border: 1px solid #f1d898;
    border-radius: 16px;
    background:
        linear-gradient(
            135deg,
            #fff9e9,
            #fff3c9
        );
}

.product-price-old {
    color: var(--lg-muted);
    font-size: .8rem;
    text-decoration: line-through;
}

.product-price-current {
    color: var(--lg-primary);
    font-weight: 800;
}

/*
|--------------------------------------------------------------------------
| Tables
|--------------------------------------------------------------------------
*/

.table-card {
    overflow: hidden;
}

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .95rem 1rem;
    border-bottom-color: #e7eeea;
    vertical-align: middle;
}

.table thead th {
    color: #5d6c65;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #f5f8f6;
}

.table tbody tr {
    transition: background-color .18s ease;
}

.table tbody tr:hover {
    background: #f8fbf9;
}

.table-responsive {
    border-radius: inherit;
}

/*
|--------------------------------------------------------------------------
| Pagination
|--------------------------------------------------------------------------
*/

.pagination {
    gap: 5px;
}

.page-link {
    min-width: 41px;
    min-height: 41px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--lg-border);
    border-radius: 10px !important;
    color: var(--lg-primary-light);
    font-weight: 700;
    box-shadow: none !important;
}

.page-link:hover {
    color: var(--lg-primary);
    border-color: #a7c9bc;
    background: #edf6f2;
}

.active > .page-link,
.page-link.active {
    color: #fff;
    border-color: var(--lg-primary-light);
    background: var(--lg-primary-light);
}

/*
|--------------------------------------------------------------------------
| Admin shared styles
|--------------------------------------------------------------------------
*/

.admin-body {
    color: var(--lg-text);
    background: #f3f7f5;
}

.admin-topbar {
    min-height: 64px;
    color: #fff;
    background: var(--lg-primary);
}

.admin-sidebar {
    background:
        linear-gradient(
            180deg,
            var(--lg-primary-dark),
            #052e24
        );
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .78rem .9rem;
    margin-bottom: .3rem;
    border-radius: 10px;
    color: rgba(255, 255, 255, .72);
    text-decoration: none;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .11);
}

.metric-card {
    height: 100%;
}

.metric-card .metric-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: var(--lg-primary-light);
    font-size: 1.35rem;
    background: #e9f3ef;
}

.metric-card .metric-value {
    color: var(--lg-heading);
    font-size: 1.7rem;
    font-weight: 850;
    letter-spacing: -.04em;
}

.metric-card .metric-label {
    color: var(--lg-muted);
    font-size: .76rem;
    font-weight: 750;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.form-card {
    padding: 1.4rem;
}

.required::after {
    content: " *";
    color: var(--lg-danger);
}

.image-preview {
    width: 100%;
    max-height: 280px;
    display: block;
    object-fit: cover;
    border: 1px solid var(--lg-border);
    border-radius: 15px;
    background: #edf1ef;
}

.empty-state {
    padding: 50px 25px;
    text-align: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 22px;
    color: var(--lg-primary-light);
    font-size: 1.8rem;
    background: #eaf4f0;
}

/*
|--------------------------------------------------------------------------
| Legacy footer support
|--------------------------------------------------------------------------
*/

.site-footer {
    color: #fff;
    background: #102d27;
}

.site-footer a {
    display: block;
    margin: .4rem 0;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
}

/*
|--------------------------------------------------------------------------
| Utilities
|--------------------------------------------------------------------------
*/

.object-fit-cover {
    object-fit: cover;
}

.min-width-0 {
    min-width: 0;
}

.text-truncate-2 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.text-truncate-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.stretched-link-safe {
    position: relative;
    z-index: 2;
}

.loading-placeholder {
    position: relative;
    overflow: hidden;
    background: #edf2ef;
}

.loading-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, .72),
            transparent
        );
    transform: translateX(-100%);
    animation: lgPlaceholderLoading 1.4s infinite;
}

@keyframes lgPlaceholderLoading {
    to {
        transform: translateX(100%);
    }
}

/*
|--------------------------------------------------------------------------
| Responsive
|--------------------------------------------------------------------------
*/

@media (max-width: 991.98px) {
    .action-card {
        position: static;
    }

    .hero {
        padding: 72px 0 82px;
    }

    .detail-cover,
    .detail-placeholder {
        height: min(70vw, 440px);
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: .96rem;
    }

    .hero {
        padding: 58px 0 68px;
    }

    .hero h1 {
        font-size: clamp(2.05rem, 10vw, 3rem);
    }

    .hero-search {
        padding: 10px;
        border-radius: 17px;
    }

    .hero-search .border-start {
        border-top: 1px solid #edf0ee;
        border-left: 0 !important;
    }

    .business-cover,
    .business-placeholder {
        height: 190px;
    }

    .detail-cover,
    .detail-placeholder {
        height: 68vw;
        min-height: 245px;
        max-height: 370px;
        border-radius: 18px;
    }

    .gallery-image {
        height: 155px;
    }

    .category-card,
    .business-card,
    .metric-card,
    .panel-card,
    .table-card,
    .form-card {
        border-radius: 17px;
    }

    .table > :not(caption) > * > * {
        padding: .78rem;
    }

    .form-card {
        padding: 1.1rem;
    }
}

@media (max-width: 575.98px) {
    .container {
        --bs-gutter-x: 1.1rem;
    }

    .btn {
        min-height: 42px;
    }

    .business-cover,
    .business-placeholder {
        height: 180px;
    }

    .category-icon {
        width: 51px;
        height: 51px;
        border-radius: 15px;
        font-size: 1.3rem;
    }

    .gallery-image {
        height: 135px;
        border-radius: 13px;
    }

    .page-link {
        min-width: 38px;
        min-height: 38px;
        padding: .4rem .65rem;
    }
}

/*
|--------------------------------------------------------------------------
| Reduced motion
|--------------------------------------------------------------------------
*/

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/*
|--------------------------------------------------------------------------
| Print
|--------------------------------------------------------------------------
*/

@media print {
    .main-navbar,
    .lg-site-header,
    .local-guide-footer,
    .site-footer,
    .admin-topbar,
    .admin-sidebar,
    .admin-mobile-bottom-navigation,
    .back-to-top,
    .admin-back-to-top,
    .btn,
    .offcanvas {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .container,
    .container-fluid {
        width: 100% !important;
        max-width: none !important;
    }

    .card,
    .panel-card,
    .table-card,
    .form-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}