/**
 * İşletme Rehberi (Directory) - Mobile First CSS
 * sosyotik.com/rehber
 * 
 * Register.php ile uyumlu renk paleti
 */

/* Utility Classes */
.hidden {
    display: none !important;
}

:root {
    /* Ana renkler - Register.php ile uyumlu */
    --primary: #000000;
    --primary-light: #333333;
    --accent: #5D87FF;
    --accent-dark: #4570EA;
    
    /* Metin renkleri */
    --text: #000000;
    --text-muted: #666666;
    --text-light: #999999;
    
    /* Arka plan renkleri */
    --bg: #F5F7FA;
    --bg-white: #FFFFFF;
    --card-bg: #FFFFFF;
    
    /* Border ve gölge */
    --border: #E5E9F2;
    --border-light: #EEEEEE;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
    
    /* Diğer */
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
}

/* =====================================================
   GLOBAL HEADER (layouts/header.php)
   ===================================================== */
.site-header {
    background: var(--primary);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
}

.header-logo img {
    height: 28px;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.nav-link.active {
    color: #fff;
    background: rgba(255,255,255,0.15);
}

.nav-link i {
    font-size: 18px;
}

/* Header Actions */
.header-actions {
    display: none;
    align-items: center;
    gap: 10px;
}

.btn-header {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-ghost {
    color: rgba(255,255,255,0.8);
    background: transparent;
}

.btn-ghost:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.btn-primary {
    color: #000;
    background: #fff;
}

.btn-primary:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: var(--radius-sm);
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.mobile-menu-toggle i {
    font-size: 24px;
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    flex-direction: column;
    padding: 16px;
    background: var(--primary);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
}

.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-nav-actions .btn-header {
    text-align: center;
    padding: 12px 16px;
}

/* =====================================================
   GLOBAL FOOTER (layouts/footer.php)
   ===================================================== */
.site-footer {
    background: var(--primary);
    color: #fff;
    padding: 48px 0 24px;
    margin-top: 60px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand {
    max-width: 280px;
}

.footer-logo {
    display: inline-flex;
    text-decoration: none;
    margin-bottom: 16px;
}

.footer-logo span {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.footer-description {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    color: #fff;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
}

.social-link i {
    font-size: 18px;
}

.footer-links h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    color: #fff;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

.footer-made {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-made i {
    color: #ff6b6b;
    font-size: 14px;
}

/* =====================================================
   PAGE HEADER (Rehber Hero)
   ===================================================== */
.page-header {
    background: var(--primary);
    padding: 32px 16px 60px;
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.page-header h1 i {
    font-size: 1.5rem;
}

.page-header p {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* Legacy header class için uyumluluk */
.header {
    background: var(--primary);
    padding: 32px 16px 60px;
    text-align: center;
    color: white;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.header p {
    font-size: 0.95rem;
    opacity: 0.7;
}

/* =====================================================
   CONTAINER
   ===================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* =====================================================
   SEARCH BOX - Mobile First
   ===================================================== */
.search-box {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px;
    margin-top: -40px;
    margin-bottom: 20px;
}

.search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.search-form > input[type="text"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    background: white;
}

.search-form > input[type="text"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 135, 255, 0.1);
}

.search-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* =====================================================
   CUSTOM DROPDOWN
   ===================================================== */
.custom-dropdown {
    position: relative;
    width: 100%;
}

/* Kategori dropdown menüsü için özel genişlik */
#categoryDropdown .dropdown-menu,
#subCategoryDropdown .dropdown-menu {
    min-width: 280px;
}

.custom-dropdown.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.dropdown-toggle {
    width: 100%;
    padding: 12px 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dropdown-toggle:hover {
    border-color: var(--primary);
}

.dropdown-toggle:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(93, 135, 255, 0.1);
}

.dropdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
}

.dropdown-label i {
    font-size: 18px;
    flex-shrink: 0;
}

.dropdown-label span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-arrow {
    font-size: 14px;
    color: var(--text-muted);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 240px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 1000;
    overflow: hidden;
}

.custom-dropdown.open .dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.15s ease-out;
}

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

.dropdown-menu-scroll {
    max-height: 280px;
    overflow-y: auto;
}

.dropdown-menu-scroll::-webkit-scrollbar {
    width: 6px;
}

.dropdown-menu-scroll::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dropdown-menu-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.dropdown-search {
    position: sticky;
    top: 0;
    background: white;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-search i {
    color: var(--text-muted);
    font-size: 16px;
}

.dropdown-search input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    background: transparent;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
    transition: background 0.15s;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: rgba(93, 135, 255, 0.06);
}

.dropdown-item.active {
    background: rgba(93, 135, 255, 0.1);
    color: var(--primary);
    font-weight: 500;
}

.dropdown-item i {
    font-size: 18px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-item span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Alt Kategori Stilleri - artık kullanılmıyor ama bırakalım */
.dropdown-parent {
    font-weight: 600;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: relative;
}

.dropdown-parent .sub-arrow {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
    opacity: 0.5;
}

.dropdown-child {
    padding-left: 46px !important;
    font-size: 13px;
    font-weight: 400;
    background: #fff;
    border-left: 3px solid transparent;
    position: relative;
}

.dropdown-child::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 50%;
    width: 8px;
    height: 1px;
    background: #ddd;
}

.dropdown-child:hover {
    border-left-color: var(--primary);
    background: rgba(93, 135, 255, 0.04);
}

.dropdown-child.active {
    border-left-color: var(--primary);
    background: rgba(93, 135, 255, 0.08);
}

.dropdown-child i {
    font-size: 16px;
}

/* =====================================================
   ACTIVE FILTERS
   ===================================================== */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(93, 135, 255, 0.1);
    border: 1px solid rgba(93, 135, 255, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s;
}

.filter-tag:hover {
    background: rgba(93, 135, 255, 0.15);
    border-color: var(--primary);
}

.filter-tag .ti-x {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 2px;
}

.filter-tag:hover .ti-x {
    opacity: 1;
}

.filter-clear {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
}

.filter-clear:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* =====================================================
   RESULTS INFO
   ===================================================== */
.results-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.results-info h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.results-count {
    color: var(--text-muted);
    font-size: 13px;
}

/* =====================================================
   BUSINESS GRID - Mobile First
   ===================================================== */
.business-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 30px;
}

/* =====================================================
   BUSINESS CARD
   ===================================================== */
.business-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: visible;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
}

.business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.business-cover {
    height: 120px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}

.business-cover img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.business-avatar {
    position: absolute;
    top: 90px;
    left: 16px;
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: white;
    padding: 3px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}

.business-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 7px;
    object-fit: cover;
}

.business-avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 7px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    font-weight: 700;
}

