/* CSS for cheezyCMS */
html {
  height: 100%;
  margin: 0;
}

body {
  min-height: 100%;
  margin: 0;
  background-color: #333333;
  background-image: linear-gradient(to bottom, #3a3a3a, #404040);
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.header {
  background: #35424a;
  color: #ffffff;
  padding: 10px 0;
}

.header h1 {
  margin: 0;
  text-align: center;
}

.navbar {
  display: flex;
  justify-content: center;
  background: #35424a;
}

.navbar a {
  color: #ffffff;
  padding: 14px 20px;
  text-decoration: none;
  text-align: center;
}

.navbar a:hover {
  background: #e8491d;
  transition: background 0.3s;
}

#grid {
  display: grid;
  gap: 0.5rem;
  grid-auto-rows: auto;
  width: 100%;
}

.card {
  display: flex;
  padding: 0.5rem;
  text-decoration: none;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  height: auto;
  justify-content: center;
  background: linear-gradient(145deg, #aa0000, #800000);
  border: 1px solid #cc0000;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1),
             0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.2s ease;
  position: relative;
  border-radius: 0.75rem;
}

.card:hover {
  transform: translateY(-2px) scale(1.02);
  background: linear-gradient(145deg, #cc0000, #aa0000);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2),
             0 4px 8px rgba(0,0,0,0.3),
             0 0 4px rgba(255,0,0,0.2);
  border-color: #ff0000;
}

.card h3 {
  margin-top: 0;
}

.card a {
  color: #ffffff;
  font-size: 1.125rem;
  text-decoration: none;
  text-align: center;
  font-weight: 500;
}

.card > div {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 500;
  text-align: center;
  font-family: system-ui, -apple-system, sans-serif !important;
}

.icon-container {
  width: 100%;
  min-height: 200%;
  margin-top: -30%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.icon-svg {
  width: 100%;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.icon-svg svg {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  aspect-ratio: 1;
}

.icon-svg text {
  fill: rgba(255, 255, 255, 0.95);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3));
}

.icon-svg text:first-child {
  font-family: 'Material Icons' !important;
}

.icon-svg text:last-child {
  font-family: system-ui, -apple-system, sans-serif !important;
  font-weight: 500;
}

.icon-clip {
  width: 100%;
  display: flex;
  justify-content: center;
}

.page-title {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}

.page-title h1 {
  font-size: 1.875rem;
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 4px rgba(170,0,0,0.4), 0 0 2px rgba(255,255,255,0.4);
  letter-spacing: 0.5px;
  margin: 0;
}

.footer {
  text-align: center;
  padding: 20px 0;
  background: #35424a;
  color: #ffffff;
  position: relative;
  bottom: 0;
  width: 100%;
}

/* Menu and submenu styles */
.menu-button {
  background: #35424a;
  color: #fff;
  border: none;
  border-radius: 0.5em;
  padding: 0.4em 1em;
  font-weight: bold;
  cursor: pointer;
  font-size: 1em;
  transition: background 0.2s;
  position: relative;
}
.menu-button.active,
.menu-button:hover {
  background: #e8491d;
}

.submenu {
  display: none;
  position: absolute;
  z-index: 1001;
  background: #222;
  border: 1px solid #444;
  border-radius: 0.5em;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  min-width: 220px;
  max-width: 400px;
  padding: 0.5em 1em 0.5em 1em;
  text-align: left;
  margin: 0;
}
.submenu .breadcrumb {
  font-size: 0.98em;
  color: #e8491d;
  margin-bottom: 0.4em;
  font-weight: bold;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.submenu div {
  color: #fff;
  cursor: pointer;
  margin: 0.15em 0;
}
.submenu div[role="menuitem"] {
  font-weight: bold;
}
.submenu .arrow {
  position: absolute;
  right: 0.2em;
  color: #e8491d;
}
.widget-card {
  border: 2px solid #111;
  border-radius: 0.9em;
  background: rgba(0,0,0,0.18);
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  padding: 1.2em 1em 1.2em 1em;
  margin-bottom: 2em;
  max-height: calc(100vh - 8em);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.widget-title {
  color: #fff;
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 0.5em;
  text-align: left;
}
.widget-header-row {
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  color: #fff;
  margin: 0.25em 0 0.5em 0;
  gap: 1.5em;
  font-size: 1.2em;
}
.widget-header-row > div {
  text-align: center;
  min-width: 80px;
  flex: 1 1 0;
}
.widget-cards-container {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: calc(100vh - 16em);
  width: 100%;
  box-sizing: border-box;
}
.widget-card-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  padding: 0.4em 0.5em;
  margin: 0;
  overflow: hidden;
  gap: 1.5em;
  background: linear-gradient(145deg, #aa0000, #800000);
  border: 1px solid #cc0000;
  border-radius: 0.75rem;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1), 0 2px 4px rgba(0,0,0,0.2);
  color: #fff;
  transition: all 0.2s ease;
  min-height: 1.6em;
  align-items: center;
  padding-top: 0.1em;
  padding-bottom: 0.1em;
}
.widget-card-row:hover {
  background: linear-gradient(145deg, #cc0000, #aa0000);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2), 0 4px 8px rgba(0,0,0,0.3), 0 0 4px rgba(255,0,0,0.2);
  border-color: #ff0000;
}
.widget-cell {
  text-align: center;
  min-width: 80px;
  flex: 1 1 0;
  word-break: break-word;
  font-size: 1.08em;
  color: #fff;
  padding-top: 0.05em;
  padding-bottom: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
}
.widget-cell a {
  color: #fff;
  text-decoration: underline;
}

.menu-row {
  display: flex;
  flex-direction: row;
  gap: 1px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.2em;
  position: relative;
}

.breadcrumb-container {
  margin: 0.5em 0 1em 0;
  color: #fff;
  font-size: 1em;
  text-align: left;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.2em;
}
.breadcrumb-link {
  color: #e8491d;
  margin-right: 0.5em;
  text-decoration: underline;
  font-weight: 500;
}
.breadcrumb-sep {
  color: #fff;
  margin-right: 0.5em;
  font-weight: bold;
}

.login-btn {
  display: inline-block;
  padding: 1em 2em;
  background: #2a7fff;
  color: #fff;
  font-size: 1.2em;
  border-radius: 6px;
  text-decoration: none;
  margin: 2em auto;
  text-align: center;
}