/** Event Banner **/

.image-banner-wrapper {
    max-width: 100%;
    /* IMPORTANT: no fixed height and no overflow hidden */
}

.image-banner-wrapper img {
    display: block;
    width: 100%;
    height: auto;   /* preserves whole image, including bottom */
}

/** JOIN US section with video **/

.join-us-section {
    background: #1a1a1a;
    color: #fff;
    padding: 4rem 2rem;
}
.join-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    align-items: center;
}
/* Wide video container */
.video-container {
    flex: 0 0 62%;
    width: 100%;
    max-width: none;          /* remove the old "vertical card" cap */
    aspect-ratio: 16 / 9;     /* <-- key change */
    margin-left: 0;
    margin-right: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
}


/* iframe fills the container cleanly */
.video-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* video fills the container */
#event-video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* keeps the full 16:9 frame visible */
    border: 0;
}




/* Fallback for browsers without aspect-ratio support */
@supports not (aspect-ratio: 1 / 1) {
    .video-container {
        position: relative;
        height: 0;
        padding-bottom: 56.25%; /* 16:9 fallback */
    }

    .video-container iframe,
    #event-video {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
    }
}
/* Text column should become narrower to make room for wide video */
.text-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-around;
    gap: 1rem;
    text-align: center;
    align-self: stretch;
}

/* Masthead text (copied from the old carousel content) */
.masthead-line-1 {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    font-weight: 700;
    letter-spacing: .02em;
    margin: 0 0 .75rem 0;
}
.masthead-line-2 {
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    font-weight: 600;
    margin: 0 0 .5rem 0;
}
.masthead-line-3 {
    font-size: clamp(0.95rem, 1.3vw, 1.1rem);
    margin: 0 0 1.25rem 0;
    font-weight: 600;
}

