/* ==========================================
   APMI Custom Styles - Light Mode
   ========================================== */

/* ---- CSS Variables ---- */
:root {
    --apmi-primary: #1a5276;
    --apmi-secondary: #2e86c1;
    --apmi-accent: #b3de4f;
    --apmi-accent-hover: #9ec745;
    --apmi-dark: #1c2a3a;
    --apmi-light: #f8f9fa;
    --apmi-text: #333333;
    --apmi-text-light: #666666;
    --apmi-border: #e5e7eb;
    --apmi-white: #ffffff;
    --apmi-bg: #ffffff;
    --apmi-bg-alt: #f3f4f6;
}


/* ==========================================
   REGISTRATION FORM
   ========================================== */
.register-form .form-control,
.register-form .form-select {
    border: 1px solid var(--apmi-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.register-form .form-control:focus,
.register-form .form-select:focus {
    border-color: var(--apmi-secondary);
    box-shadow: 0 0 0 3px rgba(46,134,193,0.1);
}

.register-form .form-label {
    font-weight: 600;
    color: var(--apmi-dark);
    margin-bottom: 6px;
}

.register-form .mb-3,
.register-form .col-md-6 .mb-3,
.register-form .col-lg-6 .mb-3 {
    margin-bottom: 1.2rem !important;
}

.membership-form-card {
    padding: clamp(1.25rem, 3vw, 2.25rem);
    border: 1px solid rgba(5, 8, 18, 0.1);
    border-radius: 16px;
    background: var(--festa-white);
    box-shadow: 0 18px 55px rgba(5, 8, 18, 0.09);
}

.register-form .form-control,
.register-form .form-select {
    min-height: 50px;
}

.register-form textarea.form-control {
    min-height: 120px;
}

.member-form-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.member-form-btn {
    display: inline-flex;
    min-height: 48px;
    padding: 0.8rem 1.1rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: var(--festa-body);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.member-form-btn[hidden] {
    display: none !important;
}

.member-form-btn:hover:not(:disabled) {
    transform: translateY(-2px);
}

.member-form-btn:focus-visible {
    outline: 3px solid rgba(95, 147, 255, 0.35);
    outline-offset: 3px;
}

.member-form-btn:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    transform: none;
}

.member-form-btn--add {
    flex: 0 0 auto;
    border-color: var(--festa-blue-deep);
    background: var(--festa-blue-deep);
    color: var(--festa-white);
    box-shadow: 0 8px 18px rgba(55, 110, 232, 0.2);
}

.member-form-btn--add:hover:not(:disabled) {
    border-color: var(--festa-ink);
    background: var(--festa-ink);
    color: var(--festa-white);
}

.member-event-entry {
    padding: clamp(1rem, 2.5vw, 1.35rem);
    border: 1px solid rgba(5, 8, 18, 0.1);
    border-radius: 12px;
    background: #f8f7f3;
}

.member-event-name-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.member-event-name-row .form-control {
    flex: 1 1 auto;
}

.member-form-btn--remove {
    min-width: 108px;
    flex: 0 0 auto;
    border-color: rgba(220, 53, 69, 0.42);
    background: var(--festa-white);
    color: #c92a3d;
}

.member-form-btn--remove:hover:not(:disabled) {
    border-color: #c92a3d;
    background: #c92a3d;
    color: var(--festa-white);
}

.captcha-question-row {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
}

.member-form-btn--refresh {
    width: 50px;
    min-width: 50px;
    padding: 0;
    flex: 0 0 50px;
    border-color: rgba(5, 8, 18, 0.25);
    background: var(--festa-white);
    color: var(--festa-ink);
    font-size: 1rem;
}

.member-form-btn--refresh:hover:not(:disabled) {
    border-color: var(--festa-blue-deep);
    background: var(--festa-blue-deep);
    color: var(--festa-white);
}

.member-form-submit {
    display: flex;
    justify-content: center;
    padding-top: 0.5rem;
}

.member-form-btn--submit {
    width: min(100%, 340px);
    min-height: 58px;
    padding-inline: 2rem;
    border-color: var(--festa-ink);
    background: var(--festa-ink);
    color: var(--festa-white);
    box-shadow: 0 14px 30px rgba(5, 8, 18, 0.2);
    font-size: 0.82rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.member-form-btn--submit:hover:not(:disabled) {
    border-color: var(--festa-coral);
    background: var(--festa-coral);
    color: var(--festa-ink);
    box-shadow: 0 18px 36px rgba(255, 101, 89, 0.22);
}

@media (max-width: 575px) {
    .membership-form-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .member-form-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .member-form-btn--add,
    .member-form-btn--submit {
        width: 100%;
    }

    .member-event-name-row {
        flex-direction: column;
    }

    .member-form-btn--remove {
        width: 100%;
    }
}

/* Contact form spacing */
#contact-form .mb-3 {
    margin-bottom: 1.2rem !important;
}

#contact-form .form-control {
    border: 1px solid var(--apmi-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

#contact-form .form-control:focus {
    border-color: var(--apmi-secondary);
    box-shadow: 0 0 0 3px rgba(46,134,193,0.1);
}

/* CAPTCHA */
.captcha-box {
    background: var(--apmi-light);
    border: 2px dashed var(--apmi-border);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.captcha-box .captcha-question {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--apmi-primary);
    margin-bottom: 10px;
}

.captcha-box .btn-refresh {
    background: none;
    border: none;
    color: var(--apmi-secondary);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
    transition: transform 0.3s ease;
}

.captcha-box .btn-refresh:hover {
    transform: rotate(180deg);
}

/* Requirements Card */
.requirements-card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border-left: 4px solid var(--apmi-accent);
}

.requirements-card h4 {
    color: var(--apmi-primary);
    margin-bottom: 20px;
}

.requirements-card ul {
    list-style: none;
    padding: 0;
}

.requirements-card ul li {
    padding: 10px 0;
    border-bottom: 1px solid var(--apmi-border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--apmi-text);
}

.requirements-card ul li:last-child {
    border-bottom: none;
}

.requirements-card ul li i {
    color: var(--apmi-accent);
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==========================================
   ORG CHART
   ========================================== */
/* Structure page styles are inline in pages/structure.php */

/* ==========================================
   CONTACT INFO
   ========================================== */
.contact-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.contact-info-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--apmi-primary) 0%, var(--apmi-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: #fff;
    font-size: 1.4rem;
}

/* ==========================================
   DIVISION & PROGRAM CARDS
   ========================================== */
.division-card {
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.division-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
}

.division-card .division-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--apmi-primary) 0%, var(--apmi-secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #fff;
    font-size: 1.3rem;
}

