:root {
  --primary-shadow: 0 2px 4px rgba(0,0,0,0.1);
  --secondary-shadow: 0 1px 3px rgba(0,0,0,0.1);
  --border-radius: 8px;
  --bg-light: #f8f9fa;
  --text-muted: #7f8c8d;
  --text-dark: #2c3e50;
  --border-light: #dee2e6;
  --primary-color: #007bff;
  --danger-color: #dc3545;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background-color: var(--bg-light);
}

.page-grid {
  display: grid;
  grid-template-areas:
    "header header header"
    "left main right"
    "footer footer footer";
  grid-template-columns: 250px 1fr 250px;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  gap: 1rem;
  padding: 1rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   HEADER AREA
   ═══════════════════════════════════════════════════════════════════════ */

.header-area {
  grid-area: header;
  position: relative;
  overflow: visible;
  z-index: 10;
  background:
    linear-gradient(
      135deg,
      #f8fafc 0%,
      #eef2f7 25%,
      #e2e8f0 50%,
      #eef2f7 75%,
      #f8fafc 100%
    );

  background-size: 300% 300%;
  animation: headerGradientMove 15s ease infinite;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 2px 7px rgba(0,0,0,0.25),
    0 4px 12px rgba(0,0,0,0.15);

  min-width: 0;
}

.header-area::before {
  content: '';

  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at top right,
      rgba(59, 130, 246, 0.10),
      transparent 35%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(255,255,255,0.03),
      transparent 35%
    );

  pointer-events: none;
}

.header-area::after {
  content: '';

  position: absolute;
  inset: 0;

  border-radius: inherit;

  pointer-events: none;

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.06),
    inset 0 -1px 0 rgba(255,255,255,0.04);
}

.header-content {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
}

.logo {
  height: 100px;
  width: auto;

  position: relative;
  z-index: 2;

  filter:
    drop-shadow(0 4px 12px rgba(0,0,0,0.35))
    drop-shadow(0 0 8px rgba(139,92,246,0.15));

  transition:
    transform 0.3s ease,
    filter 0.3s ease;
}

.logo:hover {
  transform: scale(1.03);

  filter:
    drop-shadow(0 6px 18px rgba(0,0,0,0.45))
    drop-shadow(0 0 14px rgba(139,92,246,0.25));
}

.site-title {
  margin-left: 2rem;
  text-align: right;
  margin-right: 2rem;
}

.header-welcome-heading {
  font-size: 1.5rem;
  margin: 0;
  color: #2c3e50;
  font-weight: 600;
  text-align: right;

  text-shadow:
    0 1px 2px rgba(255,255,255,0.4);
}

.welcome-subtext {
  margin: 0;
  color: #5f6b7a;
  font-size: 0.9rem;
  text-align: right;
}

/* ── Header Right Container ───────────────────────────────────────────── */
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
}

/* ── Profile Container ────────────────────────────────────────────────── */
.profile-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.22);

  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  border-radius: 12px;
  box-shadow:
    0 4px 12px rgba(0,0,0,0.15);
}

.profile-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Profile Picture Wrapper (for badge positioning) ──────────────────── */
.profile-picture-wrapper {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  /* isolation keeps child compositing layers from leaking paint */
  isolation: isolate;
}

/* ── Inner clip container — this is what actually circles the GIF ──────── */
.profile-picture-clip {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;          /* clips GIF repaint to the circle — no artifacts */
  transform: translateZ(0);  /* own GPU layer for the clip region */
  flex-shrink: 0;
}

.profile-picture {
  width: 40px;
  height: 40px;
  object-fit: cover;
  display: block;
  /* clip-path REMOVED — it was the artifact source */
  /* transform and backface-visibility no longer needed here */
}

.dropdown-menu {
  z-index: 9999;
}

/* ── Notification Badge (overlay on profile picture) ──────────────────── */
.profile-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #5e6ad2, #8b5cf6);
  border: 2px solid var(--bg-light);
  border-radius: 50%;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(94, 106, 210, 0.4);
  animation: pulse-badge 2s ease-in-out infinite;
  z-index: 10;
  cursor: pointer;
  transition: all 0.2s ease;
}

