/* Aruksworld Custom Styles */

/* Fixed navbar styles */
.navbar-fixed-top {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    background-color: #1a237e !important; /* Deep blue color that matches the logo */
}

/* Add padding to body to prevent content from hiding under the fixed navbar */
body {
    padding-top: 150px; /* Increased to properly clear the two-tier header */
    margin: 0;
}

/* Logo styling in navbar */
.navbar-brand img {
    max-height: 120px;
    width: auto;
    transition: all 0.3s ease;
}

/* Footer logo styling */
footer h5 img {
    max-height: 30px;
    margin-right: 8px;
}

/* Program comparison table improvements */
.comparison-table th {
    background-color: #1a237e;
    color: white;
}

.comparison-table th img {
    max-height: 30px;
    max-width: 100px;
    margin-right: 8px;
    border-radius: 4px;
}

/* Add subtle hover effect to navbar links */
.navbar-dark .navbar-nav .nav-link:hover {
    color: #ffb300; /* Gold color that matches graduation cap in logo */
}

/* Style for university logos in program lists */
.university-logo {
    max-height: 40px;
    max-width: 100px;
    border-radius: 4px;
    margin-right: 10px;
}

/* Program cards styling */
.program-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid #1a237e;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Application deadline badge */
.deadline-badge {
    background-color: #ffb300;
    color: #000;
    font-weight: bold;
}

/* Navbar shrink on scroll */
.navbar-shrink {
    padding-top: 5px;
    padding-bottom: 5px;
}

.navbar-shrink .navbar-brand img {
    max-height: 50px;
}

/* Apply navbar shrinking to the StudyPortals-style header */
header nav.navbar-shrink {
    padding-top: 0;
    padding-bottom: 0;
    min-height: 60px !important;
}

/* Theme toggle styles */
#theme-toggle {
    transition: all 0.3s ease;
}

#theme-toggle:hover {
    transform: rotate(30deg);
}

/* Light mode specific styles */
[data-bs-theme="light"] .navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="light"] .program-card {
    border-left: 4px solid #1565C0;
}

[data-bs-theme="light"] .navbar-nav .nav-link:hover {
    color: #1565C0 !important;
}

[data-bs-theme="light"] .comparison-table th {
    background-color: #1565C0;
    color: white;
}

/* Dark mode specific styles - ensure consistency */
[data-bs-theme="dark"] .navbar {
    background-color: #1a237e !important;
}

[data-bs-theme="dark"] footer {
    background-color: #1a237e !important;
}

/* Smooth transitions for theme changes */
body, .navbar, footer, .card, .btn, .program-card {
    transition: background-color 0.5s ease, color 0.5s ease, border-color 0.5s ease;
}

/* Portal Page Styles */
.portal-section {
    margin-bottom: 3rem;
}

/* Card styles for portal pages */
.discipline-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #343a40;
    border: none;
    color: #ffffff;
}

.discipline-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.discipline-card .card-title {
    color: #ffffff !important;
}

.discipline-card .card-text {
    color: #e9ecef !important;
}

