/* public_html/css/style.css */

/* Variables from PHP global_ui_functions.php */
:root {
    --primary-color: #007bff; /* Default, overridden by PHP */
    --secondary-color: #6c757d; /* Default, overridden by PHP */
    --text-color: #333;
    --background-light: #f8f9fa;
    --background-dark: #343a40;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--background-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header */
header {
    background-color: var(--primary-color) !important; /* Enforce primary color */
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-logo {
    height: 40px; /* Adjust as needed */
    width: auto;
}

.navbar-brand {
    font-weight: bold;
    color: white;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: white !important;
}

/* Main Content */
main {
    flex: 1; /* Allows main content to grow and push footer down */
}

.container {
    max-width: 1200px;
}

/* Footer */
footer {
    background-color: var(--background-dark) !important;
    color: rgba(255, 255, 255, 0.7);
    padding: 20px 0;
}

footer p {
    margin-bottom: 5px;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: darken(var(--primary-color), 10%); /* This won't work in pure CSS, need JS or specific color */
    border-color: darken(var(--primary-color), 10%);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: darken(var(--secondary-color), 10%);
    border-color: darken(var(--secondary-color), 10%);
}

/* Forms */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25); /* Default Bootstrap blue, consider making it --primary-color */
}

/* Cards */
.card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Homepage Slider */
.carousel-item img {
    width: 100%;
    height: 400px; /* Fixed height for sliders */
    object-fit: cover; /* Cover ensures image fills the area */
}

/* Section titles */
.section-title {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}


/* Admin Specific Styles */
#wrapper {
    display: flex;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem;
    -webkit-transition: margin .25s ease-out;
    -moz-transition: margin .25s ease-out;
    -o-transition: margin .25s ease-out;
    transition: margin .25s ease-out;
    width: 15rem; /* Fixed width */
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    background-color: var(--primary-color); /* Admin sidebar heading color */
    color: white;
}

#sidebar-wrapper .sidebar-logo {
    height: 30px;
    width: auto;
    margin-right: 10px;
}

#sidebar-wrapper .list-group {
    width: 15rem;
}

#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

@media (min-width: 768px) {
    #sidebar-wrapper {
        margin-left: 0;
    }

    #page-content-wrapper {
        min-width: 0;
        width: 100%;
    }

    #wrapper.toggled #sidebar-wrapper {
        margin-left: -15rem;
    }
}

.list-group-item-action {
    color: var(--text-color);
}

.list-group-item-action:hover {
    color: var(--primary-color);
    background-color: var(--background-light);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-color);
}

/* Custom Alert Messages */
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}
.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}
.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-color: #bee5eb;
}

/* Other common elements */
.badge-primary {
    background-color: var(--primary-color);
}