/* styles.css */

/* Root font size for scalability */
:root {
    font-size: 16px; /* This can be adjusted for scaling */
    font-family: 'Roboto', sans-serif;
    --primary-color: #000000; /* Primary black */
    --secondary-color: #FFFFFF; /* Primary white */
    --highlight-color: #FF4610;
    --highlight-color-dark: #cc3a0d; /* Approximate darker shade of #FF4610 */
    --light-gray: #CBCBCB; /* Secondary light gray */
    --medium-gray: #D6D6D6; /* Tertiary medium gray */
    --lightest-gray: #DFDFDF; /* Tertiary lightest gray */
    --background-gray: #F5F5F5; /* Background light gray */
}

/* Basic body and layout styles */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 1rem; /* 16px */
    font-family: 'Roboto', sans-serif; /* Ensure Roboto is used */
}
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Navbar styles */
.navbar {
    background-color: var(--primary-color) !important;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-brand img {
    height:30px;
}

.nav-link {
    color: var(--secondary-color) !important;
}

.nav-link:hover {
    color: var(--highlight-color) !important;
}

/* Custom navbar-toggler-icon */
.navbar-toggler-icon {
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="30" height="30" viewBox="0 0 30 30"%3E%3Cpath stroke="rgba(255, 255, 255, 1)" stroke-width="2" linecap="round" linejoin="round" d="M4 7h22M4 15h22M4 23h22"/%3E%3C/svg%3E');
}

/* Responsive text-center for navbar items on small screens */
@media (max-width: 768px) {
    .navbar-nav {
        text-align: center;
    }
    .navbar-nav .nav-item {
        margin-bottom: 0.15rem;
    }
}

/* Search bar styling */
.search-bar {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}
.search-form {
    width: 100%;
    max-width: 416px;
    position:sticky;
    top: 56px;
    z-index: 1029;
    background-color: var(--background-gray);
}
.search-form input[type="search"] {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
    box-sizing: border-box;
}
/* Target the clear button in WebKit browsers */
.search-bar input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 10px;
    width: 10px;
    background: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14" width="14" height="14"><path stroke="%23FF4610" stroke-width="2" d="M1 1l12 12M13 1L1 13"/></svg>') no-repeat center center;
    cursor: pointer;
}
@media (max-width: 768px) {
    .search-bar {
        padding: 10px 15px;
    }
    .search-bar form input[type="search"] {
        width: 100%;
        padding: 10px;
    }
}

/* Search Results styling */
.search-results {
    list-style-type: none;
    padding: 0;
}

.search-result-item {
    border-bottom: 1px solid var(--light-gray);
    padding: 15px 0;
    transition: background-color 0.3s;
}

.search-result-item:hover {
    background-color: var(--lightest-gray); /* Add a slight background change on hover */
}

.search-result-link {
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.search-result-link:hover {
    color: var(--highlight-color); /* Change color on hover to indicate interactivity */
    text-decoration: underline; /* Underline text on hover */
}

.search-result-item a {
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.1rem;
}

.search-result-item a:hover {
    color: var(--highlight-color);
}

.search-result-item p {
    margin: 10px 0;
}

.search-result-item mark {
    background-color: var(--highlight-color);
    opacity: 85%;
    font-weight: bold;
}

/* Footer styling */
/* Footer should always be at the bottom */
.d-flex.flex-column.min-vh-100 footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    margin-top: auto !important;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* General font size settings for various elements */
.navbar-brand, .nav-link, .btn-link, .display-4, .lead, .btn-lg {
    font-size: 1rem; /* Adjust based on design needs */
}

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

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
    color: var(--secondary-color);
}

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

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
}

/* Styles for the home page */
.intro {
    background-image: url("/static/images/hero.b4801a48f2aa.png");
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--secondary-color);
    height: 30vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border-radius: 0.5rem;
}
.intro::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.intro h1, .intro p {
    z-index: 2;
    background: rgba(0, 0, 0, 0.70); /* Semi-transparent background */
    padding: 10px 20px;
    max-width: 90%;
}
.intro h1 {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    font-size: 4vh;
}
.intro p {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    font-size: 2vh;
}

@media (max-width: 1024px) {
    .intro {
        background-image: url("/static/images/hero_tablet.ea21ba0d6f83.png");
    }
    .intro h1 {
        font-size: 3vh;
    }

    .intro p {
        font-size: 1.5vh;
    }
}

@media (max-width: 768px) {
    .intro {
        background-image: url("/static/images/hero_mobile.c6a944ba82a6.png");
    }
    .intro h1 {
        font-size: 2.5vh;
    }

    .intro p {
        font-size: 1.2vh;
    }
}

.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 15rem;
}

.card .icon {
    font-size: 3rem;
}

.icon {
    color: var(--primary-color);
    margin-bottom: 0.1rem;
}
.icon:hover{
    color: var(--highlight-color);
}

.social-icon {
    color: var(--secondary-color);
    padding: 0.4rem;
    text-decoration: none;
}

.social-icon:hover {
    color: var(--highlight-color);
    text-decoration: none;
}



