/* Custom styles for EduReviews - Education & Training Platform */

:root {
    --primary-color: #4f46e5;       /* Vibrant modern Indigo */
    --star-color: #f59e0b;          /* Warm Amber */
    --success-color: #10b981;       /* Premium Emerald */
    --education-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --bg-color: #f1f5f9;            /* Soft light slate-blue background */
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-secondary);
    background-color: var(--bg-color) !important;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
}

/* Ensure headings & links inside dark sections inherit white/light colors */
.text-white, 
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary h4, .bg-primary h5, .bg-primary h6,
.bg-gradient h1, .bg-gradient h2, .bg-gradient h3, .bg-gradient h4, .bg-gradient h5, .bg-gradient h6,
.navbar-dark .navbar-brand, .navbar-dark .nav-link {
    color: #ffffff !important;
}

.bg-gradient .breadcrumb-item a,
.bg-primary .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none;
}
.bg-gradient .breadcrumb-item a:hover,
.bg-primary .breadcrumb-item a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}
.bg-gradient .breadcrumb-item.active,
.bg-primary .breadcrumb-item.active {
    color: #ffffff !important;
}

/* Bootstrap Overrides */
.navbar {
    background-color: #0f172a !important; /* Elegant dark slate navbar */
    border-bottom: 1px solid #1e293b;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: #4338ca !important;
    border-color: #4338ca !important;
}

/* Education Theme Enhancements */
.bg-gradient {
    background: var(--education-gradient) !important;
}

.hover-shadow {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05) !important;
}

.star-rating {
    color: var(--star-color);
}

/* Company Cards */
.card {
    background-color: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Search Bar */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Rating Stars */
.bi-star-fill,
.bi-star {
    font-size: 1rem;
}

/* Footer Links */
footer a {
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Review Cards */
.review-card {
    transition: border-color 0.3s;
}

.review-card:hover {
    border-color: var(--primary-color);
}

/* Badges */
.badge {
    font-weight: 500;
}

/* Progress Bars */
.progress {
    border-radius: 10px;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 10px;
}

/* Buttons */
.btn {
    font-weight: 500;
    transition: all 0.3s;
}

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

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
}

/* Alert Messages */
.alert {
    border-radius: 10px;
}

/* Company Logo */
.company-logo {
    max-height: 150px;
    object-fit: contain;
}

/* Rating Display */
.display-4 {
    font-weight: 700;
}

/* Search Autocomplete Dropdown */
.search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 50px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    margin-top: 0.25rem;
}

.search-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

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

.search-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.search-item .fw-bold {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.search-item .text-muted {
    font-size: 0.85rem;
}

/* Make search form position relative for dropdown positioning */
#searchForm {
    position: relative;
    min-width: 300px;
}

/* Hero Search Dropdown */
.search-dropdown-hero {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1050;
    margin-top: 0.5rem;
}

#heroSearchForm {
    position: relative;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .search-dropdown {
        right: 0;
    }
    
    #searchForm {
        min-width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Navbar improvements */
    .navbar-nav {
        padding-top: 1rem;
    }
    
    .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
}

@media (max-width: 768px) {
    /* Typography adjustments */
    .display-4 {
        font-size: 2rem !important;
    }
    
    .display-3 {
        font-size: 2.5rem !important;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Card adjustments */
    .card-img-top {
        height: 100px !important;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    /* Button adjustments */
    .btn-lg {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    /* Hero section */
    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    /* Search form in hero */
    #heroSearchForm .col-md-8,
    #heroSearchForm .col-md-3 {
        margin-bottom: 0.5rem;
    }
    
    /* Rating distribution bars */
    .progress {
        height: 20px !important;
    }
    
    /* Company detail page */
    .company-logo {
        max-height: 100px !important;
        margin-bottom: 1rem;
    }
    
    /* Review cards */
    .card-body p,
    .card-text {
        font-size: 0.9rem;
    }
    
    /* Tables responsive */
    .table {
        font-size: 0.875rem;
    }
    
    /* Modal adjustments */
    .modal-body {
        padding: 1rem;
    }
    
    /* Form controls */
    .form-control,
    .form-select {
        font-size: 1rem;
    }
    
    /* Badges */
    .badge {
        font-size: 0.75rem;
        padding: 0.35em 0.65em;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Stack columns */
    .col-sm-6 {
        margin-bottom: 1rem;
    }
    
    /* Full width buttons on mobile */
    .btn:not(.btn-sm) {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .d-inline .btn {
        display: inline-block !important;
        width: auto !important;
    }
    
    /* Compact stats */
    .text-center h3 {
        font-size: 1.5rem;
    }
    
    /* Navbar brand */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Reduce padding */
    .py-4 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    /* Card spacing */
    .g-4 {
        --bs-gutter-y: 1rem;
    }
}
