/* MAP SECTION - "THE GEOLOCATION HUD" */
/* Concept: Satellite view, tactical display, target lock */

.map-section {
    position: relative;
    padding: 0;
    height: 600px;
    background-color: #000;
    z-index: 20;
    /* High Z-Index to overlay Contact section */
    margin-top: -120px;
    /* Deep overlap */

    /* EXTRAORDINARY SEPARATION: "The Seismic Tech Fracture" */
    /* An aggressive, full-width jagged cut */
    clip-path: polygon(0 120px,
            15% 30px,
            30% 120px,
            45% 10px,
            55% 10px,
            70% 120px,
            85% 30px,
            100% 120px,
            100% 100%,
            0% 100%);
}

/* GLOWING BORDER FRACTURE */
.map-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 21;
    pointer-events: none;

    /* Hazard Strip Pattern Gradient */
    background: repeating-linear-gradient(45deg,
            var(--color-cyan),
            var(--color-cyan) 10px,
            var(--color-magenta) 10px,
            var(--color-magenta) 20px);

    /* The Border Cut - A thin strip following the main shape */
    clip-path: polygon(0 120px, 15% 30px, 30% 120px, 45% 10px, 55% 10px, 70% 120px, 85% 30px, 100% 120px,
            100% 125px, 85% 35px, 70% 125px, 55% 15px, 45% 15px, 30% 125px, 15% 35px, 0 125px);

    opacity: 1;
    /* High visibility */
    box-shadow: 0 0 50px var(--color-cyan);
    mix-blend-mode: screen;
}

.map-overlay-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    background:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.8) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.8) 100%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.8) 0%, transparent 20%, transparent 80%, rgba(0, 0, 0, 0.8) 100%);
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.9);
}

/* Grid Lines */
.map-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(0, 255, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 100px 100px;
    opacity: 0.3;
}

/* Target Reticle */
.target-reticle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 250px;
    height: 250px;
    border: 2px solid rgba(0, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulseReticle 4s infinite;
}

.target-reticle::before,
.target-reticle::after {
    content: '';
    position: absolute;
    background: var(--color-cyan);
}

/* Crosshairs */
.target-reticle::before {
    top: 50%;
    left: -10px;
    right: -10px;
    height: 1px;
}

.target-reticle::after {
    left: 50%;
    top: -10px;
    bottom: -10px;
    width: 1px;
}

@keyframes pulseReticle {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0.2);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 0.8;
        box-shadow: 0 0 20px 10px rgba(0, 255, 255, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.5;
        box-shadow: 0 0 0 0 rgba(0, 255, 255, 0);
    }
}

/* Address Card HUD */
.address-card-hud {
    position: absolute;
    bottom: 50px;
    left: 50px;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--color-cyan);
    padding: 25px;
    max-width: 400px;
    backdrop-filter: blur(10px);
    z-index: 20;
    border-left: 5px solid var(--color-magenta);
    pointer-events: auto;
    /* clickable text */
    transform: skewX(-5deg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.address-title {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.address-lines {
    font-family: var(--font-body);
    color: #ccc;
    font-size: 1rem;
    line-height: 1.6;
}

.address-highlight {
    color: var(--color-cyan);
    font-weight: bold;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: rgba(0, 255, 255, 0.5);
    box-shadow: 0 0 15px var(--color-cyan);
    animation: scanMap 5s linear infinite;
    opacity: 0.5;
}

@keyframes scanMap {
    0% {
        top: 0%;
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

.google-map-iframe {
    width: 100%;
    height: 100%;
    filter: invert(90%) hue-rotate(180deg) contrast(1.2) grayscale(0.2);
    /* Dark Mode Hack for non-API map */
    border: none;
}

/* Map specific responsive */
@media (max-width: 768px) {
    .address-card-hud {
        bottom: 20px;
        left: 20px;
        right: 20px;
        width: auto;
        transform: skewX(0);
    }
}