/* ==========================================
   1. DEFINE THE BRAND COLORS 
   ========================================== */
:root {
    --col-music:       #7e22ce; /* Purple */
    --col-pubs:        #d97706; /* Amber */
    --col-food:        #7c2d12; /* Rust Red */
    --col-arts:        #0f766e; /* Teal */
    --col-attractions: #713f12; /* Brown */
    --col-community:   #0a2916; /* Green */
    
    --col-gray-dark:   #1f2937; /* Standard text color */
}

/* ==========================================
   2. THEME CLASSES 
   ========================================== */
.theme-music       { --theme-primary: var(--col-music); }
.theme-pubs        { --theme-primary: var(--col-pubs); }
.theme-food        { --theme-primary: var(--col-food); }
.theme-arts        { --theme-primary: var(--col-arts); }
.theme-attractions { --theme-primary: var(--col-attractions); }
.theme-community   { --theme-primary: var(--col-community); }

/* ==========================================
   3. MAIN NAVIGATION LINKS (Left Side)
   ========================================== */
.nav-music, .nav-pubs, .nav-food, 
.nav-arts, .nav-attractions, .nav-community {
    color: var(--col-gray-dark); /* Keep text dark and readable */
    font-weight: 700;            /* Bold text */
    text-decoration: none;       /* No default thin underline */
    padding-bottom: 4px;         /* Space between text and the border */
    transition: all 0.2s ease;   /* Smooth hover effect */
}

/* Specific Border Colors (3px Thickness) */
.nav-music       { border-bottom: 3px solid var(--col-music); }
.nav-pubs        { border-bottom: 3px solid var(--col-pubs); }
.nav-food        { border-bottom: 3px solid var(--col-food); }
.nav-arts        { border-bottom: 3px solid var(--col-arts); }
.nav-attractions { border-bottom: 3px solid var(--col-attractions); }
.nav-community   { border-bottom: 3px solid var(--col-community); }

/* Hover Effects */
.nav-music:hover, .nav-pubs:hover, .nav-food:hover, 
.nav-arts:hover, .nav-attractions:hover, .nav-community:hover {
    opacity: 0.8;
    transform: translateY(-2px); /* Moves up slightly */
}

/* ==========================================
   4. FAVOURITES LINK STYLE (Right Side)
   ========================================== */
.nav-fav {
    color: var(--col-gray-dark) !important;
    font-weight: 700;
    text-decoration: none;
    /* CHANGED: Match 'About Us' thickness (2px) */
    border-bottom: 2px solid #ef4444;       
    padding-bottom: 4px;
    transition: all 0.2s ease;
}

.nav-fav:hover {
     color: #da0909;     
    transform: translateY(-2px);
    opacity: 0.8;
}

.nav-fav i {
    color: #ef4444; 
    margin-right: 4px;
}

/* ==========================================
   5. ABOUT US LINK STYLE (Right Side)
   ========================================== */
.nav-about {
    font-weight: 700; /* Slightly lighter weight for secondary nav */
    color: #374151;
    text-decoration: none;
    border-bottom: 2px solid #1e3a8a; /* Blue Underline (2px) */
    padding-bottom: 4px;              /* Added padding to align with Favourites */
    transition: all 0.2s ease;
}

/* css/style.css - Update the hover state at the bottom */

.nav-about:hover {
    color: #1e3a8a;              /* The Blue Text */
    opacity: 0.8;                /* Slight fade */
    transform: translateY(-2px); /* The "Lift" effect */
}

/* ==========================================
   6. COMPONENT UTILITIES 
   ========================================== */
.text-theme   { color: var(--theme-primary); }
.bg-theme     { background-color: var(--theme-primary); }
.border-theme { border-color: var(--theme-primary); }

.badge-theme {
    background-color: var(--theme-primary);
    color: white;
}

.box-theme {
    background-color: color-mix(in srgb, var(--theme-primary), white 90%);
    border: 1px solid var(--theme-primary);
    color: var(--theme-primary);
}
.box-theme a {
    color: var(--theme-primary);
    text-decoration: underline;
    font-weight: bold;
}

/* ==========================================
   7. DYNAMIC LOGO STYLES (Clean & Professional)
   ========================================== */

/* 1. Ensure the color variables are defined (Add to your :root if missing) */
:root {
    --col-pubs: #d97706;
    --col-music: #7e22ce;
    --col-food: #ea580c;
    --col-arts: #0f766e;
    --col-attractions: #0284c7;
    --col-community: #16a34a;
    --col-fav: #991b1b; /* Dark Red for Favourites */
}

/* 2. Map the parent theme class directly to the text-theme color */
.theme-pubs .text-theme        { color: var(--col-pubs) !important; }
.theme-music .text-theme       { color: var(--col-music) !important; }
.theme-food .text-theme        { color: var(--col-food) !important; }
.theme-arts .text-theme        { color: var(--col-arts) !important; }
.theme-attractions .text-theme { color: var(--col-attractions) !important; }
.theme-community .text-theme   { color: var(--col-community) !important; }
.theme-fav .text-theme         { color: var(--col-fav) !important; }

/* 3. Force the SVG paths to inherit the color from .text-theme */
.text-theme svg,
.text-theme svg g, 
.text-theme svg path {
    fill: none !important;            
    stroke: currentColor !important;   /* This grabs the color set in step 2 */
    stroke-width: 80px !important;    
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease;
}

/* 4. Distance Text - Light Tints for Dark Cards */
.distance-display {
    font-weight: 700;
    display: flex;
    align-items: center;
}

/* Using color-mix to create a 80% white tint of the theme color */
.theme-pubs .distance-display  { color: color-mix(in srgb, var(--col-pubs), white 80%) !important; }
.theme-music .distance-display { color: color-mix(in srgb, var(--col-music), white 80%) !important; }
.theme-food .distance-display  { color: color-mix(in srgb, var(--col-food), white 80%) !important; }
.theme-arts .distance-display  { color: color-mix(in srgb, var(--col-arts), white 80%) !important; }
.theme-attractions .distance-display { color: color-mix(in srgb, var(--col-attractions), white 80%) !important; }
.theme-community .distance-display { color: color-mix(in srgb, var(--col-community), white 80%) !important; }
.theme-fav .distance-display   { color: color-mix(in srgb, var(--col-fav), white 80%) !important; }

/* 5. Logo Sizing & Hover */
.text-theme svg {
    height: 100%;
    width: auto;
    display: block;
}

.text-theme:hover {
    opacity: 0.7;
}

/* View Toggle States */
.view-btn-active {
    background-color: white !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: var(--col-theme) !important; /* Uses the dynamic theme color */
}

/* Leaflet Map Customizations */
#category-map {
    background: #e5e7eb;
}

/* Styling the pins to match your theme */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    padding: 0 !important;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: 200px !important;
}

.map-popup-card img {
    width: 100%;
    height: 100px;
    object-cover: cover;
}

.map-popup-info {
    padding: 10px;
}

/* Styling for the permanent map labels */
.map-label {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 8px;
    font-weight: 700;
    font-size: 11px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    color: #1f2937;
}

/* Ensure the blue user circle marker stands out */
.leaflet-interactive {
    transition: all 0.3s ease;
}