.modal-dialog {
    opacity: 0.95 !important;
    /* Slightly increased opacity for better visibility */
    align-content: center !important;
}

/* Ensure Modals appear above the high-z-index Navbar (3000) */
.modal {
    z-index: 4000 !important;
}

.modal-backdrop {
    z-index: 3900 !important;
}

#result2 {
    color: #000080;
    font-weight: bold;
    font-size: 1.5em;
}

#result1 {
    color: #000080;
    font-weight: bold;
    font-size: 1.5em;
}

#result3 {
    color: #000080;
    font-weight: bold;
    font-size: 1.5em;
}

#result4 {
    color: #000080;
    font-weight: bold;
    font-size: 1.5em;
}

#result6 {
    color: #000080;
    font-weight: bold;
    font-size: 1.5em;
}



.btn-margin-left {
    margin-left: 10px;
}

.btn-margin-right {
    margin-right: 10px;
}

.btn-margin-top {
    margin-top: 10px;
}

.navbar {
    padding: 0 !important;
    border: 1px #FFFFFF solid !important;
    height: 60px;
    position: relative !important;
    z-index: 3000 !important;
}

.dropdown-menu {
    z-index: 3001 !important;
}

.leaflet-container {
    border: 1px #FFFFFF solid !important
}

body {
    padding: 0;
    margin: 0;
}


html,
body {
    height: 100%;

}

#map {
    width: 100%;
    height: calc(100% - 60px);
    height: -o-calc(100% - 60px);
    /* opera */
    height: -webkit-calc(100% - 60px);
    /* google, safari */
    height: -moz-calc(100% - 60px);
    /* firefox */
    min-height: 94.5%;
    min-width: 100%;
    display: block;
}

#frm1,
#frm2 {
    margin: 20px;
}

.p-small-footer {
    font-size: 0.7rem;
    margin-left: 50%;
    margin-top: 5px;
}

.margin-40 {
    margin-left: 1%;
}

.disabled {
    pointer-events: none;
    color: grey;
    border-color: #ffffff !important;
}

.leaflet-control-geocoder-expanded {

    width: 300px !important;
}

.leaflet-control-view-center {
    background-image: url('./icon-viewcenter.png') !important;
}

#PinControl-HideButton {
    background-image: url('L.Marker.Pin.img/control/hide.png') !important;
}


.leaflet-oldie .leaflet-control-minimap-toggle-display {
    background-image: url('./toggle.png') !important;
}


.leaflet-control-minimap-toggle-display {
    background-image: url('./toggle.png') !important;
    content: 'M' !important;
}

table {
    font-family: arial, sans-serif;
    border-collapse: collapse;
    width: 100%;
}

td,
th {
    border: 2px solid #6b6868;
    text-align: left;
    padding-left: 5px;
}

tr:nth-child(even) {
    background-color: #bdc5ce;
}


.leaflet-control,
.leaflet-bar {
    border-color: #666 !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35) !important;
    border-radius: 4px !important;
}

.leaflet-bar a,
.leaflet-bar button {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid #ddd !important;
}

.leaflet-bar a:hover,
.leaflet-bar button:hover {
    background-color: #f0f0f0 !important;
}

.leaflet-control-minimap,
.leaflet-control-styleeditor,
.leaflet-control-pan-right,
.leaflet-control-pan-left,
.leaflet-control-pan-up,
.leaflet-control-pan-down {
    border: solid #666 2px !important;
}




.modal_opacity {
    opacity: 1 !important;
}

.custom-popup .leaflet-popup-tip-container {
    display: none !important;
}

.custom-popup .leaflet-popup-content-wrapper {
    background: rgb(91, 192, 222, 0.5) !important;
    color: rgb(48, 25, 25) !important;
    font-size: 14px !important;
    line-height: 1px !important;
    font-weight: bolder !important;
    padding: 10px !important;
    border: 10px !important;
    border-color: #6b6868 !important;
}

/*
  .custom-popup .leaflet-popup-content-wrapper a {
    color:rgba(0,0,0,0.5);
    }
  .custom-popup .leaflet-popup-tip-container {
    width:30px;
    height:15px;
    }
    */

.custom-popup .leaflet-popup-tip {
    /* serve per togliere il triangolino dal tooltip */
    width: 10px;
    height: 10px;
}


