/* Website Custom Styles */

/* General Styles */
body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* RTL/LTR Support */
[dir="rtl"] {
    text-align: right;
}

[dir="ltr"] {
    text-align: left;
}

/* Font Support */
[dir="rtl"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="ltr"] {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Margin/Padding RTL Support */
[dir="rtl"] .me-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="rtl"] .me-3 { margin-left: 1rem !important; margin-right: 0 !important; }
[dir="rtl"] .ms-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="rtl"] .ms-3 { margin-right: 1rem !important; margin-left: 0 !important; }

[dir="ltr"] .me-1 { margin-right: 0.25rem !important; margin-left: 0 !important; }
[dir="ltr"] .me-2 { margin-right: 0.5rem !important; margin-left: 0 !important; }
[dir="ltr"] .me-3 { margin-right: 1rem !important; margin-left: 0 !important; }
[dir="ltr"] .ms-1 { margin-left: 0.25rem !important; margin-right: 0 !important; }
[dir="ltr"] .ms-2 { margin-left: 0.5rem !important; margin-right: 0 !important; }
[dir="ltr"] .ms-3 { margin-left: 1rem !important; margin-right: 0 !important; }

/* RTL Support */
[dir="rtl"] .carousel-control-prev {
    right: 0;
    left: auto;
}

[dir="rtl"] .carousel-control-next {
    left: 0;
    right: auto;
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .search-box {
        padding: 20px;
    }

    .search-box .row > div {
        margin-bottom: 15px;
    }

    .category-card {
        padding: 20px;
        margin-bottom: 20px;
    }

    .category-icon {
        font-size: 2rem;
    }

    .service-card .service-image {
        height: 150px;
    }

    .filter-sidebar {
        margin-bottom: 30px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .search-box .btn {
        margin-top: 10px;
    }

    .category-card {
        padding: 15px;
        text-align: center;
    }

    .service-card .p-4 {
        padding: 15px !important;
    }

    .price-tag {
        font-size: 0.9rem;
        padding: 3px 10px;
    }
}

/* Animation Improvements */
.category-card, .service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover, .service-card:hover {
    transform: translateY(-8px);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #53B153;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #53B153;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Print Styles */
@media print {
    .navbar, .footer, .filter-sidebar, .btn {
        display: none !important;
    }

    .service-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .category-card, .service-card {
        border: 2px solid #000;
    }

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

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .category-card, .service-card {
        transition: none;
    }

    .category-card:hover, .service-card:hover {
        transform: none;
    }

    .carousel {
        animation: none;
    }
}

/* Focus Styles for Accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Custom Badge Styles */
.badge {
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Improved Card Shadows */
.category-card, .service-card, .filter-sidebar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.category-card:hover, .service-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Improved Typography */
.fw-bold {
    font-weight: 600;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
}

/* Better Form Styling */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    padding: 12px 16px;
}

.form-control:focus, .form-select:focus {
    border-color: #53B153;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transition: all 0.2s ease;
}

/* Improved Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #123524 0%, #53B153 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    transform: translateY(-1px);
}

/* Loading Spinner for AJAX */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Tooltip Improvements */
.tooltip {
    font-size: 0.875rem;
}

/* Better Spacing */
.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 40px 0;
    }
}

/* Authentication Pages Styles */
.auth-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.auth-header {
    background: linear-gradient(135deg, #123524 0%, #53B153 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Password Strength Indicator */
.password-strength {
    height: 4px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength.weak {
    background-color: #dc3545;
}

.password-strength.medium {
    background-color: #ffc107;
}

.password-strength.strong {
    background-color: #28a745;
}

/* Form Validation Styles */
.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='m2.3 6.73.94-.94 1.88 1.88 3.75-3.75.94.94-4.69 4.69z'/%3e%3c/svg%3e");
}

.form-control.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 2.4 2.4m0-2.4L5.8 7'/%3e%3c/svg%3e");
}

/* Social Login Buttons */
.btn-google {
    background-color: #db4437;
    border-color: #db4437;
    color: white;
}

.btn-google:hover {
    background-color: #c23321;
    border-color: #c23321;
    color: white;
}

.btn-facebook {
    background-color: #3b5998;
    border-color: #3b5998;
    color: white;
}

.btn-facebook:hover {
    background-color: #2d4373;
    border-color: #2d4373;
    color: white;
}

/* Loading States */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading .btn-text {
    opacity: 0.6;
}

.btn-loading .spinner-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 1rem;
    height: 1rem;
}

