/* ==========================================================================
   Global Styles & Variables
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

:root { --amac-accent: #2563eb; --amac-accent-hover: #1d4ed8; }
html { scroll-behavior: smooth; }
body { 
    background-color: #f9fafb; 
    transition: overflow 0.3s;
    font-family: 'Poppins', sans-serif;
}
body.modal-open, body.scroll-locked { 
    overflow: hidden; 
}
.logo-img { image-rendering: -webkit-optimize-contrast; }

/* ==========================================================================
   Component Styles
   ========================================================================== */
.btn-primary {
  background: var(--amac-accent); color: #fff; border-radius: 0.5rem;
  font-weight: 600; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  background: var(--amac-accent-hover);
}
.card {
  position: relative; border: 1px solid #e5e7eb; border-radius: 0.75rem;
  background: #ffffff; transition: transform .2s ease, box-shadow .2s ease, opacity .3s ease, border-color .2s ease;
  overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  cursor: pointer;
}
.card:hover { 
  transform: translateY(-5px); 
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  border-color: var(--amac-accent);
}
.card h4 { font-weight: 600; color: #111827; }
.card p { color: #4b5563; }
.card .card-media { width: 100%; height: 160px; object-fit: cover; display: block; }

/* NEW GLASS CARD STYLE FOR EXCOM */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px); /* For Safari */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    transition: transform 0.2s ease, background 0.2s ease;
}
.glass-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

/* NEW CONTAINER FOR SCROLL HIJACKING */
.scroll-hijack-container {
    overflow-y: auto;
    /* Hide scrollbar for Chrome, Safari and Opera */
    &::-webkit-scrollbar {
        display: none;
    }
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ==========================================================================
   Seamless Transition Modal
   ========================================================================== */
.modal-container {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1000; 
    visibility: hidden; pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}
.modal-container.is-open { 
    visibility: visible; 
    pointer-events: auto;
    opacity: 1;
}
.modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(4px);
}
.modal-content {
    position: absolute; 
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(90vw, 64rem);
    height: 90vh;
    background: #f9fafb;
    border-radius: 0.75rem;
    overflow: hidden;
}
.modal-scroll-container { width: 100%; height: 100%; overflow-y: auto; position: relative; }
.modal-title, .modal-body { opacity: 0; transition: opacity 0.3s ease 0.3s; }
.modal-container.is-open .modal-title, .modal-container.is-open .modal-body { opacity: 1; }
.modal-title { font-size: 2.25rem; font-weight: 800; color: #111827; padding: 2.5rem 2.5rem 1rem 2.5rem; }
.modal-body { padding: 0 2.5rem 2.5rem 2.5rem; display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1024px) { .modal-body { grid-template-columns: 40% 1fr; } }
.modal-section { margin-bottom: 2rem; }
.modal-section h2 { font-size: 1.25rem; font-weight: 700; color: var(--amac-accent); margin: 0 0 1rem 0; padding-bottom: 0.5rem; border-bottom: 1px solid #e5e7eb; }
.modal-section p { color: #4b5563; line-height: 1.6; }
.modal-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 0.75rem; }
.gallery-item-wrapper { position: relative; cursor: pointer; overflow: hidden; border-radius: 0.5rem; aspect-ratio: 1 / 1; }
.gallery-image { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item-wrapper:hover .gallery-image { transform: scale(1.05); }
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}
.gallery-item-wrapper:hover .video-play-icon {
    opacity: 1;
}
.modal-leadership-grid { display: grid; gap: 1.5rem; }
.modal-leader-card { display: flex; align-items: center; gap: 1rem; }
.modal-leader-card img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.modal-leader-info .name { font-weight: 600; color: #1f2937; }
.modal-leader-info .position { color: #6b7280; font-size: 0.875rem; }
.modal-leader-info .contact { display: flex; flex-direction: column; margin-top: 0.25rem; }
.contact-link { font-size: 0.875rem; color: var(--amac-accent); text-decoration: none; transition: color .2s; }
.contact-link:hover { text-decoration: underline; }

/* ==========================================================================
   Universal Close Button & Lightbox
   ========================================================================== */
.universal-close-btn {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    color: #e5e7eb;
    background: rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    border-radius: 50%;
    z-index: 2010; /* High z-index to be on top of all content */
    transition: color 0.2s ease, background-color 0.2s ease;
}
.universal-close-btn:hover {
    color: #fff;
    background: rgba(0,0,0,0.5);
}

.lightbox-container { position: fixed; inset: 0; z-index: 2000; display: flex; justify-content: center; align-items: center; padding: 2rem; }
.lightbox-container.hidden { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(17, 24, 39, 0.9); backdrop-filter: blur(8px); }
.lightbox-content-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; height: 100%; max-width: 80vw; max-height: 80vh; }
.lightbox-image { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 0.5rem; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); }
.lightbox-caption { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: white; background: rgba(0, 0, 0, 0.6); padding: 0.5rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; text-align: center; max-width: calc(100% - 2rem); width: auto; }
.lightbox-caption:empty { display: none; }
.video-embed-wrapper { position: relative; width: 100%; max-width: 1280px; padding-top: 56.25%; /* 16:9 Aspect Ratio */ height: 0; }
.video-embed-wrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* ==========================================================================
   Navbar & Animations
   ========================================================================== */
#navbar { position: absolute; top: 0; left: 0; width: 100%; z-index: 50; background: transparent; transition: background .3s ease, box-shadow .3s ease; }
#navbar.scrolled { position: fixed; background: rgba(17, 24, 39, 0.7); box-shadow: 0 4px 14px rgba(0,0,0,.15); backdrop-filter: saturate(180%) blur(16px); }

/* FASTER, SUBTLE ANIMATIONS */
.reveal, .reveal-up, .reveal-left, .reveal-right, .reveal-zoom { 
    opacity: 0; 
    transition: opacity 0.5s ease-out, transform 0.5s ease-out; 
    will-change: transform, opacity;
}
.reveal-up { transform: translateY(20px); }
.reveal-left { transform: translateX(-20px); }
.reveal-right { transform: translateX(20px); }
.reveal-zoom { transform: scale(0.95); }
.visible { opacity: 1; transform: none; }

/* ==========================================================================
   About Section Slideshow & Polaroid Effect
   ========================================================================== */
.polaroid-frame {
    background: #fff;
    padding: 1rem 1rem 4.5rem 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 3px 6px rgba(0, 0, 0, 0.1);
    transform: rotate(-2deg);
    position: relative;
    margin-top: 2.5rem;
    transition: transform 0.3s ease;
}
.polaroid-frame:hover { transform: rotate(0deg) scale(1.02); }
#about-slideshow .about-slide { position: absolute; inset: 0; transition: opacity 1s ease-in-out; opacity: 0; z-index: 1; }
#about-slideshow .about-slide.active { opacity: 1; z-index: 10; }
.polaroid-caption { position: absolute; bottom: 2.25rem; left: 1rem; right: 1rem; text-align: center; font-size: 0.875rem; font-weight: 600; color: #4b5563; z-index: 15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slideshow-indicators { display: flex; gap: 0.75rem; position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); z-index: 15; }
.indicator-dot { width: 8px; height: 8px; background-color: #d1d5db; border-radius: 50%; transform: scale(1); transition: transform 0.3s ease, background-color 0.3s ease; }
.indicator-dot.active { background-color: var(--amac-accent); transform: scale(1.5); }