.custom-popup .leaflet-tooltip-top:before,
.custom-popup .leaflet-tooltip-bottom:before,
.custom-popup .leaflet-tooltip-left:before,
.custom-popup .leaflet-tooltip-right:before {
    border: none !important;
}

.custom-popup .leaflet-tooltip {

    /* position: absolute !important;*/
    padding: 3px !important;

    /*border: 1px solid lightgray !important;*/
    border: none !important;

    /* border-radius: 2px !important;*/
    color: #000080 !important;
    white-space: wrap !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
    opacity: 1 !important;

    font-weight: bolder !important;
    font-size: 12px !important;
    background: rgb(91, 192, 222, 0.8) !important;

}

.my-small {

    font-size: smaller !important;
}


.leaflet.control.filelayer {
    content: "prova";
}

.myDivIcon {
    text-align: center;
    /* Horizontally center the text (icon) */
    line-height: 20px;
    /* Vertically center the text (icon) */
}


.btn-outline-info {
    --bs-btn-color: #708090;
    --bs-btn-border-color: #ffffff !important;
    --bs-btn-hover-color: #000;
    --bs-btn-color: #708090;
    --bs-btn-hover-bg: ;
    --bs-btn-color: #708090;
    --bs-btn-hover-border-color: ;
    --bs-btn-focus-shadow-rgb: 13, 202, 240;
    --bs-btn-active-color: #000;
    --bs-btn-color: #708090;
    --bs-btn-active-bg: ;
    --bs-btn-color: #708090;
    --bs-btn-active-border-color: ;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-color: #708090;
    --bs-btn-disabled-color: ;
    --bs-btn-disabled-bg: transparent;
    --bs-btn-color: #708090;
    --bs-btn-disabled-border-color: ;
    --bs-gradient: none;
}


.leaflet-control-better-scale {
    height: 40px !important;
    margin-left: 20px !important;
}


.leaflet-control-better-scale-ruler {
    overflow: hidden;
    position: relative;
    width: 150% !important;
    height: 15px !important;
    background-color: White;
    border: 1px solid #1b1e1f;
}

.shadowed {
    text-shadow: 2px 2px 4px rgb(91, 91, 94);
}


/* Fix Bootstrap tooltip conflict */
.leaflet-tooltip {
    opacity: 1 !important;
    background-color: white !important;
    color: #333 !important;
    border: 1px solid #ccc !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    font-size: 12px;
    font-weight: bold;
}

/* Fix Generic Bootstrap Tooltip (the white box next to buttons) */
.tooltip {
    opacity: 1 !important;
    /* Force visible */
}

.tooltip-inner {
    background-color: #333 !important;
    /* Dark background */
    color: #fff !important;
    /* White text */
    border: 1px solid #000;
}

.custom-tooltip {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 5px;
    border-radius: 3px;
    font-size: 14px;
}

/* --- BOOTSTRAP STYLE LEGEND OVERRIDES --- */

/* The main container - Card style - COLLAPSED by default */
.leaflet-panel-layers {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, .125) !important;
    border-radius: 0.25rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    padding: 0.5rem 1rem !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
    overflow: hidden !important;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

/* Hide the list when collapsed */
.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-list {
    display: none !important;
}

/* Collapsed state - show icon */
.leaflet-panel-layers:not(.expanded) {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    border: 2px solid #666 !important;
    /* Stronger border for the icon */
    border-radius: 4px !important;
    /* Fix weird icon overlap */
    color: transparent !important;
}

.leaflet-panel-layers:not(.expanded) .leaflet-panel-layers-title {
    display: none !important;
}

/* Add layers icon when collapsed */
.leaflet-panel-layers:not(.expanded)::before {
    content: "☰";
    font-size: 20px;
    color: #495057;
    font-weight: bold;
}

/* Expanded state */
.leaflet-panel-layers.expanded {
    padding: 0 !important;
    min-width: 250px;
    cursor: default;
}

/* Groups - Section headers/containers */
.leaflet-panel-layers-group {
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, .125) !important;
    background-color: #f8f9fa !important;
    /* Bootstrap gray-100 */
    margin-bottom: 8px !important;
    border-radius: 0 !important;
    padding: 0.5rem 1rem !important;
}

/* Remove bottom border from last group */
.leaflet-panel-layers-group:last-child {
    border-bottom: none !important;
}

