/*
============================================================
 GEOLAND MMC — Main Stylesheet
============================================================
 Project      : Geoland MMC Website
 File         : mapping.css
 Description  : Main stylesheet for the Geoland website,
                including layout, responsive design,
                animations, map interface and 3D terrain UI.
 Technologies : HTML5, CSS3, JavaScript, D3.js, Three.js, topojson
 Author       : Malik Babayev (vebigs.com)
 Website      : geoland.az
============================================================
*/


* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050706;
    font-family: Arial, Helvetica, sans-serif;
}

body {
    color: white;
}

/* BÖLGƏ HOVER ======================================== */

.region-hover {
    fill: rgba(120, 220, 150, 0.10) !important;
    stroke: #8cffae !important;
    stroke-width: 1.5px !important;
}

/* BÖLGƏ TOOLTİP =================================== */

.region-tooltip {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
    padding: 9px 13px;
    background: rgba(5, 12, 9, 0.95);
    border: 1px solid rgba(140, 255, 174, 0.45);
    color: #dffff0;
    font-family: Arial, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.region-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* HEADER =========================================== */
header {
    width: 100%;
    height: 120px;
}
.brand {
    width:auto;
}

.brand-name {
    height: 100px;
}
.brand-name img{
    height: 100%;
}

/* XƏRİTƏ =========================================== */

#mapScreen {
    position: fixed;
    inset: 0;
    top: 120px;
    width: 100%;
    height: calc(100% - 120px);
    background: radial-gradient(circle at center, #18211b 0%, #080b09 70%);
    transition: opacity 0.8s ease, transform 1s ease;
}

#mapScreen.hidden {
    opacity: 0;
    transform: scale(1.15);
    pointer-events: none;
}


#map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* SVG XƏRİTƏ========================================= */

#map svg {
    width: 100%;
    height: 100%;
}

#map path {
    fill: transparent;
    stroke: rgba(160, 255, 190, 0.25);
    stroke-width: 0.8;
    vector-effect: non-scaling-stroke;
}

#map path:hover {
    fill: rgba(160, 255, 190, 0.08);
    stroke: rgba(180, 255, 210, 0.75);
}


/* XƏRİTƏ BAŞLIĞI ========================================= */

.map-title {
    position: absolute;
    right: 45px;
    top: 40px;
    z-index: 20;
    text-align: right;
}

.map-title span {
    display: block;
    font-size: 11px;
    letter-spacing: 5px;
    color: rgba(255, 255, 255, 0.55);
}

.map-title small {
    display: block;
    margin-top: 8px;
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(160, 255, 190, 0.7);
}

/* XƏRİTƏ STATUSU ========================================= */

#mapStatus h1, #mapStatus sh2{
    position: absolute;
    bottom: 30px;
    left: 40px;
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(160, 255, 190, 0.5);
}


.map-seo-content {
    position: absolute;
    left: 50px;
    bottom: 45px;
    z-index: 10;
    width: min(520px, calc(100vw - 100px));
    padding: 18px 22px;
    background: rgba(5, 10, 8, 0.62);
    border-left: 2px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    pointer-events: none;
}

.map-seo-content h1 {
    margin: 0 0 8px;
    font-family: inherit;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.map-seo-content p {
    margin: 0;
    max-width: 480px;
    font-size: 13px;
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: rgba(255, 255, 255, 0.72);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .map-seo-content {
        left: 30px;
        bottom: 30px;

        width: min(480px, calc(100vw - 60px));

        padding: 15px 18px;
    }

    .map-seo-content h1 {
        font-size: 22px;
    }

    .map-seo-content p {
        font-size: 12px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {

    .map-seo-content {
        left: 15px;
        right: 15px;
        bottom: 20px;

        width: auto;

        padding: 13px 15px;

        background: rgba(5, 10, 8, 0.72);
    }

    .map-seo-content h1 {
        font-size: 18px;
        line-height: 1.2;
    }

    .map-seo-content p {
        font-size: 11px;
        line-height: 1.5;
    }
}


/* ƏRAZİ ================================================= */

.terrain-screen {
    position: fixed;
    inset: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background: #050706;
    transition: opacity 0.8s ease;
}

.terrain-screen.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* CANVAS  =============================================== */

#terrainCanvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* OVERLAY ============================================== */

.terrain-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(5, 7, 6, 0.85), transparent 40%),
        linear-gradient(0deg, rgba(5, 7, 6, 0.8), transparent 35%);
}

/* YUXARI PANEL ========================================= */

.terrain-topbar {
    position: absolute;
    top: 32px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 20;
}

.terrain-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 4px;
}