.notification-count {
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 4px;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes pulse-badge {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 2px 8px rgba(94, 106, 210, 0.4);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 2px 12px rgba(94, 106, 210, 0.6);
  }
}

@keyframes headerGradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.profile-notification-badge:hover {
  animation: none;
  transform: scale(1.15);
  box-shadow: 0 4px 16px rgba(94, 106, 210, 0.6);
}

/* ── Dropdown Menu Badge ──────────────────────────────────────────────── */
.msg-dropdown-badge {
  background: linear-gradient(135deg, #5e6ad2, #8b5cf6);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 12px;
  font-weight: 700;
  margin-left: auto;
  min-width: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(94, 106, 210, 0.3);
  transition: all 0.2s ease;
}

.dropdown-item:has(.msg-dropdown-badge):hover .msg-dropdown-badge {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(94, 106, 210, 0.5);
}

.dropdown-toggle {
  color: #2c3e50 !important;
  font-weight: 500;
  text-decoration: none;
}

.dropdown-toggle:hover {
  color: #4a3f6b !important;
}

/* ── Language Switcher ────────────────────────────────────────────────── */
.language-switcher-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  margin: 0;
  width: fit-content;
}

.language-switcher {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.language-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  opacity: 0.6;
  transition: opacity 0.3s, transform 0.2s;
}

.language-btn:hover,
.language-btn.active {
  opacity: 1;
  transform: scale(1.1);
}

.flag-icon {
  width: 32px;
  height: 24px;
  border-radius: 4px;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════════════
   LEFT SIDEBAR
   ═══════════════════════════════════════════════════════════════════════ */

.left-sidebar {
  grid-area: left;
  background-color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--primary-shadow);
  min-width: 0;
}

/* Modern Gradient Button Styles */
.left-sidebar .btn {
  background: linear-gradient(45deg, #667eea, #764ba2);
  border: none;
  color: white;
  font-weight: 500;
  border-radius: 12px;
  padding: 12px 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.left-sidebar .btn i {
  font-size: 1rem;
  flex-shrink: 0;
}

.left-sidebar .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
  color: white;
}

.left-sidebar .btn:active {
  transform: translateY(0);
}

.left-sidebar .btn:focus {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4), 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
  color: white;
}

.left-sidebar .btn.w-100 {
  width: 100% !important;
  margin-bottom: 0.5rem;
}

.badge-glow {
    background-color: #ffc107;
    color: black;
    font-size: 0.65rem;
    box-shadow: 0 0 8px #ffc107;
}

/* ═══════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════ */

.main-content {
  grid-area: main;
  background-color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--primary-shadow);
  min-width: 0;
  overflow-x: hidden;
  container-type: inline-size;
  container-name: main-content;
}

/* ═══════════════════════════════════════════════════════════════════════
   RIGHT SIDEBAR & WIDGETS
   ═══════════════════════════════════════════════════════════════════════ */

.right-sidebar {
  grid-area: right;
  background-color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--primary-shadow);
  min-width: 0;
}

.right-sidebar > div:last-child {
  margin-bottom: 0;
}

/* Standardized widget styling */
.weather-widget,
.calendar-widget,
.radio-widget,
.google-search-widget,
.currency-widget,
.rss-widget {
  background-color: var(--bg-light);
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--secondary-shadow);
  margin-bottom: 1rem;
}

/* Online Users Widget - Single frame (no double background) */
.online-users-widget {
  margin-bottom: 1rem;
}

/* ── Weather Widget ───────────────────────────────────────────────────── */
.weather-widget-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.weather-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  width: 100%;
}

