html, body {
   overflow-x: hidden !important;
   width: 100% !important;
   position: relative;
}

:root {
   /* Layout & Shapes */
   --container-width: 1080px;
   --radius-lg: 30px;
   --radius-md: 20px;
   --section-padding: 80px 20px;
}

/* ==========================================================================
   Events Page Specific Styles
   ========================================================================== */
#primeagile__11204 {
   display: flex;
   align-items: stretch;
   flex-wrap: wrap; /* Allows stacking for mobile if needed */
}

#primeagile__11205,
#primeagile__11206 {
   padding: 0px;
   display: flex;
   flex-direction: column;
}

/* Ensure the background stretches through the deep nesting */
#primeagile__11206 > div,
#primeagile__11208,
#primeagile__11208 > div,
#primeagile__11208 > div > div {
   height: 100%;
   display: flex;
   flex-direction: column;
}
#primeagile__11203{
   overflow-y: hidden;
}

img#primeagile__11207 {
   /* width: 100%; */
   height: 100%;
   object-fit: cover !important;
}

.events-hero-section {
   background-color: #d1c4e9;
   /* Brand Lavender */
   padding: 100px 50px;
   display: flex;
   flex-direction: column;
   justify-content: center;
   text-align: left;
   width: 100%;
   height: 100%;
   min-height: 40rem;
}

.events-title {
   font-size: clamp(2.5rem, 7vw, 4.5rem);
   font-weight: 600;
   color: var(--color-primary-dark);
   max-width: 900px;
   line-height: 1.1;
   letter-spacing: -1.5px;
   margin: 0;
}

/* Ensure container alignment on the new page */
.events-hero-section .content-container,
#primeagile__11229 {
   max-width: var(--container-max);
   margin: 0 auto;
}

#primeagile__11229 {
   height: 48rem
}

/* ==========================================================================
   No Tourist Traps CTA
   ========================================================================== */
#primeagile__11212 {
   max-width: var(--container-width);
   margin: 0 auto
}

.events-cta-section {
   background-color: #ffffff;
   padding: 100px 20px;
   text-align: center;
}

.events-cta-heading {
   font-size: clamp(2rem, 5vw, 3.5rem);
   font-weight: 600;
   color: var(--color-primary-dark);
   margin-bottom: 2.5rem;
   line-height: 1.1;
   letter-spacing: -1px;
}

.events-cta-section .gold-pill {
   /* Ensuring consistency with global styles but centering easily here */
   display: inline-block !important;
}


h2#primeagile__11028 {
   color: #ffffff !important;
}

/* ==========================================================================
   Build for Locals Section
   ========================================================================== */

.events-intro-section {
   background-color: #ffffff;
   padding: 100px 20px;
   overflow: hidden; /* Prevent reveal shifts */
}

.events-intro-section h2 {
   font-size: clamp(2.5rem, 6vw, 4rem);
   font-weight: 600;
   line-height: 1;
   margin-bottom: 2rem;
   color: #333;
}

.events-intro-p {
   font-size: 1.15rem;
   max-width: 800px;
   margin-bottom: 3rem;
   color: #444;
   line-height: 1.4;
}

.events-feature-list {
   display: flex;
   flex-direction: column;
   gap: 1rem;
   max-width: 800px;
}

.events-feature-item {
   display: flex;
   gap: 2rem;
   align-items: flex-start;
}

.events-feature-icon {
   width: 60px;
   height: 20px;
   position: relative;
   top: 10px;
   flex-shrink: 0;
}

/* Custom Line-and-Box Iconography */
.events-feature-icon::before {
   content: "";
   position: absolute;
   left: 0;
   top: 50%;
   width: 40px;
   height: 2px;
   background-color: #333;
   transform: translateY(-50%);
}

.events-feature-icon::after {
   content: "";
   position: absolute;
   right: 0;
   top: 50%;
   width: 20px;
   height: 20px;
   background-color: #333;
   border-radius: 6px;
   transform: translateY(-50%);
}