/* Fix for cut-off text in collapsed groups */
.leaflet-panel-layers-group.collapsible:not(.expanded) {
    height: auto !important;
    overflow: visible !important;
}

.leaflet-panel-layers-group.collapsible:not(.expanded) .leaflet-panel-layers-grouplabel {
    height: auto !important;
    overflow: visible !important;
}

/* Group Label/Title */
.leaflet-panel-layers-grouplabel {
    font-weight: 600 !important;
    color: #495057 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    padding-bottom: 0.25rem;
    display: block;
    height: auto !important;
    overflow: visible !important;
    line-height: 1.4 !important;
}

/* Items (Layers) */
.leaflet-panel-layers-item {
    background-color: transparent !important;
    border: none !important;
    padding: 0.35rem 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    color: #212529 !important;
    font-size: 0.9rem !important;
    transition: background-color 0.15s ease-in-out;
}

.leaflet-panel-layers-item:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
    cursor: pointer;
}

/* Icons */
.leaflet-panel-layers-icon {
    width: 24px !important;
    height: 24px !important;
    line-height: 24px !important;
    margin-right: 8px !important;
}

/* Checkboxes (Selectors) */
.leaflet-panel-layers-selector {
    margin-top: 4px !important;
}

/* --- RESPONSIVE STYLES --- */

/* Mobile devices (max-width: 768px) */
@media (max-width: 768px) {

    /* Navbar adjustments */
    .navbar {
        height: auto !important;
        min-height: 50px;
        flex-wrap: wrap;
        padding: 5px 10px !important;
    }

    .navbar-brand {
        flex-shrink: 0;
    }

    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.95);
        padding: 10px;
        border-radius: 5px;
        margin-top: 5px;
    }

    .navbar-collapse .btn-toolbar {
        flex-direction: column;
        width: 100%;
    }

    .navbar-collapse .btn-group {
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar-collapse .btn {
        margin: 2px !important;
    }

    /* Legend panel adjustments for mobile */
    .leaflet-panel-layers.expanded {
        min-width: 180px !important;
        max-width: 220px !important;
        font-size: 0.8rem !important;
    }

    .leaflet-panel-layers-group {
        padding: 0.3rem 0.5rem !important;
    }

    .leaflet-panel-layers-grouplabel {
        font-size: 0.65rem !important;
    }

    .leaflet-panel-layers-item {
        font-size: 0.75rem !important;
        padding: 0.2rem 0 !important;
    }

    .leaflet-panel-layers-icon {
        width: 18px !important;
        height: 18px !important;
        line-height: 18px !important;
        margin-right: 4px !important;
    }

    /* Map height adjustment for mobile */
    #map {
        height: calc(100% - 60px) !important;
        min-height: calc(100vh - 80px) !important;
    }
}

/* --- LANDSCAPE OPTIMIZATION (Fix for disappearing tools) --- */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        height: 40px !important;
        min-height: 40px !important;
    }

    .navbar-brand img {
        height: 25px !important;
        width: auto !important;
    }

    .navbar-brand span {
        font-size: 0.8rem !important;
        padding: 2px 5px !important;
        margin-top: 0 !important;
    }

    #map {
        height: calc(100% - 40px) !important;
    }

    /* Scale down Geoman toolbar to fit on small screens */
    .leaflet-pm-toolbar {
        transform: scale(0.8);
        transform-origin: top left;
    }

    /* Reposition top-left controls to the very top */
    .leaflet-top.leaflet-left {
        top: 0 !important;
    }

    /* Make the mobile menu button smaller */
    .leaflet-control-custom a i {
        font-size: 1.2rem !important;
    }

    .leaflet-control-custom {
        width: 30px !important;
        height: 30px !important;
        line-height: 30px !important;
    }
}

/* --- GEOMAN CONTRAST FIX (Fix for unreadable white-on-white text) --- */
.leaflet-pm-toolbar .pm-action-container {
    background-color: #333 !important;
    /* Dark background for submenus */
    border: 1px solid #111 !important;
    border-radius: 4px;
}

.leaflet-pm-toolbar .pm-action-container .pm-action {
    color: #ffffff !important;
    /* White text on dark background */
    padding: 2px 10px !important;
    font-size: 13px !important;
    text-shadow: none !important;
    background-color: transparent !important;
}