.program-card {
    background: var(--apmi-light);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: all 0.3s ease;
}

.program-card:hover {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.program-card i {
    color: var(--apmi-accent);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ==========================================
   DYNAMIC EVENT FIELDS
   ========================================== */
.event-field-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.event-field-wrapper .form-control {
    flex: 1;
}

.event-field-wrapper .btn-remove-event {
    background: #e74c3c;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.event-field-wrapper .btn-remove-event:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.btn-add-event {
    background: var(--apmi-secondary);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-event:hover {
    background: var(--apmi-primary);
}

/* ==========================================
   SPINNER & TOAST
   ========================================== */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    padding: 15px 25px;
    border-radius: 8px;
    color: #fff;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateX(120%);
    transition: transform 0.3s ease;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success { background: #27ae60; }
.toast-notification.error { background: #e74c3c; }
.toast-notification.warning { background: #f39c12; }

/* ==========================================
   MOBILE MENU - Light Mode Override
   ========================================== */
.mobile-menu {
    background: #fff !important;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.1);
}

.mobile-menu .close-button {
    color: var(--apmi-dark) !important;
    background: var(--apmi-light) !important;
}

.mobile-menu .nav-menu__link {
    color: var(--apmi-text) !important;
}

.mobile-menu .nav-menu__link:hover,
.mobile-menu .nav-menu__item.activePage .nav-menu__link {
    color: var(--apmi-accent) !important;
}

/* Offcanvas sidebar - keep dark for contrast */
.twoffcanvas {
    background: var(--apmi-dark) !important;
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 991px) {
    .apmi-nav {
        height: 64px;
    }

    .apmi-nav__logo-img {
        height: 36px;
    }

    .apmi-cta {
        padding: 60px 0;
    }

    .apmi-cta__stats {
        gap: 20px;
    }

    .apmi-cta__stat-num {
        font-size: 1.4rem;
    }

    /* Mobile buttons */
    .apmi-btn {
        font-size: 0.82rem;
        padding: 10px 20px;
        text-align: center;
        justify-content: center;
        width: 100%;
    }

    .apmi-cta__buttons {
        flex-direction: column;
        align-items: center;
    }

    .breadcrumb-area h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .breadcrumb-area {
        padding: 120px 0 60px;
    }

    .breadcrumb-area h1 {
        font-size: 1.5rem;
    }

    .apmi-footer__top-inner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        margin: 24px 0;
        border-radius: 16px;
    }

    .apmi-footer__top-logo {
        width: 140px;
    }

    .apmi-footer__top-desc {
        max-width: 100%;
    }

    .apmi-footer__col {
        margin-bottom: 28px;
    }

    .apmi-footer__heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .apmi-footer__heading {
        text-align: center;
    }

    .apmi-footer__contact li {
        justify-content: center;
    }

    .apmi-footer__links {
        text-align: center;
    }

    .apmi-footer__socials {
        justify-content: center;
    }

    .apmi-footer__social-desc {
        text-align: center;
    }

    .apmi-cta__stat-divider {
        display: none;
    }
}

/* Upload Zone Styles */
.upload-zone:hover {
    border-color: var(--main-600, #6366f1) !important;
    background-color: rgba(99,102,241,0.04);
}

.upload-zone.dragover {
    border-color: var(--main-600, #6366f1) !important;
    background-color: rgba(99,102,241,0.08);
}

/* ==========================================
   PROGRAM PAGE - Modern Cards
   ========================================== */
.apmi-programs-section {
    padding: 80px 0;
    background: var(--apmi-bg);
}

.apmi-programs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.apmi-program-card {
    background: #fff;
    border: 1px solid var(--apmi-border);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.apmi-program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--apmi-accent) 0%, var(--apmi-secondary) 100%);
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.apmi-program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.apmi-program-card:hover::before {
    opacity: 1;
}

.apmi-program-card__number {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--apmi-accent);
    letter-spacing: 2px;
    margin-bottom: 14px;
    opacity: 0.7;
}

.apmi-program-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--apmi-dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.apmi-program-card__desc {
    font-size: 0.88rem;
    color: var(--apmi-text-light);
    line-height: 1.7;
    margin: 0;
}

.apmi-program-card__line {
    width: 40px;
    height: 2px;
    background: var(--apmi-border);
    margin-top: 20px;
    border-radius: 2px;
    transition: all 0.4s ease;
}

.apmi-program-card:hover .apmi-program-card__line {
    width: 60px;
    background: var(--apmi-accent);
}

/* ==========================================
   CTA SECTION - Modern Design
   ========================================== */
.apmi-cta-modern {
    padding: 60px 0 80px;
    background: var(--apmi-bg);
}

.apmi-cta-modern__inner {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.apmi-cta-modern__inner::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 168, 67, 0.15) 0%, transparent 70%);
}

.apmi-cta-modern__inner::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 134, 193, 0.1) 0%, transparent 70%);
}