.weather-city {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

.weather-condition {
  color: #666;
  text-transform: capitalize;
  font-size: 0.8rem;
}

.weather-details {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.weather-icon {
  width: 40px;
  height: 40px;
}

.weather-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.95rem;
}

.weather-temp {
  font-weight: 500;
}

.humidity-info {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: #666;
}

.humidity-icon {
  color: #4a90e2;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* ── Calendar Widget ──────────────────────────────────────────────────── */
.calendar-widget-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.calendar-header {
  text-align: center;
  font-weight: 500;
  color: #333;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
}

.calendar-table th {
  text-align: center;
  padding: 0.3rem;
  font-size: 0.8rem;
  color: #666;
}

.calendar-table td {
  text-align: center;
  padding: 0.3rem;
  font-size: 0.9rem;
}

.calendar-table .current-day {
  background-color: #e9ecef;
  border-radius: 50%;
  font-weight: bold;
}

/* ── Radio Widget ─────────────────────────────────────────────────────── */
.radio-widget-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.radio-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
  position: relative;
}

.radio-icon {
  color: #007bff;
  pointer-events: none;
}

.radio-title {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

.radio-station-logo {
  position: absolute;
  right: 0;
  top: 30%;
  transform: translateY(-50%);
  height: 24px;
  width: auto;
  object-fit: contain;
}

.radio-player-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.5rem 0;
}

#custom-radio-player {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.radio-station-selector {
  margin-bottom: 0.5rem;
}

.radio-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.radio-control-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: transform 0.2s, opacity 0.3s;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-grow: 1;
}

.custom-range {
  height: 0.5rem;
}

.radio-info {
  font-size: 0.8rem;
  color: #666;
  text-align: center;
  min-height: 1.5rem;
}

.radio-webapp-button .btn i {
  margin-right: 0.5rem;
}

/* ── Sidebar RDS display (radio widget) ──────────────────────────────────── */
.sidebar-rds-display {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(0, 123, 255, 0.07);
  border: 1px solid rgba(0, 123, 255, 0.18);
  border-radius: 6px;
  font-size: 0.78rem;
  line-height: 1.3;
  word-break: break-word;
}

.sidebar-rds-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 3px;
}

.sidebar-rds-track {
  color: var(--text-dark);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Dark theme override */
[data-theme="dark"] .sidebar-rds-display {
  background: rgba(0, 123, 255, 0.12);
  border-color: rgba(0, 123, 255, 0.28);
}

[data-theme="dark"] .sidebar-rds-track {
  color: #e0e0e0;
}

/* ── Google Search Widget ─────────────────────────────────────────────── */
.google-search-widget-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.google-search-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
  position: relative;
}

.google-logo {
  height: 20px;
  width: auto;
}

