.loginBoxContainer{

    background-image: url('/images/login.jpeg');
    background-size: cover;

}

.loginBoxContainer2{

    background-image: url('/images/signup.jpeg');
    background-size: cover;

}

.loginBoxContainer3{

    /*background-image: url('/images/forgot.jpeg');*/
    background-size: cover;

}

.loginBox{

    background: rgb(245 245 245 / 54%);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    /*backdrop-filter: blur(10.5px);*/
    -webkit-backdrop-filter: blur(8.5px);
    border: 1px solid rgba(91, 120, 230, 1);

}

.auth form .form-group .form-control{
    background: transparent;
    font-size: 1.0rem;
    font-weight: 500;
    /*border-radius: 30px;*/
}

select.form-control{
    padding: 0.4375rem 0.75rem;
    color: #020202;
    border: 2px solid #414951;
    border-radius: 15px;
    outline: none;
}

input.form-control{
    padding: 0.4375rem 0.75rem;
    color: #020202;
    border: 2px solid #414951;
    border-radius: 15px;
    outline: none;
}
.form-control::placeholder {
    color:  #020202;
}

 body {
     /*background: url('/images/4.jpg') no-repeat center center fixed;*/
     background-size: cover;
     height: 100vh;
 }

#mapProfileView {
    position: absolute;
    transform: scale(1.02); /* Slight zoom-out effect */
    transition: opacity 1.5s ease, transform 1.5s ease;
    top: 0;
    left: 0;
    width: 100%;
    height: 94%;
    border-radius: 10px;

}

#mapProfileView.is-ready {
    opacity: 1;
    transform: scale(1);
}

/* Basic form styling */
.login-form .form-group {
    margin-bottom: 20px;
}


/* Styling for the links */
.auth-link {
    font-size: 1rem;
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 576px) {
    .login-card {
        padding: 20px;
        margin: 20px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .link-container {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

/* Custom styles to match the provided image */
:root {
    --primary-green: #377353;
    --secondary-green: #40885f;
    --text-dark: #3a3a3a;
    --text-light: #5e5e5e;
    --form-bg: #e9ecef;
    --form-border: #ced4da;
    --map-reveal-duration: 1200ms;
    --map-reveal-ease: cubic-bezier(.22, .72, .08, 1);

}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    /*background-color: rgba(255, 255, 255, 0.9);*/
    padding: 10px;
}

/*.logo-container {*/
/*    flex-shrink: 0;*/
/*    margin-right: 1.5rem;*/
/*}*/

.logo-container {
    position: relative;
    width: 100px; /* Default width */
    min-width: 80px; /* Minimum width */
    border-radius: 9999px;
    padding: 5px;
    isolation: isolate;
    aspect-ratio: 1;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    /*margin-right: 1.5rem; !* Add margin-right from the first rule *!*/
}


.logo-block-green {
    background-color: var(--primary-green);
    width: 1rem;
    height: 100px;
    margin-left: 10px;
}

/*.logo-image {*/
/*    width: 100px;*/
/*    height: auto;*/
/*}*/

.system-info {
    line-height: 1.2;
    color: var(--text-light);
}

:root {
    /* tweak these to your brand */
    --accent: #16a34a; /* emerald */
    --accent-2: #22d3ee; /* cyan */
    --text-dark: #0f172a; /* fallback/dark text */
}

.system-subtitle {
    /* responsive + tighter rhythm */
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0;

    /* gradient text with fallback */
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent; /* shows the gradient */
    /* readability on busy backgrounds */
    text-shadow: 0 1px 0 rgba(255, 255, 255, .2);

    /* entrance */
    animation: riseIn .6s ease-out both;

    /* underline accent */
    position: relative;
    display: inline-block;
}

.system-subtitle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -.35rem;
    width: 60%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--accent), transparent);
    opacity: .9;
}