.apmi-cta-modern__badge {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(212, 168, 67, 0.15);
    border: 1px solid rgba(212, 168, 67, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    color: var(--apmi-accent);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
}

.apmi-cta-modern__title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.apmi-cta-modern__desc {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.65);
    max-width: 520px;
    margin: 0 auto 32px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.apmi-cta-modern__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--apmi-accent);
    color: var(--apmi-dark);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 14px 36px;
    border-radius: 12px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.apmi-cta-modern__btn:hover {
    background: var(--apmi-accent-hover);
    color: var(--apmi-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(212, 168, 67, 0.35);
}

.apmi-cta-modern__btn i {
    transition: transform 0.3s ease;
}

.apmi-cta-modern__btn:hover i {
    transform: translateX(4px);
}

/* Empty state icon */
.apmi-empty-icon {
    font-size: 48px;
}

/* ==========================================
   MOBILE FIXES - Global
   ========================================== */
@media (max-width: 991px) {
    /* Breadcrumb - override inline padding */
    .breadcrumb-area {
        padding: 120px 0 60px !important;
    }

    /* Reduce large display text */
    .display-4 {
        font-size: 2rem !important;
    }

    /* Reduce Tailwind spacing utilities */
    .tw-py-30 {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .tw-py-20 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }

    .tw-mb-16 {
        margin-bottom: 2rem !important;
    }

    .tw-mb-20 {
        margin-bottom: 2.5rem !important;
    }

    .tw-mb-12 {
        margin-bottom: 2rem !important;
    }

    .tw-mb-10 {
        margin-bottom: 1.5rem !important;
    }

    .tw-p-10 {
        padding: 1.5rem !important;
    }

    .tw-px-16 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    .tw-px-12 {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }

    /* Reduce large font sizes */
    .tw-text-5xl {
        font-size: 2rem !important;
    }

    /* Empty state icons */
    .apmi-empty-icon,
    [style*="font-size: 80px"] {
        font-size: 40px !important;
    }

    /* Program cards */
    .apmi-programs-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .apmi-program-card {
        padding: 24px;
    }

    /* CTA modern */
    .apmi-cta-modern__inner {
        padding: 40px 24px;
        border-radius: 20px;
    }

    /* Map height */
    iframe[style*="min-height: 500px"] {
        min-height: 300px !important;
    }
}

@media (max-width: 768px) {
    /* Breadcrumb */
    .breadcrumb-area {
        padding: 120px 0 60px !important;
    }

    .display-4 {
        font-size: 1.6rem !important;
    }

    .display-5 {
        font-size: 1.4rem !important;
    }

    /* Sections */
    .tw-py-30 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .tw-py-20 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .tw-mb-16 {
        margin-bottom: 1.5rem !important;
    }

    .tw-mb-20 {
        margin-bottom: 2rem !important;
    }

    /* Cards */
    .tw-p-10 {
        padding: 1.25rem !important;
    }

    .tw-p-8 {
        padding: 1.25rem !important;
    }

    /* Program cards mobile */
    .apmi-program-card {
        padding: 20px;
        border-radius: 12px;
    }

    .apmi-program-card__title {
        font-size: 0.95rem;
    }

    .apmi-program-card__desc {
        font-size: 0.82rem;
    }

    /* CTA modern mobile */
    .apmi-cta-modern {
        padding: 40px 0 60px;
    }

    .apmi-cta-modern__inner {
        padding: 36px 20px;
        border-radius: 16px;
    }

    .apmi-cta-modern__btn {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }

    /* Register button */
    .tw-px-16 {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
        width: 100%;
    }

    /* Structure photo */
    .org-photo {
        width: 100px !important;
        height: 100px !important;
    }

    /* Map */
    iframe[style*="min-height: 500px"] {
        min-height: 250px !important;
    }
}

/* ==========================================
   MEMBER DETAIL PAGE - Public
   ========================================== */
.apmi-member-detail {
    padding: 80px 0;
    background: var(--apmi-bg-alt);
}

.apmi-member-card {
    background: #fff;
    border: 1px solid var(--apmi-border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.apmi-member-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.apmi-member-card__header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.apmi-member-card__logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--apmi-border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.apmi-member-card__logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.apmi-member-card__company {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--apmi-dark);
    margin-bottom: 4px;
}

.apmi-member-card__position {
    font-size: 0.92rem;
    color: var(--apmi-text-light);
    margin: 0;
}

.apmi-member-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--apmi-dark);
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--apmi-border);
}

/* Info Grid */
.apmi-member-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.apmi-member-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.apmi-member-info-item--full {
    grid-column: 1 / -1;
}

.apmi-member-info-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--apmi-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apmi-member-info-item a {
    color: var(--apmi-secondary);
    font-weight: 500;
}

.apmi-member-info-item a:hover {
    color: var(--apmi-accent);
}

