/* ==========================================================
   Veterinary Directory - Premium Design System (Vanilla CSS)
   ========================================================== */

/* 1. CSS Custom Properties (Tokens) */
:root {
    /* Colors - Primary (Calming Medical Teal/Blue) */
    --clr-primary-50: #f0fdfa;
    --clr-primary-100: #ccfbf1;
    --clr-primary-500: #14b8a6;
    --clr-primary-600: #0d9488;
    --clr-primary-700: #0f766e;
    
    /* Colors - Accent/Urgency */
    --clr-urgent-50: #fef2f2;
    --clr-urgent-500: #ef4444;
    --clr-urgent-600: #dc2626;

    /* Colors - WhatsApp */
    --clr-wa: #25D366;
    --clr-wa-dark: #128C7E;

    /* Colors - Neutrals */
    --clr-gray-50: #f8fafc;
    --clr-gray-100: #f1f5f9;
    --clr-gray-200: #e2e8f0;
    --clr-gray-600: #475569;
    --clr-gray-800: #1e293b;
    --clr-gray-900: #0f172a;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glass: 0 4px 30px rgba(0, 0, 0, 0.1);

    /* Radii */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;
    
    /* Layout */
    --max-width: 1200px;
}

/* 2. Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--clr-gray-50);
    color: var(--clr-gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--clr-gray-900);
    line-height: 1.2;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
    border-radius: var(--radius-md);
}

/* 3. Layout Utilities */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.grid { display: grid; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }

/* 4. Glassmorphism Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--clr-primary-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* 5. Buttons & Badges */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: var(--font-body);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--clr-primary-600);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(13, 148, 136, 0.39);
}

.btn-primary:hover {
    background-color: var(--clr-primary-700);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.23);
    color: white;
}

.btn-urgent {
    background-color: var(--clr-urgent-500);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.39);
    animation: pulse 2s infinite;
}

.btn-urgent:hover {
    background-color: var(--clr-urgent-600);
    color: white;
}

.btn-whatsapp {
    background-color: var(--clr-wa);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(37, 211, 102, 0.39);
}

.btn-whatsapp:hover {
    background-color: var(--clr-wa-dark);
    transform: translateY(-2px);
    color: white;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-open {
    background: var(--clr-primary-100);
    color: var(--clr-primary-700);
}

.badge-24h {
    background: var(--clr-urgent-50);
    color: var(--clr-urgent-600);
}

/* 6. Cards */
.clinic-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid var(--clr-gray-100);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
}

.clinic-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--clr-primary-100);
}

/* 7. Hero Section with Gradient */
.hero {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--clr-primary-50) 0%, white 100%);
    text-align: center;
    border-bottom: 1px solid var(--clr-gray-200);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--clr-primary-700), var(--clr-primary-500));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: var(--clr-gray-600);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* 8. Search Area */
.search-box {
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    display: inline-flex;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    border: 1px solid var(--clr-gray-100);
}
.search-box input {
    flex: 1;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    outline: none;
    font-size: 1rem;
    font-family: var(--font-body);
}

/* 9. Forms & Inputs */
input[type="text"], input[type="email"], input[type="password"], select, textarea {
    border: 1px solid var(--clr-gray-300) !important;
    background-color: #ffffff !important;
    padding: 0.75rem 1rem !important;
    border-radius: var(--radius-md) !important;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--clr-gray-800);
    transition: all 0.2s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
    width: 100%;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--clr-primary-500) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15) !important;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--clr-gray-700);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hidden-mobile {
        display: none;
    }
}
