/* Basic Reset & Font */
body,
html {
  margin: 0;
  padding: 0;
  font-family: 'Inter', sans-serif; /* Use Inter font */
  background-color: #1f1f1f; /* Slightly darker background */
  color: #e0e0e0; /* Slightly softer white */
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevent scrolling on the main page */
  cursor: none; /* Hide the mouse cursor */
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background-color: #000; /* Assuming a dark header based on typical signage */
  color: #fff;
  border-bottom: 2px solid #333;
}

.logo img {
  max-height: 55px; /* Slightly larger */
  margin-left: 20px;
}

.time-date {
  text-align: center;
  font-size: 2em; /* Slightly larger time */
  font-weight: 500; /* Medium weight */
  color: #fff;
}

#current-date {
  display: block;
  font-size: 0.55em; /* Relative to time */
  font-weight: 400; /* Regular weight */
  color: #ccc;
  margin-top: 2px;
}

.weather {
  text-align: right;
  font-size: 0.95em;
  color: #ccc;
}
.weather span {
  margin-left: 8px;
}

/* Main Content Area */
main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  padding: 25px; /* Increased padding */
  gap: 25px; /* Increased gap */
}

/* Top Section (Cycling Carousel) */
.top-section {
  display: flex;
  height: 30%;
  background-color: #2a2a2a; /* Panel background */
  border-radius: 8px; /* Slightly larger radius */
  overflow: hidden;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

#top-carousel-container {
  width: 100%;
  height: 100%;
  position: relative;
}

/* Layout for horizontal schedule scroll */
.carousel-content.schedule-mode {
  display: block;
  padding: 0;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  background-color: transparent;
  position: relative;
}

@keyframes scroll-horizontal {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  } /* Assumes duplicated content */
}

.schedule-item-card {
  flex-shrink: 0;
  width: 220px; /* Wider card */
  /* height: calc(100% - 40px); REMOVE fixed calculation */
  height: 100%; /* Fill the container */
  background-color: #383838; /* Slightly lighter card bg */
  border-radius: 6px;
  overflow: hidden;
  display: inline-flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease-in-out;
}
/* Optional: subtle hover effect
.schedule-item-card:hover { transform: translateY(-3px); } */

.schedule-item-card img {
  width: 100%;
  height: 160px; /* Larger image */
  object-fit: cover;
  background-color: #505050;
}
.schedule-item-card h4 {
  font-size: 1.05em;
  margin: 10px 8px 5px 8px; /* Adjust spacing */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f0f0f0;
  font-weight: 500;
}
.schedule-item-card p {
  font-size: 0.9em;
  color: #bbb;
  margin: 0 8px;
  font-weight: 400;
}

/* Bottom Section (3 Columns) */
.bottom-section {
  display: flex;
  gap: 25px; /* Increased gap */
  height: 70%;
}

.column {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Panel styles moved to injected CSS for better organization */

/* Scrollbar Refinements */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Style for the visible image */
/* .carousel-content.single-item-mode img.item-image { ... } */

/* Container for the text content */
/* .carousel-content.single-item-mode .item-text-content { ... } */

/* .carousel-content.single-item-mode .item-text-content h3 { ... } */
/* .carousel-content.single-item-mode .item-text-content p { ... } */

/* Specific style for the 'Read More' prompt */
/* .carousel-content.single-item-mode .item-text-content .read-more { ... } */

/* Specific style for the Show Time */
/* .carousel-content.single-item-mode .item-text-content .show-time { ... } */

/* Blurred background pseudo-element */
/* .carousel-content.single-item-mode::before { ... } */

/* Style for the published date span */
.published-date {
  display: inline-block; /* Allow margin-top */
  margin-top: 5px; /* Reduced margin */
  font-size: 0.85em;
  color: #bbb;
  font-style: italic;
}

/* --- NEW: Silence Detection Flash & Overlay for Office View --- */
@keyframes officeRedFlashAnimation {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

body.silence-detected-flash-office::after {
  /* Using a pseudo-element for overlay */
  content: '';
  position: fixed; /* Cover the entire viewport */
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 0, 0, 0.75); /* More opaque red */
  z-index: 9999; /* Ensure it's on top of everything */
  pointer-events: none;
  animation: officeRedFlashAnimation 1s infinite;
  opacity: 0; /* Start invisible, animation controls visibility */
}

#silence-warning-overlay-office {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  display: none; /* Hidden by default, shown by JS */
  justify-content: center;
  align-items: center;
  z-index: 10000; /* Above the red flash pseudo-element */
  text-align: center;
  pointer-events: none;
}

#silence-warning-text-office {
  font-size: 5vw;
  font-weight: bold;
  color: #ffff00; /* Bright yellow */
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
  line-height: 1.2;
  text-shadow:
    -2px -2px 0 #000,
    2px -2px 0 #000,
    -2px 2px 0 #000,
    2px 2px 0 #000;
}
/* --- END NEW --- */

/* --- Page-Specific Overrides --- */

/* Make carousel fill height on public page */
.full-carousel-page main .top-section {
  height: 100%;
}