/* Country badges in portal pages */
.country-badge {
    margin: 4px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Light mode adjustments for portal pages */
[data-bs-theme="light"] .discipline-card {
    background-color: #f8f9fa;
    color: #212529;
}

[data-bs-theme="light"] .discipline-card .card-title {
    color: #212529 !important;
}

[data-bs-theme="light"] .discipline-card .card-text {
    color: #6c757d !important;
}

/* Make sure text is always visible in light sections */
.bg-light h2, 
.bg-light h3, 
.bg-light h4, 
.bg-light h5, 
.bg-light p {
    color: #212529 !important;
}

/* Fix color contrast for dark background cards */
.card.bg-dark h4,
.card.bg-dark h5,
.card.bg-dark p,
.card.bg-dark .card-text {
    color: #ffffff !important;
}

/* Ensure proper contrast for all card content */
.card-body h4,
.card-body h5 {
    color: inherit;
}

[data-bs-theme="dark"] .card-body h4,
[data-bs-theme="dark"] .card-body h5,
[data-bs-theme="dark"] .card-body p {
    color: #f8f9fa !important;
}

[data-bs-theme="light"] .card-body h4,
[data-bs-theme="light"] .card-body h5,
[data-bs-theme="light"] .card-body p {
    color: #212529 !important;
}

/* Force proper text colors for portal cards */
.portal-section .card h3,
.portal-section .card h4,
.portal-section .card h5,
.portal-section .card p {
    color: #212529 !important;
}

[data-bs-theme="dark"] .portal-section .card h3,
[data-bs-theme="dark"] .portal-section .card h4,
[data-bs-theme="dark"] .portal-section .card h5,
[data-bs-theme="dark"] .portal-section .card p {
    color: #f8f9fa !important;
}

/* Specific fix for distance learning sections */
.bg-light .card h3,
.bg-light .card h4,
.bg-light .card p {
    color: #212529 !important;
}

/* Fix insights page color contrast issues */
.insights-container h3,
.insights-container h4,
.insights-container h5,
.insights-container p {
    color: inherit;
}

[data-bs-theme="dark"] .insights-container h3,
[data-bs-theme="dark"] .insights-container h4,
[data-bs-theme="dark"] .insights-container h5,
[data-bs-theme="dark"] .insights-container p {
    color: #f8f9fa !important;
}

[data-bs-theme="light"] .insights-container h3,
[data-bs-theme="light"] .insights-container h4,
[data-bs-theme="light"] .insights-container h5,
[data-bs-theme="light"] .insights-container p {
    color: #212529 !important;
}

/* Global contrast fixes for all components */
.bg-white h1, .bg-white h2, .bg-white h3, .bg-white h4, .bg-white h5, .bg-white h6,
.bg-white p, .bg-white span, .bg-white div, .bg-white li, .bg-white a {
    color: #212529 !important;
}

.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark h5, .bg-dark h6,
.bg-dark p, .bg-dark span, .bg-dark div, .bg-dark li, .bg-dark a {
    color: #f8f9fa !important;
}

/* Admin panel contrast fixes */
.admin-card h3, .admin-card h4, .admin-card h5, .admin-card p {
    color: inherit;
}

[data-bs-theme="dark"] .admin-card h3,
[data-bs-theme="dark"] .admin-card h4,
[data-bs-theme="dark"] .admin-card h5,
[data-bs-theme="dark"] .admin-card p {
    color: #f8f9fa !important;
}

[data-bs-theme="light"] .admin-card h3,
[data-bs-theme="light"] .admin-card h4,
[data-bs-theme="light"] .admin-card h5,
[data-bs-theme="light"] .admin-card p {
    color: #212529 !important;
}

/* Ensure all white backgrounds have dark text */
.card.bg-white, .card.bg-light,
.bg-white, .bg-light {
    color: #212529 !important;
}

.card.bg-white *, .card.bg-light *,
.bg-white *, .bg-light * {
    color: #212529 !important;
}

/* Ensure all dark backgrounds have light text */
.card.bg-dark, .card.bg-secondary,
.bg-dark, .bg-secondary {
    color: #f8f9fa !important;
}

.card.bg-dark *, .card.bg-secondary *,
.bg-dark *, .bg-secondary * {
    color: #f8f9fa !important;
}

/* Bootstrap utility class overrides for better contrast */
.text-white {
    color: #ffffff !important;
}

.text-dark {
    color: #212529 !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Form elements contrast fixes */
.form-control, .form-select, .form-check-label {
    color: var(--bs-body-color) !important;
}

/* Button contrast fixes */
.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
}

.btn-secondary {
    background-color: #6c757d !important;
    border-color: #6c757d !important;
    color: #ffffff !important;
}

.btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: #ffffff !important;
}

.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000000 !important;
}

.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #ffffff !important;
}

.btn-info {
    background-color: #0dcaf0 !important;
    border-color: #0dcaf0 !important;
    color: #000000 !important;
}

.btn-dark {
    background-color: #212529 !important;
    border-color: #212529 !important;
    color: #ffffff !important;
}

/* Alert contrast fixes */
.alert-primary {
    background-color: #cfe2ff !important;
    color: #084298 !important;
    border-color: #b6d4fe !important;
}

.alert-success {
    background-color: #d1e7dd !important;
    color: #0a3622 !important;
    border-color: #badbcc !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    color: #664d03 !important;
    border-color: #ffecb5 !important;
}

.alert-danger {
    background-color: #f8d7da !important;
    color: #721c24 !important;
    border-color: #f5c2c7 !important;
}

/* Badge contrast fixes */
.badge.bg-primary {
    background-color: #0d6efd !important;
    color: #ffffff !important;
}