/* Dropdown Menu Improvements */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    padding: 10px 0;
}

.dropdown-item {
    padding: 10px 20px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #53B153;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

/* Alert Improvements */
.alert {
    border: none;
    border-radius: 0;
    padding: 15px 0;
}

.alert-success {
    background: linear-gradient(90deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(90deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

/* Mobile Responsive for Auth Pages */
@media (max-width: 576px) {
    .auth-card .card-body {
        padding: 2rem 1.5rem !important;
    }

    .auth-header {
        font-size: 1.5rem !important;
    }

    .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

/* RTL Improvements for Dropdowns */
[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .dropdown-toggle::after {
    margin-left: 0;
    margin-right: 0.255em;
}

/* Form Focus Improvements */
.form-control:focus,
.form-select:focus {
    border-color: #53B153;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

/* Checkbox and Radio Improvements */
.form-check-input:checked {
    background-color: #53B153;
    border-color: #53B153;
}

.form-check-input:focus {
    border-color: #53B153;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

/* Progress Bar Improvements */
.progress {
    height: 6px;
    border-radius: 3px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Service Detail Page Styles */
.service-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
}

.service-main-image {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 15px;
}

.image-overlay {
    position: absolute;
    bottom: 20px;
    right: 20px;
}

.thumbnail-gallery .thumbnail {
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    cursor: pointer;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-gallery .thumbnail:hover,
.thumbnail-gallery .thumbnail.active {
    border-color: #53B153;
    transform: scale(1.05);
}

.thumbnail-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    border-radius: 6px;
}

.booking-card {
    position: static;
    border-radius: 15px;
}

.provider-card,
.policy-card {
    border-radius: 15px;
}

.provider-avatar .avatar-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #123524 0%, #53B153 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.feature-item,
.spec-item {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.feature-item:hover,
.spec-item:hover {
    background-color: #f8f9fa;
    padding-left: 10px;
    padding-right: 10px;
    margin-left: -10px;
    margin-right: -10px;
    border-radius: 5px;
}

.feature-item:last-child,
.spec-item:last-child {
    border-bottom: none;
}

.policy-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.description-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #53B153;
}

.price-amount {
    color: #53B153 !important;
}

.map-container {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Rating Stars */
.rating .fas.fa-star,
.rating .fas.fa-star-half-alt {
    color: #ffc107;
}

.rating .far.fa-star {
    color: #e9ecef;
}

/* Carousel Improvements */
.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
}

.carousel-control-prev {
    left: 20px;
}

.carousel-control-next {
    right: 20px;
}

.carousel-indicators {
    bottom: 20px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
}

/* Modal Improvements */
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.modal-header {
    border-bottom: 1px solid #f0f0f0;
    padding: 20px 25px;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 20px 25px;
}

/* Gallery Modal */
.gallery-thumb {
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-thumb:hover,
.gallery-thumb.border-primary {
    border-color: #53B153 !important;
    transform: scale(1.05);
}

/* Contact Options */
.contact-options .btn {
    padding: 12px;
    font-weight: 500;
    border-radius: 10px;
}

.share-options .btn {
    padding: 10px;
    font-size: 0.9rem;
    border-radius: 8px;
}

/* Responsive Design for Service Detail */
@media (max-width: 768px) {
    .service-main-image {
        height: 250px;
    }

    .booking-card {
        position: static;
        margin-top: 30px;
    }

    .thumbnail-gallery .thumbnail {
        height: 60px;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 40px;
        height: 40px;
    }

    .carousel-control-prev {
        left: 10px;
    }

    .carousel-control-next {
        right: 10px;
    }

    .description-content {
        padding: 15px;
    }

    .modal-xl {
        margin: 10px;
    }
}

@media (max-width: 576px) {
    .service-header h1 {
        font-size: 1.5rem;
    }

    .price-amount {
        font-size: 1.5rem;
    }

    .provider-avatar .avatar-circle {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .feature-item,
    .spec-item {
        font-size: 0.9rem;
    }

    .contact-options .row {
        gap: 10px;
    }
}

/* Animation for favorite button */
.btn-outline-danger.favorited {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    animation: heartBeat 0.5s ease-in-out;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Booking card behavior - removed sticky positioning for normal scrolling */

/* Service specifications table style */
.specifications-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.spec-key {
    color: #6c757d;
    font-weight: 500;
}

.spec-value {
    color: #495057;
}

/* Features list style */
.features-list {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
}

.feature-item i.fa-check {
    color: #28a745;
    font-weight: bold;
}
