/* ============================================================
   PIBD — CONTACT PAGE REDESIGN
   Unique, premium, modern nonprofit contact page
    Palette: Primary #A3181E · Dark #5B060B · Midnight #0f172a
   Fonts: Fraunces + Inter
   ============================================================ */

.contact-page {
    --primary: #A3181E;
    --primary-dark: #5B060B;
    --primary-hover: #8A141A;
    --primary-soft: rgba(163, 24, 30, 0.06);
    --primary-fade: rgba(163, 24, 30, 0.09);
    --primary-tint: rgba(163, 24, 30, 0.12);
    --primary-glow: rgba(163, 24, 30, 0.18);

     --slate: #0f172a;
    --ink: #23201f;
    --ink-soft: #56504f;
    --ink-mute: #837b7a;
    --surface: #ffffff;
    --surface-alt: #f7f6f4;
    --canvas: #f4f3f1;

    --line: rgba(35, 32, 31, 0.10);
    --line-soft: rgba(35, 32, 31, 0.06);

    --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 2px 10px rgba(0,0,0,.05), 0 8px 22px rgba(0,0,0,.04);
    --shadow-md: 0 8px 22px rgba(0,0,0,.07), 0 18px 40px rgba(0,0,0,.06);
    --shadow-lg: 0 18px 40px rgba(0,0,0,.10), 0 34px 70px rgba(0,0,0,.10);

    --r-sm: 8px;
    --r-md: 12px;
    --r-lg: 16px;
    --r-xl: 22px;
    --r-pill: 999px;

    --maxw: 1200px;
    --ease: 220ms cubic-bezier(.4,0,.2,1);

    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    line-height: 1.65;
}

.contact-page * { box-sizing: border-box; }
.contact-page a { color: inherit; text-decoration: none; }
.contact-page img { max-width: 100%; display: block; }

.contact-page .container {
    width: min(calc(100% - 48px), var(--maxw));
    margin-inline: auto;
}

/* ============================================================
   HERO — Unique split design
   ============================================================ */
.contact-page .cp-hero {
    position: relative;
    min-height: 50svh;
    display: flex;
    align-items: center;
    padding: clamp(48px, 8vh, 80px) 0;
    overflow: hidden;
    background: var(--slate);
}

.contact-page .cp-hero__pattern {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: .04;
    background-image: 
        radial-gradient(circle at 20% 30%, var(--primary) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, var(--primary) 1px, transparent 1px),
        radial-gradient(circle at 50% 50%, var(--primary) 1.5px, transparent 1.5px);
    background-size: 60px 60px, 80px 80px, 100px 100px;
    background-position: 0 0, 40px 40px, 20px 20px;
}

.contact-page .cp-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
     background: linear-gradient(135deg, rgba(15,23,42,.95) 0%, rgba(10,20,35,.98) 100%);
}

.contact-page .cp-hero__content {
    position: relative;
    z-index: 2;
    max-width: 640px;
}

.contact-page .cp-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem 1rem;
    border-radius: var(--r-pill);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: rgba(255,255,255,.9);
    margin-bottom: 1.5rem;
}

.contact-page .cp-hero__tag::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(163,24,30,.35);
}

.contact-page .cp-hero__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.08;
    color: #fff;
    margin: 0 0 1.25rem;
    text-shadow: 0 2px 30px rgba(0,0,0,.4);
}

.contact-page .cp-hero__title span {
    color: #ffd2d6;
}

.contact-page .cp-hero__sub {
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.75;
    color: rgba(255,255,255,.82);
    max-width: 560px;
    margin: 0;
    text-shadow: 0 1px 12px rgba(0,0,0,.35);
}

.contact-page .cp-hero__decor {
    position: absolute;
    pointer-events: none;
    z-index: 1;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.06);
}

.contact-page .cp-hero__decor--1 {
    width: 400px;
    height: 400px;
    top: -150px;
    right: -100px;
}

.contact-page .cp-hero__decor--2 {
    width: 250px;
    height: 250px;
    bottom: -80px;
    left: -60px;
    background: rgba(163,24,30,.05);
}

/* ============================================================
   CONTACT SECTION — Asymmetric Layout
   ============================================================ */
.contact-page .cp-section {
    padding: clamp(64px, 8vw, 100px) 0;
    position: relative;
    background: var(--canvas);
}

.contact-page .cp-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: start;
}

/* ============================================================
   FORM — Unique card with accent border
   ============================================================ */
.contact-page .cp-form-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    padding: 48px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--ease), transform var(--ease);
}

.contact-page .cp-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 0 0 4px 4px;
}

.contact-page .cp-form-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.contact-page .cp-form-header {
    margin-bottom: 36px;
    padding-top: 8px;
}

.contact-page .cp-form-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: clamp(1.6rem, 2.5vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -.022em;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 10px;
}

.contact-page .cp-form-subtitle {
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.7;
    margin: 0;
}

.contact-page .cp-form-group {
    margin-bottom: 22px;
    position: relative;
}

.contact-page .cp-form-label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 8px;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.contact-page .cp-form-label .required {
    color: var(--primary);
    margin-left: 2px;
}

.contact-page .cp-form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    font-size: .95rem;
    font-family: inherit;
    color: var(--ink);
    background: var(--surface-alt);
    transition: all var(--ease);
    outline: none;
}

.contact-page .cp-form-control::placeholder {
    color: var(--ink-mute);
    opacity: .7;
}

.contact-page .cp-form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-fade), 0 2px 8px rgba(0,0,0,.04);
    background: var(--surface);
    transform: translateY(-1px);
}

