/* =========================================
   CONTACT PAGE STYLES
   ========================================= */

/* =========================================
   HERO — same animated gradient treatment as the About page hero
   (navy -> royal blue -> navy sweep, drifting aurora blobs, and a
   pointer-tracked spotlight wired up in contact.js)
   ========================================= */
.contact-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 3rem;
    overflow: hidden;
    isolation: isolate;

    /* Updated live by contact.js so the spotlight tracks the cursor */
    --hero-mx: 50%;
    --hero-my: 50%;

    background: linear-gradient(135deg,
                var(--color-navy) 0%,
                var(--color-navy-dark) 50%,
                var(--color-navy) 100%);
    background-size: 200% auto;
    background-position: 0% center;
    animation: heroGradientShift 18s ease-in-out infinite;
}

@keyframes heroGradientShift {
    0%   { background-position: 0% center; }
    50%  { background-position: 100% center; }
    100% { background-position: 0% center; }
}

.contact-hero::before {
    content: "";
    position: absolute;
    inset: -25%;
    z-index: -2;
    pointer-events: none;
    background:
        radial-gradient(38% 42% at 22% 28%, rgba(14, 23, 48, 0.55) 0%, rgba(14, 23, 48, 0) 66%),
        radial-gradient(34% 38% at 78% 70%, rgba(24, 38, 74, 0.60) 0%, rgba(24, 38, 74, 0) 68%),
        radial-gradient(30% 34% at 62% 16%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0) 70%);
    animation: heroAurora 26s ease-in-out infinite alternate;
}

@keyframes heroAurora {
    0%   { transform: translate3d(-3%, -2%, 0) scale(1); }
    50%  { transform: translate3d(3%, 3%, 0) scale(1.08); }
    100% { transform: translate3d(-2%, 2%, 0) scale(1.03); }
}

.contact-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    background: radial-gradient(circle 420px at var(--hero-mx) var(--hero-my),
                rgba(255, 255, 255, 0.20) 0%,
                rgba(14, 23, 48, 0.35) 38%,
                rgba(255, 255, 255, 0) 72%);
}

.contact-hero.is-pointer-active::after { opacity: 1; }

.contact-hero-container {
    position: relative;
    z-index: 1;
    width: 100%;
}

.contact-hero .overline {
    color: var(--color-accent);
}

.contact-hero h2 {
    color: var(--color-white);
    margin-bottom: 0;
}

.contact-hero h2 .highlight-blue {
    color: var(--color-accent);
}

.highlight-blue {
    color: var(--color-blue);
}

@media (prefers-reduced-motion: reduce) {
    .contact-hero,
    .contact-hero::before {
        animation: none;
    }
}

@media (max-width: 900px) {
    .contact-hero {
        padding: 8.5rem 0 3.5rem;
    }
}

.contact-main {
    background-color: #f8fafc;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: flex-start;
}

.offices-desc {
    color: var(--color-gray);
    font-size: 1.05rem;
    line-height: 1.65;
    margin: 0 auto;
}

/* Office Cards */
.office-cards-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

@media (max-width: 900px) {
    .office-cards-wrapper {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    .office-cards-wrapper {
        grid-template-columns: 1fr;
    }
}

.office-card {
    background-color: #ffffff;
    border: 1px solid #dfe4ea;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
}

.office-card:hover {
    transform: translateY(-4px);
    border-color: #5ec8e5;
    box-shadow: 0 10px 25px rgba(24, 38, 74, 0.05);
}

.office-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f3f6fa; 
}

/* UPDATED: Office Identity Layout (Aligns Icon beside text) */
.office-identity {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
}

.office-main-icon {
    color: #2841a2;
    font-size: 1.25rem;
    margin-top: 0.25rem; /* Pushes the icon down perfectly to align with "Lebanon" */
}

.office-titles {
    display: flex;
    padding-left: 25px;
    flex-direction: column;
    gap: 0.1rem;
}

.office-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #18264a;
    margin: 0;
    line-height: 1.2;
}