.google-search-title {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

.google-search-container {
  padding: 0.5rem 0;
}

.google-search-container .input-group {
  box-shadow: var(--secondary-shadow);
  border-radius: 20px;
  overflow: hidden;
}

.google-search-container .form-control {
  border-radius: 20px 0 0 20px;
  border-right: none;
}

.google-search-container .btn {
  border-radius: 0 20px 20px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
}

.google-search-container .form-control:focus {
  box-shadow: none;
  border-color: #ced4da;
}

.google-search-container .input-group:focus-within {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ── Currency Widget ──────────────────────────────────────────────────── */
.currency-widget-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.currency-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.currency-title {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

.currency-rates {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.currency-rate {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

/* ── RSS Widget ───────────────────────────────────────────────────────── */
.rss-widget-compact {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.rss-header {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  text-align: left;
  width: 100%;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.rss-title {
  font-weight: 500;
  font-size: 1rem;
  color: #333;
}

.rss-feed-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rss-item {
  padding: 0.3rem 0;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
}

.rss-item-title {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.rss-item-title:hover {
  color: #0056b3;
  text-decoration: underline;
}

.rss-item-date {
  color: #666;
  font-size: 0.7rem;
  margin-top: 0.2rem;
}

/* ── Online Users Widget ──────────────────────────────────────────────── */
.online-users-widget-compact {
  background: var(--bg-light);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.85rem;
  box-shadow: var(--secondary-shadow);
}

.online-users-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-weight: 600;
  color: #333;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

.online-users-icon {
  color: var(--primary-color);
}

.online-indicator {
  width: 8px;
  height: 8px;
  background-color: #28a745;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.online-stats {
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.users-list {
  margin-bottom: 8px;
}

/* ── User Item (Consolidated - Used in Online Users & Messaging) ─────── */
.user-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  margin-bottom: 4px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.05);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.user-item:hover {
  background: rgba(0, 0, 0, 0.08);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.user-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-dark);
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.user-role.admin {
  color: var(--danger-color);
  font-weight: 600;
}

/* ── User Action Buttons (Profile + Message) ─────────────────────────── */
.user-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
  opacity: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.user-item:hover .user-actions {
  opacity: 1;
}

.user-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border-light);
  background: #ffffff;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-decoration: none;
  transition: all 0.15s ease;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.user-action-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.user-action-btn:active {
  transform: translateY(0);
}

.user-action-btn.profile-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: rgba(0, 123, 255, 0.1);
}

.user-action-btn.message-btn:hover {
  border-color: #28a745;
  color: #28a745;
  background: rgba(40, 167, 69, 0.1);
}

.anonymous-count {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */

.footer-area {
  grid-area: footer;
  background-color: var(--bg-light);
  color: var(--text-dark);
  padding: 2rem 1rem 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--primary-shadow);
  position: relative;
  overflow: hidden;
  min-width: 0;
}

.footer-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(0,0,0,0.02)"><polygon points="0,0 1000,100 1000,0"/></svg>');
  pointer-events: none;
}

.footer-content {
  position: relative;
  z-index: 2;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  min-width: 0;
}

.footer-section {
  background-color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  box-shadow: var(--secondary-shadow);
  min-width: 180px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--primary-shadow);
}

.footer-section h4 {
  color: var(--text-dark);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-section h4 i {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links-list li {
  margin-bottom: 0.5rem;
}

.footer-links-list a {
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0;
  border-radius: 4px;
  font-size: 0.9rem;
}

.footer-links-list a:hover {
  color: var(--text-dark);
  background-color: rgba(0, 0, 0, 0.05);
  padding-left: 0.5rem;
  transform: translateX(5px);
}

.footer-links-list img {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  border-radius: 2px;
}

.footer-links-list a i {
  font-size: 0.8rem;
  width: 16px;
  text-align: center;
}

.footer-bottom {
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--secondary-shadow);
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-bottom a:hover {
  color: var(--text-dark);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(0, 0, 0, 0.1);
  color: var(--text-dark);
  transform: translateY(-2px);
}

.contact-info {
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.9rem;
}

.contact-info p {
  margin-bottom: 0.5rem;
}

.contact-info i {
  margin-right: 0.5rem;
  color: var(--text-muted);
  width: 16px;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════════════ */

.text-danger {
  color: #dc3545;
}

/* Bootstrap 5.3.2 compatibility fixes */
.form-select:focus,
.form-control:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  border-color: #86b7fe;
}

/* Alert transitions */
.alert {
  transition: opacity 0.3s ease;
}

.alert.fade {
  opacity: 0;
}

.alert.show {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════ */

/* Tablet - 1024px */
@media (max-width: 1024px) {
  .page-grid {
    grid-template-areas:
      "header"
      "main"
      "left"
      "right"
      "footer";
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr auto auto;
  }

  .header-content {
    grid-template-columns: auto 1fr;
  }

  .site-title {
    text-align: left;
    margin-left: 1rem;
    margin-right: 0;
  }

  .header-right {
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 1rem;
  }

  .header-welcome-heading,
  .welcome-subtext {
    text-align: left;
  }
}

/* Desktop - 1200px */
@media (max-width: 1200px) {
  .footer-sections {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

/* ── Landscape Mobile / Small Tablet (769px – 1024px) ──────────── */
@media (min-width: 769px) and (max-width: 1024px) {

    /* Nav buttons: 2-per-row instead of full-width stack */
    .left-sidebar .nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .left-sidebar .btn.w-100 {
        width: auto !important;
        flex: 1 1 calc(50% - 0.25rem);
        min-width: 130px;
        text-align: left;
    }

    /* Right sidebar: display widgets in a 2-column responsive grid */
    .right-sidebar {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
        gap: 1rem;
        align-items: start;
    }

    /* Widgets inside right sidebar: remove individual bottom margins
       since the grid gap handles spacing */
    .right-sidebar > div {
        margin-bottom: 0 !important;
    }

    /* RSS widget in left sidebar: 2-column grid for news items */
    .rss-feed-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* Mobile - 768px */
@media (max-width: 768px) {
  .page-grid {
    grid-template-areas:
      "header"
      "main"
      "left"
      "right"
      "footer";
    grid-template-columns: 1fr;
  }

  .left-sidebar,
  .right-sidebar {
    padding: 0.5rem;
  }

  .header-right {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .language-switcher-container {
    width: 100%;
  }

  .profile-container {
    width: 100%;
    justify-content: center;
    padding: 0.4rem 0.8rem;
  }

  .profile-picture {
    width: 35px;
    height: 35px;
  }

  .profile-notification-badge {
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    border-width: 1.5px;
  }

  .notification-count {
    font-size: 0.6rem;
  }

  .msg-dropdown-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
  }

  /* Make action buttons always visible on mobile */
  .user-actions {
    opacity: 1;
  }

  .user-action-btn {
    width: 22px;
    height: 22px;
    font-size: 0.7rem;
  }

  .footer-sections {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-area {
    padding: 1.5rem 1rem 1rem;
  }

  .social-links {
    flex-wrap: wrap;
  }

  .footer-section {
    min-width: unset;
  }
}

/* Small Mobile - 576px */
@media (max-width: 576px) {
  .logo {
    height: 60px;
  }

  .header-welcome-heading {
    font-size: 1.2rem;
  }

  .page-grid {
    padding: 0.5rem;
    gap: 0.5rem;
  }

  .header-area,
  .left-sidebar,
  .main-content,
  .right-sidebar,
  .footer-area {
    padding: 0.75rem;
    border-radius: 6px;
  }

  .weather-widget,
  .calendar-widget,
  .radio-widget,
  .google-search-widget,
  .currency-widget,
  .rss-widget {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
  }
}

/* Extra Small Mobile - 480px */
@media (max-width: 480px) {
  .profile-picture {
    width: 32px;
    height: 32px;
  }

  .profile-notification-badge {
    min-width: 16px;
    height: 16px;
  }

  .notification-count {
    font-size: 0.55rem;
    padding: 0 3px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   SHOP CART BUTTON — header cart icon with badge
   Add this block to the bottom of static/css/styles.css
   ════════════════════════════════════════════════════════════════════ */

/* ── Cart button wrapper ─────────────────────────────────────────────── */
.shop-cart-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(102, 126, 234, 0.10);
  border: 1px solid rgba(102, 126, 234, 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #2c3e50;
  text-decoration: none;
  font-size: 1.05rem;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
}

.shop-cart-btn:hover {
  background: rgba(102, 126, 234, 0.20);
  border-color: rgba(102, 126, 234, 0.45);
  color: #667eea;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(102, 126, 234, 0.25);
}

.shop-cart-btn:active {
  transform: translateY(0);
}

.shop-cart-btn i {
  pointer-events: none;
}

/* ── Badge ───────────────────────────────────────────────────────────── */
.shop-cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  border: 2px solid #f8f9fa;   /* matches --bg-light */
  border-radius: 40px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.45);
  animation: cartBadgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  pointer-events: none;
  white-space: nowrap;
}

@keyframes cartBadgePop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Re-trigger animation when count changes */
.shop-cart-badge.updating {
  animation: none;
}
.shop-cart-badge.updated {
  animation: cartBadgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

/* ── Dark theme support ──────────────────────────────────────────────── */
[data-theme="dark"] .shop-cart-btn {
  background: rgba(102, 126, 234, 0.15);
  border-color: rgba(102, 126, 234, 0.30);
  color: #e2e8f0;
}

[data-theme="dark"] .shop-cart-btn:hover {
  background: rgba(102, 126, 234, 0.28);
  color: #a5b4fc;
}

[data-theme="dark"] .shop-cart-badge {
  border-color: #1e2130;   /* matches dark surface */
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .shop-cart-btn {
    width: 38px;
    height: 38px;
    font-size: .95rem;
    border-radius: 10px;
  }
}