/* Custom CSS for Layout */

/* Ensure full height for main layout container */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll on small screens */
}

.min-vh-100 {
    min-height: 100vh; /* Make the main container take at least full viewport height */
}

/* Sidebar Styling (Fixed on large screens) */
.sidebar-nav {
    width: 250px; /* Default width of the sidebar */
    flex-shrink: 0; /* Prevent sidebar from shrinking */
    /* Hide on small screens by default, shown by Bootstrap's offcanvas */
    transform: translateX(-100%); /* Start off-screen */
    transition: transform 0.3s ease-in-out; /* Smooth transition */
    z-index: 1040; /* Ensure offcanvas is above other content */
    background-color: #212529 !important; /* Ensure dark background */
}

/* For large screens (lg breakpoint and up) */
@media (min-width: 992px) {
    .sidebar-nav {
        /* On large screens, the offcanvas is removed,
           so we make it fixed and visible */
        transform: translateX(0); /* Make it visible */
        position: sticky; /* Sticky positioning within its parent */
        top: 0;
        height: 100vh; /* Take full viewport height */
        z-index: 1020; /* Ensure it's above other content if needed */
        border-right: 1px solid rgba(255, 255, 255, 0.1); /* Optional separator */
    }

    /* Adjust offcanvas on larger screens - override default Bootstrap */
    .offcanvas-start {
        /* Bootstrap's offcanvas becomes just a normal div on larger screens */
        /* We want it to behave like our fixed sidebar */
        visibility: visible !important;
        transform: none !important;
        position: sticky !important; /* Make it sticky for the fixed effect */
        top: 0 !important;
        height: 100vh !important;
        width: 250px !important;
        border-right: 1px solid rgba(0,0,0,.1); /* Optional visual separator */
    }
    .offcanvas-header {
        display: none !important; /* Hide offcanvas close button on large screens */
    }
}

/* Content Wrapper adjustment */
.content-wrapper {
    background-color: #f8f9fa; /* Light background for content */
    /* border-left: 1px solid #eee; Optional border to separate from sidebar */
    overflow-y: auto; /* Allow scrolling for content if it overflows */
}

/* Top Navbar adjustments */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Modern Look & Feel Enhancements */
body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #343a40; /* Darker text */
    background-color: #e9ecef; /* Light gray background */
}

h1, h2, h3, h4, h5, h6 {
    color: #007bff; /* Primary blue for headings */
    margin-bottom: 0.75rem;
}

.card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15) !important;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.btn-outline-light {
    color: #f8f9fa;
    border-color: #f8f9fa;
}

.btn-outline-light:hover {
    background-color: #f8f9fa;
    color: #343a40;
}

.bg-dark {
    background-color: #212529 !important; /* Darker than default for better contrast */
}

.text-white {
    color: #f8f9fa !important;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1); /* Subtle highlight for active link */
    border-radius: 0.25rem;
}

/* Footer Social Icons */
.social-icons a {
    transition: color 0.2s ease-in-out;
}

.social-icons a:hover {
    color: #007bff !important; /* Highlight social icons on hover */
}

/* Specific styling for blog posts if fetched and added dynamically */
.blog-post {
    background-color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 0.25rem 0.5rem rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}

.blog-post h2 {
    color: #007bff;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.blog-post .post-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.blog-post p {
    line-height: 1.6;
}

/* Contact Form Specifics */
#contactForm {
    background-color: #fff;
    padding: 2rem;
    border-radius: 0.75rem;
}
#formStatus {
    font-weight: bold;
    text-align: center;
}