/**
 * Award-Winning Hero Section Redesign
 * Modern UX/UI with refined typography, perfect spacing, and sophisticated animations
 * Based on award-winning design principles: visual hierarchy, golden ratio, perfect scale
 * 
 * IMPORTANT: This file MUST load after all other hero stylesheets to ensure proper overrides
 */

/* Force override for hero title - highest specificity */
#hero-section h1.hero-title-large.mb-3,
#hero-section .hero-content h1.hero-title-large,
#hero-section .hero-content .col-lg-10 h1.hero-title-large,
.hero-section#hero-section h1.hero-title-large,
section#hero-section h1.hero-title-large,
.hero-section .hero-content .container .row .col-lg-10 h1.hero-title-large,
.art-gallery-hero h1.hero-title-large.mb-3,
.art-gallery-hero .hero-content h1.hero-title-large,
.art-gallery-hero .hero-content .col-lg-10 h1.hero-title-large,
h1.hero-title-large {
  font-size: clamp(1.5rem, 3.5vw, 2.5rem) !important;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 0 !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  /* Test: Add border to verify CSS is loading - remove after testing */
  /* border: 2px solid red !important; */
}

/* ===== TYPOGRAPHY SCALE - MAJOR THIRD (1.25) ===== */
:root {
  --hero-title-size: clamp(1.5rem, 3.5vw, 2.5rem);      /* Even smaller */
  --hero-tagline-size: clamp(0.875rem, 2vw, 1.125rem);  /* Much smaller */
  --hero-description-size: clamp(0.8125rem, 1.6vw, 0.9375rem); /* Compact */
  --hero-rotating-size: clamp(0.75rem, 1.8vw, 0.875rem); /* Subtle */
  
  /* Perfect line heights */
  --hero-title-line-height: 1.15;
  --hero-tagline-line-height: 1.4;
  --hero-description-line-height: 1.6;
  
  /* Refined letter spacing */
  --hero-title-tracking: -0.03em;
  --hero-tagline-tracking: 0.02em;
  --hero-description-tracking: 0;
}

/* ===== HERO CONTENT CONTAINER - REFINED SPACING ===== */
.hero-section .hero-content,
.art-gallery-hero .hero-content,
.hero-content {
  padding: 2rem 1rem !important;
  max-width: 900px !important; /* Tighter container */
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: center !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.hero-section .hero-content .container,
.art-gallery-hero .hero-content .container,
.hero-content .container {
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 100% !important;
}

.hero-section .hero-content .row,
.art-gallery-hero .hero-content .row,
.hero-content .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

.hero-section .hero-content .col-lg-10,
.art-gallery-hero .hero-content .col-lg-10,
.hero-content .col-lg-10 {
  padding-left: 0.5rem !important;
  padding-right: 0.5rem !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* ===== HERO TITLE - REFINED & SMALLER ===== */
.hero-section h1.hero-title-large,
.hero-section .hero-title-large,
.art-gallery-hero h1.hero-title-large,
.art-gallery-hero .hero-title-large,
.hero-content h1.hero-title-large,
.hero-content .hero-title-large,
.hero-title-large,
.hero-title {
  font-size: var(--hero-title-size) !important;
  font-weight: 700 !important; /* Reduced from 800 */
  line-height: var(--hero-title-line-height) !important;
  letter-spacing: var(--hero-title-tracking) !important;
  margin-bottom: 1rem !important; /* Improved spacing below title */
  margin-left: auto !important;
  margin-right: auto !important;
  color: #ffffff !important;
  text-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    0 1px 4px rgba(0, 0, 0, 0.3),
    0 0 1px rgba(0, 0, 0, 0.2) !important;
  position: relative;
  z-index: 1;
  text-align: center !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  
  /* Smooth entrance animation */
  animation: heroTitleFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
  opacity: 0;
  transform: translateY(20px);
}

@keyframes heroTitleFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Subtle gradient overlay on title */
.hero-section h1.hero-title-large::after,
.hero-section .hero-title-large::after,
.art-gallery-hero h1.hero-title-large::after,
.art-gallery-hero .hero-title-large::after,
.hero-content h1.hero-title-large::after,
.hero-content .hero-title-large::after,
.hero-title-large::after,
.hero-title::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: -1;
  border-radius: 4px;
}

/* ===== HERO TAGLINE - COMPACT & ELEGANT ===== */
.hero-section .lead.fs-3.mb-2,
.art-gallery-hero .lead.fs-3.mb-2 {
  font-size: var(--hero-tagline-size) !important;
  font-weight: 500 !important; /* Reduced from 700 */
  line-height: var(--hero-tagline-line-height) !important;
  letter-spacing: var(--hero-tagline-tracking) !important;
  margin-bottom: 0.375rem !important; /* Tight spacing below tagline */
  color: rgba(255, 215, 0, 0.95) !important; /* Slightly more subtle */
  text-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.4),
    0 1px 3px rgba(0, 0, 0, 0.3),
    0 0 12px rgba(255, 215, 0, 0.2) !important;
  opacity: 0.98;
  
  /* Staggered entrance */
  animation: heroTaglineFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
  opacity: 0;
  transform: translateY(15px);
}

