/* ===================================
   BASE STYLES
=================================== */

html,
body {
  position: relative;
  z-index: 0;
  margin: 0;
  padding-top: clamp(5px, calc(3vw - 26px), 10px);
  background-color: #282734;
  color: #ffffff;
  font-family: "DM Sans", sans-serif;
  text-align: center;
}

/* Typography */
h1,
h2 {
  text-shadow: 0 3px 12px rgba(0, 0, 0, 1);
}

h1 {
  font-size: clamp(1.5rem, 5vw, 3rem);
  line-height: 0.8;
  margin: 0;
}

h2 {
  font-size: clamp(1.02rem, 4vw, 2.65rem);
  margin-top: 0;
  margin-bottom: clamp(10px, 2vw, 16px);
}

/* ===================================
   ICON GRID LAYOUT
=================================== */

.icon-grid {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  /* Shared spacing control for column/row gaps. */
  --icon-gap: clamp(3px, 0.5vw, 8px);
  gap: var(--icon-gap);
}

.icon-grid::before {
  /* Force the 6/7 split by inserting a line break after the 6th item. */
  content: "";
  flex-basis: 100%;
  height: 0;
  order: 1;
}

.icon-grid .icon-wrapper:nth-child(-n + 6) {
  order: 0;
}

.icon-grid .icon-wrapper:nth-child(n + 7) {
  order: 2;
}

/* ===================================
   ICON COMPONENTS
=================================== */

.icon-wrapper {
  /* Keep 7 items per row while letting the row center. */
  flex: 0 1 calc((100% - (var(--icon-gap) * 6)) / 7);
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: clamp(1em, 1.5vw, 2em);
  color: #fff;
  transition: transform 0.2s;
}

.icon-wrapper img {
  width: min(110px, 10vw);
  height: min(110px, 10vw);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.2s;
}

.icon-wrapper:hover {
  transform: scale(1.08);
}

.icon-wrapper:hover img {
  box-shadow: 0 0 20px 6px rgba(255, 255, 255, 0.4);
}

.icon-wrapper:hover .label {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
}

.label {
  margin-top: clamp(0px, 0.4vw, 2px);
  /* Scale label size smoothly between small and large screens. */
  font-size: clamp(7px, 1.5vw, 16px);
  font-weight: 600;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 1);
}

/* ===================================
   CALENDAR
=================================== */

.calendar-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  /* Fit the calendar within the viewport while reserving space above/below. */
  height: clamp(
    250px,
    calc(100dvh - 380px - env(safe-area-inset-bottom)),
    600px
  );
}

.calendar-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  filter: invert(1) hue-rotate(190deg) contrast(0.95) brightness(1.1)
    opacity(0.65);
}

/* ===================================
   GLASS EFFECT
=================================== */

.glass {
  background: rgba(255 255 255 / 10%);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  width: 85%;
  max-width: 1100px;
  /* Scale padding smoothly across viewport sizes. */
  padding: clamp(10px, 2vw, 30px);
  margin: clamp(12px, 4vw, 25px) auto;
}

/* Media Services glass panel */
.glass:nth-of-type(2) {
  position: relative;
  z-index: 200;
}

/* Media Releases glass panel */
.glass:nth-of-type(3) {
  position: relative;
  z-index: 1;
}

/* ===================================
   PARTICLES
=================================== */

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  pointer-events: none;
}

/* ===================================
   SECTION DROPDOWN MENU (MEDIA SERVICES)
=================================== */

.section-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 20;
  gap: 12px;
}

.section-menu-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.section-menu-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  color: white;
  cursor: pointer;
  font-size: 0.9rem;
  background: none;
  border: none;
  padding: 0;
  position: relative;
}

.section-menu-btn .arrow {
  line-height: 1;
  transform: translateY(-7px);
  transition: transform 0.2s ease;
  font-size: clamp(1.5rem, 3vw, 3rem);
  text-shadow:
    0 3px 12px rgba(0, 0, 0, 1),
    0 0 2px rgba(255, 255, 255, 0.4);
  -webkit-text-stroke: 0.7px rgba(255, 255, 255, 0.25);
}

.section-menu-btn.open .arrow {
  transform: rotate(180deg);
  text-shadow: 0 -3px 12px rgba(0, 0, 0, 1);
}

.section-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(40, 39, 52, 0.93);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(40, 39, 52, 1);
  min-width: 180px;
  z-index: 9999;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 1);
}

.section-dropdown a {
  display: block;
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  font-size: 0.95rem;
  text-align: left;
  font-weight: 600;
}

.section-dropdown a:hover {
  background: none;
  text-shadow:
    0 0 14px rgba(255, 255, 255, 1),
    0 0 28px rgba(255, 255, 255, 0.8);
}

.section-header.open .section-dropdown {
  display: block;
}