.verified-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #10B981;
    color: white;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 3px;
}

.business-content {
    padding: 36px 16px 16px;
}

.business-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.business-tagline {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.business-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.business-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.business-meta .status-open {
    color: #22c55e;
    font-weight: 500;
}

.business-meta .status-closed {
    color: #ef4444;
    font-weight: 500;
}

.business-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
    margin-top: 10px;
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin: 30px 0;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: var(--text);
    background: var(--card-bg);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.empty-state i {
    font-size: 56px;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer a {
    color: var(--primary);
    text-decoration: none;
}

/* =====================================================
   TABLET BREAKPOINT (min-width: 600px)
   ===================================================== */
@media (min-width: 600px) {
    .header {
        padding: 50px 20px 70px;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .search-box {
        padding: 20px;
        margin-top: -45px;
    }
    
    .search-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .search-form > input[type="text"] {
        grid-column: 1 / -1;
    }
    
    .search-btn {
        grid-column: 1 / -1;
    }
    
    .active-filters {
        gap: 10px;
    }
    
    .business-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .results-info {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

/* =====================================================
   DESKTOP BREAKPOINT (min-width: 992px)
   ===================================================== */
@media (min-width: 992px) {
    .header {
        padding: 60px 20px 80px;
    }
    
    .header h1 {
        font-size: 2.5rem;
    }
    
    .header p {
        font-size: 1.1rem;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .search-box {
        padding: 24px;
        margin-top: -50px;
        margin-bottom: 30px;
    }
    
    .search-form {
        grid-template-columns: 1.2fr 1.5fr 1.3fr 1fr 1fr auto;
        align-items: start;
    }
    
    .search-form > input[type="text"] {
        grid-column: auto;
    }
    
    .search-btn {
        grid-column: auto;
        padding: 12px 28px;
        height: 100%;
    }
    
    .dropdown-menu {
        min-width: 220px;
    }
    
    .results-info {
        margin-bottom: 20px;
    }
    
    .results-info h2 {
        font-size: 1.25rem;
    }
    
    .business-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
        margin-bottom: 40px;
    }
    
    .business-cover {
        height: 140px;
    }
    
    .business-avatar {
        top: 110px;
        left: 20px;
        width: 70px;
        height: 70px;
        border-radius: 12px;
        padding: 4px;
    }
    
    .business-avatar img {
        border-radius: 8px;
    }
    
    .business-avatar-placeholder {
        border-radius: 8px;
        font-size: 24px;
    }
    
    .business-content {
        padding: 40px 20px 20px;
    }
    
    .business-name {
        font-size: 1.1rem;
    }
    
    .business-meta {
        font-size: 13px;
        gap: 12px;
    }
    
    .business-category {
        font-size: 12px;
        margin-top: 12px;
    }
    
    .pagination {
        margin: 40px 0;
        gap: 8px;
    }
    
    .pagination a,
    .pagination span {
        padding: 10px 16px;
    }
    
    .empty-state {
        padding: 60px 20px;
    }
    
    .empty-state i {
        font-size: 64px;
    }
    
    .empty-state h3 {
        font-size: 1.25rem;
    }
    
    .footer {
        padding: 40px 20px;
        font-size: 14px;
    }
    
    /* Desktop Header */
    .desktop-nav {
        display: flex;
    }
    
    .header-actions {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .mobile-nav {
        display: none !important;
    }
    
    /* Desktop Footer */
    .footer-top {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 48px;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* =====================================================
   LARGE DESKTOP (min-width: 1200px)
   ===================================================== */
@media (min-width: 1200px) {
    .business-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .header-container {
        padding: 0 24px;
    }
    
    .footer-container {
        padding: 0 24px;
    }
}