.card-title {
    color: var(--primary-color);
    margin-bottom: 0.1rem;
}

.card-body {
    padding: 1rem;
}

.card-text {
    margin-bottom: 0.1rem;
}

.card-footer {
    background: none;
    border-top: none;
    padding-top: 0;
}

.btn-learn-more {
    margin-top: auto;
}

.form-control, .d-flex .btn {
    font-size: 1rem; /* Ensures consistency */
}

.list-group-item {
    font-size: 1rem;
    background-color: var(--background-gray);
}
.list-group-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.list-group-item a:hover {
    color: var(--highlight-color);
    text-decoration: underline;
}

/* Margin for content sections */
.content-section {
    margin-top: 2rem;
}

/* Breadcrumb customization */
.breadcrumb {
    background: none;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: var(--highlight-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #6c757d;
}

/* Manual index link styling */
.manual-index-link {
    display: block;
    margin: 1rem 0;
    text-align: center;
}

.manual-index-link a {
    font-weight: bold;
    color: var(--highlight-color);
    text-decoration: none;
}

.manual-index-link a:hover {
    text-decoration: underline;
}

/* Section and subsection title styling */
.section-title {
    color: #343a40;
}

.subsection-title {
    color: #6c757d;
}

.section-anchor {
    display: block;
    position: relative;
    top: -80px; /* Offset for fixed navbar */
    visibility: hidden;
}

.content-container {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-gray);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* Comments Container */
.comment-container {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--primary-color);
    background-color: var(--background-gray);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
}

.content-container h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--highlight-color);
    padding-bottom: 10px;
}

.content-container p {
    margin-bottom: 15px;
    color: var(--primary-color);
}

/* Dashboard styles */
/* Sidebar title styling */
.sidebar-title {
    font-size: 1.5rem; /* Increased font size for better visibility */
    font-weight: bold; /* Bold text */
    margin-bottom: 1rem; /* Margin below the title */
}

/* Section styling for consistent spacing and look */
.section {
    background-color: var(--background-gray); /* Background color */
    padding: 20px; /* Padding inside the section */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Box shadow for a subtle 3D effect */
    margin-bottom: 20px; /* Margin below each section */
}

/* Centering text within the dashboard content */
#dashboard-content h2,
#dashboard-content p,
#dashboard-content h3 {
    text-align: center; /* Center-align text */
}

/* Centering the button within the section */
.section .center-button {
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center; /* Center vertically */
    flex-direction: column; /* Ensure vertical stacking */
}



/* Specific styles for auth forms */
.auth-form-container h1 {
    font-size: 2em;
    margin-bottom: 20px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--highlight-color);
    padding-bottom: 10px;

}

/* Specific styles for auth forms */
.auth-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: var(--background-gray);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.auth-form-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.auth-form-container input[type="text"],
.auth-form-container input[type="password"],
.auth-form-container input[type="email"],
.auth-form-container select {
    width: 100%;
    font-size: 1rem;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border-radius: 5px;
    border: 1px solid var(--light-gray);
    background-color: var(--secondary-color);
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.auth-form-container input[type="text"]:focus,
.auth-form-container input[type="password"]:focus,
.auth-form-container input[type="email"]:focus,
.auth-form-container select:focus {
    border-color: var(--highlight-color);
    outline: none;
}

.auth-form-container label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.auth-form-container .form-check-label {
    font-weight: normal;
    color: var(--primary-color);
}

.auth-form-container button[type="submit"] {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.2rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--secondary-color);
    transition: background-color 0.3s ease;
}

.auth-form-container button[type="submit"]:hover,
.auth-form-container button[type="submit"]:focus,
.auth-form-container button[type="submit"]:active {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
}

.auth-form-container .alert {
    font-size: 0.875rem;
}

.auth-form-container a {
    color: var(--primary-color);
    text-decoration: none;
}

.auth-form-container a:hover {
    text-decoration: underline;
}

.text-register {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}

.text-register:hover {
    color: var(--highlight-color);
    text-decoration: underline;
}

/* Custom pagination styling */
.pagination {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.pagination .step-links a {
    color: var(--highlight-color);
    text-decoration: none;
    padding: 0.5rem;
    margin: 0 0.25rem;
}

.pagination .step-links a:hover {
    text-decoration: underline;
}

.pagination .current {
    padding: 0.5rem;
    margin: 0 0.25rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Responsive design adjustments */
@media (max-width: 576px) {
    .container {
        padding: 0 8px;
    }

    .navbar-brand img {
        height: 25px;
    }

    .navbar-nav .nav-link {
        padding: 0.25rem 0.5rem;
    }

    .search-bar {
        padding: 8px 0;
    }

    .search-form input[type="search"] {
        padding: 8px;
    }

    .card {
        height: auto;
        margin-bottom: 1rem;
    }

    .content-container,
    .comment-container {
        padding: 15px;
    }

    .pagination .step-links a,
    .pagination .current {
        padding: 0.25rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .subsection-title {
        font-size: 1rem;
    }

    .auth-form-container {
        padding: 1rem;
    }
}