.badge.bg-secondary {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #198754 !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

.badge.bg-danger {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

/* Table contrast fixes */
.table th, .table td {
    color: var(--bs-body-color) !important;
}

.table-dark th, .table-dark td {
    color: #f8f9fa !important;
}

.table-light th, .table-light td {
    color: #212529 !important;
}

/* Navigation contrast fixes */
.navbar-dark .navbar-nav .nav-link {
    color: #f8f9fa !important;
}

.navbar-light .navbar-nav .nav-link {
    color: #212529 !important;
}

/* Dropdown contrast fixes */
.dropdown-menu {
    background-color: var(--bs-dropdown-bg) !important;
}

.dropdown-item {
    color: var(--bs-dropdown-link-color) !important;
}

.dropdown-item:hover {
    background-color: var(--bs-dropdown-link-hover-bg) !important;
    color: var(--bs-dropdown-link-hover-color) !important;
}

/* Article cards in insights */
.article-card h5,
.article-card p,
.article-card .card-text {
    color: inherit;
}

[data-bs-theme="dark"] .article-card h5,
[data-bs-theme="dark"] .article-card p,
[data-bs-theme="dark"] .article-card .card-text {
    color: #f8f9fa !important;
}

[data-bs-theme="light"] .article-card h5,
[data-bs-theme="light"] .article-card p,
[data-bs-theme="light"] .article-card .card-text {
    color: #212529 !important;
}

/* Featured program cards in portal pages */
.featured-program {
    background-color: #212529;
    border: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-program:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="light"] .featured-program {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
}

/* Program Comparison Feature Styles */
.floating-compare-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1a237e;
    color: white;
    border-radius: 50px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

[data-bs-theme="light"] .floating-compare-btn {
    background-color: #1565C0;
}

.floating-compare-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

.floating-compare-btn.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.compare-count {
    background: #ffb300;
    color: #000;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 10px;
}

.compare-text {
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Program selection checkbox in search results */
.program-select-checkbox {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.program-card {
    position: relative;
}

.program-card.selected {
    border-left: 4px solid #ffb300;
    box-shadow: 0 0 0 2px #ffb300;
}

/* Notification system for comparison actions */
.notification-area {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    max-width: 350px;
}

.notification {
    background: #343a40;
    color: white;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    animation: slide-in 0.3s ease-out forwards;
}

.notification-content {
    display: flex;
    align-items: center;
}

.notification.fade-out {
    animation: fade-out 0.3s ease-out forwards;
}

.notification-success {
    border-left: 4px solid #28a745;
}

.notification-warning {
    border-left: 4px solid #ffc107;
}

.notification-error {
    border-left: 4px solid #dc3545;
}

.notification-info {
    border-left: 4px solid #17a2b8;
}

[data-bs-theme="light"] .notification {
    background: #f8f9fa;
    color: #212529;
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fade-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* StudyPortals-style header */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1030;
}

/* Default dark theme header background */
[data-bs-theme="dark"] header {
    background-color: #1a237e;
}

/* Light theme header background */
[data-bs-theme="light"] header {
    background-color: #ffffff;
}

/* Style for top navigation bar */
header nav:first-child {
    min-height: 35px;
    padding: 0;
}

header nav:first-child .nav-link {
    padding: 0.25rem 1rem;
    font-size: 0.85rem;
}

/* Style for main navigation bar */
header nav:nth-child(2) {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    min-height: 75px;
}

header nav:nth-child(2) .nav-link {
    padding: 0.5rem 1.2rem;
    font-size: 1rem;
}

/* Light mode adjustments for StudyPortals-style header */
[data-bs-theme="light"] header nav:first-child {
    background-color: #e9ecef !important;
}

[data-bs-theme="light"] header nav:first-child .nav-link {
    color: #495057;
}

[data-bs-theme="light"] header nav:nth-child(2) {
    background-color: #ffffff !important;
    border-bottom: 1px solid #dee2e6;
}

[data-bs-theme="light"] header nav:nth-child(2) .nav-link {
    color: #212529;
}

[data-bs-theme="light"] .btn-warning {
    background-color: #ffb300;
    border-color: #ffb300;
}

/* Dropdown menu styling to match StudyPortals */
.dropdown-menu {
    border-radius: 0;
    margin-top: 0;
    padding: 0.5rem 0;
    min-width: 230px;
    border: none;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Mega menu styling for "For Students" dropdown */
.mega-menu {
    width: 600px !important;
    max-width: 100%;
    padding: 1rem;
}

.mega-menu .row {
    width: 100%;
    margin: 0;
}

.mega-menu .dropdown-header {
    font-weight: bold;
    color: #ffb300;
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
}

.mega-menu .dropdown-item {
    padding: 0.4rem 1.5rem;
}

/* Ensure proper spacing in mega menu */
.mega-menu .col-md-4 {
    padding: 0.5rem;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #343a40;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .dropdown-item {
    color: #f8f9fa;
}

[data-bs-theme="dark"] .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

[data-bs-theme="dark"] .dropdown-header {
    color: #ffb300;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

[data-bs-theme="light"] .dropdown-header {
    color: #1565C0;
    border-bottom-color: rgba(0, 0, 0, 0.1);
}