/* === Light-only SAFE patch (non-destructive) === */
/* Hide any theme toggle UI (sun/moon etc.) without removing site code */
#theme-toggle, .theme-toggle, .toggle-theme, .toggle-dark, .color-mode, .mode-switch,
button[aria-label*="theme" i], button[aria-label*="dark" i], button[aria-label*="light" i],
.sun-moon, .dark-mode-toggle { display: none !important; }

/* Force document to appear light regardless of app logic */
:root, html, body { background: #ffffff; color: #111111; }
html.dark, body.dark, [data-theme="dark"] { background: #ffffff !important; color: #111111 !important; }
html.dark *, body.dark *, [data-theme="dark"] * { --tw-text-opacity: 1; color: #111111 !important; }

/* Top bar white (try common header classes but do not rename anything) */
header, .topbar, .site-header, .navbar, .main-header, .header {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0,0,0,.08) !important;
}

/* Desktop nav links remain readable on white */
header a, .topbar a, .site-header a, .navbar a, .main-header a, .header a {
  color: #111111 !important;
}

/* Mobile menu overlay sizing: ensure panel never exceeds viewport and can scroll to last button */
.mobile-menu, .menu-mobile, .offcanvas, .nav-drawer, .drawer, .menu-panel {
  border-radius:12px;
  border-radius:12px;
  border-radius:12px;
  max-height:none;
}
.mobile-menu .panel, .menu-mobile .panel, .offcanvas .panel, .nav-drawer .panel, .drawer .panel, .menu-panel .panel {
  border-radius:12px;
  border-radius:12px;
  border-radius:12px;
  max-height:none;
  overflow: auto;
}

/* "Vezi portofoliu" text should be black; do not change structure */
a:where(:not(.btn)):where([href*="portofoliu" i]),
a:where(.btn):where([href*="portofoliu" i]),
button:where([data-action*="portofoliu" i]) {
  color: #000 !important;
  border-color: #111 !important;
}

/* Slightly tighter vertical spacing */
section, .section, main > section { padding-block: clamp(1.2rem, 4vw, 2rem) !important; }
h1 { margin-block: .5rem .7rem !important; }
h2 { margin-block: .5rem .8rem !important; }
p  { margin-block: .25rem .5rem !important; }
.grid, .row, .columns { row-gap: .8rem !important; }

/* Popup menu matches button content height */
.mobile-menu .panel, .menu-mobile .panel, .offcanvas .panel, .nav-drawer .panel, .drawer .panel, .menu-panel .panel {
  border-radius:12px;
  border-radius:12px;
  border-radius:12px;max-height:none; overflow:visible;}

/* === Force mobile menu panel to fit content exactly === */
.mobile-menu, .menu-mobile, .offcanvas, .nav-drawer, .drawer, .menu-panel, .navbar-menu, .sidebar-menu, .menu-overlay {
  /* container stays full screen so we can click outside to close, but */
  display: flex;
  align-items: flex-start !important; /* do not center/stretch vertically */
}
.mobile-menu .panel, .menu-mobile .panel, .offcanvas, .nav-drawer .panel, .drawer .panel, .menu-panel, .navbar-menu, .sidebar-menu .panel {
  height: auto !important;
  max-height: none !important;
  flex: 0 0 auto !important;
  overflow: visible !important;
  align-self: flex-start !important;
  margin-top: 12px !important;
  border-radius: 12px !important;
  
}
/* Bootstrap Offcanvas special cases */
.offcanvas, .offcanvas.show, .offcanvas.offcanvas-start, .offcanvas.offcanvas-end, .offcanvas.offcanvas-top, .offcanvas.offcanvas-bottom {
  height: auto !important;
  max-height: none !important;
}
.offcanvas-body { height: auto !important; overflow: visible !important; }
.offcanvas-header { border-bottom: 1px solid rgba(0,0,0,.08); }