@keyframes heroTaglineFadeIn {
  to {
    opacity: 0.98;
    transform: translateY(0);
  }
}

/* ===== HERO DESCRIPTION - REFINED & COMPACT ===== */
.hero-section .text-lead.mb-5,
.art-gallery-hero .text-lead.mb-5 {
  font-size: var(--hero-description-size) !important;
  font-weight: 400 !important;
  line-height: var(--hero-description-line-height) !important;
  letter-spacing: var(--hero-description-tracking) !important;
  margin-bottom: 2rem !important; /* Reduced from 4.5rem, improved spacing */
  margin-top: 1.5rem !important; /* Add top margin for better spacing */
  color: rgba(255, 255, 255, 0.92) !important;
  text-shadow: 
    0 1px 4px rgba(0, 0, 0, 0.35),
    0 0 2px rgba(0, 0, 0, 0.2) !important;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  
  /* Staggered entrance */
  animation: heroDescriptionFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s both;
  opacity: 0;
  transform: translateY(12px);
}

@keyframes heroDescriptionFadeIn {
  to {
    opacity: 0.92;
    transform: translateY(0);
  }
}

/* ===== ROTATING SENTENCE - SUBTLE ===== */
.rotating-sentence {
  font-size: var(--hero-rotating-size) !important;
  font-weight: 400 !important;
  line-height: 1.5 !important;
  letter-spacing: 0.01em !important;
  color: rgba(255, 255, 255, 0.85) !important;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}

/* ===== BUTTON CONTAINER - REFINED SPACING ===== */
.hero-section .d-flex.flex-wrap.justify-content-center.gap-3.mb-3,
.art-gallery-hero .d-flex.flex-wrap.justify-content-center.gap-3.mb-3 {
  margin-top: 2rem !important; /* Improved spacing - moved button up */
  margin-bottom: 2rem !important;
  gap: 0.75rem !important; /* Tighter gap */
  
  /* Staggered entrance */
  animation: heroButtonsFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.65s both;
  opacity: 0;
  transform: translateY(10px);
}