.events-feature-content h3 {
   font-size: 1.5rem;
   font-weight: 700;
   margin-bottom: 0.25rem;
   color: #333;
}

.events-feature-content p {
   font-size: 1.1rem;
   color: #555;
   line-height: 1.4;
   font-weight: 300;
}

@media (max-width: 768px) {
   .events-intro-section {
      padding: 60px 20px;
   }

   .events-feature-item {
      gap: 1.5rem;
   }

   .events-feature-icon {
      width: 40px;
   }

   .events-feature-icon::before {
      width: 25px;
   }
    #primeagile__11224 {
       padding: 0px !important;
    }
   #primeagile__11211{
   padding: 2rem !important;
}
}

/* ==========================================================================
   Events Image Collage
   ========================================================================== */

.events-collage-section {
   padding: 120px 20px;
   background: #ffffff;
   overflow: visible;
   /* To allow scale expansion */
}

.collage-wrapper {
   position: relative;
   max-width: 1000px;
   height: 650px;
   margin: 40px auto;
}

.collage-item {
   position: absolute;
   border-radius: 35px;
   overflow: hidden;
   box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
   transition: all 0.8s cubic-bezier(0.19, 1, 0.22, 1);
   cursor: pointer;
   background: #f1f1f1;
}

.collage-item img {
   width: 100%;
   height: 100%;
   object-fit: cover;
   display: block;
}

/* Staggered Positions & Rotations */
.item-1 {
   width: 420px;
   height: 550px;
   z-index: 3;
   left: 5%;
   transform: rotate(-3deg);
}

.item-2 {
   width: 380px;
   height: 480px;
   z-index: 2;
   left: 40%;
   top: 50px;
   transform: rotate(2deg);
}

.item-3 {
   width: 320px;
   height: 420px;
   z-index: 1;
   right: 5%;
   top: 20px;
   transform: rotate(6deg);
}

@media (max-width: 991px) {
   #primeagile__11204 {
      flex-direction: column !important;
   }

   #primeagile__11205,
   #primeagile__11206 {
      width: 100% !important;
   }
   .events-collage-section, #primeagile__11219 {
      padding: 0px 1rem !important;
      margin: 0px;
   }
   #primeagile__11223 {
      transform: scale(1.3);
      padding-top: 3rem;
      height: 100%;
   }
   .events-collage-section > div {
   
   display: grid;
      gap: 3px;
   grid-template-columns: 1fr 1fr 1fr;
   background: #ffffff;
   overflow: visible;
}


   #primeagile__11206 > div,
   #primeagile__11208,
   #primeagile__11208 > div,
   #primeagile__11208 > div > div {
      height: auto !important;
   }

   #primeagile__11207 {
      height: 25rem !important;
      min-height: unset !important;
   }

   .events-hero-section {
      min-height: unset !important;
      padding: 60px 20px !important;
      height: auto !important;
   }

   .collage-wrapper {
      height: 500px;
   }

   .item-1 {
      width: 320px;
      height: 400px;
      left: 0;
   }

   .item-2 {
      width: 280px;
      height: 350px;
      left: 30%;
      top: 40px;
   }

   .item-3 {
      width: 240px;
      height: 300px;
      right: 0;
      top: 10px;
   }
}

@media (max-width: 768px) {
   .collage-wrapper {
      display: flex;
      flex-direction: column;
      height: auto;
      gap: 2rem;
      align-items: center;
   }

   .collage-item {
      position: static;
      transform: rotate(0) !important;
      width: 100% !important;
      max-width: 400px;
      height: 400px !important;
   }
}

/* ==========================================================================
   Utility (Everything in One Tap) Section
   ========================================================================== */
#primeagile__11219 {
   background-color: #f6f5f3;
   padding-top: 120px;
}

.events-utility-section {
   padding-top: 100px;
   padding-bottom: 20px;
}

.events-utility-section .events-feature-list {
   margin-top: 2rem;
}

.events-main-heading {
   font-size: 3rem;
   font-weight: 600;
}

/* Hover effect on content for utility focus */
.events-feature-item:hover .events-feature-content h3 {
   color: var(--color-primary-dark);
}

