/* Remove arrows from number input */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] {
  -moz-appearance: textfield;
}

:root {
    --primary: #0088cc;
    --secondary: #00c9ff;
    --bg-dark: #0a0e14;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent: #f6ad55;
    --radius: 20px;
    --font-main: 'Outfit', sans-serif;
}

/* Splash Screen */
#app-splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0a0e14;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    transition: opacity 0.5s ease;
}

.splash-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(0, 201, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--secondary);
    animation: rotate 1s linear infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes rotate {
    to { transform: rotate(360deg); }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #000;
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden;
    line-height: 1.6;
}

/* Background Theme Layer */
.app-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-size: cover;
    background-position: center;
    z-index: -1;
    transition: background-image 0.8s ease;
}

.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Darker gradient for better contrast */
    background: linear-gradient(180deg, rgba(7, 10, 15, 0.6) 0%, rgba(7, 10, 15, 0.95) 100%);
    z-index: -1;
}

/* App Container */
#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    padding-top: env(safe-area-inset-top);
    /* Spacer for nav */
    position: relative;
}

/* Header */
.header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 99999; pointer-events: auto;
    background: rgba(10, 14, 20, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.home-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 15px;
    background: var(--glass-bg);
    border-radius: 12px;
    transition: all 0.2s;
}

.home-link:active {
    transform: scale(0.95);
}

/* Cards & Sections */
.section {
    padding: 20px;
}

.card {
    background: rgba(15, 23, 42, 0.7);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(0, 201, 255, 0.4);
    background: rgba(15, 23, 42, 0.85);
}

.card:active {
    transform: scale(0.98);
}

/* Bottom Navigation */
.nav-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 360px;
    height: 65px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000; pointer-events: auto;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.7rem;
    cursor: pointer;
}

/* Global Collapsible Content */
.collapsible-wrapper {
    position: relative;
    margin-top: 10px;
}

.collapsible-content {
    max-height: 120px;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    position: relative;
}

.collapsible-content.expanded {
    max-height: 5000px;
    transition: max-height 0.8s ease-in-out;
}

.collapsible-content:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(transparent, rgba(10, 14, 20, 0.95));
    pointer-events: none;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--secondary);
    font-weight: 700;
    cursor: pointer;
    padding: 12px 0 0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.read-more-btn i {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.collapsible-content.expanded+.read-more-btn i {
    transform: rotate(180deg);
}

.nav-item.active {
    color: var(--secondary);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.category-item {
    aspect-ratio: 1/1.1;
    background: var(--card-bg);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.category-icon {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: transform 0.5s ease;
}

.category-icon::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.4) 100%);
}

.category-item:hover .category-icon {
    transform: scale(1.1);
}

.category-item i {
    font-size: 1.1rem;
    color: var(--secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.category-item span {
    width: 100%;
    padding: 15px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1;
    text-align: center;
    line-height: 1.3;
}


/* Improved Modal & Glassmorphism */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(7, 10, 15, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 10000;
    padding: 20px;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(15, 23, 42, 0.8);
    width: 100%;
    max-width: 400px;
    border-radius: 30px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 201, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.modal-fullscreen {
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column;
}

.modal-fullscreen .modal-body {
    flex: 1;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}

.modal-close:hover {
    color: var(--text-primary);
}

.btn {
    padding: 14px 25px;
    border-radius: 16px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 10px 20px -5px rgba(0, 136, 204, 0.4);
}

.btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 5px 10px -5px rgba(0, 136, 204, 0.4);
}

/* Google Login Button */
.btn-google {
    background: white;
    color: #3c4043;
    border: 1px solid #dadce0;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-google:hover {
    background: #f8f9fa;
    border-color: #d2d4d7;
}

.btn-google img {
    width: 20px;
    height: 20px;
}

/* Auth Form Fields */
.modal-content h2 {
    text-align: center;
    font-size: 1.8rem;
    margin-bottom: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

#auth-forms input,
#auth-forms select {
    width: 100%;
    padding: 14px 18px;
    margin-bottom: 15px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: var(--font-main);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

#auth-forms select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
    cursor: pointer;
    padding-right: 45px;
}

#auth-forms select option {
    background: #121826;
    color: white;
}

#auth-forms input:focus,
#auth-forms select:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--secondary);
    box-shadow: 0 0 0 4px rgba(0, 201, 255, 0.1);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
}