/* Socials */
.apmi-member-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.apmi-member-social-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    background: var(--apmi-light);
    border: 1px solid var(--apmi-border);
    color: var(--apmi-text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.apmi-member-social-link:hover {
    background: var(--apmi-accent);
    border-color: var(--apmi-accent);
    color: var(--apmi-dark);
    transform: translateY(-2px);
}

.apmi-member-social-link i {
    font-size: 1.1rem;
}

/* Events */
.apmi-member-events {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.apmi-member-event {
    background: var(--apmi-light);
    border-radius: 12px;
    padding: 18px;
    border: 1px solid var(--apmi-border);
}

.apmi-member-event__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.apmi-member-event__name {
    font-weight: 600;
    color: var(--apmi-dark);
}

.apmi-member-event__media {
    margin-top: 12px;
}

.apmi-member-event__video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.apmi-member-event__video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.apmi-member-event__image-link img {
    max-width: 100%;
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.apmi-member-event__link {
    color: var(--apmi-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.apmi-member-event__link:hover {
    color: var(--apmi-accent);
}

/* Sidebar Logo */
.apmi-member-sidebar-logo {
    max-width: 200px;
    max-height: 160px;
    object-fit: contain;
}

/* Quick Links */
.apmi-member-quick-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.apmi-member-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--apmi-light);
    color: var(--apmi-text);
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.apmi-member-quick-link:hover {
    background: var(--apmi-accent);
    color: var(--apmi-dark);
}

/* CTA Card */
.apmi-member-cta-card {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-color: transparent;
}

.apmi-member-cta-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.apmi-member-cta-desc {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 18px;
}

.apmi-member-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--apmi-accent);
    color: var(--apmi-dark);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.apmi-member-cta-btn:hover {
    background: var(--apmi-accent-hover);
    color: var(--apmi-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 168, 67, 0.3);
}

@media (max-width: 768px) {
    .apmi-member-detail {
        padding: 40px 0 60px;
    }

    .apmi-member-card {
        padding: 20px;
        border-radius: 12px;
    }

    .apmi-member-card__header {
        flex-direction: column;
        text-align: center;
    }

    .apmi-member-card__company {
        font-size: 1.2rem;
    }

    .apmi-member-info-grid {
        grid-template-columns: 1fr;
    }

    .apmi-member-socials {
        justify-content: center;
    }

    .apmi-member-sidebar-logo {
        max-width: 150px;
    }
}

/* ==========================================
   Members Section - Homepage Marquee Slider
   ========================================== */
.apmi-members-section {
    padding: 80px 0;
    background: var(--apmi-bg);
    overflow: hidden;
}

.apmi-members-marquee {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.apmi-members-row {
    overflow: hidden;
    margin: 0 -15px;
}

.apmi-members-row .swiper {
    overflow: visible;
}

.apmi-members-row .swiper-wrapper {
    transition-timing-function: linear !important;
}

/* Card */
.apmi-member-card-home {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--apmi-white);
    border: 1px solid var(--apmi-border);
    border-radius: 20px;
    padding: 22px 20px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Accent line top */
.apmi-member-card-home__accent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--apmi-accent), var(--apmi-secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.apmi-member-card-home:hover {
    transform: translateY(-6px);
    border-color: transparent;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.06);
}

.apmi-member-card-home:hover .apmi-member-card-home__accent {
    transform: scaleX(1);
}

/* Logo */
.apmi-member-card-home__logo {
    width: 100%;
    height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apmi-member-card-home__logo img {
    max-height: 90px;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: 0.85;
    transition: all 0.4s ease;
}

.apmi-member-card-home:hover .apmi-member-card-home__logo img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* Placeholder icon */
.apmi-member-card-home__placeholder {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--apmi-primary), var(--apmi-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--apmi-white);
    font-size: 1.6rem;
    transition: transform 0.4s ease;
}

.apmi-member-card-home:hover .apmi-member-card-home__placeholder {
    transform: scale(1.1);
}

/* ==========================================
   GLOBAL JOIN CTA POPUP
   ========================================== */
.join-cta-popup {
    --bs-modal-width: min(920px, calc(100vw - 2rem));
    z-index: 10950;
}

body:has(.join-cta-popup.show) > .modal-backdrop {
    z-index: 10940;
}

.join-cta-popup .modal-dialog {
    max-width: 920px;
}

.join-cta-popup .modal-content {
    display: grid;
    grid-template-columns: minmax(250px, 0.82fr) minmax(0, 1.18fr);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: var(--festa-ink-soft);
    color: var(--festa-white);
    box-shadow: 0 36px 100px rgba(0, 0, 0, 0.52);
}

.join-cta-popup__close {
    position: absolute;
    z-index: 4;
    top: 16px;
    right: 16px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    background: rgba(5, 8, 18, 0.62);
    color: #fff;
    transition: transform 0.25s ease, background-color 0.25s ease;
}

.join-cta-popup__close:hover,
.join-cta-popup__close:focus-visible {
    transform: rotate(8deg);
    background: var(--festa-coral);
    color: var(--festa-ink);
}

.join-cta-popup__visual {
    position: relative;
    min-height: 440px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 74%, rgba(216, 255, 62, 0.62), transparent 22%),
        linear-gradient(145deg, #5f93ff 0%, #376ee8 58%, #142249 100%);
}

.join-cta-popup__visual::after {
    position: absolute;
    inset: 0;
    background: url("../img/speckles.svg") center / 680px auto no-repeat;
    content: "";
    opacity: 0.16;
}

.join-cta-popup__index,
.join-cta-popup__number {
    position: absolute;
    z-index: 2;
    font-weight: 900;
}

.join-cta-popup__index {
    top: 24px;
    left: 24px;
    font-size: 0.62rem;
    letter-spacing: 0.15em;
}

.join-cta-popup__number {
    right: -12px;
    bottom: -52px;
    color: rgba(255, 255, 255, 0.22);
    font-family: var(--festa-display);
    font-size: 15rem;
    letter-spacing: -0.09em;
    line-height: 1;
}

.join-cta-popup__orbit {
    position: absolute;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
}

.join-cta-popup__orbit--one {
    top: 82px;
    left: -72px;
    width: 270px;
    height: 270px;
}

.join-cta-popup__orbit--two {
    top: 132px;
    left: -22px;
    width: 170px;
    height: 170px;
}

.join-cta-popup__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.4rem, 5vw, 4.5rem);
}

.join-cta-popup__body h2 {
    max-width: 500px;
    margin-bottom: 1.2rem;
    font-size: clamp(3.1rem, 6vw, 5.4rem);
    line-height: 0.82;
}

.join-cta-popup__body p {
    max-width: 510px;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.94rem;
}

.join-cta-popup__actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.join-cta-popup__arrow {
    font-size: 1rem;
}

.join-cta-popup__later {
    padding: 0.6rem 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.48);
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ==========================================
   MEMBER DETAIL - FESTA EDITORIAL STYLE
   ========================================== */
.member-profile-hero .page-hero-overlay {
    background:
        linear-gradient(180deg, rgba(5, 8, 18, 0.5), rgba(5, 8, 18, 0.18) 42%, rgba(5, 8, 18, 0.98)),
        linear-gradient(90deg, rgba(5, 8, 18, 0.9), transparent 78%);
}

.member-profile-hero__title {
    max-width: 1240px;
    overflow-wrap: anywhere;
}

.member-profile-brand {
    position: sticky;
    top: calc(var(--festa-nav-height) + 2rem);
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--festa-line-dark);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(5, 8, 18, 0.1);
}

