/* Brand Color Palette */
:root {
  /* Water Blue - Primary brand color */
  --brand-blue: #1B9CD9;
  --brand-blue-light: #E8F5FB;
  --brand-blue-hover: #d0ebf7;
  --brand-blue-dark: #0D7AB3;

  /* Neutral Base */
  --brand-navy: #2C3E50;        /* Headings, important text */
  --brand-gray: #555555;        /* Body text */
  --brand-gray-light: #95A5A6;  /* Secondary text, borders */
  --brand-background: #F8F9FA;  /* Subtle backgrounds */
  --brand-white: #FFFFFF;       /* Cards, containers */

  /* Accent Colors (Use Sparingly) */
  --brand-green: #6B9F6F;       /* Success, eco-friendly elements */
  --brand-green-light: #E9F4EA;
  --brand-orange: #F5A623;      /* Alerts, calls-to-action (minimal use) */
  --brand-orange-light: #FFF3E0;
  --brand-danger: #E74C3C;      /* Errors only */
}

/* Bulma Color Overrides */
/* Primary/Info - Water Blue */
.button.is-primary,
.button.is-info {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.button.is-primary:hover,
.button.is-info:hover {
  background-color: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
}

.button.is-primary.is-light,
.button.is-info.is-light {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
  border-color: var(--brand-blue-light);
}

.button.is-primary.is-light:hover,
.button.is-info.is-light:hover {
  background-color: var(--brand-blue-hover);
  color: var(--brand-blue-dark);
  border-color: var(--brand-blue-hover);
}

.notification.is-primary,
.notification.is-info {
  background-color: var(--brand-blue-light);
  color: var(--brand-blue-dark);
}

.notification.is-primary.is-light,
.notification.is-info.is-light {
  background-color: var(--brand-blue-light);
  color: var(--brand-navy);
}

.notification.is-primary.is-light strong,
.notification.is-info.is-light strong {
  color: var(--brand-blue-dark);
}

/* Select dropdowns */
.select.is-primary select,
.select.is-info select {
  border-color: var(--brand-blue);
}

.select.is-primary select:focus,
.select.is-primary select:active,
.select.is-info select:focus,
.select.is-info select:active {
  border-color: var(--brand-blue-dark);
  box-shadow: 0 0 0 0.125em rgba(27, 156, 217, 0.25);
}

.tag.is-primary,
.tag.is-info {
  background-color: var(--brand-blue);
  color: var(--brand-white);
}

/* Success - Nature Green */
.button.is-success {
  background-color: var(--brand-green);
  border-color: var(--brand-green);
}

.notification.is-success {
  background-color: var(--brand-green-light);
  color: var(--brand-green);
}

.tag.is-success {
  background-color: var(--brand-green);
  color: var(--brand-white);
}

/* Warning - Warm Orange */
.button.is-warning {
  background-color: var(--brand-orange);
  border-color: var(--brand-orange);
  color: var(--brand-white);
}

.notification.is-warning {
  background-color: var(--brand-orange-light);
  color: var(--brand-orange);
}

.tag.is-warning {
  background-color: var(--brand-orange);
  color: var(--brand-white);
}

/* Danger - Error Red */
.button.is-danger {
  background-color: var(--brand-danger);
  border-color: var(--brand-danger);
}

.notification.is-danger {
  background-color: #fde8e8;
  color: var(--brand-danger);
}

.tag.is-danger {
  background-color: var(--brand-danger);
  color: var(--brand-white);
}

/* Typography */
.title,
.subtitle {
  color: var(--brand-navy);
}

/* Page Titles - Consistent styling for main page headings */
.page-title {
  color: var(--brand-navy);
  font-weight: 600;
  margin-bottom: 1.5rem;
}

body {
  color: var(--brand-gray);
}

/* Links */
a {
  color: var(--brand-blue);
}

a:hover {
  color: var(--brand-blue-dark);
}

/* Backgrounds */
.section {
  background-color: var(--brand-white);
}

.hero.is-primary,
.hero.is-info {
  background-color: var(--brand-blue);
}

html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--brand-blue);
}

html {
  position: relative;
  min-height: 100%;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

#main-content-layout {
    display: flex;
    flex-direction: row;
}

#main-content-layout > main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-content-layout > main > footer {
    margin-top: auto;
    padding: 2rem 0;
}

/* Sidebar Logo Styling */
.sidebar-logo-section {
    padding: 2rem 1rem 1.5rem;
    text-align: center;
    background-color: var(--brand-white);
    margin-bottom: 1.5rem;
}

.sidebar-logo-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sidebar-logo-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.sidebar-logo {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .sidebar-logo-section {
        padding: 1.5rem 0.75rem 1rem;
    }

    .sidebar-logo {
        max-width: 150px;
    }
}

/* Contact Group Link */
.contact-group-link {
    color: var(--brand-navy);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-group-link:hover {
    color: var(--brand-blue);
    text-decoration: underline;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background-color: var(--brand-blue);
    border: none;
    border-radius: 6px;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    display: block;
    width: 1.75rem;
    height: 2px;
    background-color: var(--brand-white);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.is-active {
    opacity: 1;
}

/* Sidebar Navigation - Professional Design */
aside.menu {
    background: linear-gradient(135deg, var(--brand-white) 0%, var(--brand-background) 100%);
    padding: 0;
    min-width: 250px;
    min-height: 100vh;
    box-shadow: 2px 0 12px rgba(44, 62, 80, 0.08);
    transition: transform 0.3s ease;
    border-right: 1px solid var(--brand-gray-light);
}

/* Navigation List Styling */
.nav-list {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0;
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-list a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--brand-gray);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    position: relative;
    background: transparent;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 0.75rem 0.25rem;
    border-radius: 0 6px 6px 0;
}

.nav-list a:hover {
    background: linear-gradient(135deg, var(--brand-blue-light) 0%, rgba(232, 245, 251, 0.6) 100%);
    color: var(--brand-navy);
    border-left-color: var(--brand-blue);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(27, 156, 217, 0.15);
}

.nav-list a.is-active {
    background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
    color: var(--brand-white);
    border-left-color: var(--brand-blue-dark);
    font-weight: 600;
    box-shadow: 0 3px 12px rgba(27, 156, 217, 0.25);
    transform: translateX(6px);
}

/* Sidebar Weather Widget */
.sidebar-weather-section {
    padding: 10px;
    margin-top: 15px;
}

/* Ensure the sidebar has enough space for the weather widget */
@media (min-width: 769px) {
    .menu {
        width: 280px; /* Increase sidebar width slightly if needed */
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-overlay.is-active {
        display: block;
    }

    aside.menu {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        min-width: 280px;
        max-width: 80%;
        z-index: 1000;
        transform: translateX(-100%);
        overflow-y: auto;
    }

    aside.menu.is-active {
        transform: translateX(0);
    }

    #main-content-layout {
        flex-direction: column;
    }

    main[role="main"] {
        width: 100%;
        padding: 1rem;
        margin-top: 4rem;
    }
}