@keyframes riseIn {
    from {
        transform: translateY(6px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Motion-safe */
@media (prefers-reduced-motion: reduce) {
    .system-subtitle {
        animation: none;
    }
}

/* Fallback if gradient clipping isn't supported */
@supports not (-webkit-background-clip:text) {
    .system-subtitle {
        color: var(--accent, var(--text-dark));
        text-shadow: none;
    }
}

.system-department {
    font-size: 0.9rem;
    font-weight: 500;
}

.login-header {
    margin-bottom: 2rem;
}

.login-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.login-header p {
    font-size: 1rem;
    color: var(--text-light);
    margin: 0;
}

.form-label {
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-control {
    background-color: #fff;
    border: 1px solid var(--form-border);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: var(--text-dark);
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(55, 115, 83, 0.25);
}

.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.d-flex.justify-content-between.align-items-center {
    margin-top: 1rem;
}

.btn-login {
    background-color: var(--secondary-green);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-login:hover {
    background-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

.btn-signup {
    background-color: #fff;
    color: var(--text-dark);
    border: 1px solid var(--form-border);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn-signup:hover {
    background-color: var(--form-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

.btn-group {
    gap: 1rem;
}

/* Panel itself should be transparent so the GIS map shows behind the fade */
.login-panel {
    background: transparent !important; /* overrides bg-white if present */
    overflow: hidden;
}

/* Background carousel fills the panel and fades to transparent on the right */
.bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 75%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Slides - optimized for performance */
.bg-carousel .slide {
    position: absolute;
    inset: 0;
    background-image: var(--img);
    background-size: cover;
    background-position: center;
    opacity: 0;
    filter: brightness(0.9) contrast(1.05);
    transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
    transform-origin: center;
    transition: opacity 0.8s ease-in-out;
    will-change: auto; /* Only set when animating */
}

/* Active slide */
.bg-carousel .slide.active {
    opacity: 1;
    will-change: opacity, transform;
    animation: kenBurns 4s ease-in-out forwards;
}

/* Loading state */
.bg-carousel .slide.loading {
    background-color: #f0f0f0;
    position: relative;
}

.bg-carousel .slide.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Optimized Ken Burns effect - only on active slide */
@keyframes kenBurns {
    0% {
        transform: scale3d(1, 1, 1) translate3d(0, 0, 0);
    }
    100% {
        transform: scale3d(1.08, 1.08, 1) translate3d(1%, -1%, 0);
    }
}

/* Fade transition */
.bg-carousel .slide.fade-out {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

.bg-carousel .slide.fade-in {
    opacity: 1;
    transition: opacity 0.8s ease-in-out;
}

/* Keep login content above background */
.login-wrapper {
    position: relative;
    z-index: 2;
}

/* Optional: readability—soft left-to-right white gradient behind content only */
.login-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    /*background: linear-gradient(to right, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.6) 25%, rgba(255,255,255,0) 75%);*/
    z-index: -1;
    pointer-events: none;
}

:root {
    --brand-1: #16a34a; /* emerald */
    --brand-2: #22d3ee; /* cyan */
    --ink: #0f172a; /* dark text */
    --muted: #334155; /* slate */
}

/* HEADER WRAPPER */
.header-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgb(255 255 255 / 55%);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgb(2 8 23 / 65%);
}


/*.logo-image {*/
/*    width: 50%;*/
/*    height: 75%;*/
/*    object-fit: contain;*/
/*    z-index: 5;*/
/*}*/

/* Optional thin accent bar (kept from your markup) */
.logo-block-green {
    background-color: var(--primary-green);
    width: 1rem;
    height: 125px;
    position: absolute;
    right: -25px;
}

/* TITLE + SUBTITLE */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.system-title {
    margin: 0;
    font-weight: 900;
    line-height: 1.0;
    font-size: 3.0rem;
    background: linear-gradient(90deg, #040f49, #04ddff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(34, 211, 238, .18);
}

.system-title-2 {
    margin: 0;
    font-weight: 900;
    line-height: 1.0;
    font-size: 1.75rem;
    background: linear-gradient(90deg, #040f49, #04ddff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(34, 211, 238, .18);
}

.system-subtitle {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    color: var(--ink);
    position: relative;
    font-size: 1.5rem;
}

.system-subtitle::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -.35rem;
    width: 62%;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--brand-1), transparent);
    opacity: .9;
}

/* Department lines */
.system-department {
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
    font-weight: 600;
}

/* Login headline tidy-up */
.login-header h1 {
    margin: 18px 0 6px;
    font-weight: 800;
    letter-spacing: .02em;
    color: var(--ink);
}

.login-header p {
    margin: 0 0 10px;
    color: #475569;
}

/* Inputs + button polish */
.form-control.form-control-lg {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    transition: box-shadow .2s, border-color .2s;
}

.form-control.form-control-lg:focus {
    border-color: var(--brand-2);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .15);
}

.auth-form-btn.btn-primary {
    border-radius: 12px;
    background: linear-gradient(90deg, var(--brand-1), var(--brand-2));
    border: none;
    transition: transform .06s ease, box-shadow .2s ease;
}

.auth-form-btn.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(34, 211, 238, .25);
}

/* Animations */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Motion-safe */
@media (prefers-reduced-motion: reduce) {
    .logo-container::before {
        animation: none;
    }
}

/*==================================================================================================================*/
/* Add these responsive fixes to your CSS */

/* Base responsive setup */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
}

/* Main container responsive adjustments */
.main-wrapper {
    min-height: 100vh;
    overflow-x: hidden;
}

/* Login panel responsive fixes */
.login-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 50vw;
    height: 100vh;
    z-index: 5;
    margin: 0;
    padding: 0;
}

/* Header section responsive */
.header-section {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgb(255 255 255 / 55%);
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgb(2 8 23 / 65%);
    flex-wrap: wrap;
}

.head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}



/*.logo-image {*/
/*    width: 70%;*/
/*    height: 70%;*/
/*    object-fit: contain;*/
/*    z-index: 5;*/
/*}*/

.logo-block-green {
    background-color: var(--primary-green);
    width: 0.75rem;
    height: 100px;
    position: absolute;
    right: -20px;
}

/* System info responsive */
.system-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.system-title {
    margin: 0;
    font-weight: 900;
    line-height: 1.0;
    font-size: clamp(1.5rem, 4vw, 3.0rem);
    background: linear-gradient(90deg, #040f49, #04ddff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(34, 211, 238, .18);
}

.system-title-2 {
    margin: 0;
    font-weight: 900;
    line-height: 1.1;
    font-size: clamp(1rem, 2.5vw, 1.75rem);
    background: linear-gradient(90deg, #040f49, #04ddff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 10px rgba(34, 211, 238, .18);
}

.system-subtitle {
    margin: 0;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.2;
    color: var(--ink);
    position: relative;
    font-size: clamp(1rem, 2vw, 1.5rem);
}

/* Login wrapper responsive */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.login-card {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
}

/* Form responsive */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control.form-control-lg {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    transition: box-shadow .2s, border-color .2s;
    font-size: clamp(0.9rem, 2vw, 1rem);
    padding: 0.75rem 1rem;
}

/* Background carousel responsive */
.bg-carousel {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
}

/* RESPONSIVE BREAKPOINTS */

/* Large tablets and small desktops */
@media (max-width: 1200px) {
    .login-panel {
        width: 55vw;
    }

    .system-title {
        font-size: clamp(1.25rem, 3.5vw, 2.5rem);
    }

    .system-title-2 {
        font-size: clamp(0.9rem, 2.2vw, 1.5rem);
    }
}

/* Tablets */
@media (max-width: 992px) {
    .login-panel {
        width: 60vw;
    }

    .header-section {
        padding: 12px;
        gap: 12px;
    }

    .logo-container {
        width: 80px;
    }

    .logo-block-green {
        width: 0.5rem;
        height: 80px;
        right: -15px;
    }

    .system-info {
        gap: 2px;
    }

    .login-card {
        padding: 0.75rem;
    }
}

/* Small tablets */
@media (max-width: 768px) {
    .login-panel {
        width: 70vw;
    }

    .head {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
    }

    .logo-container {
        width: 70px;
        margin-bottom: 0.5rem;
    }

    .logo-block-green {
        display: none; /* Hide on small screens */
    }

    .system-info {
        align-items: center;
        text-align: center;
    }

    .login-header h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .bg-carousel {
        -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
        mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 50%, rgba(0, 0, 0, 0) 100%);
    }
}

/* Mobile devices */
@media (max-width: 576px) {
    .login-panel {
        width: 100vw;
        position: relative;
        height: auto;
        min-height: 100vh;
    }

    .bg-carousel {
        -webkit-mask-image: none;
        mask-image: none;
        opacity: 0.3; /* Make background less prominent on mobile */
    }

    .login-wrapper::before {
        background: rgba(255,255,255,0.9);
    }

    .header-section {
        margin-bottom: 1rem;
        padding: 10px;
    }

    .head {
        gap: 0.5rem;
    }

    .logo-container {
        width: 60px;
    }

    /*.logo-image {*/
    /*    width: 80%;*/
    /*    height: 80%;*/
    /*}*/

    .system-title {
        font-size: clamp(1rem, 4vw, 1.5rem);
    }

    .system-title-2 {
        font-size: clamp(0.75rem, 3vw, 1rem);
        line-height: 1.2;
    }

    .system-subtitle {
        font-size: clamp(0.8rem, 3vw, 1rem);
    }

    .login-card {
        padding: 0.5rem;
    }

    .login-header {
        margin-bottom: 1rem;
    }

    .login-header h1 {
        font-size: clamp(1.25rem, 6vw, 1.75rem);
        margin-bottom: 0.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-control.form-control-lg {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .auth-form-btn {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    /* Adjust map view for mobile when login takes full width */
    .col-lg-12.col-md-12 {
        display: none; /* Hide map on mobile or adjust as needed */
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    .header-section {
        padding: 8px;
    }

    .system-title {
        font-size: clamp(0.9rem, 4vw, 1.2rem);
    }

    .system-title-2 {
        font-size: clamp(0.7rem, 3vw, 0.9rem);
    }

    .system-subtitle {
        font-size: clamp(0.7rem, 3vw, 0.85rem);
    }

    .logo-container {
        width: 50px;
    }
}

/* Ultra-wide screens */
@media (min-width: 1400px) {
    .login-panel {
        width: 45vw;
    }

    .login-card {
        max-width: 100%;
        padding: 2rem;
    }
}


/*==================================================================================================================*/
/* Additional responsive styles for search and form components */

/* Map controls responsive */
.map-controls-wrapper {
    position: relative;
    z-index: 10;
    padding: 1rem;
}

.responsive-map {
    width: 100% !important;
    min-height: 500px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* Search input responsive */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 100%;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.search-icon {
    position: absolute;
    left: 12px;
    width: 18px;
    height: 18px;
    fill: #888;
    z-index: 2;
}

.responsive-search-input {
    padding: 10px 10px 10px 40px;
    border-radius: 25px;
    border: 1px solid #ddd;
    font-size: 15px;
    width: 280px;
    max-width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-btn {
    border-radius: 25px;
    padding: 8px 18px;
    white-space: nowrap;
}

/* Canal chief container responsive */
.canal-chief-container {
    text-align: center;
    display: none;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.responsive-select {
    width: auto;
    min-width: 200px;
    max-width: 100%;
    border-radius: 8px;
    padding: 8px 12px;
    border: 1px solid #ddd;
}

/* Form responsive styles */
.responsive-form {
    width: 100%;
}

.responsive-submit-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.auth-links {
    margin-top: 1rem;
    text-align: center;
}

.auth-link {
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.auth-link:hover {
    color: var(--primary-green);
    text-decoration: underline;
}

/* Map container responsive */
.map-container {
    position: relative;
}

/* RESPONSIVE BREAKPOINTS FOR COMPONENTS */

@media (max-width: 768px) {
    .map-controls-wrapper {
        padding: 0.5rem;
    }

    .responsive-search-input {
        width: 200px;
        font-size: 14px;
        padding: 8px 8px 8px 35px;
    }

    .search-btn {
        padding: 6px 12px;
        font-size: 14px;
    }

    .search-icon {
        width: 16px;
        height: 16px;
        left: 10px;
    }

    .responsive-select {
        min-width: 150px;
        font-size: 14px;
        padding: 6px 10px;
    }

    .canal-chief-container {
        flex-direction: column;
        align-items: center;
    }

    .responsive-map {
        min-height: 300px;
        border-radius: 5px;
    }
}

@media (max-width: 576px) {
    /* Mobile-first approach for forms */
    .responsive-search-input {
        width: 100%;
        max-width: 250px;
        margin-bottom: 0.5rem;
    }

    .search-btn {
        width: 100%;
        max-width: 120px;
    }

    .search-input-wrapper {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .responsive-select {
        width: 100%;
        min-width: auto;
        margin-bottom: 0.5rem;
    }

    .map-controls-wrapper {
        padding: 0.25rem;
    }

    .responsive-map {
        min-height: 250px;
        margin-top: 0.5rem;
    }

    /* Hide map completely on very small screens if needed */
    .map-container {
        display: none;
    }

    /* Make login panel full screen on mobile */
    .login-panel {
        width: 100vw !important;
        position: static !important;
        height: auto !important;
        min-height: 100vh;
    }

    .login-wrapper {
        padding: 0.5rem;
    }

    .login-card {
        padding: 0.5rem;
    }

    .header-section {
        margin-bottom: 1rem;
    }

    .responsive-form .form-group {
        margin-bottom: 1rem;
    }

    .auth-links {
        margin-top: 1.5rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .responsive-search-input {
        font-size: 13px;
        padding: 6px 6px 6px 30px;
    }

    .search-btn {
        font-size: 13px;
        padding: 6px 10px;
    }

    .responsive-select {
        font-size: 13px;
        padding: 6px 8px;
    }

    .responsive-submit-btn {
        font-size: 14px;
        padding: 0.6rem;
    }

    .auth-link {
        font-size: 0.9rem;
    }
}

/* Utility classes for showing/hiding content based on screen size */
@media (max-width: 576px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 577px) {
    .show-mobile-only {
        display: none !important;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    .bg-carousel .slide {
        background-attachment: scroll; /* Better performance on mobile */
    }

    .bg-carousel .slide.active {
        animation: none; /* Disable Ken Burns effect on mobile for better performance */
    }
}

/* Ensure proper touch targets for mobile */
@media (max-width: 768px) {
    .btn, .form-control, .responsive-select {
        min-height: 44px; /* iOS recommended touch target size */
    }

    .search-btn, .responsive-submit-btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}



/*==================================================================================================================*/
/* Responsive Map Container Styles */

#mapProfileView {
    width: 100% !important;
    height: 95%; /* Default height */
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: height 0.3s ease;
    position: relative;
}

/* Map height adjustments for different screen sizes */
@media (max-width: 575px) {

    /* Adjust ArcGIS UI components for mobile */
    .esri-ui-corner .esri-component {
        font-size: 12px;
    }

    .esri-zoom .esri-widget--button {
        width: 32px;
        height: 32px;
    }

    .esri-attribution {
        font-size: 10px;
    }
}


/* Responsive zoom controls */
.map-zoom-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.zoom-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: bold;
    color: #333;
}

.zoom-btn:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

@media (max-width: 575px) {
    .zoom-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .map-zoom-controls {
        top: 5px;
        right: 5px;
        gap: 3px;
    }
}

/* Responsive legend positioning */
.esri-legend {
    max-height: 30vh;
    overflow-y: auto;
}

@media (max-width: 575px) {
    .esri-legend {
        max-height: 20vh;
        font-size: 12px;
    }

    .esri-legend__layer-caption {
        font-size: 11px;
    }
}

/* Custom popup styles for different screen sizes */
.esri-popup__main-container {
    max-width: 90vw;
}

@media (max-width: 575px) {
    .esri-popup__main-container {
        max-width: 95vw;
        max-height: 50vh;
    }

    .esri-popup__content {
        font-size: 14px;
    }

    .esri-popup__header-title {
        font-size: 16px;
    }
}

/* Station marker responsive styles */
.station-marker {
    transition: transform 0.2s ease;
}

.station-marker:hover {
    transform: scale(1.2);
}

@media (max-width: 575px) {
    .station-marker {
        transform: scale(0.8);
    }

    .station-marker:hover {
        transform: scale(1.0);
    }
}

/* Loading indicator for map transitions */
.map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    display: none;
    z-index: 1000;
}

.map-loading.active {
    display: block;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Map overlay controls */
.map-overlay-controls {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 99;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.map-toggle-btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-toggle-btn.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.map-toggle-btn:hover {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

@media (max-width: 575px) {
    .map-overlay-controls {
        top: 5px;
        left: 5px;
        max-width: calc(100% - 70px); /* Account for zoom controls */
    }

    .map-toggle-btn {
        padding: 4px 8px;
        font-size: 10px;
        min-width: 60px;
    }
}

/* Hide complex UI elements on very small screens */
@media (max-width: 480px) {
    .esri-zoom {
        display: none !important;
    }

    .esri-attribution {
        display: none !important;
    }

    .map-toggle-btn {
        display: none;
    }

    .map-overlay-controls {
        display: none;
    }
}

/* Responsive basemap gallery if used */
.esri-basemap-gallery {
    max-height: 200px;
    overflow-y: auto;
}

@media (max-width: 575px) {
    .esri-basemap-gallery {
        max-height: 150px;
    }

    .esri-basemap-gallery__item {
        width: 80px;
        height: 60px;
    }
}

/* Custom fullscreen mode */
.map-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    #mapProfileView {
        /* Reduce visual complexity on mobile */
        image-rendering: optimizeSpeed;
        image-rendering: -moz-crisp-edges;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }

    /* Simplify animations on mobile */
    .esri-view-surface {
        animation-duration: 0.2s !important;
    }
}

/* Touch-friendly controls */
@media (hover: none) and (pointer: coarse) {
    .zoom-btn, .map-toggle-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .esri-zoom .esri-widget--button {
        min-width: 44px;
        min-height: 44px;
    }
}