.terrain-location {
    margin-top: 6px;
    font-size: 8px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.45);
}

/* GERİ DÜYMƏSİ  ======================================== */

.back-button {
    border: 1px solid rgba(180, 255, 200, 0.25);
    background: rgba(0, 0, 0, 0.2);
    color: white;
    padding: 12px 20px;
    font-size: 10px;
    letter-spacing: 2px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.back-button:hover {
    border-color: rgba(180, 255, 200, 0.8);
    background: rgba(180, 255, 200, 0.08);
}

/* ƏRAZİ MƏLUMATI ============================================ */

.terrain-info {
    position: absolute;
    left: 45px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 300px;
}

.terrain-label {
    font-size: 9px;
    letter-spacing: 3px;
    color: rgba(180, 255, 200, 0.65);
}

#terrainRegionName {
    margin: 12px 0 0;
    font-size: 55px;
    line-height: 0.95;
    letter-spacing: -2px;
    font-weight: 700;
}

.terrain-line {
    width: 60px;
    height: 1px;
    margin: 25px 0;
    background: rgba(180, 255, 200, 0.6);
}

.terrain-stats {
    display: flex;
    gap: 35px;
}

.terrain-stats span {
    display: block;
    font-size: 8px;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
}

.terrain-stats strong {
    display: block;
    margin-top: 7px;
    font-size: 15px;
    font-weight: 500;
}

/* YÜKLƏNMƏ ========================================= */

.terrain-loading {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 50;
    text-align: center;
    transition: opacity 0.4s ease;
}

.terrain-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(180, 255, 200, 0.9);
    animation: spin 0.8s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#terrainLoadingText {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.55);
}

/* AŞAĞI ========================================= */

.terrain-bottom {
    position: absolute;
    bottom: 25px;
    left: 40px;
    right: 40px;
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    z-index: 20;
}

/* MARKER ========================================= */

.region-marker {
    position: absolute;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #b7ffc9;
    box-shadow: 0 0 0 4px rgba(180, 255, 200, 0.08),
        0 0 18px rgba(180, 255, 200, 0.7);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.region-marker:hover {
    transform: scale(1.8);
}

.map-seo-content {
    position: absolute;
    left: 50px;
    bottom: 45px;
    z-index: 10;

    width: min(520px, calc(100vw - 100px));

    padding: 18px 22px;

    background: rgba(5, 10, 8, 0.62);
    border-left: 2px solid rgba(255, 255, 255, 0.45);

    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    pointer-events: none;
}

.map-seo-content h1 {
    margin: 0 0 8px;

    font-family: inherit;
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: 0.02em;

    color: #ffffff;
}

.map-seo-content p {
    margin: 0;

    max-width: 480px;

    font-size: 13px;
    line-height: 1.65;
    font-weight: 400;
    letter-spacing: 0.02em;

    color: rgba(255, 255, 255, 0.72);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .map-seo-content {
        left: 30px;
        bottom: 30px;

        width: min(480px, calc(100vw - 60px));

        padding: 15px 18px;
    }

    .map-seo-content h1 {
        font-size: 22px;
    }

    .map-seo-content p {
        font-size: 12px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 575px) {

    .map-seo-content {
        left: 15px;
        right: 15px;
        bottom: 20px;

        width: auto;

        padding: 13px 15px;

        background: rgba(5, 10, 8, 0.72);
    }

    .map-seo-content h1 {
        font-size: 18px;
        line-height: 1.2;
    }

    .map-seo-content p {
        font-size: 11px;
        line-height: 1.5;
    }
}
/* MOBILE ========================================= */

@media (max-width: 700px) {
    .brand {
        left: 20px;
        top: 20px;
    }

    .map-title {
        right: 20px;
        top: 25px;
    }

    .terrain-topbar {
        left: 20px;
        right: 20px;
    }

    .terrain-info {
        left: 20px;
        top: auto;
        bottom: 100px;
        transform: none;
    }

    #terrainRegionName {
        font-size: 38px;
    }

    .terrain-bottom {
        left: 20px;
        right: 20px;
    }
}