
(function() {
  'use strict';

  // Prevent double initialization
  if (window.__adwsModalInitialized) return;
  window.__adwsModalInitialized = true;

  // Configuration
  const config = Object.assign({
    cookieName: 'adws_embed_modal_seen',
    cookieDays: 30,
    showResetButton: false,
    autoShow: true,
    debug: false
  }, window.EmbedModalConfig || {});

  // Asset base URLs
  const IMG_BASE = 'https://assets.adwsdist.com/img/';
  const FONT_BASE = 'https://assets.adwsdist.com/fonts/';
  const VID_BASE = 'https://assets.adwsdist.com/vid/';

  // GA4 Tracking
  function initGA4() {
    if (window.__adwsGA4Initialized) return;
    window.__adwsGA4Initialized = true;

    // Load gtag.js
    const gtagScript = document.createElement('script');
    gtagScript.async = true;
    gtagScript.src = 'https://www.googletagmanager.com/gtag/js?id=G-88Q5S9XR9S';
    document.head.appendChild(gtagScript);

    // Initialize dataLayer and gtag
    window.dataLayer = window.dataLayer || [];
    function gtag(){window.dataLayer.push(arguments);}
    window.gtag = gtag;
    gtag('js', new Date());
    gtag('config', 'G-88Q5S9XR9S', {
      page_title: 'Andrews 50th Anniversary Modal',
      page_location: window.location.href
    });
  }

  // Initialize GA4 immediately
  initGA4();

  // Cookie management
  function hasSeenModal() {
    return document.cookie.split(';').some(c => c.trim().startsWith(config.cookieName + '='));
  }

  function setSeenCookie() {
    const date = new Date();
    date.setTime(date.getTime() + (config.cookieDays * 24 * 60 * 60 * 1000));
    document.cookie = config.cookieName + '=true; expires=' + date.toUTCString() + '; path=/; SameSite=Lax';
  }

  function clearCookie() {
    document.cookie = config.cookieName + '=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;';
  }

  // Reset button for testing
  function createResetButton() {
    if (!config.showResetButton) return;
    
    const btn = document.createElement('button');
    btn.id = 'adws-reset-modal-btn';
    btn.textContent = 'Reset Modal';
    btn.style.cssText = 'position:fixed;top:10px;right:10px;background:#333;color:#fff;border:none;padding:8px 16px;border-radius:6px;font-size:14px;cursor:pointer;z-index:99998;font-family:-apple-system,sans-serif;box-shadow:0 2px 8px rgba(0,0,0,0.3);';
    btn.addEventListener('click', function() {
      clearCookie();
      alert('Cookie cleared! Refresh to see modal again.');
    });
    document.body.appendChild(btn);
  }

  // CSS injection
  function injectStyles() {
    if (document.getElementById('adws-modal-styles')) return;
    
    const style = document.createElement('style');
    style.id = 'adws-modal-styles';
    style.textContent = `
/* ROOT CSS */
:root {
  --rem-base: 10px;
  --base-font-size: 23px;
  --base-line-height: 1.5;
  --vertical-rhythm: calc(var(--base-line-height) * 1em);
  --brand-color: #003d78;
  --brand-color-dark: #00162c;
  --brand-color-light: #0064c5;
  --accent-color: #ffac00;
  --accent-color-dark: #b37800;
  --accent-color-light: #b37800;
  --base-text-color: #fff;
  --base-link-color: #2165ff;
  --animation-duration: 0.3s;
  --animation-timing-function: ease;
  --input-x: 40px;
  --gutter: 35px;
  --h1: 150px;
  --h2: 23px;
  --h3: 23px;
  --h4: 21px;
  --h5: 21px;
  --h6: 20px;
  --btn-y: 12px;
  --btn-x: 40px;
  --btn-b: 1px;
  --btn-r: 0;
  --btn-fz: 16px;
}
@media (max-width: 1023px) {
  :root {
    --base-font-size: 14px;
    --h1: 60px;
    --h2: 14px;
    --h3: 14px;
    --h4: 14px;
    --h5: 14px;
    --h6: 14px;
  }
}
@media (max-width: 667px) {
  :root {
    --btn-y: 12px;
    --btn-x: 40px;
    --btn-b: 1px;
    --btn-r: 0;
    --btn-fz: 16px;
  }
}
@media (min-width: 812px) and (max-height: 414px) and (orientation: landscape) {
  :root {
    --gutter: 50px;
  }
}

/* FONT FACES */
@font-face {
  font-family: "Nexa";
  src: url("${FONT_BASE}Nexa-Black.woff2") format("woff2"), url("${FONT_BASE}Nexa-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nexa";
  src: url("${FONT_BASE}Nexa-Regular.woff2") format("woff2"), url("${FONT_BASE}Nexa-Regular.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nexa Slab";
  src: url("${FONT_BASE}NexaSlab-Black.woff2") format("woff2"), url("${FONT_BASE}NexaSlab-Black.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Nexa Slab";
  src: url("${FONT_BASE}NexaSlab-Heavy.woff2") format("woff2"), url("${FONT_BASE}NexaSlab-Heavy.woff") format("woff");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* BUTTONS */
.modal-wrapper .btn {
  display: inline-block;
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
  padding: 12px 28px;
  font-weight: 400;
  width: 100%;
  letter-spacing: 0.2em;
  vertical-align: middle;
  text-transform: uppercase;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  border-radius: 0;
  transition: all 0.35s ease;
}
.modal-wrapper .btn--primary {
  border-color: #ffac00;
  color: #ffac00;
}
.modal-wrapper .btn--primary:hover {
  background-color: #ffac00;
  color: #fff;
}
.modal-wrapper .btn--white {
  border-color: #fff;
  color: #fff;
}
.modal-wrapper .btn--white:hover {
  background-color: #fff;
  color: #ffac00;
}

/* BASE STYLES */
.modal-wrapper h1,
.modal-wrapper h2,
.modal-wrapper h3,
.modal-wrapper h4 {
  font-family: "Nexa Slab";
  line-height: 1.4;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #fff;
  font-weight: normal;
}
.modal-wrapper h1 strong,
.modal-wrapper h2 strong,
.modal-wrapper h3 strong,
.modal-wrapper h4 strong {
  display: block;
  font-family: "Nexa";
  font-weight: 900;
}
.modal-wrapper h1, .modal-wrapper .h1 {
  font-size: var(--h1);
  line-height: 0.975;
  margin: 0 0 35px;
}
.modal-wrapper h2, .modal-wrapper .h2 {
  font-size: var(--h2);
  margin: 0 0 21px;
}
.modal-wrapper .h3, .modal-wrapper h3 {
  font-size: var(--h3);
  margin: 0 0 15px;
}
.modal-wrapper .h4, .modal-wrapper h4 {
  font-size: var(--h4);
  margin: 0 0 15px;
}
.modal-wrapper p {
  margin-bottom: 32px;
  margin-top: 0;
}
.modal-wrapper p:last-child {
  margin-bottom: 0;
}
.modal-wrapper p a {
  text-decoration: underline;
}
.modal-wrapper p a:hover {
  color: #ffac00;
}
.modal-wrapper a {
  color: inherit;
  text-decoration: none;
}
.modal-wrapper img {
  max-width: 100%;
  height: auto;
  vertical-align: top;
}
.modal-wrapper ul, .modal-wrapper ol {
  list-style: none;
  margin-top: 0;
  padding-left: 0;
}
.modal-wrapper ul li, .modal-wrapper ol li {
  list-style: none;
}

* { box-sizing: border-box; }
*:after, *:before { box-sizing: inherit; }

.modal-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  position: relative;
  overflow: hidden;
  font: var(--base-font-size)/var(--base-line-height) "Nexa", "Arial", "Helvetica Neue", "Helvetica", serif;
  color: var(--base-text-color);
}
.modal-wrapper .container {
  width: 100%;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
  max-width: calc(1319px + var(--gutter) * 2);
}
.modal-wrapper .container--full {
  max-width: 1588px;
}
.modal-wrapper .main, .modal-wrapper .header, .modal-wrapper .footer {
  min-width: 0;
}
.modal-wrapper .main {
  flex: 1 1 auto;
}
.modal-wrapper .text-primary {
  color: #ffac00;
}

/* HERO SECTION */
.modal-wrapper .hero-section {
  position: relative;
  padding: 38px 0 20px;
  z-index: 0;
}
.modal-wrapper .hero-section__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 42px;
  position: relative;
  z-index: 2;
}
.modal-wrapper .hero-section__subtitle {
  font-family: "Nexa";
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0.15em;
  font-weight: 900;
  text-transform: uppercase;
  color: #ffac00;
  margin-bottom: 20px;
}
.modal-wrapper .hero-section__title {
  color: #ffac00;
}
.modal-wrapper .hero-section__logo {
  max-width: 180px;
  margin: 0 auto 34px;
}
.modal-wrapper .hero-section__logo img {
  display: block;
  width: 100%;
}
.modal-wrapper .hero-section__text {
  max-width: 729px;
}
.modal-wrapper .hero-section__decor {
  margin: 0 -35px;
  position: relative;
}
.modal-wrapper .hero-section__decor--img-mobile, .modal-wrapper .hero-section__decor--img-desktop {
  width: 100%;
}
.modal-wrapper .hero-section__decor--img-mobile {
  display: block;
}
.modal-wrapper .hero-section__decor--img {
  display: block;
}
.modal-wrapper .hero-section__glass {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  max-width: 650px;
  margin: 0 auto;
  padding-left: 72px;
  padding-right: 32px;
}
.modal-wrapper .hero-section__glass--left, .modal-wrapper .hero-section__glass--right {
  display: block;
}
.modal-wrapper .hero-section__glass--left {
  width: 48px;
  margin-bottom: 20px;
}
.modal-wrapper .hero-section__glass--right {
  width: 84px;
}

/* COMPANY SECTION */
.modal-wrapper .company-section {
  padding-top: 26px;
}
.modal-wrapper .company-wrap {
  padding: 25px;
  position: relative;
}
.modal-wrapper .company-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: #db3512;
  clip-path: polygon(50% 0%, 100% 0, 100% 98%, 18% 100%, 0 99%, 0 0);
}
.modal-wrapper .company-wrap__head {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  margin-bottom: 40px;
  gap: 16px;
}
.modal-wrapper .company-wrap__head h2 {
  margin-bottom: 0;
}
.modal-wrapper .company-wrap__visual {
  position: relative;
}
.modal-wrapper .company-wrap__visual:before, .modal-wrapper .company-wrap__visual:after {
  content: "";
  position: absolute;
  z-index: 2;
}
.modal-wrapper .company-wrap__visual:before {
  left: 0;
  bottom: 0;
  width: 92px;
  height: 116px;
  margin: 0 0 -70px -45px;
  background: url(${IMG_BASE}figure-02.svg) no-repeat;
  background-size: cover;
  transform-origin: center center;
  animation: zoomPulse1 2.5s ease-in-out infinite;
  will-change: transform;
}
.modal-wrapper .company-wrap__visual:after {
  right: 0;
  top: 0;
  width: 74px;
  height: 59px;
  margin: -30px -38px 0 0;
  background: url(${IMG_BASE}figure-03.svg) no-repeat;
  background-size: cover;
  transform-origin: center center;
  animation: zoomPulse2 3s ease-in-out infinite;
  will-change: transform;
}
.modal-wrapper .company-wrap__visual--img {
  position: relative;
}
.modal-wrapper .company-wrap__visual--img:before {
  content: "";
  display: block;
  padding-top: 120%;
}
.modal-wrapper .company-wrap__visual--img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ABOUT SECTION */
.modal-wrapper .about-wrap {
  position: relative;
  padding: 25px 25px 75px;
  overflow: hidden;
  z-index: 1;
}
.modal-wrapper .about-wrap__heading {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  margin-bottom: 40px;
}
.modal-wrapper .about-wrap::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  background: #db3512;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 99%);
}
.modal-wrapper .about-list {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin: 0 0 43px;
}
.modal-wrapper .about-list__item {
  width: 100%;
}
.modal-wrapper .about-list__item:first-child, .modal-wrapper .about-list__item:nth-child(2) {
  width: 100%;
}
.modal-wrapper .about-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.modal-wrapper .about-card__visual {
  overflow: hidden;
  width: 100%;
  position: relative;
  margin-bottom: 15px;
}
.modal-wrapper .about-card__visual::before {
  content: "";
  display: block;
  padding-top: 59.3%;
}
.modal-wrapper .about-card__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-wrapper .about-card__title {
  margin-bottom: 0;
}

/* CONTENT SECTION */
.modal-wrapper .content-section {
  padding: 45px 0 53px;
}
.modal-wrapper .content-section .container {
  position: relative;
}
.modal-wrapper .content-section__decor-img {
  position: absolute;
  bottom: -32px;
  left: 0;
  z-index: 0;
}
.modal-wrapper .content-section__decor-img::after, .modal-wrapper .content-section__decor-img::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 9;
}
.modal-wrapper .content-section__decor-img::after {
  width: 83px;
  height: 71px;
  background: url(${IMG_BASE}glass-01.svg) no-repeat;
  background-size: cover;
  margin: 0 0 6px 65px;
}
.modal-wrapper .content-section__decor-img::before {
  width: 76px;
  height: 234px;
  margin-bottom: 14px;
  background: url(${IMG_BASE}glass-02.svg) no-repeat;
  background-size: cover;
}
.modal-wrapper .content-wrap {
  position: relative;
}
.modal-wrapper .content-wrap__visual {
  position: relative;
  margin: 0 -15px 42px;
  z-index: 0;
}
.modal-wrapper .content-wrap__visual::before {
  content: "";
  display: block;
  padding-top: 66.7%;
}
.modal-wrapper .content-wrap__visual::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  width: 68px;
  height: 66px;
  margin: 0 -14px -29px 0;
  background: url(${IMG_BASE}figure-06.svg) no-repeat;
  background-size: cover;
  z-index: 9;
  transform-origin: center center;
  animation: zoomPulse2 3s ease-in-out infinite;
  will-change: transform;
}
.modal-wrapper .content-wrap__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.modal-wrapper .content-wrap__inner {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  position: relative;
}

/* SERVICE SECTION */
.modal-wrapper .service-section {
  padding: 60px 0 38px;
}
.modal-wrapper .service-tile {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 35px;
}
.modal-wrapper .service-tile__visual {
  order: 2;
  max-width: 695px;
  margin: 0 auto;
  position: relative;
}
.modal-wrapper .service-tile__visual::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 70px;
  height: 79px;
  background: url(${IMG_BASE}sun.svg) no-repeat;
  background-size: cover;
  z-index: 0;
  border-radius: 30%;
  transform-origin: center;
  margin: -25px 60px 0 0;
  animation: rotateCircle 8s linear infinite;
}
.modal-wrapper .service-tile__visual img {
  display: block;
  width: 100%;
  position: relative;
  z-index: 2;
}
.modal-wrapper .service-tile__content {
  padding: 0 25px;
}
.modal-wrapper .section-heading {
  text-align: center;
  max-width: 770px;
  margin: 0 auto 35px;
  padding: 0 25px;
}

/* BRAND SECTION */
.modal-wrapper .brand-section {
  padding: 52px 0 54px;
}
.modal-wrapper .brand-section .btn-holder {
  padding: 0 25px;
}

/* TIMELINE SECTION */
.modal-wrapper .timeline-section {
  padding: 56px 0 12px;
  overflow: hidden;
  color: #003d78;
  position: relative;
  background-color: #ffac00;
  z-index: 0;
}
.modal-wrapper .timeline-section h2 {
  color: #003d78;
}
.modal-wrapper .timeline-slider .swiper-button-prev {
  left: 5px;
}
.modal-wrapper .timeline-slider .swiper-button-next {
  right: 5px;
}
.modal-wrapper .timeline-slider .swiper-button-prev, .modal-wrapper .timeline-slider .swiper-button-next {
  color: #fff;
  width: 16px;
  height: 16px;
  margin-top: -138px;
}
.modal-wrapper .timeline-slider .swiper-pagination {
  display: flex;
  justify-content: space-between;
  bottom: 0;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal-wrapper .timeline-slider .swiper-pagination::-webkit-scrollbar {
  display: none;
}
.modal-wrapper .timeline-slider .swiper-pagination .swiper-pagination-bullet {
  font-size: 23px;
  font-weight: 900;
  line-height: 1.55;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0 30px 8px;
  color: #fff;
  position: relative;
  margin: 0;
  width: auto;
  height: auto;
  background: none;
  opacity: 1;
  flex-shrink: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
}
.modal-wrapper .timeline-slider .swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
  color: #003d78;
}
.modal-wrapper .timeline-card {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 36px;
  padding: 94px 25px 38px;
}
.modal-wrapper .timeline-card__visual img {
  display: block;
  width: 100%;
}
.modal-wrapper .timeline-card__title {
  margin-bottom: 30px;
}

/* BRAND SLIDER */
.modal-wrapper .brand-slider {
  overflow: visible;
  margin-bottom: 46px;
  padding-bottom: 33px;
}
.modal-wrapper .brand-slider .swiper-wrapper {
  transition-timing-function: linear;
}
.modal-wrapper .brand-slider .swiper-slide {
  width: 229px;
}
.modal-wrapper .brand-slider .swiper-pagination {
  bottom: 0;
  top: auto;
}
.modal-wrapper .brand-slider .swiper-pagination-progressbar {
  background: #fff;
  height: 2px;
}
.modal-wrapper .brand-slider .swiper-pagination-progressbar-fill {
  background-color: #ffac00;
}
.modal-wrapper .brand-card__visual {
  width: 100%;
}
.modal-wrapper .brand-card__visual img {
  display: block;
  width: 100%;
}
.modal-wrapper .btn-holder {
  text-align: center;
}

/* VIDEO */
.modal-wrapper .video-holder {
  position: relative;
}
.modal-wrapper .video-holder img, .modal-wrapper .video-holder video {
  display: block;
  width: 100%;
}
.modal-wrapper .video-holder .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  border: none;
  padding: 0;
  background: none;
  border-top: 20px solid transparent;
  border-left: 40px solid #feac00;
  border-bottom: 20px solid transparent;
  z-index: 9;
  font-size: 0;
  text-indent: -9999px;
  overflow: hidden;
  opacity: 0.75;
  transform: translate(-50%, -50%);
  transition: all 0.35s ease;
}
.modal-wrapper .video-holder .play-btn:hover {
  opacity: 1;
}

/* ANIMATIONS */
@keyframes zoomPulse1 {
  0% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(1.15); }
  100% { transform: translateZ(0) scale(1); }
}
@keyframes zoomPulse2 {
  0% { transform: translateZ(0) scale(1); }
  50% { transform: translateZ(0) scale(1.25); }
  100% { transform: translateZ(0) scale(1); }
}
@keyframes rotateCircle {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* DATA ANIMATIONS */
.modal-wrapper [data-anim] {
  opacity: 0;
  will-change: transform, opacity;
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--delay, 0ms);
}
.modal-wrapper .is-inview [data-anim] {
  opacity: 1;
  transform: translateY(0) translateZ(0) scale(1);
}
.modal-wrapper [data-anim=slide-in] {
  transform: translate3d(0, 30px, 0);
  opacity: 0;
  transition: opacity 450ms linear, transform 850ms cubic-bezier(0.215, 0.61, 0.355, 1);
  transition-delay: var(--delay, 0ms);
}

/* FOOTER */
.modal-wrapper .footer {
  background-color: #ffa700;
  padding: 10px 0;
}
.modal-wrapper .footer__container {
  max-width: 1592px;
}
.modal-wrapper .footer__logo {
  max-width: 156px;
  margin-left: auto;
}
.modal-wrapper .footer__logo img {
  display: block;
  width: 100%;
}

/* RESPONSIVE */
@media (max-width: 1023px) {
  .modal-wrapper h1, .modal-wrapper .h1 { letter-spacing: 0.15em; }
  .modal-wrapper .container--full { padding-left: 10px; padding-right: 10px; }
  .modal-wrapper .hero-section__glass { display: none; }
  .modal-wrapper .content-section__decor-img { display: none; }
  .modal-wrapper .content-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 125px;
    height: 118px;
    margin: -62px 0 0 -70px;
    background: url(${IMG_BASE}figure-07.svg) no-repeat;
    background-size: cover;
    z-index: 9;
    transform-origin: center center;
    animation: zoomPulse1 2.5s ease-in-out infinite;
    will-change: transform;
  }
  .modal-wrapper .timeline-slider { background: #db3512; color: #fff; }
  .modal-wrapper .timeline-slider .swiper-pagination { bottom: auto; top: 0; padding-top: 20px; }
}
@media (min-width: 375px) {
  .modal-wrapper .service-tile__visual::before { margin-right: 80px; }
}
@media (min-width: 480px) {
  .modal-wrapper .btn { padding-left: 38px; padding-right: 38px; width: auto; }
  .modal-wrapper .hero-section__content { padding-bottom: 50px; }
  .modal-wrapper .company-wrap__visual--img:before { padding-top: 101.2%; }
  .modal-wrapper .content-wrap__visual::before { padding-top: 43.8%; }
}
@media (min-width: 667px) {
  .modal-wrapper .service-tile__visual::before { margin-right: 100px; width: 80px; height: 90px; }
  .modal-wrapper .timeline-slider .swiper-button-prev, .modal-wrapper .timeline-slider .swiper-button-next { margin-top: -55px; }
}
@media (min-width: 768px) {
  .modal-wrapper .hero-section__glass { max-width: 780px; }
  .modal-wrapper .hero-section__glass--left { width: 70px; margin-bottom: 0; }
  .modal-wrapper .hero-section__glass--right { width: 110px; }
  .modal-wrapper .company-wrap { padding-bottom: 52px; }
  .modal-wrapper .company-wrap__visual--img:before { padding-top: 60.7%; }
  .modal-wrapper .about-list { gap: 55px 15px; }
  .modal-wrapper .about-list__item { width: calc(50% - 8px); }
  .modal-wrapper .about-list__item:first-child .about-card__visual::before, .modal-wrapper .about-list__item:nth-child(2) .about-card__visual::before { padding-top: 43.2%; }
  .modal-wrapper .about-card__visual::before { padding-top: 65.5%; }
}
@media (min-width: 1024px) {
  .modal-wrapper .btn { font-size: 16px; line-height: 1; min-width: 428px; }
  .modal-wrapper h1, .modal-wrapper .h1 { line-height: 0.8; margin-bottom: 30px; }
  .modal-wrapper h2, .modal-wrapper .h2 { margin-bottom: 35px; }
  .modal-wrapper p { margin-bottom: 46px; }
  .modal-wrapper .hero-section { padding-top: 69px; padding-bottom: 200px; }
  .modal-wrapper .hero-section__content { margin-bottom: 0; padding-bottom: 100px; }
  .modal-wrapper .hero-section__subtitle { font-size: 23px; letter-spacing: 0.2em; margin-bottom: 20px; }
  .modal-wrapper .hero-section__logo { max-width: 238px; }
  .modal-wrapper .hero-section__decor::before, .modal-wrapper .hero-section__decor::after {
    content: "";
    position: absolute;
    top: -40px;
  }
  .modal-wrapper .hero-section__decor::before {
    left: 0;
    width: 84px;
    height: 73px;
    background: url(${IMG_BASE}star-03.svg) no-repeat;
    background-size: cover;
    z-index: -1;
    transform-origin: center center;
    will-change: transform;
    animation: zoomPulse2 3s ease-in-out infinite;
  }
  .modal-wrapper .hero-section__decor::after {
    right: 0;
    width: 81px;
    height: 79px;
    background: url(${IMG_BASE}star-04.svg) no-repeat;
    background-size: cover;
    z-index: -1;
    transform-origin: center center;
    animation: zoomPulse2 3s ease-in-out infinite;
    will-change: transform;
  }
  .modal-wrapper .hero-section__decor { position: absolute; left: 0; right: 0; bottom: 40px; z-index: 0; margin-left: 35px; margin-right: 35px; }
  .modal-wrapper .hero-section__decor--img-mobile { display: none; }
  .modal-wrapper .hero-section__glass--left { width: 80px; }
  .modal-wrapper .company-section { padding-top: 44px; }
  .modal-wrapper .company-wrap::before { clip-path: polygon(1% 0, 100% 2%, 99% 100%, 0 99%); }
  .modal-wrapper .company-wrap { padding-top: 110px; padding-left: 60px; padding-right: 60px; }
  .modal-wrapper .company-wrap__head { gap: 30px; margin-bottom: 78px; }
  .modal-wrapper .company-wrap__visual:before { width: 215px; height: 271px; margin: 0 0 94px -86px; }
  .modal-wrapper .company-wrap__visual:after { width: 131px; height: 132px; margin: 52px -85px 0 0; }
  .modal-wrapper .about-section { padding: 10px 0; }
  .modal-wrapper .about-wrap { padding: 92px 60px 84px; }
  .modal-wrapper .about-wrap::before { clip-path: polygon(0 0, 23% 2%, 80% 0, 100% 3%, 100% 100%, 0 98%); }
  .modal-wrapper .about-card__visual { margin-bottom: 22px; }
  .modal-wrapper .content-section { padding: 45px 0 83px; }
  .modal-wrapper .content-section__heading { min-height: 295px; }
  .modal-wrapper .content-wrap::after, .modal-wrapper .content-wrap::before {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 9;
  }
  .modal-wrapper .content-wrap::after { width: 155px; height: 111px; margin: 0 0 -20px 0; background: url(${IMG_BASE}figure-04.svg) no-repeat; background-size: cover; }
  .modal-wrapper .content-wrap::before { width: 145px; height: 220px; margin: 0 -80px 52px 0; background: url(${IMG_BASE}star-05.svg) no-repeat; background-size: cover; transform-origin: center center; animation: zoomPulse1 2.5s ease-in-out infinite; will-change: transform; }
  .modal-wrapper .content-wrap__visual { margin: 0 0 76px; }
  .modal-wrapper .content-wrap__visual::after { width: 104px; height: 101px; margin: 0 -74px 74px 0; }
  .modal-wrapper .content-wrap__heading { margin-bottom: 0; }
  .modal-wrapper .content-wrap__inner { grid-template-columns: 473px 1fr; gap: 18px; }
  .modal-wrapper .service-section { padding: 60px 0 64px; }
  .modal-wrapper .service-tile { grid-template-columns: repeat(2, 1fr); align-items: flex-end; gap: 100px; }
  .modal-wrapper .service-tile__visual { order: 0; }
  .modal-wrapper .service-tile__visual::before { margin: -55px 120px 0 0; }
  .modal-wrapper .service-tile__content { padding: 0; }
  .modal-wrapper .section-heading { margin-bottom: 85px; padding: 0; }
  .modal-wrapper .brand-section { padding: 80px 0 54px; }
  .modal-wrapper .brand-section .btn-holder { padding: 0; }
  .modal-wrapper .timeline-section { padding: 76px 0 85px; }
  .modal-wrapper .timeline-section::before, .modal-wrapper .timeline-section::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    z-index: -1;
    transform-origin: center center;
    will-change: transform;
  }
  .modal-wrapper .timeline-section::before { width: 196px; height: 208px; background: url(${IMG_BASE}star-01.svg) no-repeat; background-size: cover; margin: 145px -35px 0 0; animation: zoomPulse1 2.5s ease-in-out infinite; }
  .modal-wrapper .timeline-section::after { width: 128px; height: 124px; margin: 350px 120px 0 0; background: url(${IMG_BASE}star-02.svg) no-repeat; background-size: cover; animation: zoomPulse2 3s ease-in-out infinite; }
  .modal-wrapper .timeline-slider { padding-bottom: 120px; }
  .modal-wrapper .timeline-slider .swiper-button-prev, .modal-wrapper .timeline-slider .swiper-button-next { display: none; }
  .modal-wrapper .timeline-card { padding: 0; }
  .modal-wrapper .timeline-card__title { color: #003d78; }
  .modal-wrapper .brand-slider { padding-bottom: 86px; }
  .modal-wrapper .brand-slider__track { display: flex; height: 100%; will-change: transform; gap: 20px; padding-right: 40px; }
  .modal-wrapper .brand-slider .swiper-slide { width: 320px; }
  .modal-wrapper .video-holder .play-btn { border-top-width: 40px; border-left-width: 75px; border-bottom-width: 40px; }
  .modal-wrapper .footer { padding: 28px 0; }
  .modal-wrapper .footer__logo { max-width: 424px; }
}
@media (min-width: 1200px) {
  .modal-wrapper .company-wrap { padding-left: 100px; padding-right: 100px; }
  .modal-wrapper .company-wrap__head { grid-template-columns: 35.6% 1fr; }
  .modal-wrapper .about-wrap { padding-left: 97px; padding-right: 97px; }
  .modal-wrapper .about-wrap__heading { grid-template-columns: 38.6% 1fr; gap: 30px; }
  .modal-wrapper .about-list__item { width: calc(33.333% - 10px); }
  .modal-wrapper .about-list__item:first-child, .modal-wrapper .about-list__item:nth-child(2) { width: calc(50% - 8px); }
  .modal-wrapper .timeline-card { grid-template-columns: repeat(2, 1fr); align-items: flex-end; }
  .modal-wrapper .timeline-card__content { max-width: 762px; }
}
@media (min-width: 1366px) {
  .modal-wrapper .hero-section__decor::before, .modal-wrapper .hero-section__decor::after { top: 0; }
  .modal-wrapper .hero-section__decor::before { left: 90px; }
  .modal-wrapper .hero-section__decor::after { right: 90px; }
  .modal-wrapper .hero-section__glass { max-width: 1000px; padding-right: 0; padding-left: 28px; }
  .modal-wrapper .service-tile__visual::before { width: 119px; height: 134px; }
}
@media (min-width: 1620px) {
  .modal-wrapper .hero-section__content { padding-bottom: 0; }
  .modal-wrapper .hero-section__glass { max-width: 1104px; }
  .modal-wrapper .hero-section__glass--left { width: 94px; }
  .modal-wrapper .hero-section__glass--right { width: 138px; }
  .modal-wrapper .company-wrap::before { margin: 0 -30px; }
  .modal-wrapper .about-wrap::before { margin: 0 -44px; }
  .modal-wrapper .content-section__decor-img { left: -60px; }
  .modal-wrapper .content-wrap::after { margin-right: -136px; }
  .modal-wrapper .content-wrap::before { margin-right: -168px; }
}
`;
    document.head.appendChild(style);

    // Add Swiper CSS
    if (!document.querySelector('link[href*="swiper"]')) {
      const swiperCss = document.createElement('link');
      swiperCss.rel = 'stylesheet';
      swiperCss.href = 'https://assets.adwsdist.com/css/swiper-bundle.min.css';
      document.head.appendChild(swiperCss);
    }
  }

  // Modal content HTML
  function getModalContent() {
    return `
<div class="modal-wrapper">
    <main class="main">
      <section class="hero-section">
        <div class="container">
          <div class="hero-section__content" data-inview="">
            <div class="hero-section__logo">
              <img src="${IMG_BASE}andrews-50-years-logo.svg" width="238" height="187" alt="Andrews 50 Years">
            </div>
            <span class="hero-section__subtitle" data-anim="slide-in">Five decades of brand building</span>
            <h1 class="hero-section__title" data-anim="slide-in">50 years</h1>
            <div class="hero-section__text" data-anim="slide-in">
              <p>For half a century, Andrews has championed the brands that bring people together during life's greatest moments. Through dedication, care and a Texas-sized spirit of excellence, we're proud to deliver 43 million cases of beer and spirits to the communities we call home.</p>
            </div>
          </div>
          <div class="hero-section__decor">
            <picture class="hero-section__decor--img">
              <source srcset="${IMG_BASE}hero-decor-mobile.svg" media="(max-width: 480px)">
              <img src="${IMG_BASE}hero-decor.svg" width="1592" height="911" alt="">
            </picture>
            <div class="hero-section__glass">
              <img src="${IMG_BASE}glass-03.svg" width="94" height="290" alt="" class="hero-section__glass--left">
              <img src="${IMG_BASE}glass-04.svg" width="138" height="331" alt="" class="hero-section__glass--right">
            </div>
          </div>
        </div>
      </section>
      <section>
        <div class="video-holder">
          <video src="${VID_BASE}Andrews-Distributing-50th.mp4" poster="${IMG_BASE}andrews-50th-cover.jpg" loop playsinline></video>
          <button class="play-btn">Play</button>
        </div>
      </section>
      <section class="company-section">
        <div class="container container--full">
          <div class="company-wrap">
            <div class="company-wrap__head" data-inview="">
              <h2 data-anim="slide-in"><strong>family owned &amp; operated</strong> Three Generations. One Enduring Legacy.</h2>
              <div data-anim="slide-in">
                <p>As a family owned and operated company, our legacy is built on service for our people, brands and communities we love. Our third generation is committed to carrying the core values that have guided Andrews since its founding in 1976 forward as we continue to grow and evolve.</p>
              </div>
            </div>
            <div class="company-wrap__visual">
              <div class="company-wrap__visual--img">
                <picture>
                  <source srcset="${IMG_BASE}img-mobile-02.jpg" media="(max-width: 480px)">
                  <img src="${IMG_BASE}img-02.jpg" width="1319" height="801" alt="" srcset="${IMG_BASE}img-02@2x.jpg 2x">
                </picture>
              </div>
            </div>
          </div>
        </div>
      </section>
      <section class="service-section">
        <div class="container container--full">
          <div class="service-tile">
            <div class="service-tile__visual">
              <picture>
                <img src="${IMG_BASE}texas-map-v2.svg" width="691" alt="">
              </picture>
            </div>
            <div class="service-tile__content" data-inview="">
              <h2 class="service-section__title" data-anim="slide-in"><strong>Texas made</strong> <span class="text-primary">Six Hometowns. One Shared Vision.</span></h2>
              <p data-anim="slide-in">With Hometown locations spanning the state of Texas, our nearly 2,000 team members are deeply rooted in the communities they serve. We pride ourselves in being the trusted advisors for the 15,000 customers, 69 partners and millions of beer and spirits lovers across our 29 counties.</p>
              <a href="https://www.andrewsdistributing.com/s/servingourcustomers" class="btn btn--primary" data-anim="slide-in" target="_blank">Serving our customers</a>
            </div>
          </div>
        </div>
      </section>
      <section class="timeline-section">
        <div class="container container--full">
          <div class="section-heading" data-inview="">
            <h2 data-anim="slide-in"><strong>The andrews way</strong> 50 years in the making</h2>
            <p data-anim="slide-in">Behind every milestone is a team united behind a passion for excellence. We're grateful for our team members, customers and partners who've helped fuel our success on our journey to setting the standard for the beer and spirits industries.</p>
          </div>
          <div class="timeline-slider swiper">
            <div class="swiper-wrapper">
              <div class="swiper-slide" data-year="1976"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-04.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-04.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-04@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>1976</strong> Andrews Story Begins</h3><p>On February 6, 1976, Andrews opened its door for the first time in Corpus Christi, Texas. Barry Andrews, then 29 years old, became the youngest person ever awarded a Miller distributorship.</p></div></div></div>
              <div class="swiper-slide" data-year="1994"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-06.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-06.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-06@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>1994</strong> Dallas Headquarters</h3><p>After acquiring Miller of Dallas, the Andrews family and company headquarters moved to Dallas, Texas.</p></div></div></div>
              <div class="swiper-slide" data-year="1997"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-07.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-07.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-07@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>1997</strong> Growing Portfolio</h3><p>As a pioneer of the "multi-branded beer distributor" model, Barry continued to build a strong portfolio, acquiring Modelo, Corona, Guinness and Shiner brands in Dallas in 1997.</p></div></div></div>
              <div class="swiper-slide" data-year="2007"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-02.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-02.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-02@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2007</strong> Industry Recognition</h3><p>BeverageWorld named Andrews the Wholesaler of the Year for the first time in 2007 and for the second time in 2020. Andrews also revealed a new logo and the tagline their team would rally around - Brand Building is What We Do.</p></div></div></div>
              <div class="swiper-slide" data-year="2008"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-11.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-11.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-11@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2008</strong> North Texas Expansions</h3><p>In 2008, Andrews acquired Miller of Fort Worth, followed by their third warehouse opening in Allen, Texas in 2011. These expansions cement Andrews throughout DFW, one of the fastest growing beer markets in the world.</p></div></div></div>
              <div class="swiper-slide" data-year="2010"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-03.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-03.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-03@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2010</strong> A New Chapter</h3><p>Mike is named President and successor leader of Andrews by father-in-law Barry Andrews. Mike became CEO in 2018.</p></div></div></div>
              <div class="swiper-slide" data-year="2020"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-10.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-10.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-10@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2020</strong> Still Family Owned</h3><p>Mike and Natalie McGuire are named Co-Managing Partners of the family company, carrying forward the Andrews vision and culture as second-generation leaders.</p></div></div></div>
              <div class="swiper-slide" data-year="2021"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-12.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-12.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-12@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2021</strong> Yuengling Lands in Texas</h3><p>Andrews partners with Yuengling, America's Oldest Brewery, to launch one of the most beloved beer brands in Texas. The launch is regarded as one of Yuengling's biggest and most successful expansions.</p></div></div></div>
              <div class="swiper-slide" data-year="2022"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-08.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-08.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-08@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2022</strong> Continued Strategic Growth</h3><p>In 2022, Andrews expands into another multi-county North Texas market through an acquisition in Ennis, Texas, adding over a million cases to their overall operations. In 2025, they add Laredo, Texas as their sixth Hometown, creating a powerful South Texas Division with Andrews' first location in Corpus Christi.</p></div></div></div>
              <div class="swiper-slide" data-year="2023"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-05.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-05.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-05@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2023</strong> New Era with Spirits</h3><p>The Sazerac Company selects Andrews to distribute more than 230 of their iconic spirits brands across Texas, ushering in a new era at Andrews. The team leveraged their decades of brand building expertise to grow their spirits portfolio and capabilities.</p></div></div></div>
              <div class="swiper-slide" data-year="2023"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-01.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-01.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-01@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2023</strong> Next Generation Leaders</h3><p>By 2023, both Maddy and Sophie McGuire have officially entered the business, serving as third-generation leaders for the family owned and operated company alongside their parents. Their innovative initiatives have helped connect Andrews brands with more Gen-Z and millennial consumers.</p></div></div></div>
              <div class="swiper-slide" data-year="2024"><div class="timeline-card"><div class="timeline-card__visual"><picture><source srcset="${IMG_BASE}timeline-img-mobile-09.jpg" media="(max-width: 480px)"><img src="${IMG_BASE}timeline-img-09.jpg" width="822" height="436" alt="" srcset="${IMG_BASE}timeline-img-09@2x.jpg 2x"></picture></div><div class="timeline-card__content"><h3 class="timeline-card__title"><strong>2024</strong> Renovated Dallas Campus</h3><p>In 2024, the Dallas headquarters was renovated to support our growing team and provide a collaborative and engaging workspace that fits our Design District neighborhood. The new Dallas campus, now covering 15 acres, features a brand-new Hospitality Suite, Customer Lab, tasting bar and Park, fostering a sense of community and creativity for our team.</p></div></div></div>
            </div>
            <div class="swiper-button-prev"></div>
            <div class="swiper-button-next"></div>
            <div class="swiper-pagination"></div>
          </div>
        </div>
      </section>
      <section class="brand-section" data-inview="">
        <div class="container container--full">
          <div class="section-heading">
            <h2 data-anim="slide-in"><strong>Beer &amp; spirits</strong> <span class="text-primary">Brand Building is What We Do.</span></h2>
            <p data-anim="slide-in">From legacy beer brands to iconic spirits, we've spent five decades building a portfolio of over 1,350 brands that fit every occasion and reflect our commitment to quality and innovation. We honor the brands that shaped our past and celebrate the ones that will take us even further.</p>
          </div>
          <div class="brand-slider swiper">
            <div class="swiper-wrapper">
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}shiner.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}shiner@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}fireball.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}fireball@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}buffalo-trace.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}buffalo-trace@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}coors-light.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}coors-light@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}corona.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}corona@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}dos-xx.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}dos-xx@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}heineken.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}heineken@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}miller.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}miller@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}modelo.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}modelo@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}sun-cruiser.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}sun-cruiser@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}twisted-tea.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}twisted-tea@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}manhattan-project.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}manhattan-project@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}surfside.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}surfside@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}voodoo-ranger.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}voodoo-ranger@2x.jpg 2x"></div></div></div>
              <div class="swiper-slide"><div class="brand-card"><div class="brand-card__visual"><img src="${IMG_BASE}yuengling.jpg" width="640" height="640" alt="" srcset="${IMG_BASE}yuengling@2x.jpg 2x"></div></div></div>
            </div>
            <div class="swiper-pagination"></div>
          </div>
          <div class="btn-holder" data-anim="slide-in">
            <a href="https://www.andrewsdistributing.com/s/portfolio" class="btn btn--primary" target="_blank">View entire portfolio</a>
          </div>
        </div>
      </section>
      <section class="about-section">
        <div class="container container--full">
          <div class="about-wrap" data-inview="">
            <div class="about-wrap__heading">
              <h2 data-anim="slide-in"><strong>culture</strong> A Team of Teams. <br> Guided by Core Values.</h2>
              <p data-anim="slide-in">Our people are at the heart of what sets us apart as a sustainably great company. For 50 years, the values we've shared together have guided our actions and built a culture centered around care for each other and trust earned from our customers and partners.</p>
            </div>
            <ul class="about-list">
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-04.jpg" width="653" alt="" srcset="${IMG_BASE}img-04@2x.jpg 2x"></div><h3 class="about-card__title">Care</h3><p>We go the extra mile for one another, personally and professionally, and build thriving relationships.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-05.jpg" width="653" alt="" srcset="${IMG_BASE}img-05@2x.jpg 2x"></div><h3 class="about-card__title">Trust</h3><p>We can be trusted to get the details right for our customers, their beer and spirits lovers, our brewing and distilling partners and all of our stakeholders.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-06.jpg" width="430" alt="" srcset="${IMG_BASE}img-06@2x.jpg 2x"></div><h3 class="about-card__title">Integrity</h3><p>We walk our talk by aligning our actions with our core values.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-07.jpg" width="430" alt="" srcset="${IMG_BASE}img-07@2x.jpg 2x"></div><h3 class="about-card__title">Collaboration</h3><p>We work together to design solutions, coordinate activities and achieve results.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-08.jpg" width="430" alt="" srcset="${IMG_BASE}img-08@2x.jpg 2x"></div><h3 class="about-card__title">Optimism</h3><p>We believe great things are ahead for us.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-09.jpg" width="430" alt="" srcset="${IMG_BASE}img-09@2x.jpg 2x"></div><h3 class="about-card__title">Agility</h3><p>We anticipate threats and opportunities, shifting and changing to win.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-10.jpg" width="430" alt="" srcset="${IMG_BASE}img-10@2x.jpg 2x"></div><h3 class="about-card__title">Innovation</h3><p>We grow by improving, extending and transforming our products, services, processes and business models.</p></div></li>
              <li class="about-list__item" data-anim="slide-in"><div class="about-card"><div class="about-card__visual"><img src="${IMG_BASE}img-11.jpg" width="430" alt="" srcset="${IMG_BASE}img-11@2x.jpg 2x"></div><h3 class="about-card__title">Excellence</h3><p>We pursue being our best individually and collectively to better serve one another.</p></div></li>
            </ul>
            <div class="btn-holder">
              <a href="https://www.andrewsdistributing.com/s/about" class="btn btn--white" data-anim="slide-in" target="_blank">About Andrews</a>
            </div>
          </div>
        </div>
      </section>
      <section class="content-section">
        <div class="container">
          <div class="content-wrap">
            <div class="content-wrap__visual">
              <picture>
                <source srcset="${IMG_BASE}img-mobile-03.jpg" media="(max-width: 480px)">
                <img src="${IMG_BASE}img-03.jpg" width="1319" height="577" alt="" srcset="${IMG_BASE}img-03@2x.jpg 2x">
              </picture>
            </div>
            <div class="content-wrap__inner" data-inview="">
              <h2 class="content-section__heading" data-anim="slide-in">
                <strong>Bright future ahead</strong>
                <span class="text-primary">Cheers to the <br> next fifty!</span>
              </h2>
              <div class="content-section__text">
                <p data-anim="slide-in">What began with two brands and 11 team members has grown into the number one beer and spirits distributor in Texas. Now, we enter our next chapter as a dynamic technology, marketing and logistics company, ready to deliver more value, more capabilities and more precision for our customers and partners than ever before. <br> With a bright future ahead, we're ready to lead the next generation forward!</p>
                <button id="adws-go-to-main-site" class="btn btn--primary" data-anim="slide-in">Go to main site</button>
              </div>
            </div>
          </div>
          <span class="content-section__decor-img">
            <img src="${IMG_BASE}figure-01.svg" width="403" alt="">
          </span>
        </div>
      </section>
    </main>
    <footer class="footer">
      <div class="footer__container container">
        <div class="footer__logo">
          <img src="${IMG_BASE}even-better.svg" width="424" alt="">
        </div>
      </div>
    </footer>
  </div>
`;
  }

  // Create modal shell
  function createModalShell() {
    const overlay = document.createElement('div');
    overlay.id = 'adws-modal-overlay';
    overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,0.7);backdrop-filter:blur(8px);z-index:99999;display:flex;align-items:center;justify-content:center;padding:20px;box-sizing:border-box;opacity:0;transition:opacity 0.3s ease;';

    const modal = document.createElement('div');
    modal.id = 'adws-modal-window';
    modal.style.cssText = 'background:#003d78;border-radius:12px;box-shadow:0 25px 50px -12px rgba(0,0,0,0.25);width:100%;max-width:95vw;max-height:95dvh;overflow-y:auto;transform:scale(0.95);transition:transform 0.3s ease;position:relative;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;';

    const closeBtn = document.createElement('button');
    closeBtn.id = 'adws-modal-close-btn';
    closeBtn.innerHTML = '&times;';
    closeBtn.setAttribute('aria-label', 'Close modal');
    closeBtn.style.cssText = 'position:sticky;top:12px;float:right;margin-right:12px;background:transparent;border:none;font-size:32px;width:40px;height:40px;cursor:pointer;z-index:101;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:300;line-height:1;transition:opacity 0.2s ease;font-family:Arial,sans-serif;opacity:0.85;';

    const contentContainer = document.createElement('div');
    contentContainer.id = 'adws-modal-content';
    contentContainer.className = 'adws-modal-body';
    
    modal.appendChild(closeBtn);
    modal.appendChild(contentContainer);
    overlay.appendChild(modal);

    return { overlay, modal, closeBtn, contentContainer };
  }

  // Load script helper
  function loadScript(src) {
    return new Promise((resolve, reject) => {
      const script = document.createElement('script');
      script.src = src;
      script.onload = resolve;
      script.onerror = reject;
      document.head.appendChild(script);
    });
  }

  // Video init
  function initVideo(root) {
    const holder = root.querySelector('.video-holder');
    if (!holder) return;

    const video = holder.querySelector('video');
    const btn = holder.querySelector('.play-btn');
    const fade = 300;

    const toggleBtn = (show) => {
      btn.style.opacity = show ? '1' : '0';
      setTimeout(() => { btn.style.display = show ? 'flex' : 'none'; }, show ? 0 : fade);
    };

    const play = () => {
      if (!video.paused) return;
      video.controls = true;
      video.play();
      toggleBtn(false);
    };

    const pause = () => {
      video.controls = false;
      toggleBtn(true);
    };

    video.addEventListener('click', play);
    btn.addEventListener('click', play);
    video.addEventListener('pause', pause);
  }

  // Slider initialization
  function initTimelineSlider() {
    const sliders = document.querySelectorAll('.timeline-slider');
    sliders.forEach(function(slider) {
      const slides = slider.querySelectorAll('.swiper-slide');
      if (slider.swiper) slider.swiper.destroy(true, true);
      
      new Swiper(slider, {
        slidesPerView: 1,
        spaceBetween: 20,
        pagination: {
          el: '.swiper-pagination',
          clickable: true,
          renderBullet: function(index, className) {
            const year = slides[index]?.dataset.year || '';
            return '<span class="' + className + '">' + year + '</span>';
          }
        },
        navigation: {
          nextEl: '.swiper-button-next',
          prevEl: '.swiper-button-prev'
        },
        on: {
          slideChange: function() {
            const pagination = this.pagination.el;
            const active = pagination.querySelector('.swiper-pagination-bullet-active');
            if (!active) return;
            const paginationRect = pagination.getBoundingClientRect();
            const activeRect = active.getBoundingClientRect();
            const offset = activeRect.left - paginationRect.left - paginationRect.width / 2 + activeRect.width / 2;
            pagination.scrollTo({ left: pagination.scrollLeft + offset, behavior: 'smooth' });
          }
        }
      });
    });
  }

  function initBrandSlider() {
    const sliders = document.querySelectorAll('.brand-slider');
    sliders.forEach(function(slider) {
      if (slider.swiper) slider.swiper.destroy(true, true);
      
      new Swiper(slider, {
        slidesPerView: 'auto',
        spaceBetween: 20,
        loop: true,
        allowTouchMove: false,
        speed: 8000,
        autoplay: {
          delay: 0,
          disableOnInteraction: false,
        },
        pagination: {
          el: '.swiper-pagination',
          type: 'progressbar',
        },
      });
    });
  }

  // Modal animations
  function initModalAnimations() {
    const modalContent = document.getElementById('adws-modal-window');
    if (!modalContent) return;

    const blocks = modalContent.querySelectorAll('[data-inview]');

    const animateBlock = (block) => {
      if (block.classList.contains('is-inview')) return;
      block.classList.add('is-inview');

      const items = block.querySelectorAll('[data-anim]');
      const totalItems = items.length;
      
      items.forEach((item, i) => {
        let delay = totalItems > 6 ? Math.min(i * 40, 300) : i * 80;
        item.style.setProperty('--delay', delay + 'ms');
        item.classList.add('is-inview');
      });
    };

    const observer = new IntersectionObserver(
      (entries, obs) => {
        entries.forEach(entry => {
          if (entry.isIntersecting) {
            requestAnimationFrame(() => { animateBlock(entry.target); });
            obs.unobserve(entry.target);
          }
        });
      },
      { root: modalContent, rootMargin: '100px 0px 0px 0px', threshold: 0 }
    );

    blocks.forEach(block => {
      const blockRect = block.getBoundingClientRect();
      const modalRect = modalContent.getBoundingClientRect();
      const isVisible = blockRect.top < modalRect.bottom + 100 && blockRect.bottom > modalRect.top;

      if (isVisible) {
        animateBlock(block);
      } else {
        block.classList.remove('is-inview');
        block.querySelectorAll('[data-anim]').forEach(item => {
          item.classList.remove('is-inview');
          item.style.removeProperty('--delay');
        });
        observer.observe(block);
      }
    });
  }

  // Initialize sliders
  function initializeSliders() {
    if (typeof Swiper === 'undefined') {
      setTimeout(initializeSliders, 100);
      return;
    }
    
    initTimelineSlider();
    initBrandSlider();
    setTimeout(initModalAnimations, 50);
  }

  // Open modal
  async function openModal() {
    if (document.getElementById('adws-modal-overlay')) return;

    injectStyles();
    
    const { overlay, modal, closeBtn, contentContainer } = createModalShell();
    contentContainer.innerHTML = getModalContent();
    
    document.body.appendChild(overlay);
    document.body.style.overflow = 'hidden';

    requestAnimationFrame(() => {
      overlay.style.opacity = '1';
      modal.style.transform = 'scale(1)';
    });

    // Load Swiper and initialize
    try {
      if (typeof Swiper === 'undefined') {
        await loadScript('https://assets.adwsdist.com/js/swiper-bundle.min.js');
      }
      setTimeout(() => {
        initializeSliders();
        initVideo(modal);
      }, 100);
    } catch (e) {
      console.error('[ADWS Modal] Script loading error:', e);
    }

    // Close handlers
    overlay.addEventListener('click', function(e) {
      if (e.target === overlay) closeModal();
    });

    closeBtn.addEventListener('click', closeModal);
    closeBtn.addEventListener('mouseenter', function() {
      this.style.opacity = '1';
    });
    closeBtn.addEventListener('mouseleave', function() {
      this.style.opacity = '0.85';
      this.style.transform = 'scale(1)';
    });

    const escHandler = function(e) {
      if (e.key === 'Escape') {
        closeModal();
        document.removeEventListener('keydown', escHandler);
      }
    };
    document.addEventListener('keydown', escHandler);

    // Go to main site button - closes modal and sets cookie
    const goToMainSiteBtn = document.getElementById('adws-go-to-main-site');
    if (goToMainSiteBtn) {
      goToMainSiteBtn.addEventListener('click', function() {
        closeModal();
      });
    }
  }

  // Close modal
  function closeModal() {
    const overlay = document.getElementById('adws-modal-overlay');
    const modal = document.getElementById('adws-modal-window');
    
    if (!overlay) return;

    setSeenCookie();
    
    overlay.style.opacity = '0';
    if (modal) modal.style.transform = 'scale(0.95)';
    document.body.style.overflow = '';
    
    setTimeout(() => { overlay.remove(); }, 300);
  }

  // Public API
  window.ADWSModal = {
    show: openModal,
    open: openModal,
    close: closeModal,
    hide: closeModal,
    clearCookie: clearCookie,
    hasSeenModal: hasSeenModal
  };

  // Initialize
  function init() {
    createResetButton();
    if (config.autoShow && !hasSeenModal()) {
      openModal();
    }
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', init);
  } else {
    init();
  }
})();
