/*
Theme Name: Fizyopedia
Theme URI: https://fizyopedia.com
Author: Istanbul Studio
Author URI: https://istanbulstudio.com
Description: Türkiye'nin en kapsamlı fizyoterapist rehberi. Premium tasarım, mobil öncelikli, SEO optimize.
Version: 2.1.6
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fizyopedia
Tags: health, directory, mobile-first, accessibility-ready
*/

/* =============================================================================
   DESIGN TOKENS
   ============================================================================= */

:root {
    /* Colors - Primary (Teal - Trust & Health) */
    --c-primary-50: #e6f7f5;
    --c-primary-100: #b3e8e2;
    --c-primary-200: #80d9cf;
    --c-primary-300: #4dcabc;
    --c-primary-400: #26bfad;
    --c-primary-500: #00a896;
    --c-primary-600: #009688;
    --c-primary: #00897b;
    --c-primary-800: #006b5f;
    --c-primary-900: #004d43;
    
    /* Colors - Secondary (Slate - Professional) */
    --c-secondary-50: #f8fafc;
    --c-secondary-100: #f1f5f9;
    --c-secondary-200: #e2e8f0;
    --c-secondary-300: #cbd5e1;
    --c-secondary-400: #94a3b8;
    --c-secondary-500: #64748b;
    --c-secondary-600: #475569;
    --c-secondary-700: #334155;
    --c-secondary: #1e293b;
    --c-secondary-900: #0f172a;
    
    /* Colors - Accent (Orange - Action) */
    --c-accent: #f97316;
    --c-accent-light: #fb923c;
    --c-accent-dark: #ea580c;
    
    /* Colors - Semantic */
    --c-success: #22c55e;
    --c-warning: #eab308;
    --c-error: #ef4444;
    --c-info: #3b82f6;
    
    /* Colors - Neutral */
    --c-white: #ffffff;
    --c-black: #000000;
    --c-gray-50: #f9fafb;
    --c-gray-100: #f3f4f6;
    --c-gray-200: #e5e7eb;
    --c-gray-300: #d1d5db;
    --c-gray-400: #9ca3af;
    --c-gray-500: #6b7280;
    --c-gray-600: #4b5563;
    --c-gray-700: #374151;
    --c-gray-800: #1f2937;
    --c-gray-900: #111827;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font-sans);
    
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    
    --font-normal: 400;
    --font-medium: 500;
    --font-semibold: 600;
    --font-bold: 700;
    
    --leading-tight: 1.25;
    --leading-snug: 1.375;
    --leading-normal: 1.5;
    --leading-relaxed: 1.625;
    
    /* Spacing */
    --space-0: 0;
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.375rem;
    --radius-lg: 0.5rem;
    --radius-xl: 0.75rem;
    --radius-2xl: 1rem;
    --radius-3xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --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-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Transitions */
    --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
    --ease-in: cubic-bezier(0.4, 0, 1, 1);
    --duration-fast: 150ms;
    --duration-base: 200ms;
    --duration-slow: 300ms;
    
    /* Layout */
    --container-sm: 640px;
    --container-md: 768px;
    --container-lg: 1024px;
    --container-xl: 1280px;
    --header-height: 64px;
    --bottom-nav-height: 56px;
    --sidebar-width: 280px;
    
    /* Z-Index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
    font-family: var(--font-sans);
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    color: var(--c-gray-700);
    background-color: var(--c-gray-50);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

input, button, textarea, select {
    font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: var(--font-bold);
    color: var(--c-secondary);
    line-height: var(--leading-tight);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

@media (min-width: 768px) {
    h1 { font-size: var(--text-5xl); }
    h2 { font-size: var(--text-4xl); }
    h3 { font-size: var(--text-3xl); }
}

p {
    margin-bottom: var(--space-4);
}

a:not([class]) {
    color: var(--c-primary);
    transition: color var(--duration-fast) var(--ease-in-out);
}

a:not([class]):hover {
    color: var(--c-primary-800);
}

/* =============================================================================
   LAYOUT
   ============================================================================= */

.container {
    width: 100%;
    max-width: var(--container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (min-width: 768px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
}

.section {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
}

@media (min-width: 768px) {
    .section {
        padding-top: var(--space-16);
        padding-bottom: var(--space-16);
    }
}

.section--white { background-color: var(--c-white); }
.section--gray { background-color: var(--c-gray-50); }

/* Grid */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Flex */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* =============================================================================
   COMPONENTS - BUTTONS
   ============================================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    line-height: 1;
    border-radius: var(--radius-lg);
    transition: all var(--duration-fast) var(--ease-in-out);
    white-space: nowrap;
    cursor: pointer;
}

.btn:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn svg {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

/* Primary Button */
.btn-primary {
    background-color: var(--c-primary);
    color: var(--c-white);
    box-shadow: 0 1px 2px 0 rgb(0 137 123 / 0.3);
}

.btn-primary:hover {
    background-color: var(--c-primary-800);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px 0 rgb(0 137 123 / 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button */
.btn-secondary {
    background-color: var(--c-white);
    color: var(--c-gray-700);
    border: 1px solid var(--c-gray-300);
}

.btn-secondary:hover {
    background-color: var(--c-gray-50);
    border-color: var(--c-gray-400);
}

/* Ghost Button */
.btn-ghost {
    background-color: transparent;
    color: var(--c-gray-600);
}

.btn-ghost:hover {
    background-color: var(--c-gray-100);
    color: var(--c-gray-900);
}

/* Accent Button */
.btn-accent {
    background-color: var(--c-accent);
    color: var(--c-white);
}

.btn-accent:hover {
    background-color: var(--c-accent-dark);
}

/* WhatsApp Button */
.btn-whatsapp {
    background-color: #25d366;
    color: var(--c-white);
}

.btn-whatsapp:hover {
    background-color: #20bd5a;
}

/* Phone Button */
.btn-phone {
    background-color: var(--c-info);
    color: var(--c-white);
}

.btn-phone:hover {
    background-color: #2563eb;
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
}

.btn-lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
}

.btn-icon {
    padding: var(--space-2);
}

.btn-block {
    width: 100%;
}

/* =============================================================================
   COMPONENTS - FORMS
   ============================================================================= */

.form-group {
    margin-bottom: var(--space-4);
}

.form-label {
    display: block;
    margin-bottom: var(--space-2);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--c-gray-700);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    color: var(--c-gray-900);
    background-color: var(--c-white);
    border: 1px solid var(--c-gray-300);
    border-radius: var(--radius-lg);
    transition: all var(--duration-fast) var(--ease-in-out);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgb(0 137 123 / 0.1);
}

.form-input::placeholder {
    color: var(--c-gray-400);
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-3) center;
    padding-right: var(--space-10);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-hint {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--c-gray-500);
}

.form-error {
    margin-top: var(--space-1);
    font-size: var(--text-sm);
    color: var(--c-error);
}

/* =============================================================================
   COMPONENTS - CARDS
   ============================================================================= */

.card {
    background-color: var(--c-white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--duration-base) var(--ease-in-out);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: var(--space-5);
}

.card-footer {
    padding: var(--space-4) var(--space-5);
    background-color: var(--c-gray-50);
    border-top: 1px solid var(--c-gray-100);
}

/* =============================================================================
   COMPONENTS - BADGES & TAGS
   ============================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-2);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-md);
}

.badge-primary {
    background-color: var(--c-primary-50);
    color: var(--c-primary-800);
}

.badge-success {
    background-color: rgb(34 197 94 / 0.1);
    color: #15803d;
}

.badge-gray {
    background-color: var(--c-gray-100);
    color: var(--c-gray-600);
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--c-gray-600);
    background-color: var(--c-gray-100);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) var(--ease-in-out);
}

.tag:hover {
    background-color: var(--c-gray-200);
    color: var(--c-gray-700);
}

.tag-primary {
    background-color: var(--c-primary-50);
    color: var(--c-primary);
}

.tag-primary:hover {
    background-color: var(--c-primary-100);
}

/* =============================================================================
   UTILITIES
   ============================================================================= */

/* Text */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--c-primary); }
.text-secondary { color: var(--c-secondary); }
.text-gray-400 { color: var(--c-gray-400); }
.text-gray-500 { color: var(--c-gray-500); }
.text-gray-600 { color: var(--c-gray-600); }
.text-gray-700 { color: var(--c-gray-700); }
.text-white { color: var(--c-white); }

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Spacing */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }

