/* Reset & Base */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-color: #f8f9fa;
    --text-color: #1f2937; /* Gray 900 */
    --link-color: #4F46E5; /* Indigo 600 */
    --border-color: #e5e7eb; /* Gray 200 */
    --card-bg: #ffffff;
    --text-muted: #6b7280; /* Gray 500 */
    --spacing: 16px;
    --emergency-color: #ef4444; /* Red 500 */
    --whatsapp-color: #22c55e; /* Green 500 */
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --font-main: 'Outfit', sans-serif;
}

.provider-name {
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 600;
    color: #111827; /* Gray 900 */
    line-height: 1.2;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, #e0f2fe 0%, #d1fae5 100%); /* Light blue to light green */
    color: var(--text-color);
    line-height: 1.5;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh; /* Ensure gradient covers full viewport */
}

a {
    text-decoration: none;
    color: var(--link-color);
    transition: color 0.2s;
}

/* Navigation Menu */
nav a:hover {
    color: #4338CA; /* Darker indigo on hover */
    text-decoration: underline;
}

.container {
    max-width: 1200px; /* Increased to fit 6 columns */
    margin: 0 auto;
    padding: 4px; /* Minimal padding to reduce blank space */
}

@media (max-width: 600px) {
    .container {
        padding: 4px; /* Minimal padding for maximum space */
    }
    
    header {
        margin-bottom: 8px !important;
        transition: all 0.3s ease;
    }

    header img {
        height: 180px !important; /* Larger logo on mobile as requested */
        margin-bottom: 2px !important;
        transition: all 0.3s ease;
    }

    header div {
        font-size: 0.9rem !important; /* Smaller text */
        margin-bottom: 6px !important;
        transition: all 0.3s ease;
    }

    .search-box-wrapper {
        margin-bottom: 8px !important;
        transition: all 0.3s ease;
    }
    
    nav {
        padding: 4px 0 !important; 
        margin-bottom: 5px !important;
        transition: all 0.3s ease;
    }
    
    .search-box {
        padding: 10px 14px !important;
    }

    /* Target the subtitle paragraphs specifically on homepage */
    header div p {
        margin: 0 !important;
        font-size: 0.85rem !important;
    }

    /* Reduce spacing for category title on category.html */
    #category-title {
        margin-bottom: 8px !important;
        font-size: 1.25rem !important;
    }
    
    .back-link {
        margin-bottom: 4px !important;
        font-size: 0.8rem !important;
    }

    /* Mobile Search Optimization - Compact mode when search is active */
    body.search-active nav {
        display: none !important;
    }

    body.search-active header {
        margin-bottom: 4px !important;
    }

    body.search-active header img {
        height: 60px !important;
        margin-bottom: 0 !important;
    }

    body.search-active header div {
        display: none !important;
    }

    body.search-active .contribute-btn,
    body.search-active .contribute-btn + p {
        display: none !important;
    }

    /* Sticky search box at top when active */
    body.search-active .search-box-wrapper {
        position: sticky;
        top: 0;
        z-index: 100;
        background: linear-gradient(135deg, #e0f2fe 0%, #d1fae5 100%);
        padding: 8px 4px;
        margin: 0 -4px 12px -4px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* ... existing code ... */

@media (min-width: 900px) { /* Desktop */
    .category-list {
        grid-template-columns: repeat(6, 1fr); /* 6 columns as requested */
    }
}

@media (min-width: 600px) and (max-width: 899px) { /* Tablet */
    .category-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Header */
header {
    margin-bottom: 5px; /* Minimal space below header */
    border-bottom: none;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}



h1 {
    font-family: var(--font-main);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

h1 a {
    color: var(--text-color);
}

.subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Search */
.search-box-wrapper {
    position: relative;
    margin-bottom: 10px; /* Reduced for tighter layout */
}

.search-box {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    font-family: var(--font-main);
    border: 1px solid transparent;
    border-radius: var(--radius-lg) !important;
    background: var(--card-bg);
    box-shadow: var(--shadow-md);
    transition: all 0.2s ease;
    color: var(--text-color);
}

.search-box:focus {
    outline: none;
    box-shadow: var(--shadow-lg);
    border-color: var(--link-color);
}

.search-box::placeholder {
    color: #9ca3af;
}

/* Voice Search Button */
.voice-search-btn {
    position: relative;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    /* Mobile optimization */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.voice-search-btn:hover {
    background: rgba(79, 70, 229, 0.1);
    transform: scale(1.1);
}

.voice-search-btn:active {
    transform: scale(0.95);
}

.voice-search-btn.listening {
    background: rgba(239, 68, 68, 0.1);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

.voice-search-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}


/* Contribute Button */
.contribute-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: white;
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
}

.contribute-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
}

.contribute-btn:active {
    transform: translateY(0);
}

/* Categories Grid - 2 Columns on Mobile for better stretch and size */
/* Categories Grid */
.category-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr)); /* Force equal widths */
    grid-auto-rows: 180px; /* Increased height for larger emojis */
    gap: 16px;
}

.category-list a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid transparent;
    color: var(--text-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    width: 100%;
    min-width: 0; /* Allow grid to control width */
    box-sizing: border-box; /* Include padding in width */
    overflow: hidden;
}