.member-profile-brand__mark {
    display: grid;
    min-height: 220px;
    margin-bottom: 2rem;
    place-items: center;
    padding: 2rem;
    overflow: hidden;
    border-radius: 14px;
    background: var(--festa-paper);
}

.member-profile-brand__mark img {
    width: 100%;
    max-height: 170px;
    object-fit: contain;
}

.member-profile-brand__mark > span {
    color: var(--festa-blue-deep);
    font-family: var(--festa-display);
    font-size: 9rem;
    font-weight: 800;
    line-height: 1;
}

.member-profile-brand__label,
.member-profile-social__label {
    color: rgba(5, 8, 18, 0.58);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.member-profile-brand h2 {
    margin: 0.45rem 0 1.75rem;
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    line-height: 0.9;
    overflow-wrap: anywhere;
}

.member-profile-heading {
    max-width: 760px;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.member-profile-heading p {
    max-width: 610px;
    margin: 0;
    color: rgba(5, 8, 18, 0.7);
}

.member-profile-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--festa-line-dark);
    border-left: 1px solid var(--festa-line-dark);
}

.member-profile-contact {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 160px;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border-right: 1px solid var(--festa-line-dark);
    border-bottom: 1px solid var(--festa-line-dark);
    color: var(--festa-ink);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a.member-profile-contact:hover,
a.member-profile-contact:focus-visible {
    background: var(--festa-blue);
    color: var(--festa-ink);
}

.member-profile-contact--wide {
    grid-column: 1 / -1;
}

.member-profile-contact__icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 50%;
    background: var(--festa-ink);
    color: #fff;
}

.member-profile-contact__content {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 0.55rem;
}

.member-profile-contact__content small {
    color: rgba(5, 8, 18, 0.58);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.member-profile-contact__content strong {
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.member-profile-contact__arrow {
    margin-left: auto;
    font-size: 1.15rem;
    transition: transform 0.3s var(--festa-ease);
}

a.member-profile-contact:hover .member-profile-contact__arrow {
    transform: translate(3px, -3px);
}

.member-profile-social {
    margin-top: 2.5rem;
}

.member-profile-social__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.9rem;
}

.member-profile-social__links a {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 46px;
    padding: 0.7rem 1rem;
    border: 1px solid var(--festa-line-dark);
    border-radius: 999px;
    color: var(--festa-ink);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 0.3s var(--festa-ease), background-color 0.3s ease;
}

.member-profile-social__links a:hover,
.member-profile-social__links a:focus-visible {
    transform: translateY(-3px);
    background: var(--festa-acid);
}

.member-profile-events__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.member-profile-events__count {
    flex: 0 0 auto;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--festa-line);
    color: var(--festa-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.member-event-card {
    height: 100%;
    border: 1px solid var(--festa-line);
    background: var(--festa-ink-soft);
}

.member-event-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--festa-panel);
}

.member-event-card__media > a,
.member-event-card__media img,
.member-event-card__media iframe,
.member-event-card__placeholder {
    width: 100%;
    height: 100%;
}

.member-event-card__media img {
    object-fit: cover;
    transition: transform 0.75s var(--festa-ease), filter 0.75s ease;
}

.member-event-card:hover .member-event-card__media img {
    transform: scale(1.045);
    filter: saturate(1.1);
}

.member-event-card__media iframe {
    display: block;
    border: 0;
}

.member-event-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.75rem;
    color: var(--festa-blue-soft);
    text-decoration: none;
}

.member-event-card__placeholder i {
    font-size: 2.2rem;
}

.member-event-card__body {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 1rem;
    padding: 1.5rem;
}

.member-event-card__body > span {
    color: var(--festa-blue);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.1em;
}

.member-event-card__body h3 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    line-height: 0.92;
}

.member-profile-bottom-cta {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.member-profile-bottom-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.member-profile-bottom-cta h2 {
    margin: 0;
    font-size: clamp(3.5rem, 8vw, 8rem);
    line-height: 0.82;
}

@media (max-width: 767px) {
    .join-cta-popup .modal-dialog {
        width: calc(100vw - 1rem);
        max-width: calc(100vw - 1rem);
        margin: 0.5rem;
    }

    .join-cta-popup .modal-content {
        display: block;
        width: 100%;
        border-radius: 18px;
    }

    .join-cta-popup__visual {
        min-height: 150px;
    }

    .join-cta-popup__number {
        right: 16px;
        bottom: -42px;
        font-size: 9rem;
    }

    .join-cta-popup__body {
        padding: 2rem 1.4rem 1.5rem;
    }

    .join-cta-popup__body h2 {
        font-size: clamp(2.65rem, 14vw, 3.6rem);
        overflow-wrap: anywhere;
    }

    .join-cta-popup__actions {
        align-items: stretch;
        flex-direction: column;
        gap: 0.75rem;
    }

    .join-cta-popup__later {
        align-self: center;
    }

    .member-profile-brand {
        position: static;
    }

    .member-profile-contact-grid {
        grid-template-columns: 1fr;
    }

    .member-profile-contact--wide {
        grid-column: auto;
    }

    .member-profile-events__head,
    .member-profile-bottom-cta__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .member-profile-bottom-cta__inner .btn-dark-festa {
        width: 100%;
    }
}

/* ==========================================
   UPCOMING EVENTS - HOMEPAGE
   ========================================== */
.apmi-events-home {
    scroll-margin-top: calc(var(--festa-nav-height) + 1rem);
}

.apmi-events-home__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.apmi-events-home__head > p {
    width: min(100%, 440px);
    margin: 0 0 0.4rem;
    color: rgba(5, 8, 18, 0.68);
    line-height: 1.75;
}

.apmi-events-home__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1rem, 2.4vw, 1.75rem);
}