.events-feature-content p {
   max-width: 500px;
   /* Keeping descriptions tight */
}

@media (max-width: 768px) {
   .events-utility-section {
      padding: 80px 20px;
   }
}

/* ==========================================================================
   Browse Live Events CTA
   ========================================================================== */
#primeagile__11224 {
   padding: 5rem
}

.events-browse-section {
   position: relative;
   background-image: url("https://images.primeagile.com/hooksapp_com/image/11363/1.webp");
   background-size: cover;
   background-position: center;
   padding: 120px 20px;
   height: 450px;
   display: flex;
   align-items: center;
   justify-content: center;
   overflow: hidden;
}

.events-browse-section .content-container {
   position: relative;
   z-index: 2;
}

.events-browse-section .gold-pill button {
   background: inherit !important;
   border: none;
   font-size: inherit !important;
}

.events-browse-section .gold-pill button {
   font-size: 1.2rem !important;
   padding: 1.4rem 3.5rem !important;
   transition: all 0.4s var(--ease-out-expo) !important;
}

.events-browse-section .gold-pill button :hover {
   transform: scale(1.08) translateY(-3px) !important;
   box-shadow: 0 15px 35px rgba(255, 200, 87, 0.4) !important;
}

@media (max-width: 768px) {
   .events-browse-section {
      height: 350px;
   }
}

/* ==========================================================================
   Built to Feel Alive Section
   ========================================================================== */

.events-alive-section {
   position: relative;
   background-image: url("https://images.primeagile.com/hooksapp_com/image/11364/2.webp");
   background-size: cover;
   background-position: center;
   padding: 15rem 20px;
   display: flex;
   align-items: center;
   justify-content: center;
   color: #ffffff;
   text-align: center;
   overflow: hidden;
}

.alive-text-wrapper {
   max-width: 600px;
   position: relative;
   z-index: 2;
   padding: 2rem;
}

.alive-heading {
   color: white;
   font-size: clamp(2rem, 5vw, 3.2rem);
   font-weight: 800;
   margin-bottom: 1.5rem;
   line-height: 1.1;
   text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.alive-description {
   font-size: 1.15rem;
   line-height: 1.5;
   margin-bottom: 2rem;
   max-width: 500px;
   margin-left: auto;
   margin-right: auto;
   font-weight: 400;
   text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.alive-subgroup {
   margin-top: 1rem;
}

.alive-quote {
   display: block;
   font-weight: 700;
   margin-bottom: 0.75rem;
   font-size: 1.2rem;
}

.alive-description.bottom {
   font-size: 1.05rem;
   opacity: 0.95;
   font-weight: 300;
   line-height: 1.4;
}

@media (max-width: 768px) {
   .events-alive-section {
      padding: 8rem 20px;
      background-position: 70% center;
      /* Adjusting focus for mobile */
   }
   .events-browse-section .gold-pill button {
   background: inherit !important;
   border: none;
      padding: 0px !important;
      width: 15rem !important;
}


   .alive-heading {
      font-size: 2rem;
   }

   .alive-description {
      font-size: 1rem;
   }
}

/* ==========================================================================
   Neighborhood Section
   ========================================================================== */

.events-neighborhood-section {
   background-color: #ffffff;
   padding: 120px 20px;
}

/* ==========================================================================
   Final CTA Section (Stop Scrolling)
   ========================================================================== */

.events-final-cta {
   background-color: var(--color-primary-dark);
   padding: 120px 20px;
   color: #ffffff;
   text-align: center;
   overflow: hidden;
}

.white-text {
   color: #ffffff !important;
}

.opacity-90 {
   opacity: 0.9;
}

.centered-max {
   margin-left: auto;
   margin-right: auto;
   margin-bottom: 4rem;
}

.events-qr-override {
   margin-top: 6rem !important;
}

#primeagile__11203 .qr-code {
   width: 30rem;
   height: 13rem;
}

.qr-label {
   font-size: 1.5rem;
   font-weight: 700;
   line-height: 1.2;
   display: block;
   text-align: left;
}

@media (max-width: 768px) {
    .events-qr-override {
        margin-top: 4rem;
        flex-direction: column;
        text-align: center;
        padding: 2rem !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .qr-code {
        width: 100% !important;
        max-width: 250px; /* Sensible size for mobile */
        height: auto !important;
        margin: 0 auto;
    }

    .qr-label {
        text-align: center;
        font-size: 1.2rem;
    }
}

/* Reusing .events-feature-list and .events-main-heading from previous sections */

/* ==========================================================================
   Recent Events Modal & Grid
   ========================================================================== */

.events-modal {
   display: none;
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.85); /* Pitch dark backdrop from mockup */
   backdrop-filter: blur(10px);
   z-index: 9999;
   overflow-y: auto;
   padding: 40px 20px;
}

.events-modal-content {
   background: transparent; /* No container styling */
   margin: 0 auto;
   padding: 20px 0;
   max-width: 1100px;
   position: relative;
   border: none;
   box-shadow: none;
   animation: modalReveal 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes modalReveal {
   from { opacity: 0; transform: translateY(30px) scale(0.95); }
   to { opacity: 1; transform: translateY(0) scale(1); }
}

.events-modal-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 40px;
}

.events-modal-close {
   cursor: pointer;
   color: #ffffff;
   opacity: 0.7;
   transition: color 0.3s, transform 0.3s;
   line-height: 1;
}

.events-modal-close:hover {
   color: #ffffff;
   opacity: 1;
   transform: rotate(90deg);
}

.events-modal-title {
   font-size: 2.2rem;
   font-weight: 700;
   color: #ffffff;
   margin: 0;
   text-align: left;
   letter-spacing: -0.5px;
}

.events-grid {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); /* Matches 4 cols nicely */
   gap: 20px;
}