@media (hover: hover) {
    .category-list a:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(79, 70, 229, 0.1);
    }

    .category-list a:hover .cat-icon {
        transform: scale(1.1);
    }
}

.category-list a:active {
    transform: scale(0.98);
    background: #f9fafb;
}

/* Category Icons - 3D Emojis */
.cat-icon {
    font-size: 3.5rem;
    margin-bottom: 8px;
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    /* Emojis render 3D natively on most systems */
}

.category-card:hover .cat-icon {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 6px 8px rgba(0,0,0,0.15));
}

.cat-text {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    width: 100%;
    padding: 0 4px;
}

.cat-name-en {
    font-weight: 600;
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.cat-name-gu {
    font-size: 0.85rem;
    color: #000000;
    font-weight: 700;
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

@media (min-width: 900px) {
    .category-list {
        grid-template-columns: repeat(6, minmax(0, 1fr)); /* Force equal widths */
    }
}

@media (min-width: 600px) and (max-width: 899px) {
    .category-list {
        grid-template-columns: repeat(4, minmax(0, 1fr)); /* Force equal widths */
    }
}

/* Provider List */
.provider-list {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr; /* Mobile: 1 column */
    gap: 16px;
    grid-auto-rows: 1fr; /* Equal row heights */
    margin-top: 24px; /* Space from search box */
}

@media (min-width: 600px) {
    .provider-list {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 equal columns */
    }
}

@media (min-width: 900px) {
    .provider-list {
        grid-template-columns: repeat(3, 1fr); /* Desktop: 3 equal columns */
    }
}

.provider-card {
    background: var(--card-bg);
    border: 1px solid transparent;
    padding: 16px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    min-height: 160px; /* Enforce minimum height (Increased) */
    height: 100%; /* Fill grid cell */
}

.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Top Row */
.provider-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.provider-name {
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Limit to 2 lines */
    line-clamp: 2; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    padding-right: 70px; /* Space for Top Rated badge */
}

.provider-area {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: right;
    white-space: nowrap;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 999px;
}

/* Actions */
.provider-actions {
    display: flex;
    gap: 6px; /* Reduced gap for 3 buttons */
    margin-top: 8px;
}

.action-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 10px; /* Reduced padding */
    border-radius: var(--radius-md);
    font-size: 0.85rem; /* Smaller font */
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-call {
    background: var(--link-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
    font-size: 0.75rem; /* Smaller font for phone numbers */
    white-space: nowrap; /* Prevent wrapping */
}

.btn-call:hover {
    background: #4338ca; /* darker indigo */
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(79, 70, 229, 0.3);
}

.btn-call:active {
    transform: translateY(0);
}

.btn-whatsapp {
    background-color: var(--whatsapp-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}

.btn-whatsapp:hover {
    background-color: #16a34a; /* darker green */
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(34, 197, 94, 0.3);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

.btn-webpage {
    background-color: #22c55e; /* Parrot Green */
    color: white;
    box-shadow: 0 4px 6px -1px rgba(34, 197, 94, 0.2);
}

.btn-webpage:hover {
    background-color: #16a34a; /* Darker Green */
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(34, 197, 94, 0.3);
}

.btn-webpage:active {
    transform: translateY(0);
}

.btn-disabled {
    background-color: #e5e7eb; /* Gray 200 */
    color: #9ca3af; /* Gray 400 */
    cursor: not-allowed;
    opacity: 0.6;
    box-shadow: none;
}

.btn-disabled:hover {
    background-color: #e5e7eb;
    transform: none;
    box-shadow: none;
}

.tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 2px;
}

.tag {
    font-size: 0.7rem;
    padding: 1px 5px;
    background: #f1f3f5;
    border-radius: 3px;
    color: #555;
    border: 1px solid #e9ecef;
}

.tag.emergency {
    background: #ffe3e3;
    color: var(--emergency-color);
    border-color: #ffc9c9;
}

/* Utility */
.back-link {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 20px 0;
}

/* Footer */
footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

/* Provider Badges & Verification */
.verified-icon {
    color: #1DA1F2; /* Verified Blue */
    margin-left: 5px;
    font-size: 1rem;
    font-weight: 900;
    display: inline-block;
}

.provider-badge {
    position: absolute;
    top: 0;
    padding: 4px 10px;
    font-size: 0.65rem;
    font-weight: 700;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}

.badge-top-right {
    right: 0;
    background: linear-gradient(135deg, #FFD700, #F59E0B); /* Gold */
    color: #4B3621;
    border-bottom-left-radius: 8px;
}

.badge-top-left {
    left: 0;
    background: linear-gradient(135deg, #1DA1F2, #0077b5); /* Verified Blue */
    color: #fff;
    border-bottom-right-radius: 8px;
}

.provider-card {
    position: relative;
    overflow: hidden; 
}
.provider-header
 >> assets\css\style.css & echo     flex-direction: column; >> assets\css\style.css & echo     align-items: flex-start; >> assets\css\style.css & echo     gap: 4px; >> assets\css\style.css & echo     margin-top: 26px; >> assets\css\style.css & echo 
/*
Final
Header
Adjustment
*/
li.provider-card
.provider-header
 >> assets\css\style.css & echo     margin-top: 40px !important; >> assets\css\style.css & echo 
/*
Force
Header
Down
with
Specificity
*/