.leaflet-pm-toolbar .pm-action-container .pm-action:hover {
    background-color: #555 !important;
    color: #ffeba7 !important;
}

/* Ensure the main toolbar icons have consistent contrast */
.leaflet-pm-toolbar .leaflet-buttons-control-button .control-icon {
    color: #333 !important;
}


/* Very small screens (max-width: 480px) */
@media (max-width: 480px) {
    .leaflet-panel-layers.expanded {
        min-width: 150px !important;
        max-width: 180px !important;
    }

    .leaflet-panel-layers-grouplabel {
        font-size: 0.6rem !important;
    }

    .leaflet-panel-layers-item {
        font-size: 0.7rem !important;
    }
}

/* --- FIX LEAFLET SEARCH --- */
.leaflet-control-search {
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px !important;
    background-color: white !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65) !important;
}

.leaflet-control-search .search-button {
    background-image: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 30px !important;
    height: 30px !important;
}

.leaflet-control-search .search-button::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f002";
    color: #444;
    font-size: 16px;
}

.leaflet-control-search .search-input {
    border: 1px solid #ccc !important;
    margin: 2px !important;
    border-radius: 4px !important;
}

/* --- RICH TEXT MARKER FIX --- */
.rich-text-marker {
    background: white !important;
    padding: 8px 12px !important;
    border: 1px solid #999 !important;
    border-radius: 4px !important;
    white-space: pre-wrap !important;
    width: max-content !important;
    max-width: 400px !important;
    height: auto !important;
    line-height: 1.5 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    color: #333 !important;
    font-size: 14px !important;
    font-family: Arial, sans-serif !important;
    display: block !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* Ensure Leaflet's default div-icon doesn't override */
.leaflet-div-icon.rich-text-marker {
    background: white !important;
    border: 1px solid #999 !important;
}

.rich-text-marker * {
    margin: 0;
    line-height: inherit;
    pointer-events: auto !important;
}

.rich-text-marker p {
    margin-bottom: 0.5em;
}

.rich-text-marker p:last-child {
    margin-bottom: 0;
}

/* Override Geoman's default pm-text-marker styles */
.pm-text-marker,
.leaflet-pm-text-marker {
    background: white !important;
    padding: 8px 12px !important;
    border: 1px solid #999 !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
    color: #333 !important;
    font-size: 14px !important;
    pointer-events: auto !important;
    cursor: pointer !important;
}

.pm-text-marker textarea,
.leaflet-pm-text-marker textarea {
    display: none !important;
    /* Hide the default textarea */
}

/* --- CATASTO QUERY POPUP MODERN --- */
.custom-catasto-popup .leaflet-popup-content-wrapper {
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    background: #ffffff;
    /* Sfondo bianco solido */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.custom-catasto-popup .leaflet-popup-content {
    margin: 0;
    width: 100% !important;
    line-height: 1.5;
}

.custom-catasto-popup a.leaflet-popup-close-button {
    color: #ffffff !important;
    /* X di chiusura bianca */
    font-size: 24px !important;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    top: 8px !important;
    right: 8px !important;
    padding: 0 !important;
    width: 30px !important;
    height: 30px !important;
    line-height: 30px !important;
    text-align: center;
    text-decoration: none !important;
    z-index: 1000;
    opacity: 1 !important;
}

.custom-catasto-popup a.leaflet-popup-close-button:hover {
    color: #ffeba7 !important;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.catasto-header {
    background: linear-gradient(135deg, #0d6efd, #0043a8);
    color: white;
    padding: 15px 20px;
    text-align: center;
}

.catasto-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    opacity: 0.9;
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
}

.catasto-comune {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
}

.catasto-body {
    padding: 20px;
}

.catasto-coords-box {
    background: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: 'Consolas', monospace;
    font-size: 0.85rem;
    color: #343a40;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Pulsante CTA migliorato */
.catasto-btn {
    font-family: inherit;
    font-weight: 600;
    font-size: 1rem;
    color: #ffffff !important;
    /* Forza testo bianco */
    background-color: #0d6efd;
    border: 1px solid #0a58ca;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(13, 110, 253, 0.3);
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catasto-btn:hover {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.4);
    color: white;
    text-decoration: none;
}

/* Tooltip Styles */
.catasto-info-container {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #dee2e6;
    display: flex;
    align-items: center;
}

.catasto-tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: help;
}

.catasto-tooltip-content {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    /* Posizione sopra l'icona */
    left: 50%;
    margin-left: -100px;
    /* Centra il tooltip */
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    /* Evita flickering mouse */
}

.catasto-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    /* Freccetta sotto */
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}

.catasto-tooltip-wrapper:hover .catasto-tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .catasto-comune {
        font-size: 1.2rem;
    }

    .catasto-coords-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .catasto-btn {
        font-size: 0.9rem;
        padding: 10px;
    }
}

