/* Root Variables for Colors and Spacing */
:root {
  --primary-color: #333E48; /* Squid Ink for headers, footers */
  --secondary-color: #FF9900; /* Amazon Orange for accents */
  --background-color: #333E48; /* Squid Ink for body background */
  --card-background: #4A5D70; /* Lighter gray for event cards */
  --text-color: #FFFFFF; /* White text for readability */
  --text-light: #E0E0E0; /* Light gray for subtitles */
  --spacing-unit: 1rem;
  --border-radius: 8px;
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --transition-default: all 0.2s ease;
}

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

#page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  color: var(--text-color); /* White text */
  background-color: var(--background-color); /* Squid Ink background */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.container {
  max-width: 1200px; /* Centered content area */
  margin: 0 auto;
  padding: 0 var(--spacing-unit);
  width: 100%;
}

/* Special full-width container for banner */
.banner-container {
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  height: auto !important; /* Adjust height based on content */
  max-height: none !important;
}

/* Banner Styles */
#banner {
  text-align: center;
  background: none;
  max-width: 50vw; /* Caps the banner (and image) at 50% of screen width */
  width: 100%; /* Allows it to scale within its parent */
  margin: 0 auto; /* Centers the banner */
  position: relative;
  overflow: hidden;
  height: auto !important; /* Adjusts height based on image */
  max-height: none !important;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

#banner img {
  width: 100% !important; /* Fills the banner div */
  height: auto !important; /* Maintains aspect ratio */
  max-width: 100%; /* Ensures it respects the banner’s max-width */
  border-radius: var(--border-radius);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  background: rgba(255, 255, 255, 0.95);
  object-fit: contain; /* Keeps the full image visible */
}

/* Main Content Styles */
main {
  flex: 1;
  text-align: center;
  padding: 0;
}

/* Spacing between banner and content */
.title {
  margin-top: 30px;
}

.main-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: var(--spacing-unit);
}

.subtitle {
  font-size: 1rem;
  color: var(--text-light);
  max-width: 700px;
  margin: 0 auto calc(var(--spacing-unit) * 3);
}

/* Event Section Styles */
.events-section {
  margin-top: calc(var(--spacing-unit) * 2);
  width: 100%;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 10px;
}

.events-section h2 {
  font-size: 1.5rem;
  color: var(--text-color);
  position: relative;
  padding-bottom: 1rem;
  margin-bottom: calc(var(--spacing-unit) * 1.5);
}

.events-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background-color: var(--secondary-color);
}

/* Improved cross-browser event list styles */
.event-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 20px;
}

.event-list li {
  width: 100%;
  min-width: 0;
}

.event-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--card-background);
  padding: calc(var(--spacing-unit) * 1.2);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition-default);
  text-decoration: none;
  min-height: 70px;
  width: 100%;
}

.event-card:hover {
  transform: translateY(-6px);
  background-color: #5A6D80;
  opacity: 0.95;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.event-city {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color);
  text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Updated Date Badge with black background and white text */
.event-date {
  background-color: #000000; /* Black background */
  color: #FFFFFF; /* White text */
  padding: 0.3rem 0.6rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Footer Styles */
footer {
  background-color: var(--primary-color);
  color: var(--text-color);
  text-align: center;
  padding: calc(var(--spacing-unit) * 2) 0;
  font-size: 1rem;
  margin-top: calc(var(--spacing-unit) * 3);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Responsive Design with improved consistency */
@media (max-width: 992px) {
  .event-list {
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--spacing-unit) * 1.5);
  }
}

@media (max-width: 768px) {
  .main-title {
    font-size: 2rem;
  }
  
  #banner {
    max-width: 95vw; /* Expands to nearly full width on small screens */
    margin: 0 auto;
  }
  
  .event-list {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .subtitle {
    font-size: 1rem;
  }
  
  main {
    padding: var(--spacing-unit) 0;
  }
  
  .event-card {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: var(--spacing-unit);
  }
  
  .event-date {
    margin-top: 0.5rem;
  }
}

/* Additional CSS for ensuring banner height consistency across browsers */
.banner-container, #banner, #banner::before {
  min-height: 0 !important;
}

/* Support for inline styles */
.image-full {
  display: inline-block;
}