.apmi-event-home-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--festa-line-dark);
    background: var(--festa-white);
    box-shadow: 0 18px 45px rgba(5, 8, 18, 0.08);
    transition: transform 0.45s var(--festa-ease), box-shadow 0.45s ease;
}

.apmi-event-home-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 65px rgba(5, 8, 18, 0.15);
}

.apmi-event-home-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: var(--festa-paper-2);
}

.apmi-event-home-card__media::after {
    position: absolute;
    inset: auto 0 0;
    height: 30%;
    background: linear-gradient(transparent, rgba(5, 8, 18, 0.32));
    content: '';
    pointer-events: none;
}

.apmi-event-home-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.75s var(--festa-ease), filter 0.4s ease;
}

.apmi-event-home-card:hover .apmi-event-home-card__media img {
    transform: scale(1.045);
    filter: saturate(1.08);
}

.apmi-event-home-card__badge {
    position: absolute;
    z-index: 2;
    top: 1rem;
    left: 1rem;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    background: var(--festa-acid);
    color: var(--festa-ink);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
}

.apmi-event-home-card__body {
    display: flex;
    min-height: 300px;
    padding: clamp(1.25rem, 2.8vw, 1.75rem);
    flex-direction: column;
}

.apmi-event-home-card__date {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.95rem;
    color: var(--festa-blue-deep);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.apmi-event-home-card__body h3 {
    margin: 0 0 0.75rem;
    color: var(--festa-ink);
    font-family: var(--festa-display);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 0.95;
    text-transform: uppercase;
}

.apmi-event-home-card__location {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-bottom: 1rem;
    color: rgba(5, 8, 18, 0.76);
    font-size: 0.88rem;
    font-weight: 700;
}

.apmi-event-home-card__location i {
    margin-top: 0.22rem;
    color: var(--festa-coral);
}

.apmi-event-home-card__body > p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 1.25rem;
    color: rgba(5, 8, 18, 0.64);
    font-size: 0.9rem;
    line-height: 1.7;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.apmi-event-home-card__link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.6rem;
    margin-top: auto;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid currentColor;
    color: var(--festa-ink);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apmi-event-home-card__link:hover {
    color: var(--festa-blue-deep);
}

.apmi-events-home__empty {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid var(--festa-line-dark);
    background: var(--festa-white);
}

.apmi-events-home__empty > span {
    display: grid;
    width: 62px;
    height: 62px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--festa-blue);
    color: var(--festa-ink);
    font-size: 1.35rem;
}

.apmi-events-home__empty h3 {
    margin: 0 0 0.25rem;
    color: var(--festa-ink);
    font-family: var(--festa-display);
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    line-height: 1;
    text-transform: uppercase;
}

.apmi-events-home__empty p {
    margin: 0;
    color: rgba(5, 8, 18, 0.64);
}

@media (max-width: 991px) {
    .apmi-events-home__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .apmi-events-home__head {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .apmi-events-home__grid {
        grid-template-columns: 1fr;
    }

    .apmi-event-home-card__body {
        min-height: 0;
    }

    .apmi-events-home__empty {
        align-items: flex-start;
    }
}

/* ==========================================
   GALLERY - FESTA EDITORIAL STYLE
   ========================================== */
.gallery-page-hero .page-hero-overlay,
.gallery-detail-hero .page-hero-overlay {
    background:
        linear-gradient(180deg, rgba(5, 8, 18, 0.46), rgba(5, 8, 18, 0.18) 38%, rgba(5, 8, 18, 0.98)),
        linear-gradient(90deg, rgba(5, 8, 18, 0.88), transparent 76%);
}

.gallery-page-hero__title,
.gallery-detail-hero__title {
    max-width: 1240px;
    overflow-wrap: anywhere;
}

.gallery-editorial__head,
.gallery-detail-section__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.gallery-editorial__result {
    flex: 0 0 auto;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--festa-line);
    color: var(--festa-muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.gallery-editorial__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--festa-line);
}

.gallery-editorial__filter {
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid var(--festa-line);
    border-radius: 999px;
    background: transparent;
    color: var(--festa-muted);
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: transform 0.3s var(--festa-ease), background-color 0.25s ease, color 0.25s ease;
}

.gallery-editorial__filter:hover,
.gallery-editorial__filter:focus-visible,
.gallery-editorial__filter.active {
    transform: translateY(-2px);
    border-color: var(--festa-blue);
    background: var(--festa-blue);
    color: var(--festa-ink);
}

.gallery-editorial-grid {
    display: grid;
    grid-auto-flow: dense;
    grid-auto-rows: minmax(92px, 7vw);
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.gallery-editorial-card {
    position: relative;
    display: block;
    grid-column: span 4;
    grid-row: span 5;
    min-height: 420px;
    overflow: hidden;
    isolation: isolate;
    border-radius: 14px;
    background: var(--festa-panel);
    color: #fff;
    text-decoration: none;
}

.gallery-editorial-card--featured {
    grid-column: span 8;
    grid-row: span 6;
}

.gallery-editorial-card--solo {
    grid-column: 1 / -1;
}

.gallery-editorial-card--tall {
    grid-row: span 7;
}

.gallery-editorial-card__media,
.gallery-editorial-card__overlay {
    position: absolute;
    inset: 0;
}

.gallery-editorial-card__media {
    z-index: -2;
}

.gallery-editorial-card__media img,
.gallery-editorial-card__placeholder {
    width: 100%;
    height: 100%;
}

.gallery-editorial-card__media img {
    object-fit: cover;
    filter: saturate(0.82) contrast(1.05);
    transition: transform 0.85s var(--festa-ease), filter 0.5s ease;
}

.gallery-editorial-card__placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, var(--festa-panel), var(--festa-blue-deep));
    color: var(--festa-blue-soft);
    font-size: 3rem;
}

