/* ============================================
   ملف: /assets/css/frontend.css
   تصميم الواجهة الأمامية للموقع
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    direction: rtl;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo i {
    font-size: 36px;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 20px;
}

.nav a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav a:hover,
.nav a.active {
    background: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Search Box */
.search-container {
    display: flex;
    justify-content: center;
}

.search-box {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.search-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #7f8c8d;
    font-size: 20px;
    z-index: 1;
}

#searchInput {
    width: 100%;
    padding: 18px 60px 18px 20px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    background: white;
    border-radius: 15px;
    margin-top: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 15px 20px;
    border-bottom: 1px solid #ecf0f1;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: right;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.result-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

.result-info {
    font-size: 14px;
    color: #7f8c8d;
}

.result-info i {
    margin-left: 5px;
}

.no-results {
    padding: 30px;
    text-align: center;
    color: #7f8c8d;
}

/* Categories Section */
.categories-section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 40px;
}

.section-title i {
    margin-left: 10px;
    color: #667eea;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.category-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(102, 126, 234, 0.3);
}

.category-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
}

.category-name {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 10px;
}

.category-count {
    color: #7f8c8d;
    font-size: 15px;
}

.category-count i {
    margin-left: 5px;
    color: #667eea;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .categories-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .category-card {
        padding: 20px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .category-name {
        font-size: 18px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


/* Places Grid */
.places-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.place-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: #2c3e50;
    cursor: pointer;
}

.place-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.2);
}

.place-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
}

.place-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #7f8c8d;
    font-size: 14px;
}

.place-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.place-info-item i {
    color: #667eea;
    width: 20px;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background: white;
    color: #667eea;
    text-decoration: none;
    border: 2px solid #667eea;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 16px;
}

.back-btn:hover {
    background: #667eea;
    color: white;
}

.no-places {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.no-places i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}


/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    left: 20px;
    top: 20px;
    color: white;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.place-details-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 20px 20px 0 0;
    flex-shrink: 0;
}

.place-details-title {
    font-size: 22px;
    font-weight: 700;
    padding-left: 50px;
    margin: 0;
}

.place-details-location {
    font-size: 13px;
    opacity: 0.9;
    margin: 6px 0 0 0;
    padding-left: 50px;
}

.place-details-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Map Section */
.map-preview {
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.map-preview iframe {
    height: 200px;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.action-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.action-btn.success {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.action-btn.success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.action-btn.info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.action-btn.info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.action-btn i {
    font-size: 16px;
}

/* Details Grid */
.details-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.detail-row:hover {
    background: #ecf0f1;
}

.detail-icon-small {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.detail-text {
    flex: 1;
}

.detail-label-small {
    font-size: 11px;
    color: #7f8c8d;
    margin-bottom: 3px;
    font-weight: 600;
    text-transform: uppercase;
}

.detail-value-small {
    font-size: 14px;
    color: #2c3e50;
    word-break: break-word;
}

.detail-value-small a {
    color: #667eea;
    text-decoration: none;
}

.detail-value-small a:hover {
    text-decoration: underline;
}

.place-details-body {
    padding: 30px;
}



@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .place-details-header {
        padding: 30px 20px;
    }
    
    .place-details-title {
        font-size: 22px;
    }
    
    .place-details-body {
        padding: 20px;
    }
    
    .detail-item {
        padding: 15px;
    }
    
    /* الأزرار على الموبايل */
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
    
    .action-btn.info {
        order: -1;
    }
}


/* Load More Button */
.load-more-btn {
    padding: 15px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.load-more-btn i {
    margin-left: 8px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-5px);
    }
    60% {
        transform: translateY(-3px);
    }
}

/* Gender Filter Buttons */
.gender-filter {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.gender-btn {
    background: white;
    color: #667eea;
    border: 2px solid white;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.gender-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gender-btn.active {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    border-color: transparent;
}

.gender-btn i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .gender-filter {
        gap: 10px;
    }
    
    .gender-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .gender-btn i {
        font-size: 16px;
    }
}