.office-loc {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #7e8a96;
    margin: 0;
    line-height: 1.2;
}

/* =========================================
   OFFICE CONTACT INFO — phone & email shown directly
   ========================================= */
.office-details {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 1rem;
}

.office-details p {
    font-size: 0.95rem;
    color: #555555;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.office-details p i {
    color: #2841a2;
    font-size: 0.9rem;
    min-width: 16px;
    text-align: center;
}

.office-card .branch-map-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #f3f6fa;
    color: #18264a;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 1.15rem;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(24, 38, 74, 0.04);
}

.office-card:hover .branch-map-action-btn {
    background-color: #2841a2;
    color: #ffffff;
}

.office-card .branch-map-action-btn:hover {
    background-color: #18264a !important;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 15px rgba(94, 200, 229, 0.6);
}

.office-email {
    color: #555555;
    display: inline-block;
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform-origin: left center;
}

.office-email:hover {
    color: #2841a2 !important;
    text-decoration: underline;
    transform: scale(1.05);
}

/* =========================================
   OUR LOCATIONS — interactive map
   Pins for Lebanon / Jordan / Saudi Arabia. Clicking a pin (or the
   location icon on an office card above) flies the map to that country.
   ========================================= */
.location-map-block {
    margin-top: 1rem;
}

.location-map-block .section-title {
    margin-bottom: 2rem;
}

.location-map-frame {
    position: relative;
    width: 100%;
    height: 440px;
    background-color: var(--color-light);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #dfe4ea;
    margin-top: 2%;
}

.contact-leaflet-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* IMPORTANT FOR COPYRIGHTS*/
.contact-leaflet-map .leaflet-control-attribution {
    font-size: 6px;
    line-height: 1;
    padding: 0 2px;
    margin: 0;
    background: transparent;
    box-shadow: none;
    opacity: 0.1;
    transition: opacity 0.2s ease;
}

/* Pin markers on the map */
.contact-map-pin {
    width: 26px;
    height: 26px;
    border-radius: 50% 50% 50% 0;
    background-color: var(--color-blue);
    border: 3px solid var(--color-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
    transform: rotate(-45deg);
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.contact-map-pin-wrapper:hover .contact-map-pin {
    background-color: var(--color-navy);
    transform: rotate(-45deg) scale(1.12);
}

.contact-map-popup {
    font-family: var(--font-main);
}

.contact-map-popup strong {
    display: block;
    color: var(--color-navy);
    font-size: 0.95rem;
    margin-bottom: 0.2rem;
}

.contact-map-popup span {
    display: block;
    color: var(--color-gray);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.contact-map-popup-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--color-blue);
    font-size: 0.82rem;
    font-weight: 700;
}

.contact-map-popup-link i {
    font-size: 0.7rem;
}

.contact-map-popup-link:hover {
    text-decoration: underline;
}

.location-map-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.25rem;
}

.regional-map-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 1.4rem;
    font-family: var(--font-main);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: 50px;
    background-color: var(--color-white);
    color: var(--color-navy);
    border: 1px solid var(--color-light);
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.regional-map-reset-btn:hover {
    border-color: var(--color-blue);
    color: var(--color-blue);
    transform: translateY(-2px);
}

@media (max-width: 600px) {
    .location-map-frame {
        height: 340px;
    }
}

/* =========================================
   MESSAGE HERO — "Start a Conversation" treated as its own
   hero-style split section: copy on the left, form on the right
   (mirrors the home page's "Who We Are" intro layout).
   ========================================= */
.message-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 5rem 0 6rem;
    background: linear-gradient(135deg, #eef1f5 0%, #e2e7ee 48%, #eef1f5 100%);
}

.message-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(40% 55% at 6% 10%, rgba(126, 138, 150, 0.18) 0%, rgba(126, 138, 150, 0) 70%),
        radial-gradient(38% 55% at 96% 94%, rgba(40, 65, 162, 0.09) 0%, rgba(40, 65, 162, 0) 72%);
}