.auth-divider span {
    padding: 0 15px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Typography */
h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.animate-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Tab Content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Sidebar Menu */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-dark);
    border-left: 1px solid var(--glass-bg);
    z-index: 2001;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar-menu.active {
    right: 0;
}

/* Mayor Profile Section */
.sidebar-profile {
    padding: 90px 20px 30px;
    background: linear-gradient(180deg, rgba(0, 136, 204, 0.1) 0%, transparent 100%);
    border-bottom: 1px solid var(--glass-bg);
    text-align: center;
}

.mayor-img-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 15px;
    border-radius: 16px;
    padding: 5px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.mayor-img-container img {
    width: 100%;
    height: 100%;
    border-radius: 11px;
    object-fit: cover;
    border: 4px solid var(--bg-dark);
    display: block;
}

.mayor-info h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.mayor-info span {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
    flex: 1;
}

.sidebar-item {
    padding: 12px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
}

.sidebar-item:active {
    background: var(--glass-bg);
    color: var(--secondary);
}

.sidebar-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar-divider {
    height: 1px;
    background: var(--glass-bg);
    margin: 10px 25px;
}

.sidebar-section-title {
    padding: 10px 25px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.sidebar-social {
    padding: 20px 25px;
    display: flex;
    gap: 15px;
    justify-content: center;
    border-top: 1px solid var(--glass-bg);
}

.sidebar-social a {
    color: var(--text-secondary);
    font-size: 1.2rem;
    transition: all 0.3s;
}

.sidebar-social a:hover {
    color: var(--secondary);
    transform: translateY(-3px);
}

.sidebar-submenu {
    padding-left: 20px;
}

.sidebar-lang-switcher {
    padding: 15px 25px;
    margin-top: auto;
    border-top: 1px solid var(--glass-bg);
}

.lang-btn-row {
    display: flex;
    gap: 10px;
}

.lang-btn {
    flex: 1;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-secondary);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.lang-btn.active {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
}

/* Hamburger Trigger */

/* Sub-Category Menu Item Backgrounds */
.menu-item-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    padding: 25px 20px !important;
    min-height: 100px;
}

.menu-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    z-index: 0;
}

.place-bg-14 {
    background-image: url('../img/places/gelincik_dagi.jpg');
}

.place-bg-15 {
    background-image: url('../img/places/seyhandede.jpg');
}

.place-bg-16 {
    background-image: url('../img/places/sinek_cayi_selalesi.jpg');
}

.place-bg-17 {
    background-image: url('../img/places/gaban_kral_yolu.jpg');
}

.place-bg-18 {
    background-image: url('../img/places/sinek_cayi.jpg');
}

.place-bg-19 {
    background-image: url('../img/places/haburman.jpg');
}

.place-bg-20 {
    background-image: url('../img/places/ulu_cami.jpg');
}

.place-bg-21 {
    background-image: url('../img/places/medrese.jpg');
}

.place-bg-22 {
    background-image: url('../img/places/beyler_sarayi.jpg');
}

.place-bg-23 {
    background-image: url('../img/places/saray_hamami.jpg');
}

.place-bg-24 {
    background-image: url('../img/places/han.jpg');
}

.place-bg-25 {
    background-image: url('../img/places/kilise.jpg');
}

/* Park ve Bahçeler */
.place-bg-26 {
    background-image: url('../img/places/sehitler_parki.jpg');
}

.place-bg-27 {
    background-image: url('../img/places/seyh_muhammed.jpg');
}

.place-bg-28 {
    background-image: url('../img/places/seyh_erbaun.jpg');
}

.place-bg-29 {
    background-image: url('../img/places/sinek_cayi_mesire.jpg');
}

/* Tarihi Mekanlar — Hanbaşı Camii */
.place-bg-34 {
    background-image: url('../img/places/hanbasi_camii.jpg');
}

/* Kadim Rotalar — Fırat Nehri */
.place-bg-35 {
    background-image: url('../img/places/firat_nehri.jpg');
}

/* Park ve Bahçeler — ID 30-33 */
.place-bg-30 {
    background-image: url('../img/places/15_temmuz_parki.jpg');
}

.place-bg-31 {
    background-image: url('../img/places/millet_parki.jpg');
}

