/* Contact page minimal styles — match other pages' heading and dark theme */

.section-timeline-heading{
    background-color: black;
}

.container{
    width: 90vw;
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
}

.padding-vertical-xlarge{
    /* move the page heading up a bit so content is tighter under the fixed header */
     /* tuned spacing: slightly increase gap between nav and heading while
         keeping the cards close to the heading. */
     padding-top: 75px;
    padding-bottom: 20px;
}

.timeline-main-heading-wrapper{
    color: white;
    text-align: center;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

h2.intro-heading{
    font-size: 8vh;
    background: -webkit-linear-gradient(to right, gold, #ee0979);
    background: linear-gradient(to right, gold, #ee0979);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

body{
    background-color: black;
    color: #e6e6e6;
}

.contact-list ul{
    list-style: none;
    padding: 0;
    margin: 24px 0 80px 0;
    font-size: 1.9vh;
}

.contact-list li{
    margin-bottom: 10px;
}

.contact-list a{ color: #feda4a; text-decoration: none; }
.contact-list a:hover{ text-decoration: underline; }

/* Location thumbnails shown under the subtitle */
.contact-photos.full-bleed{
    width: 100vw;
    margin-left: calc(50% - 50vw); /* keep the container full-bleed */
}

.contact-photos-inner{
    width: min(920px, 90vw);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 4px 0; /* minimal vertical padding */
    box-sizing: border-box;
    border-color: #e6e6e6;
}

.contact-photos-inner img{
    width: 100%;
    height: auto;
    object-fit: contain; /* don't crop */
    display: block;
}

/* Contact card interactive styles */
.contact-card{ position: relative; overflow: hidden; }
.contact-btn{ display: block; width: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.contact-btn img{ display: block; width: 100%; height: auto; }

.contact-hover{
    position: absolute; inset: 0; display:flex; align-items:center; justify-content:center;
    background: rgba(0,0,0,0); color: #fff; opacity: 0; transition: background 180ms ease, opacity 180ms ease;
}
.contact-card:hover .contact-hover{ background: rgba(0, 0, 0, 0.632); opacity: 1; }
.hover-text{ text-align: center; transition: transform 160ms ease; }
.hover-text .question{ font-size: 2vh; font-weight: 700; margin-bottom: 6px; }
.hover-text .action{ font-size: 1.6vh; color: #feda4a; }

/* Move the hover overlay text slightly upwards when the overlay appears
   so the copy feels visually centred over the image. */
.contact-card:hover .hover-text,
.contact-card:focus-within .hover-text{
    transform: translateY(-30px);
}

.contact-details{
    position: absolute; inset: 0; display:flex; align-items:center; justify-content:center;
    background: rgba(0,0,0,0); color: #fff; opacity: 0; pointer-events: none;
    transition: background 220ms ease, opacity 220ms ease;
}
.contact-card.revealed .contact-details{
    /* green overlay for winning card with backdrop blur */
    background: rgba(2, 47, 13, 0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 1;
    pointer-events: auto;
    cursor: text;
    z-index: 3; /* ensure details sits above hover overlay so text can be selected */
}
.contact-card.revealed .contact-hover{
    opacity: 0;
    pointer-events: none; /* allow pointer interaction (selection) to reach the details */
    z-index: 1; /* keep hover visually below details */
}
.details-text{ color: #e6e6e6; font-size: 1.9vh; white-space: pre-wrap; text-align: center; margin: 0 12px; }

/* Close button inside details */
.contact-close{
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 0;
    color: #e6e6e6;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    padding: 6px 8px;
}
.contact-close:hover{ color: #d6ffd2; }

/* Wrong state styling */
.contact-card.wrong .contact-details{
    /* darker red overlay for wrong attempts with backdrop blur */
    background: rgba(40,6,6,0.92);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    opacity: 1;
    pointer-events: none;
}
.contact-card.wrong .details-text{ color: #8b0000; font-weight: 700; }

/* In dark mode, make the 'Wrong' text a lighter red for better contrast */
body:not(.light-mode) .contact-card.wrong .details-text{
    color: #ff8a8a !important;
}

/* Animations for wrong and revealed states */
@keyframes wrongPulse {
    0% { transform: translateY(0) scale(1); opacity: 0.95; }
    30% { transform: translateY(-4px) scale(1.02); }
    60% { transform: translateY(2px) scale(0.995); }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

@keyframes revealedFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.contact-card.wrong .contact-details{
    animation: wrongPulse 420ms cubic-bezier(.2,.9,.3,1);
}

.contact-card.revealed .contact-details{
    animation: revealedFade 220ms ease;
}

/* When details are revealed, default the details text to black so the
   copy reads on light overlays. Dark-mode will override this below to keep
   white text on dark revealed overlays. */
.contact-card.revealed .details-text{
    color: #000000;
}

/* Ensure revealed details and their children remain selectable so the
   selection highlight doesn't disappear when the overlay is active. */
.contact-card.revealed .details-text,
.contact-card.revealed .details-text *{
    user-select: text !important;
    -webkit-user-select: text !important;
}

/* Ensure dark-mode keeps the revealed details readable (light text on dark bg) */
body:not(.light-mode) .contact-card.revealed .details-text{
    color: #e6e6e6 !important;
}



/* Correct label & links inside details */
.details-text .correct{
    font-weight: 700;
    font-size: 1.9vh;
    color: #74ec92; /* dark green for correct */
    margin-bottom: 8px;
}
.details-text .addr{ color: #e6e6e6; margin-bottom: 8px; white-space: pre-wrap; }
.details-text .contact-links a{ color: #adffa5; text-decoration: none; }
.details-text .contact-links a:hover{ text-decoration: underline; }

/* If the address is wrapped in an <a> (to make it a clickable link),
   keep the text color the same as the surrounding .addr and only show
   an underline on hover/focus. Also ensure visited links don't change
   the color. This keeps the address visually consistent while making
   it interactive. */
.details-text .addr a{
    color: inherit !important; /* keep same color (black in light-mode) */
    text-decoration: none !important;
    border-bottom: 1px solid transparent; /* prevents layout shift on hover in some browsers */
    cursor: pointer;
}
.details-text .addr a:visited{
    color: inherit !important;
}
.details-text .addr a:hover,
.details-text .addr a:focus{
    text-decoration: underline !important;
    border-bottom-color: transparent;
    outline: none;
}

/* small screens: make each card stack horizontally (one-per-row) */
@media (max-width: 420px){
    .contact-photos-inner{ width: 94vw; }
    .contact-photos-inner img{ width: 100%; }
}

@media (max-width: 720px){
    .contact-photos-inner{
        grid-template-columns: 1fr; /* stack on small screens */
    }
}

/* Contact form card styling (black with gold accents) */
.contact-form-wrap{ width: 90vw; max-width: 920px; margin: 36px auto 24px; }
.contact-form-card{
    background: linear-gradient(180deg, rgba(0,0,0,0.85), rgba(10,10,10,0.95));
    border: 1px solid rgba(255, 255, 255, 0.307);
    box-shadow: 0 6px 22px rgba(0,0,0,0.6);
    padding: 22px; border-radius: 12px;
}
.contact-form-card .form-heading{
    margin: 0 0 12px 0; color: #fff0b2; font-size: 2.6vh; font-weight: 800; text-align: left; padding-bottom: 15px;
}
.contact-form-card .form-row{ margin-bottom: 12px; }
.contact-form-card label{ display:block; font-size: 1.6vh; color: #e6e6e6; margin-bottom: 6px; }
.contact-form-card input[type="text"],
.contact-form-card input[type="email"],
.contact-form-card textarea{
    width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.192);
    background: rgba(255,255,255,0.02); color: #e6e6e6; font-size: 1.8vh; resize: vertical;
    transition: box-shadow 140ms ease, border-color 140ms ease;
}
.contact-form-card input:focus, .contact-form-card textarea:focus{ outline: none; border-color: rgba(254,218,74,0.85); box-shadow: 0 0 0 4px rgba(254,218,74,0.06); }
.contact-form-card .form-actions{ display:flex; align-items:center; gap: 12px; }
.btn-submit{
    background: linear-gradient(180deg,#524306d5,#4e3b07); color: #ffffff; border: 1px solid #9e8419; padding: 10px 16px; border-radius: 8px; cursor: pointer; font-weight:700; font-size:1.8vh;
    transition: background 200ms ease-in, transform 220ms ease;
}
.btn-submit:hover{ background: linear-gradient(180deg,#766009d5,#766009d5); }
.btn-submit:active{ transform: translateY(1px); }
.form-msg{ color: #cbd9c4; font-size: 1.7vh; }
.form-msg.success{ color: #b7ffd0; }
.form-msg.error{ color: #ffd7d7; }

@media (max-width: 520px){
    .contact-form-card{ padding: 16px; }
    .contact-form-card .form-heading{ font-size: 2.4vh; }
}

/* Tighter spacing and smaller heading on small screens for contact page */
@media (max-width: 520px){
    /* small screens: keep a slightly smaller top gap to accommodate the
       fixed header while keeping cards visually close to heading */
    .padding-vertical-xlarge{ padding-top: 48px; padding-bottom: 18px; }
    h2.intro-heading{ font-size: 5.2vh; }
    .timeline-main-heading-wrapper{ max-width: 90vw; }
    .margin-bottom-medium{ margin-bottom: 2vh; }
}

/* Force a line break in the main contact heading on small screens */
.intro-heading .line-break{ display: inline; }
@media (max-width: 520px){
    .intro-heading .line-break{ display: block; }
}

/* Social cards using the same visual language as contact-form-card */
.social-cards{ display:flex; gap: 16px; width: 90vw; max-width: 920px; margin: 28px auto; flex-wrap: wrap; align-items: stretch; justify-content: center; }
.social-card{
    display:flex; align-items:center; justify-content:center;
    background: transparent; /* no card background */
    border: none;
    padding: 8px 14px; text-align:center; text-decoration:none; color: #e6e6e6;
    transition: opacity 140ms ease;
    height: 72px; /* consistent height */
    min-width: 72px; /* allow width to vary */
}
.social-card img{ width: auto; height: 64px; display:block; filter: grayscale(1) brightness(0) invert(1); object-fit: contain; }
.social-card:hover{ opacity: 0.85; }

/* Specific hover opacity for Facebook and Instagram icons */
.social-card[aria-label="Facebook"]:hover,
.social-card[aria-label="Instagram"]:hover{
    opacity: 0.8 !important;
}

@media (max-width: 900px){
    .social-cards{ justify-content: space-between; }
}
@media (max-width: 520px){
    .social-cards{ gap: 12px; }
    .social-card{ height: 64px; min-width: 64px; padding: 8px; }
        .social-card img{ height: 56px; }
}

/* Force social icons into a single row on narrow phones: size them so
   four fit comfortably in one line and remove wrapping. This only applies
   on small phones and keeps per-network fine-tuning intact. */
@media (max-width: 520px){
    .social-cards{
        gap: 8px !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        overflow-x: hidden !important;
        padding: 0 6px !important;
    }

    /* Make each card take roughly 1/4 of the available width */
    .social-card{
        flex: 0 0 calc((100% - 24px) / 4) !important;
        box-sizing: border-box !important;
        height: 56px !important;
        min-width: 56px !important;
        padding: 6px !important;
    }

    /* Slightly smaller images to fit the tighter layout */
    .social-card img{ height: 40px !important; }

    /* Keep per-network visual tweaks but shrink them proportionally */
    .social-card[aria-label="Facebook"] img{ height: 34px !important; }
    .social-card[aria-label="X (Twitter)"] img,
    .social-card[aria-label="LinkedIn"] img{ height: 28px !important; }
    .social-card[aria-label="Instagram"] img{ height: 34px !important; transform: translateY(1px) !important; }
}

/* Per-network fine-tuning: make X and LinkedIn slightly smaller, nudge Instagram down 1px */
.social-card[aria-label="X (Twitter)"] img{ height: 32px; }
.social-card[aria-label="Facebook"] img{ height: 45px; }
.social-card[aria-label="LinkedIn"] img{ height: 32px; }
.social-card[aria-label="Instagram"] img{  height: 45px; transform: translateY(3px); }

@media (max-width: 520px){
    .social-card[aria-label="Facebook"] img{ height: 35px; }
    .social-card[aria-label="X (Twitter)"] img,
    .social-card[aria-label="LinkedIn"] img{ height: 25px; }
    .social-card[aria-label="Instagram"] img{ height: 35px; transform: translateY(1px); }
}
