:root {
    --beige: #F8F5EE;
    --light-blue: #009EE3;
    --dark-blue: #233087;
    --white: #FFFFFF;
    --dark: #2F2F2F;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--beige);
    color: var(--dark);
    line-height: 1.5;
}

h1,
.heading {
    font-family: 'Anton', sans-serif;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: clamp(3.2rem, 6vw, 7rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

.panel {
    width: 100%;
    position: relative;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
}

.block {
    min-height: 48vw;
    display: flex;
    position: relative;
    width: 100%;
}

.grid-container>.block,
.union-bg-container>.block {
    justify-content: center;
}

.block>.heading,
.block>.form-content,
.block>.location-block-inner,
.block>.logo,
.block>.address-details,
.block>.form-content-wrapper {
    max-width: 725px;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* Specific override for the logo to hit the 465px target */
.block>.logo {
    max-width: 465px;
}

.block.flex-center {
    display: flex;
    align-items: center;
}

.beige {
    background-color: var(--beige);
}

.light-blue {
    background-color: var(--light-blue);
}

.dark-blue {
    background-color: var(--dark-blue);
}

.bg-transparent {
    background-color: transparent !important;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.align-left {
    justify-content: flex-start;
}

.flex-col {
    flex-direction: column;
}

.relative {
    position: relative;
}

.z-10 {
    position: relative;
    z-index: 10;
}

.overflow-hidden {
    overflow: hidden;
}

.text-white {
    color: var(--white);
}

.text-dark {
    color: var(--dark);
}

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

.padding-large {
    padding: 3.5rem 2rem;
}

.gap-medium {
    gap: 2rem;
}

.image-block {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.image-block .object-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.logo {
    max-width: 465px;
    height: auto;
}

.inline-icon {
    display: inline-block;
    width: 0.25em;
    height: auto;
    margin-left: 0.1em;
    transform: translateY(-0.1em);
}

.join-us-panel-link {
    text-decoration: none;
    color: inherit;
}

.social-inline {
    width: 0.35em !important;
    margin-left: 0.3em;
    margin-right: 0.1em;
}

.bg-powered {
    position: relative;
    clip-path: inset(0);
}

.bg-powered .bg-shape-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/symbol-bg.svg');
    background-size: 45vw auto;
    background-position: left center;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.union-bg-container {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    background-color: #00A5E0;
    clip-path: inset(0);
}

.union-bg-container .block {
    z-index: 1;
}

.union-bg-shape {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 0;
    background-image: url('../images/symbol-bg.svg');
    background-size: 100% auto;
    background-position: left -10% center;
    background-repeat: no-repeat;
}

.location-block {
    justify-content: flex-start;
    padding: 3rem 5%;
}

.location-block>.location-block-inner {
    max-width: 725px;
    width: 100%;
}

.location {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    margin-bottom: 25px
}

.location:last-child {
    margin-bottom: 0;
}

.map-container {
    width: 100%;
    overflow: hidden;
    border-radius: 4px;
}

.map-container a {
    color: #233087
}

.location-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    mix-blend-mode: multiply;
}

.address-details {
    font-size: 16px;
    color: var(--dark-blue);
    line-height: 1.3;
    padding-top: 0;
}

.hours-grid {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 4px 10px;
    margin-top: 0.5rem;
}

.hours-grid .day {
    font-weight: 600;
}

.hours-grid .time {
    opacity: 0.9;
}

.detail-label {
    display: block;
    font-size: 0.9em;
    opacity: 0.65;
    margin-bottom: 0.15em;
    font-weight: 400;
}

.form-block {
    align-items: flex-start;
    justify-content: center;
}

.form-heading {
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    margin-bottom: 2rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    position: relative;
    cursor: pointer;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.custom-checkbox {
    width: 30px;
    height: 30px;
    min-width: 30px;
    min-height: 30px;
    border-radius: 0;
    /* Square as requested */
    background-color: var(--white);
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
}

.custom-checkbox::after {
    content: "";
    width: 100%;
    height: 100%;
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12L10 17L20 7' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M5 12L10 17L20 7' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-size: 65%;
    mask-size: 65%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    background-color: var(--check-color, #EF312C);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

input[type="checkbox"]:checked~.custom-checkbox::after {
    opacity: 1;
    transform: scale(1);
}

.privacy-note {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
    margin-top: -1rem;
}

.privacy-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: underline;
    transition: color 0.2s ease;
}

.privacy-link:hover {
    color: #ffffff;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group label {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    color: var(--white);
    font-weight: 400;
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 2px;
    background-color: var(--white);
    color: var(--dark);
    font-family: inherit;
    font-size: 1rem;
}

.input-group input::placeholder {
    color: #555;
}

.button-row {
    margin-top: 0.5rem;
}

.submit-btn {
    width: 100%;
    background: transparent;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 0.9rem;
    font-weight: 500;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

.submit-btn:hover:not(:disabled) {
    background: var(--white);
    color: var(--dark-blue);
}

.submit-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
    color: transparent !important;
}

.submit-btn.is-loading::after {
    content: 'SENDING...';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    letter-spacing: 0.1em;
    font-size: 0.8rem;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.highlight-error {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
    outline: 2px solid #EF312C;
    border-radius: 4px;
}

.submit-btn-wrapper {
    position: relative;
    width: 100%;
    cursor: not-allowed;
}

.submit-btn-wrapper:has(.submit-btn:not(:disabled)) {
    cursor: default;
}

.btn-tip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #EF312C;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-tip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #EF312C transparent transparent transparent;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

/* Success Message Styles */
.form-success {
    text-align: center;
    padding: 2rem 0;
}

.success-heading {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.success-text {
    font-size: 1.1rem;
    color: var(--white);
    opacity: 0.9;
    line-height: 1.6;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    background-color: var(--beige);
    text-align: center;
}

.footer-content {
    max-width: 1450px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-logo {
    max-width: 361px;
    width: 90%;
    height: auto;
}

.footer-credit a {
    color: var(--dark-blue);
    text-decoration: none;
    font-size: clamp(1rem, 1.2vw, 1.25rem);
    font-weight: 500;
    transition: opacity 0.2s;
}

.footer-credit a:hover {
    opacity: 0.7;
}

.footer-social .instagram-link {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--dark-blue);
    text-decoration: none;
}

.join-us-text {
    font-size: 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.social-icon {
    width: 24px;
    height: 24px;
    display: block;
    color: var(--dark-blue);
    transition: transform 0.2s ease;
}

.instagram-link:hover .social-icon {
    transform: scale(1.1);
}

.footer-bottom {
    margin-top: 2rem;
    width: 100%;
    max-width: 400px;
    border-top: 1px solid rgba(35, 44, 125, 0.1);
    padding-top: 2rem;
}

.copyright {
    font-size: 0.85rem;
    opacity: 0.5;
    color: var(--dark-blue);
}

.footer-privacy-link {
    font-size: inherit;
    color: var(--dark-blue);
    opacity: 1;
    text-decoration: underline;
    transition: opacity 0.2s ease;
}

.footer-privacy-link:hover {
    opacity: 0.85;
}

@media (max-width: 900px) {

    .grid-container,
    .union-bg-container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .mobile-reverse {
        flex-direction: column-reverse;
    }

    .block {
        min-height: 80vw;
        text-align: left;
    }

    .heading {
        text-align: left;
        width: 100%;
    }

    .flex-center.align-left {
        justify-content: flex-start;
    }

    .image-block {
        height: 300px !important;
        min-height: 300px;
    }

    .image-block img {
        object-position: center center;
    }

    #image-team-block img {
        object-position: center 15%;
    }

    #image-cup-block { order: 1; }
    #powered-you-block { order: 2; }
    #location-block { order: 3; }
    #join-us-block { order: 4; }
    #challah-image { order: 5; }
    #challah-text-block { order: 6; }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .location {
        grid-template-columns: 1fr;
    }

    .padding-large {
        padding: 3rem 8%;
    }

    .footer {
        padding: 4rem 1rem 2rem;
    }

    .footer-content {
        gap: 1.75rem;
    }

    .footer-bottom {
        margin-top: 1rem;
        padding-top: 1rem;
    }
}