.gallery-editorial-card__overlay {
    z-index: -1;
    background: linear-gradient(180deg, rgba(5, 8, 18, 0.08), rgba(5, 8, 18, 0.22) 42%, rgba(5, 8, 18, 0.94));
}

.gallery-editorial-card__content {
    display: flex;
    height: 100%;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(1.15rem, 2.3vw, 2rem);
}

.gallery-editorial-card__meta,
.gallery-editorial-card__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.gallery-editorial-card__meta {
    font-size: 0.61rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.gallery-editorial-card__meta span:last-child {
    text-align: right;
}

.gallery-editorial-card__title {
    align-items: end;
}

.gallery-editorial-card__title h3 {
    max-width: 88%;
    margin: 0;
    font-size: clamp(2.4rem, 4.5vw, 5rem);
    line-height: 0.82;
    overflow-wrap: anywhere;
}

.gallery-editorial-card:not(.gallery-editorial-card--featured) .gallery-editorial-card__title h3 {
    font-size: clamp(2.2rem, 3.4vw, 3.8rem);
}

.gallery-editorial-card__title > span {
    font-size: 1.6rem;
    transition: transform 0.4s var(--festa-ease);
}

.gallery-editorial-card:hover .gallery-editorial-card__media img,
.gallery-editorial-card:focus-visible .gallery-editorial-card__media img {
    transform: scale(1.065);
    filter: saturate(1.06) contrast(1.05);
}

.gallery-editorial-card:hover .gallery-editorial-card__title > span,
.gallery-editorial-card:focus-visible .gallery-editorial-card__title > span {
    transform: translate(6px, -6px);
}

.gallery-editorial-card[hidden] {
    display: none;
}

.gallery-editorial-empty {
    display: none;
    padding: clamp(4rem, 10vw, 8rem) 1.5rem;
    border: 1px solid var(--festa-line);
    color: var(--festa-muted);
    text-align: center;
}

.gallery-editorial-empty.is-visible {
    display: block;
}

.gallery-editorial-empty i {
    margin-bottom: 1.25rem;
    color: var(--festa-blue);
    font-size: 3rem;
}

.gallery-editorial-empty h3 {
    margin-bottom: 0.65rem;
    color: var(--festa-white);
    font-size: clamp(2.8rem, 5vw, 5rem);
}

.gallery-editorial-empty p {
    margin: 0;
}

.gallery-editorial-empty--paper {
    border-color: var(--festa-line-dark);
    color: rgba(5, 8, 18, 0.62);
}

.gallery-editorial-empty--paper h3 {
    color: var(--festa-ink);
}

.gallery-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.gallery-pagination a {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid var(--festa-line);
    color: var(--festa-muted);
    font-size: 0.67rem;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease;
}

.gallery-pagination a:hover,
.gallery-pagination a.active {
    transform: translateY(-2px);
    border-color: var(--festa-acid);
    background: var(--festa-acid);
    color: var(--festa-ink);
}

.gallery-detail-hero__back {
    display: table;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-decoration: none;
    text-transform: uppercase;
}

.gallery-detail-hero__back:hover {
    color: var(--festa-acid);
}

.gallery-detail-section__head {
    align-items: flex-start;
    flex-direction: column;
}

.gallery-detail-grid {
    display: grid;
    grid-auto-flow: dense;
    grid-auto-rows: minmax(76px, 6vw);
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
}

.gallery-detail-photo {
    position: relative;
    display: block;
    grid-column: span 4;
    grid-row: span 5;
    min-height: 340px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--festa-panel);
}

.gallery-detail-photo--featured {
    grid-column: span 8;
    grid-row: span 7;
}

.gallery-detail-photo--tall {
    grid-row: span 7;
}

.gallery-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--festa-ease), filter 0.5s ease;
}

.gallery-detail-photo__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(5, 8, 18, 0.66));
    opacity: 0.72;
    transition: opacity 0.35s ease;
}

.gallery-detail-photo__number,
.gallery-detail-photo__zoom {
    position: absolute;
    z-index: 2;
    color: #fff;
}