/* Reuse the green CTA style already present (find-more-btn) */
.find-more-btn {
    display: inline-block;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    padding: 1rem 1.5rem;
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color .3s;
    border-radius: 6px;
}
.find-more-btn:hover { background: #218838; }

/* Mobile: stack */
@media (max-width: 768px) {
    .join-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .video-container {
        flex: 0 0 auto;
        width: 100%;
        max-width: 92vw;
        aspect-ratio: 16 / 9;
        margin-left: auto;
        margin-right: auto;
    }

    .text-container {
        width: 100%;
        text-align: center;
    }
}
/** Post Body section **/

.event-description {
    /*padding: 3rem 0;*/
    padding-top: 3rem;
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: flex-start;
    gap: 3rem;
}

.text-content {
    flex: 1;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: justify;
}

.text-content p {
    margin-bottom: 1.5rem;
}

/* Make sure links in the content are readable */
.text-content a {
    color: #28a745; /* Using The Energy Year's green */
    text-decoration: none;
}

.text-content a:hover {
    text-decoration: underline;
}

.logo-content {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.endorsed-heading {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: bold;
    text-align: center;
}

.anpg-logo {
    width: 100%;
    height: auto;
}

/* Keep this as specific as needed, but scoped to the content column */
.event-description .text-content strong,
.event-description .text-content b {
    font-weight: 700; /* some resets set strong/b to inherit/400 */
}

.event-description .text-content em,
.event-description .text-content i {
    font-style: italic; /* some resets set em/i to normal */
}

/* Lists (incl. Gutenberg’s wp-block-list) */
.event-description .text-content ul,
.event-description .text-content ol,
.event-description .text-content .wp-block-list {
    margin: 0 0 1.5rem 1.25rem;   /* left indent so bullets show */
    padding-left: 1.25rem;        /* guard against resets that set 0 */
    list-style-position: outside; /* keep bullets outside text box */
}

.event-description .text-content ul,
.event-description .text-content .wp-block-list {
    list-style-type: disc;
}

.event-description .text-content ol {
    list-style-type: decimal;
}

.event-description .text-content li {
    margin-bottom: 0.5rem;        /* breathing room for multi-line items */
}

/* Nested lists—optional but nice */
.event-description .text-content ul ul { list-style-type: circle; }
.event-description .text-content ul ul ul { list-style-type: square; }

@media screen and (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        gap: 2rem;
    }

    .logo-content {
        width: 150px;
        margin: 0 auto;
    }

    .endorsed-heading {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }
}

/* Sponsor Block Section */
.sponsors-block { padding: 4rem 2rem; text-align: center; }
.sponsors-block h2 { font-size: 2.5rem; color: #333; margin-bottom: 3rem; text-transform: none; }


/* NEW: single-banner layout */
.sponsors-block .sponsor-banner {
    max-width: 1200px;     /* match your content width */
    margin: 0 auto;
}
.sponsors-block .sponsor-banner img {
    display: block;
    width: 100%;
    height: auto;          /* maintain aspect ratio */
    object-fit: contain;   /* guard against odd intrinsic sizes */
    /* optional niceties */
    border-radius: 8px;
}

/* Mobile tweaks */
@media (max-width: 768px) {
    .sponsors-block { padding: 2rem 1rem; }
    .sponsors-block h2 { font-size: 2rem; margin-bottom: 1rem; }
    .sponsors-block .sponsor-banner img { border-radius: 6px; }
}




/** Gala Carousel Section **/
.gala-showcase {
    padding: 4rem 2rem;
}

.gala-container { /* Changed from gala-container */
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
    padding: 0 5px; /* Add slight padding to container */
}

.gala-showcase h2 {
    font-size: 2rem;
    color: #333; /* override common.css */
    text-transform: none; /* override common.css */
    text-align: center;
    margin-bottom: 4rem;

}

.gala-track {
    display: flex;
    gap: 15px; /* Reduced from 20px */
    /*    gap: 20px;*/
    transition: transform 0.3s ease;
}

.gala-item {
    /*    flex: 0 0 calc(25% - 15px); !* Desktop: 4 items per view *!*/
    flex: 0 0 calc(25% - 15px); /* Adjusted to account for the new gap */
    text-align: center;
    box-sizing: border-box;
    /*padding: 0 8px; !* Reduced padding *!*/
        padding: 0 10px;
}

.gala-item img {
    width: 100%;
    aspect-ratio: 4/3; /* Maintain consistent image ratio */
    object-fit: cover;
    margin-bottom: 1rem;
}

.gala-item p {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* gala nav disabled by request, but leaving it commented in case they change their mind */
/*.gala-nav {*/
/*    position: absolute;*/
/*    top: 50%;*/
/*    transform: translateY(-50%);*/
/*    background: rgba(0, 0, 0, 0.5);*/
/*    color: white;*/
/*    border: none;*/
/*    padding: 1rem;*/
/*    cursor: pointer;*/
/*    z-index: 2; !* Added z-index to ensure buttons are clickable *!*/
/*}*/

/*.gala-nav.prev {*/
/*    left: 0;*/
/*}*/

/*.gala-nav.next {*/
/*    right: 0;*/
/*}*/

.gala-dots {
    text-align: center; /* Added to center dots */
    margin-top: 2rem; /* Added spacing from carousel */
}

.gala-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.gala-dot.active {
    background: black;
}

/* New, Sponsors title (smaller, consistent) */
.gala-mini-title {
    color: #fff;
    text-align: center;
    font-size: clamp(1.25rem, 2.6vw, 1.6rem);
    margin: 0 0 2rem 0;
    font-weight: bold;
    font-style: normal;
    background: #272727;
    padding: 14px 25px 18px;
}

/* Mobile styles */
@media screen and (max-width: 768px) {
    .gala-item {
        flex: 0 0 100%; /* Full width on mobile */
        padding: 0 20px;
    }

    .gala-track {
        gap: 0; /* Remove gap on mobile */
    }

    .gala-dots {
        margin-top: 1.5rem;
    }

    .gala-dot {
        width: 8px;
        height: 8px;
        margin: 0 4px;
    }
}

/** Modal inquiry form **/

/* Delegate Info Box Styles */
.delegate-info {
    background-color: #1a1a1a; /* Same dark background as join-us-section */
    border-left: 4px solid #28a745; /* Green accent border matching buttons */
    padding: 20px;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.6;
    border-radius: 4px;
    color: white; /* White text for dark background */
}

.delegate-info p {
    margin-bottom: 10px;
    color: #f8f9fa; /* Light colored text for better contrast */
}

.delegate-info p:last-child {
    margin-bottom: 0;
}

.shop-link {
    color: #2ecc71; /* Brighter green for dark background */
    text-decoration: underline;
    font-weight: bold;
    transition: color 0.2s;
}

.shop-link:hover {
    color: #3cb371; /* Slightly different green on hover */
    text-decoration: none;
}

/* Enhanced Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    /*top: 0;*/
    /*left: 0;*/
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Slightly darker overlay */
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow-y: auto; /* Allow scrolling for tall modals on mobile */
    /*padding: 20px; !* Add padding for mobile *!*/
    padding:
            max(20px, env(safe-area-inset-top) + 12px)
            max(20px, env(safe-area-inset-right) + 12px)
            max(20px, env(safe-area-inset-bottom) + 12px)
            max(20px, env(safe-area-inset-left) + 12px);
    -webkit-overflow-scrolling: touch;      /* smooth scrolling inside overlay on iOS */
}

.modal-content {
    background-color: white;
    /*width: 90%;*/
    /*max-width: 600px;*/
    padding: 2.5rem; /* Slightly more padding */
    border-radius: 8px; /* Rounded corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); /* Enhanced shadow */
    position: relative;
    margin: auto; /* Center in flex container */
    width: min(600px, 92vw);
    max-height: calc(100dvh - (env(safe-area-inset-top) + env(safe-area-inset-bottom) + 40px));
    overflow: auto;                         /* prevent clipping */
    will-change: transform;                 /* helps some mobile GPUs avoid odd clipping */
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px; /* Larger close button */
    background: none;
    border: none;
    cursor: pointer;
    color: #666; /* Softer color */
    transition: color 0.2s;
    z-index: 1; /* Ensure it's above content */
}

.modal-close:hover {
    color: #000; /* Darker on hover */
}

.modal-title {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: #333;
    text-align: center;
    font-size: 1.8rem;
}

/* Form Styles Enhancements */
.enquiry-form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem; /* Slightly more spacing */
}

.form-group {
    display: flex;
    flex-direction: column;
}

.checkbox-group {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.enquiry-form label {
    margin-bottom: 0.6rem;
    font-weight: 500;
    color: #444;
}

.checkbox-group label {
    margin-bottom: 0;
}

.enquiry-form input[type="text"],
.enquiry-form input[type="email"],
.enquiry-form input[type="tel"] {
    padding: 0.9rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s;
}

.enquiry-form input[type="text"]:focus,
.enquiry-form input[type="email"]:focus,
.enquiry-form input[type="tel"]:focus {
    border-color: #28a745; /* Green border on focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2); /* Subtle green shadow */
}

.enquiry-form input[type="checkbox"] {
    margin-bottom: 0;
    margin-right: 8px; /* Additional space between checkbox and label */
}

.submit-button {
    background-color: #28a745;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 1.5rem; /* Slightly more margin */
    transition: background-color 0.3s, transform 0.1s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-button:hover {
    background-color: #218838;
}

.submit-button:active {
    transform: translateY(1px); /* Slight push effect when clicked */
}

/* Additional mobile optimizations */
@media screen and (max-width: 768px) {
    .modal-overlay {
        align-items: flex-start;            /* center horizontally, start vertically */
    }
    .modal-content {
        width: 100%;
        padding: 1.5rem; /* Less padding on mobile */
        /*margin: 15px 0;*/
        margin-top: clamp(12px, 4vh, 28px);
        border-radius: 10px;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .delegate-info {
        padding: 15px;
        font-size: 14px;
    }

    .enquiry-form input[type="text"],
    .enquiry-form input[type="email"],
    .enquiry-form input[type="tel"] {
        padding: 0.8rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .submit-button {
        padding: 0.9rem;
    }
}

/* Validation styles */
.form-group .error {
    border-color: #dc3545 !important;
}

.form-message {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.success-message {
    padding: 25px;
    text-align: center;
    background-color: #d4edda;
    color: #155724;
    border-radius: 4px;
    font-size: 18px;
    margin: 20px 0;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}