/* Custom styles for Longevity Clinic Directory */

/* Navigation styling */
.navbar .nav-link,
.navbar .navbar-nav .nav-link,
.navbar .dropdown-item {
    color: #f3f5f7 !important;
}

.navbar .nav-link:hover,
.navbar .navbar-nav .nav-link:hover,
.navbar .dropdown-item:hover {
    color: #ffffff !important;
}

.navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Consistent border-radius variables */
:root {
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Override Bootstrap's default border-radius */
    --bs-border-radius: var(--border-radius-sm);
    --bs-border-radius-sm: calc(var(--border-radius-sm) * 0.75);
    --bs-border-radius-lg: var(--border-radius-md);
    --bs-border-radius-xl: var(--border-radius-lg);
    --bs-border-radius-2xl: var(--border-radius-xl);
}

/* Apply consistent border-radius to all rounded elements */
.rounded,
.rounded-1,
.rounded-2,
.rounded-3 {
    border-radius: var(--border-radius-sm) !important;
}

.rounded-lg {
    border-radius: var(--border-radius-lg) !important;
}

/* Form controls */
.form-control,
.form-select,
.btn {
    border-radius: var(--border-radius-sm);
}

/* Input groups */
.input-group .form-control:not(:last-child),
.input-group .btn:not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .form-control:not(:first-child),
.input-group .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

/* Hero section */
.hero-section {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
    margin-bottom: 2rem;
}

/* Clinic cards */
.clinic-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border-radius: var(--border-radius-lg);
}

.clinic-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.featured-clinic {
    border: 2px solid var(--bs-primary);
    box-shadow: 0 0.25rem 0.75rem rgba(var(--bs-primary-rgb), 0.15);
}

.featured-clinic .card-header {
    background: var(--bs-primary) !important;
    color: white !important;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
    border-bottom: none !important;
}

/* Contact preview styling */
.contact-preview {
    font-size: 0.875rem;
}

.contact-preview i {
    width: 1rem;
    text-align: center;
}

/* Admin dashboard stats cards */
.card .fa-3x {
    opacity: 0.8;
}

/* Form enhancements */
.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Table improvements */
.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.075);
}

/* Badge styling */
.badge {
    font-size: 0.75em;
    font-weight: 500;
}

/* Button group styling */
.btn-group .btn {
    border-radius: var(--border-radius-sm);
    margin-right: 0.25rem;
}

.btn-group .btn:last-child {
    margin-right: 0;
}

/* Navbar enhancements */
.navbar {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 0;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.25rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* Footer styling */
footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Loading spinner */
.fa-spinner {
    animation: spin 1s linear infinite;
}

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

/* Search form styling */
.input-group-text {
    border-right: none;
    background-color: var(--bs-body-bg);
}

.input-group .form-control {
    border-left: none;
}

.input-group .form-control:focus {
    border-left: none;
}

/* Alert improvements */
.alert {
    border-radius: var(--border-radius-lg);
    border: none;
}

/* Card improvements */
.card {
    border-radius: var(--border-radius-lg);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid var(--bs-border-color);
}

.card-header {
    border-bottom: 1px solid var(--bs-border-color);
    background-color: rgba(var(--bs-body-color-rgb), 0.03);
    font-weight: 500;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0 !important;
}

.card-body:last-child,
.card-footer:last-child {
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg) !important;
}

/* Rating stars */
.text-warning .fa-star,
.text-warning .fa-star-half-alt {
    color: #ffc107 !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .fa-8x {
        font-size: 4rem !important;
    }
    
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        margin-bottom: 0.25rem;
        margin-right: 0;
    }
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.border-primary-soft {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.25) !important;
}

.bg-primary-soft {
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

/* Video embed containers */
.ratio {
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

/* Contact group styling */
.contact-group {
    padding: 1rem;
    border-radius: var(--border-radius-md);
    background-color: rgba(var(--bs-body-color-rgb), 0.02);
    margin-bottom: 1rem;
}

.contact-group:last-child {
    margin-bottom: 0;
}

/* Social media buttons */
.btn-outline-secondary {
    border-color: var(--bs-border-color);
}

.btn-outline-secondary:hover {
    background-color: var(--bs-secondary);
    border-color: var(--bs-secondary);
}

/* Pagination improvements */
.pagination .page-link {
    border-radius: var(--border-radius-sm);
    margin-right: 0.25rem;
    border: 1px solid var(--bs-border-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}

/* Dropdown improvements */
.dropdown-menu {
    border-radius: var(--border-radius-md);
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.dropdown-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

/* Modal improvements */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

.modal-header {
    border-bottom: 1px solid var(--bs-border-color);
}

.modal-footer {
    border-top: 1px solid var(--bs-border-color);
}

/* Enhanced warning button styling for View Map */
.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
    font-weight: 600 !important;
    box-shadow: 0 0.25rem 0.5rem rgba(255, 193, 7, 0.4) !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-warning:hover {
    background-color: #ffca2c !important;
    border-color: #ffca2c !important;
    color: #000 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 0.375rem 0.75rem rgba(255, 193, 7, 0.6) !important;
}

.btn-warning:active,
.btn-warning:focus {
    background-color: #e0a800 !important;
    border-color: #e0a800 !important;
    color: #000 !important;
    box-shadow: 0 0.25rem 0.5rem rgba(255, 193, 7, 0.4) !important;
}
