/* General Body Styling */
body {
    font-family: 'Inter', sans-serif;
    position: relative; /* Required for ScrollSpy */
    overflow-x: hidden; /* Prevent horizontal scroll issues on mobile */
}

/* Prevent horizontal scroll on all containers */
.container, .container-fluid {
}

/* Ensure all images and media don't overflow */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll on all sections */
section {
    max-width: 100%;
    overflow-x: hidden;
}

/* Header & Navbar Styling */
header {
    border-bottom: 1px solid #dee2e6;
    background-color: #ffffff;
}

.navbar {
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: padding-top 0.3s, padding-bottom 0.3s;
}

/* Custom Logo Style from Image */
.logo-text {
    font-weight: 700; /* Bold */
    font-size: 2.25rem; /* Larger font size */
    color: #d9534f; /* A bootstrap-like red color */
    border-left: 4px solid #343a40; /* Dark grey border */
    padding-left: 10px;
    line-height: 1;
    display: inline-block;
}

/* Navigation Link Styling */
.navbar-nav .nav-link {
    color: #495057;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    margin-left: 0.5rem; /* Spacing between links */
    position: relative; /* Required for the ::after pseudo-element */
    transition: color 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: #e58885;
}

/* Active Link Underline Style */
.navbar-nav .nav-link.active {
    color: #d9534f; /* Standard Bootstrap primary blue */
    font-weight: 700;
}

/* The blue underline effect */
.navbar-nav .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -27px; /* Aligns with the bottom border of the header */
    left: 0;
    right: 0;
    height: 3px;
    background-color: #d9534f;
    border-radius: 0.5rem;
}

/* Section Styling for One-Page Layout */
.content-section {
    padding-top: 70px; /* Adds space for the fixed navbar */
    padding-bottom: 30px;
    min-height: 400px; /* Ensures sections have enough height for scrolling */
    overflow: hidden;
}

/* Mobile-first responsive adjustments */
@media (max-width: 991.98px) {
    /* Ensure no horizontal scroll on mobile */
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .navbar {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .navbar-brand img {
        height: 35px !important; /* Smaller logo on mobile */
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
    
    .navbar-nav {
        padding-top: 1rem; /* Add some space above links when toggled */
        background-color: #ffffff;
        margin-top: 0.5rem;
        border-radius: 0.5rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem; /* Adjust padding for vertical layout */
        margin-left: 0;
        margin-bottom: 0.25rem;
        border-radius: 0.5rem;
        transition: background-color 0.3s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: #f8f9fa;
        color: #d9534f;
    }

    .navbar-nav .nav-link.active::after {
        /* On mobile, the underline can be simpler */
        bottom: 0;
        left: 0;
        width: 5px; /* Change to a side-bar style */
        height: 100%;
        border-radius: 0 2px 2px 0;
    }
    
    .content-section {
        padding-top: 0px; /* More space for mobile navbar */
    }
}

/* Extra small devices (phones, 576px and down) */
@media (max-width: 575.98px) {
    /* Extra protection against horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    
    .container, .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        max-width: 100%;
    }
    
    .navbar-brand img {
        height: 30px !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.65rem 1rem;
        font-size: 0.95rem;
    }
    
    .content-section {
    }
}

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 320px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.toast {
    background-color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    color: #333;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    align-items: center;
    border-left: 5px solid #ccc; /* Borda padrÃ£o */
}
.toast.show {
    opacity: 1;
    transform: translateX(0);
}
.toast::before {
    font-size: 20px;
    margin-right: 12px;
    font-weight: bold;
}
.toast.success { background-color: #e0f2f1; color: #004d40; border-left-color: #26a69a; }
.toast.success::before { content: 'âœ”'; color: #26a69a; }
.toast.error { background-color: #ffcdd2; color: #b71c1c; border-left-color: #ef5350; }
.toast.error::before { content: 'âœ–'; color: #ef5350; }
.toast.info { background-color: #e3f2fd; color: #0d47a1; border-left-color: #42a5f5; }
.toast.info::before { content: 'â„¹'; color: #42a5f5; }