.inline-modal {
   position: absolute;
   background: rgba(0, 0, 0, 0.6) !important; 
   backdrop-filter: blur(15px) !important;
   height: 100%;
   z-index: 100;
}

.event-card {
   border-radius: 16px;
   overflow: hidden;
   box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
   transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   cursor: pointer;
   display: flex;
   flex-direction: column;
   height: 380px; 
   position: relative;
   border: 1px solid rgba(255, 255, 255, 0.08);
   color: white;
}

.event-card:hover {
   transform: translateY(-5px) scale(1.03);
   box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
   border-color: rgba(255, 255, 255, 0.2);
}

.event-card-bg {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-size: cover;
   background-position: center;
   transition: transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
   z-index: 0;
}

.event-card:hover .event-card-bg {
   transform: scale(1.15); 
}

.event-card-overlay {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0.6) 60%, rgba(0,0,0,0.95) 100%);
   z-index: 1;
}

.event-card-topbar {
   position: relative;
   z-index: 2;
   display: flex;
   justify-content: space-between;
   align-items: flex-start;
   padding: 15px 18px;
   width: 100%;
   box-sizing: border-box;
}

.event-card-handle {
   font-weight: 600;
   font-size: 0.85rem; 
   text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.event-card-views {
   display: flex;
   flex-direction: column;
   align-items: center;
   gap: 2px;
   font-size: 0.8rem;
   font-weight: 600;
   opacity: 0.95;
   text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.event-card-bottom-info {
   position: relative;
   z-index: 2;
   margin-top: auto;
   padding: 20px 18px;
   width: 100%;
   box-sizing: border-box;
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center; 
}

.event-card-text {
   display: flex;
   flex-direction: column;
   align-items: center;
   margin-bottom: 5px; 
}

.event-card-title {
   font-size: 1.15rem; 
   font-weight: 700;
   color: #ffffff;
   text-shadow: 0 2px 5px rgba(0,0,0,0.9);
   line-height: 1.25;
   margin-bottom: 6px;
}

.event-card-date,
.event-card-address {
   font-size: 0.85rem;
   color: rgba(255, 255, 255, 0.9);
   text-shadow: 0 1px 3px rgba(0,0,0,0.8);
   font-weight: 500;
   margin-bottom: 2px;
}

.event-card-metrics {
   display: flex;
   justify-content: space-between;
   width: 100%;
   padding-top: 15px;
   margin-top: 5px;
}

.event-card-metrics .metric {
   display: flex;
   align-items: center;
   gap: 4px;
   font-size: 0.85rem;
   font-weight: 500;
   opacity: 0.95;
}



@media (max-width: 900px) {
   .events-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

@media (max-width: 640px) {
   .events-modal {
      padding: 10px;
   }
   .events-modal-content {
      padding: 25px 15px;
      margin: 10px auto;
   }
   .events-modal-title {
      font-size: 1.8rem;
   }
   .events-grid {
      grid-template-columns: 1fr;
   }
}

/* ==========================================================================
   Event Details View Modal
   ========================================================================== */

#event-details-view {
   padding: 10px 0;
}

.event-details-layout {
   display: flex;
   flex-direction: column;
   color: #ffffff;
   animation: modalReveal 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.event-back-btn {
   display: inline-flex;
   align-items: center;
   gap: 8px;
   background: rgba(255, 255, 255, 0.05);
   border: 1px solid rgba(255, 255, 255, 0.1);
   color: #ffffff;
   padding: 10px 20px;
   border-radius: 30px;
   cursor: pointer;
   font-size: 0.95rem;
   font-weight: 600;
   margin-bottom: 25px;
   align-self: flex-start;
   transition: all 0.3s ease;
}

.event-back-btn:hover {
   background: rgba(255, 255, 255, 0.15);
   transform: translateX(-4px);
}

.event-details-hero {
   width: 100%;
   height: 380px;
   border-radius: 20px;
   background-size: cover;
   background-position: center;
   box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
   position: relative;
   margin-bottom: 35px;
   border: 1px solid rgba(255, 255, 255, 0.05);
}

.event-details-hero::after {
   content: '';
   position: absolute;
   bottom: 0; left: 0; right: 0; height: 50%;
   background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
   border-radius: 0 0 20px 20px;
}

.event-details-content {
   padding: 0 10px;
   text-align: center;
   display: flex;
   flex-direction: column;
   align-items: center;
}

.event-details-header {
   font-size: 2.5rem;
   font-weight: 800;
   margin-bottom: 20px;
   text-shadow: 0 2px 4px rgba(0,0,0,0.8);
   color: #ffffff;
   letter-spacing: -0.5px;
}

.event-details-meta {
   display: flex;
   flex-wrap: wrap;
   justify-content: center;
   gap: 25px;
   margin-bottom: 35px;
   background: rgba(255,255,255,0.03);
   padding: 16px 24px;
   border-radius: 12px;
   border: 1px solid rgba(255,255,255,0.05);
}

.event-details-meta .meta-item {
   font-size: 1.05rem;
   font-weight: 500;
   color: rgba(255, 255, 255, 0.9);
   display: flex;
   align-items: center;
   gap: 8px;
}

.event-details-desc {
   font-size: 1.15rem;
   line-height: 1.7;
   color: rgba(255, 255, 255, 0.75);
   max-width: 800px;
   margin: 0 auto 50px auto;
}

/* The distinct styling for the "Buy Tickets" / Main Action button */
.buy-tickets-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   background: #ffcc55; /* vibrant yellow from mockup */
   color: #2d1a49; /* Deep purple font from mockup */
   font-weight: 800;
   font-size: 1.15rem;
   padding: 20px 50px;
   border-radius: 50px; /* Pill shape */
   text-decoration: none;
   letter-spacing: 1.5px; /* Slight tracking for uppercase */
   text-transform: uppercase;
   box-shadow: 0 10px 25px rgba(255, 204, 85, 0.4);
   transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
   width: fit-content;
}

.buy-tickets-btn:hover {
   transform: translateY(-5px) scale(1.04);
   box-shadow: 0 15px 35px rgba(255, 204, 85, 0.55);
   color: #2d1a49;
}