/**
 * Reshi.rs - Modern Design System
 * Professional UI/UX with Bootstrap 5
 */

:root {
    /* Brand Colors */
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --primary-light: #e7f3ff;
    --secondary-color: #F8F9FA;
    --text-color: #343A40;
    --text-muted: #6c757d;
    --bg-color: #FFFFFF;
    
    /* Status Colors */
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }

/* Navigation */
.navbar {
    background-color: var(--bg-color) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color) !important;
    text-decoration: none;
}

.navbar-brand img {
    height: 45px;
    margin-right: 12px;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.375rem;
    transition: var(--transition);
    margin: 0 0.25rem;
}

.nav-link:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color) !important;
}

.nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--primary-light);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.625rem 1.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Cards */
.card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 0.5rem;
}

.featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.premium-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
    font-size: 1.1rem;
}

.rating-stars .bi-star-fill {
    color: #ffc107;
}

.rating-stars .bi-star-half {
    color: #ffc107;
}

.rating-stars .bi-star {
    color: #e0e0e0;
}

/* Star Rating Input */
.star-rating-input {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 0.25rem;
}

.star-rating-input input[type="radio"] {
    display: none;
}

.star-rating-input label {
    font-size: 2rem;
    color: #e0e0e0;
    cursor: pointer;
    transition: var(--transition);
}

.star-rating-input label:hover,
.star-rating-input label:hover ~ label,
.star-rating-input input[type="radio"]:checked ~ label {
    color: #ffc107;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Search Form */
.search-form {
    background: white;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    margin-top: 2rem;
}

.search-form .form-label {
    font-weight: 500;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.search-form .form-control,
.search-form .form-select {
    border: 2px solid var(--secondary-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.search-form .form-control:focus,
.search-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.1);
}

/* Filters */
.filter-bar {
    background: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    background: white;
    border: 2px solid var(--secondary-color);
    color: var(--text-color);
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
    margin: 0.25rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Profile Cards */
.provider-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.provider-card .card-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--secondary-color);
}

.provider-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.provider-card:hover .card-img-wrapper img {
    transform: scale(1.1);
}

.provider-card .rating-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

/* Gallery Carousel */
.gallery-carousel {
    margin: 2rem 0;
}

.gallery-item {
    cursor: pointer;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* Multi-step Form */
.step-indicator {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.step-indicator::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--secondary-color);
    z-index: 0;
}

.step {
    position: relative;
    z-index: 1;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 3px solid var(--secondary-color);
    background: white;
    color: var(--text-muted);
}

.step.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.step.completed {
    border-color: var(--success-color);
    background: var(--success-color);
    color: white;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 -4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
}

.sticky-cta.active {
    display: block;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 3rem;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stats-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-label {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Profile Image */
.profile-image {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* Footer */
footer {
    background-color: var(--text-color);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
    box-shadow: var(--shadow-sm);
}

/* Loading Spinner */
.spinner-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9998;
    align-items: center;
    justify-content: center;
}

.spinner-overlay.active {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .search-form {
        padding: 1.5rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .sticky-cta {
        padding: 0.75rem;
    }
    
    .sticky-cta .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
    background-color: var(--secondary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-md) !important;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .sticky-cta,
    footer {
        display: none;
    }
}