@keyframes heroButtonsFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== BUTTONS - REFINED SIZE ===== */
.hero-section .btn-lg,
.art-gallery-hero .btn-lg {
  font-size: 0.9375rem !important; /* 15px - smaller */
  padding: 0.625rem 1.25rem !important; /* Tighter padding */
  font-weight: 500 !important;
  letter-spacing: 0.01em !important;
  border-radius: 0.5rem !important;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* ===== HERO TEXT FADE - REFINED GRADIENT ===== */
.hero-section .hero-text-fade,
.art-gallery-hero .hero-text-fade {
  width: clamp(420px, 59.5vw, 840px) !important; /* 30% smaller */
  height: clamp(420px, 59.5vw, 840px) !important; /* Perfect circle - same as width */
  background: radial-gradient(circle at center, 
    rgba(0, 0, 0, 0.92) 0%, 
    transparent 100%) !important;
  filter: blur(24px) !important; /* Increased blur for smoother fade */
  -webkit-filter: blur(24px) !important;
}

/* ===== MOBILE OPTIMIZATIONS - ULTRA COMPACT ===== */
@media (max-width: 991px) {
  .hero-section .hero-content,
  .art-gallery-hero .hero-content,
  .hero-content {
    padding: 1.5rem 0.75rem !important;
    max-width: 100% !important;
  }
  
  .hero-section h1.hero-title-large,
  .hero-section .hero-title-large,
  .art-gallery-hero h1.hero-title-large,
  .art-gallery-hero .hero-title-large,
  .hero-content h1.hero-title-large,
  .hero-content .hero-title-large,
  .hero-title-large,
  .hero-title {
    font-size: clamp(1.25rem, 4.5vw, 1.875rem) !important; /* Even smaller on mobile */
    margin-bottom: 0.25rem !important; /* Tight spacing on mobile */
    margin-left: auto !important;
    margin-right: auto !important;
    line-height: 1.2 !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
  }
  
  .hero-section .lead.fs-3.mb-2,
  .art-gallery-hero .lead.fs-3.mb-2 {
    font-size: clamp(0.8125rem, 2.2vw, 1rem) !important;
    margin-bottom: 0.25rem !important; /* Tight spacing on mobile */
  }
  
  .hero-section .text-lead.mb-5,
  .art-gallery-hero .text-lead.mb-5 {
    font-size: clamp(0.75rem, 1.8vw, 0.875rem) !important;
    margin-bottom: 1.5rem !important;
    margin-top: 1rem !important;
    padding: 0 0.5rem;
  }
  
  .hero-section .d-flex.flex-wrap.justify-content-center.gap-3.mb-3,
  .art-gallery-hero .d-flex.flex-wrap.justify-content-center.gap-3.mb-3 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    gap: 0.5rem !important;
  }
  
  .hero-section .btn-lg,
  .art-gallery-hero .btn-lg {
    font-size: 0.875rem !important; /* 14px */
    padding: 0.5rem 1rem !important;
  }
  
  .hero-section .hero-text-fade,
  .art-gallery-hero .hero-text-fade {
    width: clamp(500px, 95vw, 800px) !important;
    height: clamp(700px, 120vh, 1200px) !important;
  }
}

/* ===== TABLET OPTIMIZATIONS ===== */
@media (min-width: 992px) and (max-width: 1199px) {
  .hero-section h1.hero-title-large,
  .hero-section .hero-title-large,
  .art-gallery-hero h1.hero-title-large,
  .art-gallery-hero .hero-title-large,
  .hero-content h1.hero-title-large,
  .hero-content .hero-title-large,
  .hero-title-large,
  .hero-title {
    font-size: clamp(1.75rem, 4vw, 2.25rem) !important; /* Smaller on tablet */
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  .hero-section .lead.fs-3.mb-2,
  .art-gallery-hero .lead.fs-3.mb-2 {
    font-size: clamp(0.9375rem, 2.2vw, 1.0625rem) !important;
  }
  
  .hero-section .text-lead.mb-5,
  .art-gallery-hero .text-lead.mb-5 {
    font-size: clamp(0.8125rem, 1.7vw, 0.9375rem) !important;
  }
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
  .hero-section h1.hero-title-large,
  .hero-section .hero-title-large,
  .art-gallery-hero h1.hero-title-large,
  .art-gallery-hero .hero-title-large,
  .hero-content h1.hero-title-large,
  .hero-content .hero-title-large,
  .hero-title-large,
  .hero-title,
  .hero-section .lead.fs-3.mb-2,
  .art-gallery-hero .lead.fs-3.mb-2,
  .hero-section .text-lead.mb-5,
  .art-gallery-hero .text-lead.mb-5,
  .hero-section .d-flex.flex-wrap.justify-content-center.gap-3.mb-3,
  .art-gallery-hero .d-flex.flex-wrap.justify-content-center.gap-3.mb-3 {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ===== SCROLL REVEAL REFINEMENTS ===== */
.scroll-reveal-award {
  opacity: 1 !important; /* Already visible, no need to wait */
  transform: translateY(0) !important;
}

/* ===== IMPROVED CONTRAST & READABILITY ===== */
.hero-section .hero-content,
.art-gallery-hero .hero-content,
.hero-content {
  /* Ensure text is always readable */
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== FOCUS STATES FOR ACCESSIBILITY ===== */
.hero-section .btn:focus-visible,
.art-gallery-hero .btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}
