/* Custom CSS for Advocate Connect */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

.hero-stats .stat-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

/* Search Section */
.search-container {
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.search-container:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 5px 5px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

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

/* Advocate Cards */
.advocate-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.advocate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.premium-card {
    border: 2px solid var(--warning-color);
    background: linear-gradient(145deg, #fff9e6 0%, #ffffff 100%);
}

.premium-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--warning-color);
    color: var(--dark-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 2;
}

.advocate-avatar {
    width: 60px;
    height: 60px;
}

.advocate-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.rating i {
    font-size: 0.9rem;
}

/* Benefits Section */
.benefits-list .benefit-item {
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 8px;
}

.benefits-list .benefit-item:hover {
    background: var(--light-color);
    transform: translateX(10px);
}

/* Pricing Cards */
.pricing-card {
    transition: all 0.3s ease;
    border-radius: 15px;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

/* Sidebar */
.sidebar .ad-banner {
    transition: all 0.3s ease;
}

.sidebar .ad-banner:hover {
    transform: scale(1.02);
}

/* Loading States */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.like-btn.liked {
    background: var(--danger-color);
    color: white;
    border-color: var(--danger-color);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Advertisement Banners */
.ad-banner img {
    max-width: 100%;
    height: auto;
}

/* Statistics */
.stat-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .advocate-card {
        margin-bottom: 2rem;
    }
    
    .premium-badge {
        right: 10px;
        top: 10px;
        font-size: 0.7rem;
        padding: 3px 8px;
    }
    
    .advocate-avatar {
        width: 50px;
        height: 50px;
    }
}

/* Custom scrollbar for suggestions */
.suggestions-dropdown::-webkit-scrollbar {
    width: 6px;
}

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

.suggestions-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.suggestions-dropdown::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

.btn:hover {
    transform: translateY(-2px);
}

.like-btn.liked {
    color: var(--danger-color) !important;
    background: rgba(220, 53, 69, 0.1);
}

.like-btn.liked i {
    color: var(--danger-color);
}

/* Comments Section */
.comment-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

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

.comment-author {
    font-weight: 600;
    color: var(--primary-color);
}

.comment-time {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Tables */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.075);
}

/* Admin Dashboard */
.admin-header {
    background: linear-gradient(135deg, var(--dark-color) 0%, #495057 100%);
    color: white;
    padding: 2rem 0;
}

.dashboard-card {
    border: none;
    border-radius: 15px;
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

/* Status Badges */
.status-active {
    background: var(--success-color);
    color: white;
}

.status-inactive {
    background: var(--secondary-color);
    color: white;
}

.status-pending {
    background: var(--warning-color);
    color: var(--dark-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .advocate-card {
        margin-bottom: 1rem;
    }
    
    .search-container {
        margin-bottom: 2rem;
    }
    
    .benefits-list .benefit-item:hover {
        transform: none;
    }
}

@media (max-width: 576px) {
    .hero-stats .stat-item {
        margin-bottom: 1rem;
    }
    
    .d-flex.gap-3 {
        flex-direction: column;
        gap: 1rem !important;
    }
    
    .btn-lg {
        width: 100%;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .search-container {
        background: var(--dark-color);
        color: white;
    }
    
    .advocate-card {
        background: var(--dark-color);
        color: white;
        border-color: #495057;
    }
    
    .suggestions-dropdown {
        background: var(--dark-color);
        border-color: #495057;
    }
    
    .suggestion-item:hover {
        background-color: #495057;
    }
}

/* Print styles */
@media print {
    .navbar,
    .sidebar,
    .admin-sidebar,
    .ad-banner,
    .btn,
    .modal {
        display: none !important;
    }
    
    .advocate-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #000;
    }
}
