/* ==========================================================================
   HOMEPAGE LAYOUT SPECIFIC STYLES
   Artist: Hailey Young (TAMUCC)
   Theme: Contemporary Portfolio Hero with Glassmorphic Interactive Feed
   ========================================================================== */

/*
   Pedagogical Comment:
   The homepage content is styled as a grid dividing the hero branding
   and the interactive Feed widget. We enforce strict scroll containment.
*/
.home-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  height: 100%;
  width: 100%;
}

/* Left Hero Branding Section */
.hero-section {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 2.5rem;
  background-image: radial-gradient(circle at 10% 20%, rgba(161, 141, 168, 0.05) 0%, transparent 40%);
  position: relative;
  overflow: hidden;
}

.hero-subtitle {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.05rem;
  color: var(--color-tea-green);
  text-transform: uppercase;
  letter-spacing: 4px;
  margin-bottom: 1rem;
}

.hero-title {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: clamp(2.5rem, 3.5vw, 3.5rem);
  color: var(--color-pearl-aqua);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 10px var(--color-glow), 0 4px 10px rgba(0, 0, 0, 0.5);
}

.hero-title span {
  color: inherit;
  text-shadow: inherit;
}

.hero-description {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--color-lavender-grey);
  line-height: 1.6;
  max-width: 100%;
  margin-bottom: 2rem;
}

.hero-tag-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background-color: rgba(92, 75, 62, 0.2);
  border: 1px solid var(--color-dark-teal);
  color: var(--color-pearl-aqua);
  padding: 0.45rem 1.1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 1px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-speed) ease;
}

.hero-tag:hover {
  background-color: rgba(92, 75, 62, 0.4);
  border-color: var(--color-pearl-aqua);
  color: var(--color-tea-green);
  box-shadow: 0 0 8px var(--color-glow);
}

/* Featured Work Photo Grid - grows to fill the remaining hero height */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  margin-bottom: 2rem;
}

.featured-cell {
  background-color: rgba(92, 75, 62, 0.25);
  border: 1px solid rgba(142, 126, 155, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  transition: opacity 0.6s ease;
}

.featured-cell a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.featured-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.6s ease;
}

.featured-cell a:hover img {
  opacity: 0.85;
}

.featured-cell.featured-primary {
  grid-row: 1 / 3;
  grid-column: 1 / 3;
}

@media (max-width: 992px) {
  .featured-grid {
    max-width: 400px;
  }
}

@media (max-width: 600px) {
  .featured-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    aspect-ratio: 1 / 1;
    max-width: 280px;
  }

  .featured-cell.featured-primary {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
  }
}

/* Right Interactive Events Feed Section */
.events-section {
  background-color: rgba(26, 20, 20, 0.4);
  border-left: 1px solid rgba(142, 126, 155, 0.2);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
  overflow-y: auto;
  /* Allow independent panel scroll */
}

.section-header {
  margin-bottom: 2rem;
}

.section-header h2 {
  font-family: var(--font-logo);
  color: var(--color-pearl-aqua);
  font-size: 1.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h2::after {
  content: '';
  flex-grow: 1;
  height: 2px;
  background-color: var(--color-dark-teal);
  box-shadow: 0 0 5px var(--color-glow);
}

.section-header p {
  color: var(--color-lavender-grey);
  font-size: 0.9rem;
}

/* Event List Card Styles with Cyberpunk Edge */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.event-card {
  background: var(--color-card-bg);
  border: 1px solid rgba(142, 126, 155, 0.2);
  border-left: 4px solid var(--color-dark-teal);
  border-radius: 8px;
  padding: 1.8rem;
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.event-card:hover {
  border-left-color: var(--color-pearl-aqua);
  transform: translateX(4px);
  box-shadow: 0 6px 20px rgba(161, 141, 168, 0.1);
  background-color: rgba(62, 46, 52, 0.85);
}

.event-card.expanded {
  border-left-color: var(--color-tea-green);
  background: rgba(92, 75, 62, 0.25);
  box-shadow: 0 8px 25px rgba(196, 180, 156, 0.1);
}

.event-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.event-date {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-tea-green);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-badge {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 10px;
  background-color: var(--color-midnight-violet);
  color: var(--color-pearl-aqua);
  border: 1px solid var(--color-dark-teal);
  font-weight: 700;
  text-transform: uppercase;
}

.event-title {
  font-family: var(--font-logo);
  font-size: 1.35rem;
  color: #ffffff;
  margin-bottom: 0.5rem;
  transition: color var(--transition-speed);
}

.event-card:hover .event-title {
  color: var(--color-pearl-aqua);
}

.event-card.expanded .event-title {
  color: var(--color-tea-green);
}

.event-brief {
  font-size: 0.95rem;
  color: var(--color-lavender-grey);
  line-height: 1.5;
  display: none;
}

.event-card.expanded .event-brief {
  display: block;
}

/* Interactive Details Section - revealed on expand click */
.event-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  margin-top: 0;
  border-top: 1px dashed rgba(142, 126, 155, 0);
  padding-top: 0;
}

.event-card.expanded .event-details {
  max-height: 350px;
  /* Expands smoothly */
  margin-top: 1rem;
  border-top-color: rgba(142, 126, 155, 0.3);
  padding-top: 1rem;
}

.detail-row {
  display: flex;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.detail-label {
  font-weight: 700;
  width: 90px;
  color: var(--color-pearl-aqua);
  flex-shrink: 0;
}

.detail-value {
  color: #ffffff;
}

.detail-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-lavender-grey);
  background-color: rgba(26, 20, 20, 0.4);
  padding: 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(92, 75, 62, 0.3);
}

/* Responsiveness adjustments */
@media (max-width: 992px) {
  main.app-content {
    overflow-y: auto;
  }

  .home-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    height: auto;
    min-height: 100%;
  }

  .hero-section {
    padding: 2rem;
    align-items: center;
    text-align: center;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-description {
    max-width: 100%;
  }

  .hero-tag-container {
    justify-content: center;
  }

  .events-section {
    border-left: none;
    border-top: 1px solid rgba(142, 126, 155, 0.2);
    padding: 2rem;
    height: auto;
    overflow: visible;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 1.5rem 1rem;
  }

  .hero-subtitle {
    font-size: 0.8rem;
    letter-spacing: 2px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .featured-grid {
    max-width: 100%;
    gap: 4px;
  }

  .events-section {
    padding: 1.2rem 1rem;
  }

  .section-header h2 {
    font-size: 1.4rem;
  }

  .event-card {
    padding: 1rem;
  }

  .event-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 400px) {
  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.7rem;
  }
}