/* ===================== CONTACT HERO — CORKBOARD (Chester) ===================== */

.contact-hero {
    width: 100%;
    overflow: hidden;
}

.contact-hero__board {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('../images/contact/base-corkboard.webp') center / cover no-repeat;
    overflow: hidden;
}

/* ---- Shared layer styles ---- */

.contact-hero__item {
    position: absolute;
    pointer-events: auto;
    opacity: 0;
    animation: pinFromTop 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    will-change: transform, opacity;
    filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.25));
    transition: transform 0.3s ease, filter 0.3s ease;
}

.contact-hero__item:hover {
    transform: scale(1.06);
    filter: drop-shadow(3px 6px 10px rgba(0,0,0,0.35));
    z-index: 20;
}

a.contact-hero__link {
    position: absolute;
    display: block;
    pointer-events: auto;
    text-decoration: none;
    transition: transform 0.3s ease, filter 0.3s ease;
    opacity: 0;
    animation: pinFromTop 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

a.contact-hero__link:hover {
    transform: scale(1.08);
    z-index: 20;
}

a.contact-hero__link--phone:hover {
    transform: none;
    animation: phoneRing 0.6s ease-in-out infinite !important;
}

a.contact-hero__link:hover .contact-hero__item {
    filter: drop-shadow(3px 6px 10px rgba(0,0,0,0.35));
    transform: none;
}

a.contact-hero__link .contact-hero__item {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    width: 100%;
    height: auto;
    opacity: 1;
    animation: none;
}

a.contact-hero__link .contact-hero__item:hover {
    transform: none;
}

/* ---- Entrance animations (directional) ---- */

@keyframes pinFromTop {
    0% { opacity: 0; transform: translateY(calc(-100% - 200px)) rotate(-8deg); }
    70% { opacity: 1; transform: translateY(10px) rotate(1deg); }
    85% { transform: translateY(-4px) rotate(0deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

@keyframes pinFromLeft {
    0% { opacity: 0; transform: translateX(calc(-100% - 200px)) rotate(8deg); }
    70% { opacity: 1; transform: translateX(10px) rotate(-1deg); }
    85% { transform: translateX(-4px) rotate(0deg); }
    100% { opacity: 1; transform: translateX(0) rotate(0deg); }
}

@keyframes pinFromRight {
    0% { opacity: 0; transform: translateX(calc(100% + 200px)) rotate(-8deg); }
    70% { opacity: 1; transform: translateX(-10px) rotate(1deg); }
    85% { transform: translateX(4px) rotate(0deg); }
    100% { opacity: 1; transform: translateX(0) rotate(0deg); }
}

@keyframes pinFromBottom {
    0% { opacity: 0; transform: translateY(calc(100% + 200px)) rotate(5deg); }
    70% { opacity: 1; transform: translateY(-10px) rotate(-1deg); }
    85% { transform: translateY(4px) rotate(0deg); }
    100% { opacity: 1; transform: translateY(0) rotate(0deg); }
}

/* ---- Idle float (applied via JS after entrance) ---- */

@keyframes floatA {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

@keyframes floatB {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-3px) rotate(0.5deg); }
}

@keyframes floatC {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes phoneRing {
    0%, 100% { transform: rotate(0deg); }
    10% { transform: rotate(-3deg); }
    20% { transform: rotate(3deg); }
    30% { transform: rotate(-3deg); }
    40% { transform: rotate(3deg); }
    50% { transform: rotate(-2deg); }
    60% { transform: rotate(2deg); }
    70% { transform: rotate(-1deg); }
    80% { transform: rotate(1deg); }
    90% { transform: rotate(0deg); }
}

.float-a { animation: floatA 4s ease-in-out infinite !important; }
.float-b { animation: floatB 5s ease-in-out infinite !important; }
.float-c { animation: floatC 3.5s ease-in-out infinite !important; }

/* ---- Shadow drift overlay ---- */

.contact-hero__board::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(43,181,160,0.06) 0%,
        transparent 40%,
        transparent 60%,
        rgba(0,0,0,0.08) 100%
    );
    pointer-events: none;
    animation: shadowDrift 20s ease-in-out infinite;
    z-index: 15;
}

@keyframes shadowDrift {
    0%, 100% { opacity: 0.6; transform: translateX(0) translateY(0); }
    50% { opacity: 1; transform: translateX(15px) translateY(8px); }
}

/* ===================== ITEM POSITIONS ===================== */

/* -- Post-it: Book a class (top-left) — from top -- */
.contact-hero__postit-book {
    top: 1%;
    left: 3%;
    width: 18%;
    animation-name: pinFromTop;
    animation-delay: 0.1s;
}

/* -- Polaroid: Hen party (from left) -- */
.contact-hero__link--hen {
    top: 8%;
    left: 16%;
    width: 24%;
    animation-name: pinFromLeft;
    animation-delay: 0.25s;
}

/* -- Post-it: 38+ hen party themes (from left) -- */
.contact-hero__postit-themes {
    top: 22%;
    left: 10%;
    width: 16%;
    z-index: 10;
    animation-name: pinFromLeft;
    animation-delay: 0.35s;
}

/* -- Polaroid: Wedding (from top) -- */
.contact-hero__link--wedding {
    top: 0%;
    left: 36%;
    width: 22%;
    animation-name: pinFromTop;
    animation-delay: 0.45s;
}

/* -- Post-it: 20 dance styles (from top) -- */
.contact-hero__postit-styles {
    top: 0%;
    left: 53%;
    width: 16%;
    animation-name: pinFromTop;
    animation-delay: 0.55s;
}

/* -- Flyer: Dance Teachers Wanted (from right) -- */
.contact-hero__link--jobs {
    top: 0%;
    right: 2%;
    width: 24%;
    animation-name: pinFromRight;
    animation-delay: 0.65s;
}

/* -- Post-it: From £8/class (from left) -- */
.contact-hero__postit-8class {
    top: 40%;
    left: 5%;
    width: 17%;
    animation-name: pinFromLeft;
    animation-delay: 0.4s;
}

/* -- Post-it: From £22/hr (from left) -- */
.contact-hero__postit-22hr {
    top: 56%;
    left: 2%;
    width: 15%;
    animation-name: pinFromLeft;
    animation-delay: 0.5s;
}

/* -- Polaroid: Weekly classes (from bottom) -- */
.contact-hero__link--classes {
    top: 40%;
    left: 26%;
    width: 22%;
    animation-name: pinFromBottom;
    animation-delay: 0.6s;
}

/* -- Map: Chester (position now via .contact-hero__link--map) -- */

/* -- Card: Email (from right) -- */
.contact-hero__link--email {
    top: 46%;
    right: 3%;
    width: 23%;
    animation-name: pinFromRight;
    animation-delay: 0.75s;
}

/* -- Phone (from bottom) -- */
.contact-hero__link--phone {
    bottom: 0%;
    left: 0%;
    width: 22%;
    animation-name: pinFromBottom;
    animation-delay: 0.3s;
}

/* -- Strip: Chester Dance Centre (from bottom) -- */
.contact-hero__strip-cdc {
    bottom: 8%;
    left: 50%;
    transform: translateX(-50%) scale(1);
    width: 30%;
    animation-name: pinFromBottom;
    animation-delay: 0.85s;
}

/* -- Post-it: Let's dance! (from right) -- */
.contact-hero__postit-lets-dance {
    top: 34%;
    right: 3%;
    width: 13%;
    z-index: 10;
    animation-name: pinFromRight;
    animation-delay: 0.8s;
}

/* -- Plant pot (from right) -- */
.contact-hero__plant {
    bottom: 0%;
    right: 0%;
    width: 14%;
    z-index: 12;
    animation-name: pinFromRight;
    animation-delay: 0.2s;
}

/* -- Paper stack: hear from you (from bottom) -- */
.contact-hero__paper-hear {
    bottom: 0%;
    right: 14%;
    width: 18%;
    z-index: 12;
    animation-name: pinFromBottom;
    animation-delay: 0.9s;
}

/* -- Pencil pot (from right) -- */
.contact-hero__pencil-pot {
    bottom: 0%;
    right: 10%;
    width: 11%;
    z-index: 13;
    animation-name: pinFromRight;
    animation-delay: 0.85s;
}

/* -- Map link (centre-right, wraps .contact-hero__map) -- */
.contact-hero__link--map {
    top: 30%;
    left: 50%;
    width: 22%;
    animation-delay: 0.7s;
}
.contact-hero__link--map .contact-hero__item {
    animation-delay: 0.7s;
}

/* ---- Mobile fallback (full composite) ---- */

.contact-hero--mobile-fallback {
    display: none;
}

/* ===================== CONTACT FORM SECTION ===================== */

.contact-form {
    background: var(--ededed, #ededed);
    padding: 5rem 0;
    scroll-margin-top: 2rem;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: var(--sp-8, 3rem);
    align-items: start;
}

.contact-form__info .section-head {
    text-align: left;
}

.contact-form__info p {
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: var(--sp-6, 2rem);
}

.contact-form__details {
    display: flex;
    flex-direction: column;
    gap: var(--sp-4, 1.25rem);
}

.contact-form__detail {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.contact-form__detail i {
    font-size: 1.25rem;
    color: var(--mustard, #2bb5a0);
    margin-top: 0.15rem;
    width: 1.5rem;
    text-align: center;
}

.contact-form__detail div {
    display: flex;
    flex-direction: column;
}

.contact-form__detail strong {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1B1B1B;
}

.contact-form__detail a {
    color: var(--mustard-deep, #1f8c7c);
    text-decoration: none;
    font-weight: 600;
}

.contact-form__detail a:hover {
    text-decoration: underline;
}

.contact-form__detail span {
    font-size: 0.85rem;
    color: #777;
}

/* ---- Form card ---- */

.contact-form__card {
    background: #fff;
    border-radius: 16px;
    padding: var(--sp-6, 2rem);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.contact-form__card h3 {
    font-family: 'Inter Tight', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1B1B1B;
    margin-bottom: 0.25rem;
}

.contact-form__sub {
    font-size: 0.9rem;
    color: #777;
    margin-bottom: var(--sp-5, 1.5rem);
}

.contact-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form__field {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem;
}

.contact-form__field label {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.35rem;
}

.contact-form__field .req {
    color: var(--red, #F91814);
}

.contact-form__field input,
.contact-form__field select,
.contact-form__field textarea {
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    padding: 0.7rem 0.9rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafa;
    color: #1B1B1B;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form__field input:focus,
.contact-form__field select:focus,
.contact-form__field textarea:focus {
    outline: none;
    border-color: var(--mustard, #2bb5a0);
    box-shadow: 0 0 0 3px rgba(43, 181, 160, 0.15);
}

.contact-form__field textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form__field--flash {
    animation: flashSelect 0.6s ease;
}

@keyframes flashSelect {
    0%, 100% { border-color: var(--mustard, #2bb5a0); box-shadow: 0 0 0 3px rgba(43, 181, 160, 0); }
    50% { border-color: var(--mustard-bright, #7de2d1); box-shadow: 0 0 0 6px rgba(43, 181, 160, 0.25); }
}

.contact-form__submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter Tight', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #1B1B1B;
    background: var(--mustard-bright, #7de2d1);
    border: none;
    border-radius: 50px;
    padding: 0.85rem 2rem;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    margin-top: 0.5rem;
}

.contact-form__submit:hover {
    background: var(--mustard, #2bb5a0);
    transform: translateY(-1px);
}

/* ===================== MAP SECTION ===================== */

.contact-map {
    background: #fff;
    padding: var(--section-pad, 5rem 0);
}

.contact-map .section-head {
    text-align: center;
    margin-bottom: var(--sp-6, 2rem);
}

.contact-map .section-head p {
    font-family: 'Manrope', sans-serif;
    font-size: 1.05rem;
    color: #555;
}

.contact-map__wrap {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.contact-map__wrap iframe {
    display: block;
    width: 100%;
    height: 450px;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 1024px) {
    .contact-hero__board {
        height: 70vh;
    }
}

@media (max-width: 768px) {
    .contact-hero__board {
        display: none;
    }

    .contact-hero--mobile-fallback {
        display: block;
        width: 100%;
        background: url('../images/contact/base-corkboard.webp') center / cover no-repeat;
        aspect-ratio: 16 / 9;
        min-height: 280px;
    }

    .contact-form__grid {
        grid-template-columns: 1fr;
        gap: var(--sp-6, 2rem);
    }

    .contact-form .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .contact-form__info .section-head {
        text-align: center;
    }

    .contact-form__info p {
        text-align: center;
    }

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

    .contact-map__wrap iframe {
        height: 300px;
    }

    .contact-map .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .contact-hero--mobile-fallback {
        min-height: 200px;
    }

    .contact-map__wrap iframe {
        height: 250px;
    }
}
