/* ===========================
     Tokens & Reset
     =========================== */
:root {
    --brand: #059669;
    --brand-dark: #047857;
    --brand-light: #ecfdf5;
    --brand-50: #f0fdf4;
    --brand-border: rgba(16, 185, 129, 0.2);
    --ink: #0f172a;
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 12px 32px rgba(5, 150, 105, 0.18);
}

* {
    font-family:
        "Outfit",
        system-ui,
        -apple-system,
        sans-serif;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background:
        radial-gradient(1200px 600px at 10% -10%, #d1fae5 0%, transparent 50%),
        radial-gradient(1000px 500px at 100% 0%, #ccfbf1 0%, transparent 50%),
        linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
    min-height: 100vh;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
p,
ul {
    margin: 0;
    padding: 0;
}
ul {
    list-style: none;
}
a {
    color: inherit;
    text-decoration: none;
}

/* ===========================
     Layout helpers
     =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

.flex {
    display: flex;
}
.flex-col {
    flex-direction: column;
}
.items-center {
    align-items: center;
}
.items-start {
    align-items: flex-start;
}
.items-end {
    align-items: flex-end;
}
.justify-between {
    justify-content: space-between;
}
.justify-end {
    justify-content: flex-end;
}
.flex-wrap {
    flex-wrap: wrap;
}
.flex-shrink-0 {
    flex-shrink: 0;
}
.gap-2 {
    gap: 0.5rem;
}
.gap-3 {
    gap: 0.75rem;
}
.gap-4 {
    gap: 1rem;
}
.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: 0.25rem;
}
.mt-4 {
    margin-top: 1rem;
}
.mt-6 {
    margin-top: 1.5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ===========================
     Sticky nav
     =========================== */
.nav {
    position: sticky;
    top: 0;
    z-index: 40;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ===========================
     Glass / Cards
     =========================== */
.glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border: 1px solid var(--brand-border);
}

/* ===========================
     Buttons
     =========================== */
.btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition:
        transform 0.15s ease,
        box-shadow 0.2s ease,
        filter 0.15s ease;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.1;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.32);
}
.btn-primary:active {
    transform: translateY(0);
    filter: brightness(0.95);
}

.btn-secondary {
    background: #fff;
    color: var(--brand);
    padding: 0.7rem 1.25rem;
    border-radius: 12px;
    border: 1.5px solid var(--brand);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.1;
}
.btn-secondary:hover {
    background: var(--brand-50);
    transform: translateY(-1px);
}

.loc-btn-primary {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}
.loc-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

#loc-pos {
    font-size: 0.7rem;
}
#loc-value {
    display: inline-block;
    font-size: 0.72rem;
    color: var(--gray-500);
    margin-top: 4px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-register {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand);
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    border: 1.5px solid var(--brand);
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
}
.nav-register:hover {
    background: var(--brand);
    color: #fff;
}

/* ===========================
     Search Bar
     =========================== */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 680px;
    margin: 8px auto 4px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    padding: 6px 8px 6px 16px;
    box-shadow: var(--shadow-sm);
    transition:
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}
.search-container:hover,
.search-container.focused,
.search-container:focus-within {
    border-color: transparent;
    box-shadow:
        0 1px 6px rgba(32, 33, 36, 0.18),
        0 0 0 3px rgba(5, 150, 105, 0.12);
}

.search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    padding: 8px 4px;
    font-size: 16px;
    background: transparent;
    color: var(--ink);
    font-weight: 500;
}
.search-input::placeholder {
    color: var(--gray-400);
    font-weight: 400;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    color: #5f6368;
    font-size: 1.05rem;
    transition: background 0.15s ease;
}
.icon-btn:hover {
    background: var(--gray-100);
}

.search-go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
.search-go:hover {
    transform: scale(1.05);
}

.clear-btn {
    visibility: hidden;
    font-weight: 700;
    color: var(--gray-400);
}
.clear-btn.visible {
    visibility: visible;
}

#langSelect {
    border: none;
    background: var(--gray-100);
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.75rem;
    color: var(--ink);
    cursor: pointer;
    outline: none;
    font-weight: 500;
}
#langSelect:focus {
    background: var(--gray-200);
}

.mic-btn {
    background: var(--gray-100);
}
.mic-btn:hover {
    background: var(--gray-200);
}

/* ===========================
     Section heading
     =========================== */
.section-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 0.75rem;
}

/* ===========================
     Category grid + buttons
     =========================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.category-grid-modal {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    max-height: 60vh;
    overflow-y: auto;
    padding: 4px;
}

.category-btn {
    padding: 0.6rem 0.4rem;
    min-height: 72px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.18s ease;
    font-size: 0.85rem;
    color: var(--ink);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
}
.category-btn:hover {
    border-color: var(--brand);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.12);
}
.category-btn.active {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.3);
}
.category-btn-more {
    background: var(--brand-light);
    color: var(--brand);
    border-color: var(--brand-border);
}

/* ===========================
     Results
     =========================== */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.result-count {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* ===========================
     Business cards
     =========================== */
.business-card {
    transition: all 0.25s ease;
    border: 1px solid var(--gray-200);
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}
.business-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--brand);
}