.px-3 { padding-left: var(--space-3); padding-right: var(--space-3); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline-flex { display: inline-flex; }

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:block { display: block; }
    .md\:flex { display: flex; }
}

@media (min-width: 1024px) {
    .lg\:hidden { display: none; }
    .lg\:block { display: block; }
    .lg\:flex { display: flex; }
}

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Border */
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }
.rounded-full { border-radius: var(--radius-full); }

.border { border: 1px solid var(--c-gray-200); }
.border-t { border-top: 1px solid var(--c-gray-200); }
.border-b { border-bottom: 1px solid var(--c-gray-200); }

/* Shadow */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* Background */
.bg-white { background-color: var(--c-white); }
.bg-gray-50 { background-color: var(--c-gray-50); }
.bg-gray-100 { background-color: var(--c-gray-100); }
.bg-primary { background-color: var(--c-primary); }
.bg-primary-50 { background-color: var(--c-primary-50); }

/* Width/Height */
.w-full { width: 100%; }
.h-full { height: 100%; }
.min-h-screen { min-height: 100vh; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* =============================================================================
   ACCESSIBILITY
   ============================================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.focus-visible:focus-visible {
    outline: 2px solid var(--c-primary);
    outline-offset: 2px;
}

/* Skip Link */
.skip-link {
    position: fixed;
    top: -100px;
    left: var(--space-4);
    z-index: var(--z-tooltip);
    padding: var(--space-3) var(--space-4);
    background-color: var(--c-primary);
    color: var(--c-white);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-lg);
    transition: top var(--duration-fast) var(--ease-out);
}

.skip-link:focus {
    top: var(--space-4);
}

/* =============================================================================
   ANIMATIONS
   ============================================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.animate-fade-in { animation: fadeIn var(--duration-base) var(--ease-out); }
.animate-slide-up { animation: slideUp var(--duration-base) var(--ease-out); }
.animate-spin { animation: spin 1s linear infinite; }
.animate-pulse { animation: pulse 2s var(--ease-in-out) infinite; }

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--c-gray-200) 25%, var(--c-gray-100) 50%, var(--c-gray-200) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease-in-out infinite;
}

@keyframes skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
    .no-print,
    .site-header,
    .site-footer,
    .bottom-nav {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* =============================================================================
   REDUCED MOTION
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
