body {
    background-color: #f7f7f7;
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Ensure no horizontal scrollbar by default */
    position: relative;
}

header {
    background-color: #060E57;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 15px; /* Default padding for header */
    display: flex;
    align-items: center;
    color: white;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 1000;

}

.header-container {
    display: flex !important;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    /* Default padding, will be overridden by media queries for small screens */
    padding: 0 20px;
}

.header-container .row {
    display: flex !important;
    flex-wrap: nowrap !important; /* Crucial: prevent wrapping */
    width: 100% !important;
    margin-left: 0 !important; /* Zero out row margins */
    margin-right: 0 !important; /* Zero out row margins */
}

.header-container .row .col-md-3 {
    flex: 0 0 140px !important; /* Fixed width for logo and title */
    flex-shrink: 0; /* Prevent shrinking */
    min-width: 0; /* Allow content to truly shrink if necessary */
    max-width: 140px !important; /* Ensure it doesn't grow beyond this */
    padding-left: 0 !important; /* Zero out column padding */
    padding-right: 0 !important; /* Zero out column padding */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.header-container .row .col-md-9 {
    flex: 0 0 calc(100% - 140px) !important; /* Take remaining space precisely */
    flex-shrink: 0; /* Prevent shrinking */
    min-width: 0; /* Allow content to truly shrink if necessary */
    padding-left: 0 !important; /* Zero out column padding */
    padding-right: 0 !important; /* Zero out column padding */
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
}

.logo-title-container {
    display: flex;
    align-items: center;
    margin-bottom: 0 !important; /* Ensure no margin pushes content down */
}

.logo {
    width: auto;
    max-width: 40px;
    height: auto;
    object-fit: contain;
    margin-top: 0;
    margin-bottom: 0;
}

h1 {
    margin-bottom: 0 !important;
    white-space: nowrap !important; /* Crucial: prevent text wrapping */
    font-size: 1.1rem !important; /* Adjust font size to fit */
}


nav {
    margin-left: auto;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin: 0 0 0 30px;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px) translateZ(0);
}

/* Nav link styling with icons (Desktop scoped) */
header nav .navbar-nav .nav-link {
    position: relative;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding: 8px 15px !important;
    border-radius: 6px;
    color: white !important;
    transform: translateZ(0);
}

header nav .navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px) translateZ(0);
}

/* Hardware-accelerated underline animation using scaleX */
header nav .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 80%;
    height: 2px;
    bottom: 2px;
    left: 50%;
    background-color: white;
    transform: translateX(-50%) scaleX(0);
    transform-origin: center center;
    transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.22s ease;
    opacity: 0;
    pointer-events: none;
}

header nav .navbar-nav .nav-link:hover::after {
    transform: translateX(-50%) scaleX(1);
    opacity: 1;
}

/* Icon animation on hover */
header nav .navbar-nav .nav-link i {
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    color: white !important;
    margin-right: 6px;
    display: inline-block;
    transform: translateZ(0);
}

header nav .navbar-nav .nav-link:hover i {
    transform: scale(1.15) translateZ(0);
}

/* Main Section */
.quote-panel {
    background-color: #e6f0ff;
    padding: 2.5rem;
    color: #003366;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.1);
}

h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-in-out;
}

.dynamic-text {
    font-size: 1rem;
}

p.dynamic-text {
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-in-out forwards;
    animation-delay: 0.5s;
}

p {
    font-style: italic;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeInUp 1s ease-in-out forwards;
    animation-delay: 0.5s;
}

label {
    text-align: left;
    /* Aligns text to the left */
}

/* Modal Background */
.modal-background {
    background-color: rgba(0, 0, 0, 0.4);
}

/* Modal Container */
.modal-content {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    border: none;
}

/* Modal Header */
.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1.25rem;
}

.modal-title {
    color: #0d6efd;
    font-weight: 600;
    font-size: 1.5rem;
}

/* Modal Body */
.modal-body {
    padding: 1.5rem;
}

/* Modal Footer */
.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 1.25rem;
}

/* Form Elements in Modal */
.modal-body .form-label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.modal-body .form-control {
    border: 1px solid #55575c;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease-in-out;
}

.modal-body .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.modal-body .form-select {
    border: 1px solid #55575c;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: border-color 0.2s ease-in-out;
}

.modal-body .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Buttons in Modal */
.modal-body .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.modal-body .btn-primary {
    background-color: #0d6efd;
    border: none;
}

.modal-body .btn-primary:hover {
    background-color: #0b5ed7;
    transform: translateY(-1px);
}

.modal-body .btn-light {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #495057;
}