/* ===========================
     Badges
     =========================== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.55rem;
    background: var(--brand-light);
    color: var(--brand);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}
.badge-distance {
    background: #fef3c7;
    color: #b45309;
}
.badge-rating {
    background: #fef3c7;
    color: #b45309;
}
.star {
    color: #fbbf24;
}

/* ===========================
     Loading / Animations
     =========================== */
.loading {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--brand-light);
    border-top: 3px solid var(--brand);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fade-in {
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0fdf4 25%, #ecfdf5 50%, #f0fdf4 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}
@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ===========================
     Modals
     =========================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.25s ease;
    padding: 1rem;
}
.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    background: #fff;
    padding: 1.5rem;
    border-radius: 18px;
    max-width: 600px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}
.modal-content.wide {
    max-width: 760px;
}
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-800);
}
.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem;
    color: var(--gray-600);
    transition: color 0.15s ease;
}
.modal-close:hover {
    color: #dc2626;
}

/* ===========================
     Pagination
     =========================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.pagination button {
    padding: 0.5rem 0.9rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--ink);
}
.pagination button:hover {
    border-color: var(--brand);
    color: var(--brand);
}
.pagination button.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

/* ===========================
     Messages
     =========================== */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin: 0.75rem 0;
    border-left: 4px solid #dc2626;
    animation: fadeIn 0.3s ease;
}
.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin: 0.75rem 0;
    border-left: 4px solid #22c55e;
    animation: fadeIn 0.3s ease;
}
.info-box {
    background: var(--brand-light);
    border-left: 4px solid var(--brand);
    padding: 0.9rem 1rem;
    border-radius: 12px;
    margin: 0.75rem 0;
}

/* ===========================
     No results
     =========================== */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
}
.no-results-icon {
    font-size: 4rem;
}
.no-results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-600);
    margin: 0.5rem 0;
}
.no-results-text {
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* ===========================
     CTA section
     =========================== */
.cta-card {
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
    border: 1.5px solid var(--brand-border);
}
.cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand-dark);
    margin-bottom: 0.75rem;
}
.cta-text {
    color: var(--gray-700);
    margin: 0 auto 1.25rem;
    max-width: 640px;
    font-size: 0.95rem;
}

/* ===========================
     Voice icon
     =========================== */
.voice-icon {
    cursor: pointer;
    transition: all 0.2s ease;
}
.voice-icon:hover {
    color: var(--brand);
    transform: scale(1.1);
}
.voice-icon.listening {
    color: #dc2626;
    animation: pulse 1s ease-in-out infinite;
}

/* ===========================
     Form
     =========================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
    background: #fff;
    color: var(--ink);
    font-family: inherit;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}
.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.button-row {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.button-row > button {
    flex: 1;
}

/* ===========================
     Logo
     =========================== */
.brand-logo img {
    height: 80px;
    width: auto;
    display: block;
}

/* ===========================
     Footer
     =========================== */
.footer {
    background: var(--gray-900);
    color: #fff;
    margin-top: 3rem;
    padding: 2rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}
.footer h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.footer p,
.footer li {
    color: #9ca3af;
    font-size: 0.9rem;
}
.footer ul li {
    margin-bottom: 0.5rem;
}
.footer a {
    color: #cbd5e1;
    transition: color 0.15s ease;
}
.footer a:hover {
    color: #fff;
}
.footer-bottom {
    border-top: 1px solid #1f2937;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #9ca3af;
}
.footer-bottom .heart {
    color: #ef4444;
}

/* ===========================
     Responsive — tablet & up
     =========================== */
@media (min-width: 640px) {
    .container {
        padding: 0 16px;
    }
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .category-grid-modal {
        grid-template-columns: repeat(3, 1fr);
    }
    .results-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .form-row.cols-2 {
        grid-template-columns: 1fr 1fr;
    }
    .button-row {
        flex-direction: row;
    }
    .results-title {
        font-size: 1.5rem;
    }
    .cta-title {
        font-size: 1.75rem;
    }
    .modal-content {
        padding: 2rem;
    }
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .category-grid-modal {
        grid-template-columns: repeat(4, 1fr);
    }
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .cta-card {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .category-grid-modal {
        grid-template-columns: repeat(5, 1fr);
    }
    .results-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===========================
     Mobile tweaks
     =========================== */
@media (max-width: 639px) {
    .glass {
        padding: 0.6rem 0.5rem;
    }
    .search-container {
        margin: 6px 0 4px;
        padding: 5px 6px 5px 12px;
    }
    .business-card {
        padding: 0.85rem;
    }
    .category-btn {
        min-height: 64px;
        padding: 0.4rem 0.3rem;
        font-size: 0.75rem;
        border-radius: 12px;
    }
    .btn-primary,
    .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .loc-btn-primary {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }
    .nav-register {
        padding: 0.4rem 0.7rem;
        font-size: 0.78rem;
    }

    .section-heading {
        font-size: 0.95rem;
    }
    .modal-content {
        padding: 1.1rem;
        border-radius: 16px;
    }
    #loc-value {
        max-width: 140px;
        font-size: 0.68rem;
    }
    .results-title {
        font-size: 1.1rem;
    }
    .cta-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 380px) {
    .category-btn {
        font-size: 0.7rem;
        min-height: 60px;
    }
    #loc-value {
        display: none;
    }
}