.message-hero-grid {
    display: grid;
    grid-template-columns: 0.85fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.message-hero-content .section-title {
    margin-bottom: 1.25rem;
}

.message-hero-content .desc-text {
    color: var(--color-gray);
    font-size: 1.05rem;
    line-height: 1.65;
    max-width: 460px;
    margin-bottom: 0;
}

.message-hero-content .social-media-box {
    margin-top: 2.5rem;
    max-width: 460px;
}

.message-hero-form {
    max-width: 560px;
    width: 100%;
}

@media (max-width: 992px) {
    .message-hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .message-hero-content .desc-text {
        max-width: 100%;
    }
    .message-hero-form {
        max-width: 100%;
    }
}

/* Contact Form Card — matches the careers page .form-card box style */
.contact-form-card {
    background: var(--color-white);
    padding: 3rem;
    border-radius: 16px;
    max-width: 100%;
    width: 100%;
    margin: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    border: 1px solid #dfe4ea;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: border-color 0.35s ease, box-shadow 0.35s ease, transform 0.35s ease;
}

.contact-form-card:hover,
.contact-form-card:focus-within {
    border-color: var(--color-accent);
    box-shadow: 0 20px 45px rgba(24, 38, 74, 0.10);
    transform: translateY(-4px);
}

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-group {
    flex: 1;
    margin-bottom: 1.5rem;
}

.contact-form-card input[type="text"],
.contact-form-card input[type="email"],
.contact-form-card input[type="tel"],
.contact-form-card textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    border: 1px solid var(--color-light);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--color-navy);
    background-color: var(--color-white);
    transition: all 0.3s ease;
}

.contact-form-card input::placeholder,
.contact-form-card textarea::placeholder {
    color: #aeb6bb;
}

.contact-form-card input:focus,
.contact-form-card textarea:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(40, 65, 162, 0.1);
}

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

.submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: auto;
    border-radius: 8px;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(40, 65, 162, 0.18);
    transition: all 0.3s ease;
}

.submit-btn i {
    font-size: 0.95rem;
    transition: transform 0.3s ease;
}

.submit-btn:hover {
    box-shadow: 0 14px 30px rgba(40, 65, 162, 0.28);
}

.submit-btn:hover i {
    transform: translate(3px, -3px);
}

/* Success Modal Overlay */
.success-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(24, 38, 74, 0.6); 
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.success-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.success-modal-card {
    background-color: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(24, 38, 74, 0.15);
    border: 1px solid #f3f6fa;
    transform: scale(0.85);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-modal-overlay.active .success-modal-card {
    transform: scale(1);
}

.success-icon-halo {
    color: #5ec8e5; 
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: inline-flex;
    animation: iconPopIn 0.5s ease;
}

.success-modal-card h3 {
    color: #18264a;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
}

.success-modal-card p {
    color: #555555;
    font-size: 0.95rem;
    margin: 0 0 1.5rem 0;
}

.close-modal-btn {
    background-color: #2841a2;
    color: #ffffff;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s ease;
}

.close-modal-btn:hover {
    background-color: #18264a;
}

@keyframes iconPopIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* UPDATED: Enhanced Social Media Box */
.social-media-box {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    text-align: center;
    background: linear-gradient(135deg, #18264a 0%, #2841a2 55%, #18264a 100%);
    background-size: 200% auto;
    background-position: 0% center;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 2rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(24, 38, 74, 0.12);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.4s ease, background-position 0.6s ease;
}

.social-media-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(24, 38, 74, 0.22);
    background-position: 100% center;
}

.social-media-box p {
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0;
}

.social-media-box .social-icons a {
    background-color: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.social-media-box .social-icons a:hover {
    background-color: #5ec8e5;
    color: #18264a;
}

@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .office-header-row {
        flex-direction: row;
    }
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .contact-form-card {
        padding: 2rem 1.5rem; 
    }
    .social-media-box {
        flex-direction: column;
        gap: 1.25rem;
        text-align: center;
    }
}