.place-bg-32 {
    background-image: url('../img/places/omer_halisdemir_parki.jpg');
}

.place-bg-33 {
    background-image: url('../img/places/sutcu_imam_parki.jpg');
}

/* Service Lightbox / Image Modal */
.service-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    z-index: 20000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s ease;
}

.service-lightbox.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.service-lightbox-content {
    max-width: 90%;
    max-height: 85%;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-lightbox.active .service-lightbox-content {
    transform: scale(1);
}

.service-lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.service-lightbox-close:hover {
    background: var(--secondary);
    transform: rotate(90deg);
}

/* Service Collapsible Text */
.service-desc {
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: all 0.3s ease;
}

.service-desc.expanded {
    -webkit-line-clamp: unset;
    display: block;
}

.service-read-more {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 5px;
    display: inline-block;
}

/* ── Header Logo & Title Wrapper ── */
.header-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
}

.header-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ── Hava Durumu Widget ── */
#weather-widget {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: rgba(0, 136, 204, 0.12);
    border: 1px solid rgba(0, 201, 255, 0.2);
    border-radius: 14px;
    padding: 6px 10px;
    cursor: default;
    transition: background 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 46px;
}

#weather-widget:hover {
    background: rgba(0, 136, 204, 0.22);
    border-color: rgba(0, 201, 255, 0.4);
}

#weather-icon {
    font-size: 1.3rem;
    color: var(--secondary);
    text-shadow: 0 0 10px rgba(0, 201, 255, 0.5);
    transition: transform 0.3s ease;
    display: block;
    line-height: 1;
}

#weather-widget:hover #weather-icon {
    transform: scale(1.1);
}

#weather-temp {
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    letter-spacing: 0.3px;
    line-height: 1;
}

@keyframes weatherPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

#weather-icon.loading {
    animation: weatherPulse 1.5s ease-in-out infinite;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-icons .fa-bell {
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

/* ── Mayor Klasördeki Resim ── */
.mayor-img-container img[src=""],
.mayor-img-container img:not([src]) {
    display: none;
}

/* Mobil Responsive: Küçük ekranlarda ikon küçülsün */
@media (max-width: 360px) {
    #weather-icon {
        font-size: 1rem;
    }

    #weather-temp {
        font-size: 0.65rem;
    }

    #weather-widget {
        padding: 5px 7px;
        min-width: 38px;
    }
}

/* Services Sidebar Compact UI */
.services-header-compact {
    margin-bottom: 20px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: 15px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.services-filter-tabs {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

.s-filter-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    padding: 10px 5px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.s-filter-btn i {
    font-size: 1rem;
}

.s-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.services-grid-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.service-compact-card {
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-width: 1px !important;
    transition: transform 0.2s ease;
}

.svc-img-wrap {
    position: relative;
    height: 140px;
    cursor: pointer;
}

.svc-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.svc-status-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.2);
}

.svc-status-tag.ongoing {
    background: rgba(246, 173, 85, 0.8);
}

.svc-status-tag.completed {
    background: rgba(40, 167, 69, 0.8);
}

.svc-content {
    padding: 12px 15px;
}

.svc-content h3 {
    font-size: 1rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.service-desc-wrapper {
    position: relative;
}

.service-desc {
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    margin-bottom: 0;
}

.service-read-more {
    color: var(--secondary);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    margin-left: 5px;
}

/* ── QR Scanner Modal ── */
.qr-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999999;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.qr-modal.active { display: flex; }

.qr-scanner-container {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 2px solid var(--primary);
    box-shadow: 0 0 30px rgba(0, 201, 255, 0.3);
}

#qr-reader { width: 100% !important; border: none !important; }

.qr-overlay-frame {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 70%; height: 70%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    pointer-events: none;
}

.qr-scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: var(--primary);
    box-shadow: 0 0 15px var(--primary);
    animation: scanMove 2s linear infinite;
}

@keyframes scanMove {
    0% { top: 15%; }
    50% { top: 85%; }
    100% { top: 15%; }
}

.qr-close-btn {
    margin-top: 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.qr-close-btn:hover { background: rgba(255, 0, 0, 0.2); border-color: #ff4444; }

.qr-scan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: #000;
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.95rem;
    margin: 20px auto 0;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 201, 255, 0.4);
}

.qr-scan-btn:active { transform: scale(0.95); }