.modal-body .btn-light:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* 6-box token input styling for reset code */
.token-inputs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.token-inputs .token-box {
    width: 44px;
    height: 48px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.token-inputs .token-box:focus {
    outline: none;
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Links in Modal */
.modal-body a {
    color: #0d6efd;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.modal-body a:hover {
    color: #0b5ed7;
    text-decoration: underline;
}

/* Underline text-primary items on hover (e.g., Forgot Password, Sign Up prompts) */
.text-primary:hover {
    text-decoration: underline !important;
}

/* Close Button */
.btn-close {
    opacity: 0.5;
    transition: opacity 0.2s ease-in-out;
}

.btn-close:hover {
    opacity: 0.75;
}

/* Password Toggle Button */
.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
}

.password-toggle:hover {
    color: #495057;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

/* Warning Messages Styling */
.text-danger {
    color: #dc3545 !important;
    font-size: 0.8rem !important;
    margin-top: 0.15rem !important;
}

/* Login and Signup Modal specific error messages */
#loginWarning .text-danger,
#signUpWarning .text-danger,
#forgotPasswordWarning .text-danger,
#loginWarning p,
#signUpWarning p,
#forgotPasswordWarning p {
    font-size: 0.75rem !important;
    margin: 0.1rem 0 !important;
    line-height: 1.2 !important;
}

#loginWarning p,
#signUpWarning p,
#forgotPasswordWarning p {
    margin-bottom: 0.1rem !important;
}

#loginWarning p:last-child,
#signUpWarning p:last-child,
#forgotPasswordWarning p:last-child {
    margin-bottom: 0 !important;
}

/* Terms Checkbox */
.form-check {
    margin-top: 1rem;
}

.form-check-input {
    margin-top: 0.25rem;
}

.form-check-label {
    color: #6c757d;
    font-size: 0.875rem;
}


/* Service Card */
.card,
.personalized-guidance,
.privacy-matters,
.experienced-counselors {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    padding: 1.25rem;
    border-radius: 0.5rem;
    background-color: #ffffff;
    box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover{
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Buttons */
a.bg-blue-600,
a.bg-gray-200 {
    transition: background-color 0.3s;
    padding: 0.625rem 1.25rem;
    border-radius: 0.3125rem;
    text-decoration: none;
    display: inline-block;
    font-weight: 500;
}

a.bg-blue-600 {
    color: white;
    background-color: #0d6efd;
}

a.bg-blue-600:hover {
    background-color: #0b5ed7;
}

a.bg-gray-200 {
    color: #003366;
    background-color: #e9ecef;
}

a.bg-gray-200:hover {
    background-color: #dee2e6;
}

footer {
    background-color: #060E57;
    padding: 1.875rem 0;
    text-align: center;
    color: #ffffff;
    width: 100%;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9375rem;
    max-width: 75rem;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.copyright {
    margin-bottom: 0.9375rem;
    font-weight: 500;
    animation: fadeInUp 1s ease-in-out forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.team-members {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin-bottom: 0.9375rem;
    font-style: italic;
    animation: fadeInUp 1s ease-in-out forwards;
    animation-delay: 0.4s;
    opacity: 0;
}

.team-members span {
    position: relative;
}

.team-members span:not(:last-child):after {
    content: "•";
    position: absolute;
    right: -0.75rem;
}

.team-members a {
    font-family: 'Roboto', Arial, sans-serif; /* Custom font */
    font-size: 1.1rem; /* Custom font size */
    color: #f2f5f8; /* Custom font color (e.g., Bootstrap primary blue) */
    font-weight: 600; /* Semi-bold */
    text-decoration: none; /* Remove default underline */
    transition: color 0.3s ease, text-decoration 0.3s ease; /* Smooth transition for hover effects */
}

/* Style for when the link is hovered */
.team-members a:hover {
    color: #086afc; /* Darker blue on hover */
    text-decoration: underline; /* Add underline on hover */
}

/* If you need to specifically style the span inside the link, you can do this: */
.team-members a span {
    /* These styles would override the <a> tag's styles for the text within the span */
    /* For example, if you wanted a different font weight only for the span content */
    font-weight: normal; /* Make span text normal weight even if link is bold */
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5625rem;
    margin-top: 0.625rem;
    animation: fadeInUp 1s ease-in-out forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.social-icons a {
    color: #ffffff;
    font-size: 1.2rem;
    transition: all 0.3s;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-decoration: none;
}

.social-icons a:hover {
    transform: translateY(-0.3125rem);
    background-color: rgba(255, 255, 255, 0.2);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(1.25rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Custom Navbar Toggler for Drawer */
.custom-navbar-toggler {
    background-color: transparent;
    border: 1px solid white;
    padding: 0.25rem 0.25rem;
    font-size: 1rem;
    line-height: 2;
    border-radius: 0.25rem;
    color: white;
    cursor: pointer;
    margin-left: auto !important; /* Push to the right */
    margin-right: .7rem !important;
    margin-top: .7rem !important;
    margin-bottom: .7rem !important;
    z-index: 1050; /* Ensure it's above other content */

    
}



.custom-navbar-toggler .navbar-toggler-icon {
    display: flex !important; /* Make it a flex container */
    justify-content: center !important; /* Center horizontally */
    align-items: center !important; /* Center vertically */
    width: 1.5em;
    height: 1.5em;
    vertical-align: middle;
    /* background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; */ /* Removed as icon is now <i> tag */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100%;
    filter: brightness(0) invert(1); /* Makes the icon white */
}

.custom-navbar-toggler .navbar-toggler-icon i {
    font-size: 1.5em !important; /* Make icon 50% bigger */
    color: white; /* Ensure icon color is white */
}

/* Navbar Drawer - Hardware Accelerated */
.navbar-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 290px;
    max-width: 85vw;
    height: 100vh;
    height: 100dvh;
    background-color: #060E57;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.18);
    transform: translate3d(100%, 0, 0);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s ease;
    will-change: transform;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    perspective: 1000px;
    contain: layout paint;
    z-index: 1045;
    visibility: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.navbar-drawer.show,
.navbar-drawer.active {
    transform: translate3d(0, 0, 0);
    visibility: visible;
}

.navbar-drawer .navbar-nav {
    flex-direction: column;
    padding: 1rem;
}

.navbar-drawer .nav-item {
    width: 100%;
    margin: 0;
}

.navbar-drawer .nav-link {
    padding: 0.75rem 1rem !important;
    color: #ffffff !important;
    display: flex;
    justify-content: flex-start;
    align-items: center !important;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.navbar-drawer .nav-link i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    color: #ffffff !important;
}

.navbar-drawer .nav-link:active {
    background-color: rgba(255, 255, 255, 0.18) !important;
    transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
    .navbar-drawer .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.12) !important;
        color: #ffffff !important;
        transform: translateX(4px);
    }
}

/* Navbar Overlay - Hardware Accelerated */
.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1044;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.26s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.26s ease;
    will-change: opacity;
    transform: translateZ(0);
}

.navbar-overlay.show,
.navbar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.navbar-collapse {
    /* Hide the default Bootstrap collapse on small screens */
    display: none !important;
}



/* Responsive rules for screens up to 991.98px (tablets and smartphones) */
@media (max-width: 991.98px) {
    .container-fluid {
        padding-left: 0 !important; /* Zero out container-fluid padding */
        padding-right: 0 !important; /* Zero out container-fluid padding */
    }

    .header-container {
        padding: 0 5px !important; /* Minimal padding for header container */
    }

    .header-container .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .header-container .row .col-md-3 {
        flex: 0 0 100px !important; /* Fixed width for logo/title */
        max-width: 100px !important;
        padding-left: 0 !important; /* Zero out column padding */
        padding-right: 0 !important; /* Zero out column padding */
    }

    .header-container .row .col-md-9 {
        flex: 0 0 calc(100% - 120px) !important; /* Take remaining space precisely */
        min-width: 0 !important;
        padding-left: 0 !important; /* Zero out column padding */
        padding-right: 0 !important; /* Zero out column padding */
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }

    .custom-navbar-toggler {
        margin-left: auto !important;
        order: 2;
    }

    .logo-title-container {
        margin-bottom: 0 !important;
    }

    h1 {
        margin: 0 !important;
        text-align: left !important;
        font-size: 1.1rem !important;
        white-space: nowrap !important;
    }

    /* Hide standard nav elements completely on small screens */
    nav {
        display: none !important;
    }
}

/* Resend Reset Code Modal Styles */
#resendResetCodeModal .modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#resendResetCodeModal .modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.5rem 0.5rem 0 0;
}

#resendResetCodeModal .modal-title {
    color: #495057;
    font-weight: 600;
}

#resendResetCodeModal .form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

#resendResetCodeModal .form-control {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

#resendResetCodeModal .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    outline: none;
}

#resendResetCodeModal .btn {
    border-radius: 0.375rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.15s ease-in-out;
}