.contact-page .cp-form-control:hover {
    border-color: rgba(163, 24, 30, .2);
    background: var(--surface);
}

.contact-page .cp-form-textarea {
    resize: vertical;
    min-height: 150px;
    line-height: 1.7;
}

.contact-page .cp-form-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: var(--r-pill);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(163,24,30,.25);
    transition: all var(--ease);
    position: relative;
    overflow: hidden;
    margin-top: 8px;
}

.contact-page .cp-form-submit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
    opacity: 0;
    transition: opacity var(--ease);
}

.contact-page .cp-form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(163,24,30,.35);
}

.contact-page .cp-form-submit:hover::before {
    opacity: 1;
}

.contact-page .cp-form-submit:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(163,24,30,.2);
}

.contact-page .cp-form-submit .ar {
    transition: transform var(--ease);
    display: inline-block;
}

.contact-page .cp-form-submit:hover .ar {
    transform: translateX(4px);
}

/* Validation States */
.contact-page .cp-form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220,53,69,.08);
    background: #fff5f5;
}

.contact-page .cp-form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25,135,84,.08);
}

/* Success Message */
.contact-page .cp-success {
    display: none;
    text-align: center;
    padding: 56px 32px;
    background: var(--surface);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.contact-page .cp-success.is-visible {
    display: block;
    animation: cpFadeIn 400ms ease;
}

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

.contact-page .cp-success__icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #198754, #157347);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2.2rem;
    margin: 0 auto 24px;
    box-shadow: 0 10px 28px rgba(25,135,84,.25);
}

.contact-page .cp-success__title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink);
    margin: 0 0 10px;
}

.contact-page .cp-success__text {
    color: var(--ink-soft);
    font-size: .95rem;
    line-height: 1.7;
    margin: 0;
}

/* ============================================================
   CONTACT INFO — Distinctive cards
   ============================================================ */
.contact-page .cp-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-page .cp-info-card {
    position: relative;
    background: var(--surface);
    border-radius: var(--r-xl);
    border: 1px solid var(--line);
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all var(--ease);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}

.contact-page .cp-info-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--primary-dark));
    border-radius: 4px 0 0 4px;
    opacity: 0;
    transition: opacity var(--ease);
}

.contact-page .cp-info-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-tint);
}

.contact-page .cp-info-card:hover::before {
    opacity: 1;
}

.contact-page .cp-info-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    background: var(--primary-soft);
    color: var(--primary);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: all var(--ease);
    border: 1px solid var(--line);
}

.contact-page .cp-info-card:hover .cp-info-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    transform: scale(1.05);
    border-color: transparent;
}

.contact-page .cp-info-content {
    flex: 1;
}

.contact-page .cp-info-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--ink);
    margin: 0 0 6px;
}

.contact-page .cp-info-text {
    color: var(--ink-soft);
    font-size: .9rem;
    line-height: 1.7;
    margin: 0;
}

.contact-page .cp-info-text a {
    color: var(--primary);
    font-weight: 500;
    transition: all var(--ease);
    position: relative;
}

.contact-page .cp-info-text a::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--primary);
    transition: width var(--ease);
}

.contact-page .cp-info-text a:hover {
    color: var(--primary-dark);
}

.contact-page .cp-info-text a:hover::after {
    width: 100%;
}

/* ============================================================
   MAP — Unique bordered panel
   ============================================================ */
.contact-page .cp-map {
    margin-top: 4px;
    border-radius: var(--r-xl);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    background: var(--surface-alt);
    aspect-ratio: 16 / 9;
    display: grid;
    place-items: center;
    color: var(--ink-mute);
    font-size: .9rem;
    text-align: center;
    padding: 24px;
    position: relative;
}

.contact-page .cp-map::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(90deg, transparent 49.5%, rgba(163,24,30,.04) 49.5%, rgba(163,24,30,.04) 50.5%, transparent 50.5%),
        linear-gradient(0deg, transparent 49.5%, rgba(163,24,30,.04) 49.5%, rgba(163,24,30,.04) 50.5%, transparent 50.5%);
    background-size: 40px 40px;
    pointer-events: none;
}

.contact-page .cp-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
    position: relative;
    z-index: 1;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 960px) {
    .contact-page .cp-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .contact-page .cp-form-card {
        padding: 36px;
    }

    .contact-page .cp-info {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .contact-page .cp-info-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .contact-page .cp-section {
        padding: 56px 0;
    }

    .contact-page .cp-form-card {
        padding: 28px;
    }

    .contact-page .cp-hero {
        min-height: 40svh;
        text-align: center;
    }

    .contact-page .cp-hero__content {
        max-width: 100%;
    }

    .contact-page .cp-hero__sub {
        max-width: 100%;
    }

    .contact-page .cp-info {
        grid-template-columns: 1fr;
    }

    .contact-page .cp-info-card:last-child {
        grid-column: span 1;
    }

    .contact-page .cp-info-card {
        padding: 22px;
        gap: 16px;
    }

    .contact-page .cp-info-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-page .cp-form-card {
        padding: 22px;
        border-radius: var(--r-lg);
    }

    .contact-page .cp-form-control {
        padding: 12px 16px;
        font-size: .9rem;
    }

    .contact-page .cp-form-submit {
        padding: 14px 24px;
        font-size: .95rem;
    }

    .contact-page .cp-info-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 16px;
    }

    .contact-page .cp-hero__tag {
        font-size: .7rem;
        padding: .4rem .85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-page *, .contact-page *::before, .contact-page *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