.gallery-detail-photo__number {
    bottom: 1rem;
    left: 1rem;
    font-size: 0.64rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.gallery-detail-photo__zoom {
    top: 1rem;
    right: 1rem;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    background: rgba(5, 8, 18, 0.45);
    transition: transform 0.35s var(--festa-ease), background-color 0.25s ease;
}

.gallery-detail-photo:hover img,
.gallery-detail-photo:focus-visible img {
    transform: scale(1.055);
    filter: saturate(1.08);
}

.gallery-detail-photo:hover .gallery-detail-photo__shade,
.gallery-detail-photo:focus-visible .gallery-detail-photo__shade {
    opacity: 1;
}

.gallery-detail-photo:hover .gallery-detail-photo__zoom,
.gallery-detail-photo:focus-visible .gallery-detail-photo__zoom {
    transform: rotate(90deg);
    background: var(--festa-blue);
    color: var(--festa-ink);
}

.gallery-detail-next {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.gallery-detail-next__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.gallery-detail-next h2 {
    margin: 0;
    font-size: clamp(3.5rem, 8vw, 8rem);
    line-height: 0.82;
}

.gallery-lightbox.mfp-bg,
.gallery-lightbox .mfp-bg {
    background: var(--festa-ink);
}

@media (max-width: 991px) {
    .gallery-editorial-card,
    .gallery-editorial-card--featured {
        grid-column: span 6;
    }

    .gallery-detail-photo,
    .gallery-detail-photo--featured {
        grid-column: span 6;
    }
}

@media (max-width: 767px) {
    .gallery-editorial__head,
    .gallery-detail-section__head,
    .gallery-detail-next__inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .gallery-editorial-grid,
    .gallery-detail-grid {
        display: block;
    }

    .gallery-editorial-card,
    .gallery-editorial-card--featured,
    .gallery-editorial-card--tall,
    .gallery-detail-photo,
    .gallery-detail-photo--featured,
    .gallery-detail-photo--tall {
        display: block;
        min-height: 0;
        margin-bottom: 12px;
        aspect-ratio: 4 / 5;
    }

    .gallery-editorial-card--featured,
    .gallery-detail-photo--featured {
        aspect-ratio: 4 / 3;
    }

    .gallery-editorial-card__title h3,
    .gallery-editorial-card:not(.gallery-editorial-card--featured) .gallery-editorial-card__title h3 {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .gallery-detail-next__inner .btn-dark-festa {
        width: 100%;
    }
}

/* ==========================================
   JOIN MEMBER - REQUIREMENTS
   ========================================== */
.membership-requirements__head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.membership-requirements__head > div {
    max-width: 900px;
}

.membership-requirements__head p {
    max-width: 720px;
    margin: 0;
    color: var(--festa-muted);
}

.membership-requirements__count {
    flex: 0 0 auto;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--festa-line);
    color: var(--festa-muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.membership-requirements__list {
    border-top: 1px solid var(--festa-line);
}

.membership-requirement {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 48px;
    gap: clamp(1rem, 3vw, 2.5rem);
    align-items: start;
    padding: clamp(1.5rem, 3.2vw, 2.75rem) clamp(0.5rem, 1.5vw, 1.25rem);
    border-bottom: 1px solid var(--festa-line);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.membership-requirement:hover {
    background: var(--festa-blue);
    color: var(--festa-ink);
}

.membership-requirement__number {
    padding-top: 0.3rem;
    color: var(--festa-blue);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.membership-requirement:hover .membership-requirement__number {
    color: var(--festa-ink);
}

.membership-requirement__content h3 {
    margin-bottom: 0.75rem;
    font-size: clamp(2.2rem, 4vw, 4rem);
    line-height: 0.9;
}

.membership-requirement__content p {
    max-width: 1050px;
    margin: 0;
    color: var(--festa-muted);
    font-size: clamp(0.94rem, 1.35vw, 1.1rem);
    line-height: 1.75;
    transition: color 0.3s ease;
}

.membership-requirement:hover .membership-requirement__content p {
    color: rgba(5, 8, 18, 0.78);
}

.membership-requirement__check {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--festa-line);
    border-radius: 50%;
    color: var(--festa-blue-soft);
}

.membership-requirement:hover .membership-requirement__check {
    border-color: rgba(5, 8, 18, 0.3);
    color: var(--festa-ink);
}

.membership-requirements__empty {
    padding: clamp(3rem, 7vw, 5rem) 1.5rem;
    border: 1px solid var(--festa-line);
    color: var(--festa-muted);
    text-align: center;
}

.membership-requirements__empty i {
    margin-bottom: 1rem;
    color: var(--festa-blue);
    font-size: 2.5rem;
}

.membership-requirements__empty p {
    max-width: 650px;
    margin: 0 auto;
}

.membership-requirements__action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.membership-requirements__action p {
    margin: 0;
    color: var(--festa-muted);
}

.membership-form-section {
    scroll-margin-top: calc(var(--festa-nav-height) + 1rem);
}

.membership-form-section__head {
    max-width: 920px;
    margin: 0 auto clamp(2.5rem, 6vw, 4rem);
    text-align: center;
}

.membership-form-section__head .eyebrow {
    justify-content: center;
}

.membership-form-section__head p {
    max-width: 650px;
    margin: 0 auto;
    color: rgba(5, 8, 18, 0.68);
}

@media (max-width: 767px) {
    .membership-requirements__head,
    .membership-requirements__action {
        align-items: flex-start;
        flex-direction: column;
    }

    .membership-requirement {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 0.75rem;
        padding-inline: 0;
    }

    .membership-requirement__check {
        display: none;
    }

    .membership-requirement__content p {
        font-size: 0.9rem;
        line-height: 1.7;
    }

    .membership-requirements__action .btn-festa {
        width: 100%;
    }
}

/* Responsive */
@media (max-width: 991px) {
    .apmi-members-section {
        padding: 60px 0;
    }

    .apmi-member-card-home {
        min-height: 130px;
        padding: 18px 14px;
        border-radius: 16px;
    }

    .apmi-member-card-home__logo {
        height: 80px;
    }

    .apmi-member-card-home__logo img {
        max-height: 64px;
    }

    .apmi-member-card-home__placeholder {
        width: 54px;
        height: 54px;
        font-size: 1.2rem;
    }
}

@media (max-width: 767px) {
    .apmi-members-section {
        padding: 40px 0;
    }

    .apmi-members-row {
        margin: 0 -4px;
    }

    .apmi-member-card-home {
        min-height: 100px;
        padding: 12px 10px;
        border-radius: 14px;
    }

    .apmi-member-card-home__accent {
        height: 3px;
    }

    .apmi-member-card-home__logo {
        height: 56px;
    }

    .apmi-member-card-home__logo img {
        max-height: 44px;
    }

    .apmi-member-card-home__placeholder {
        width: 40px;
        height: 40px;
        border-radius: 10px;
        font-size: 0.95rem;
    }
}