#resendResetCodeModal .btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

#resendResetCodeModal .btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

#resendResetCodeModal .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

#resendResetCodeModal .btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

#resendResetCodeModal .text-danger {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

#resendResetCodeModal .text-muted {
    color: #6c757d !important;
    font-size: 0.95rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .token-inputs { gap: 0.4rem; }
    .token-inputs .token-box { width: 40px; height: 46px; font-size: 1.1rem; }
    
    /* Mobile styles for resend reset code modal */
    #resendResetCodeModal .modal-dialog {
        margin: 1rem;
    }
    
    #resendResetCodeModal .btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

/* Password Strength Meter */
#passwordStrengthMeter {
    margin-top: 10px;
}

.strength-meter {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-meter-fill {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.strength-meter-fill.weak {
    width: 33%;
    background-color: #dc3545;
}

.strength-meter-fill.moderate {
    width: 66%;
    background-color: #ffc107;
}

.strength-meter-fill.strong {
    width: 100%;
    background-color: #28a745;
}

.strength-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.strength-label {
    font-weight: 600;
}

.strength-label.weak {
    color: #dc3545;
}

.strength-label.moderate {
    color: #ffc107;
}

.strength-label.strong {
    color: #28a745;
}

.strength-description {
    color: #6c757d;
    font-size: 12px;
}

/* Criteria Pills to Help Users Strengthen Password in Signup */
.strength-criteria-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
}

.criteria-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    transition: all 0.25s ease;
}

.criteria-pill i {
    font-size: 0.72rem;
    color: #94a3b8;
    transition: color 0.25s ease;
}

.criteria-pill.met {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.criteria-pill.met i {
    color: #10b981;
}

.password-match-feedback {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.password-match-feedback.match {
    color: #059669;
}

.password-match-feedback.mismatch {
    color: #dc2626;
}