/* Mobile/Custom Control Leaflet */
.leaflet-control-custom {
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
    border-radius: 4px;
}

.leaflet-control-custom:hover {
    background-color: #f4f4f4 !important;
}

.leaflet-control-custom a {
    color: black;
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* FIX: Legend Button Icon when collapsed */
/* Uses FontAwesome 5 Free - Layer Group Icon */
.leaflet-panel-layers:not(.expanded) {
    min-height: 34px !important;
    min-width: 34px !important;
    cursor: pointer !important;
    background-color: white !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px !important;
    /* Fix weird icon overlap */
    color: transparent !important;
}

.leaflet-panel-layers:not(.expanded)::after {
    content: "\f5fd";
    /* fa-layer-group */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 18px;
    color: #444;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}


/* --- LEGENDA (Panel Layers) HARMONIZATION --- */

/* Match the Panel Header to Bootstrap Modal Header (Primary Blue) */
.panel-header {
    background-color: #0d6efd;
    /* Bootstrap Primary Blue */
    color: white;
    padding: 10px 15px;
    font-size: 1.1rem;
    font-weight: 500;
    border-top-left-radius: 0.25rem;
    /* Match .modal-content radius */
    border-top-right-radius: 0.25rem;
    display: none;
    /* Hidden by default, shown when expanded */
    align-items: center;
    gap: 10px;
}

/* Only show header when expanded */
.leaflet-panel-layers.expanded .panel-header {
    display: flex;
}

/* Style the Panel Container to match .modal-content */
.leaflet-panel-layers {
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 0.3rem;
    /* Match Bootstrap modal radius */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .15);
    overflow: hidden;
    /* Ensure header corners are respected */
}

/* Remove default padding from the container so header sits flush */
.leaflet-panel-layers.expanded {
    padding: 0 !important;
}

/* Adjust the list container */
.leaflet-panel-layers-list {
    padding: 10px;
    background-color: white;
    max-height: 70vh;
    /* Prevent it from being too tall */
    overflow-y: auto;
    border-bottom-left-radius: 0.3rem;
    border-bottom-right-radius: 0.3rem;
}

/* Tweaks for the items to look cleaner */
.leaflet-panel-layers-group {
    border: 1px solid #dee2e6 !important;
    /* Lighter border */
    background-color: #f8f9fa !important;
    /* Light gray background for groups */
    margin-bottom: 8px !important;
    border-radius: 0.25rem !important;
}

.leaflet-panel-layers-grouplabel {
    color: #495057 !important;
    font-weight: 600 !important;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
    margin-bottom: 5px;
}


/* --- REDESIGNED BRAND HEADER --- */

.custom-brand-badge {
    background: linear-gradient(135deg, #0d6efd, #0043a8);
    /* Gradient Blue */
    color: white !important;
    padding: 5px 15px 5px 10px;
    border-radius: 50px;
    /* Pill shape */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.custom-brand-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(13, 110, 253, 0.3);
    color: #ffeba7 !important;
    /* Gold text on hover */
}

.brand-logo {
    height: 34px;
    width: auto;
    /* Sharper contrast: no blur, just brightness */
    filter: brightness(1.2);
    margin-right: 8px;
}

.brand-text-container {
    line-height: 1;
    display: flex;
    align-items: flex-start;
}

.brand-title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.brand-year {
    font-size: 0.7em;
    opacity: 0.9;
    margin-left: 2px;
    font-weight: 400;
}

/* Ensure mobile layout doesn't break */
@media (max-width: 576px) {
    .custom-brand-badge {
        padding: 5px;
        border-radius: 8px;
        /* Square off slightly on mobile to save space if needed */
    }

    .brand-logo {
        height: 28px;
    }
}