/* ==========================================================================
   FSM Global Network Map - Refined Luxury Theme
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --fsm-gold: #d4af37;
    --fsm-gold-light: #e5c158;
    --fsm-glow: #ffda85;
    --fsm-bg-start: #141724;
    --fsm-bg-end: #07080c;
    --fsm-card-bg: rgba(14, 17, 24, 0.82);
    --fsm-border: rgba(212, 175, 55, 0.32);
    --fsm-border-hover: rgba(255, 218, 133, 0.75);
    --fsm-height: 580px;
}

.fsm-network-wrapper {
    position: relative;
    width: 100%;
    max-width: 1240px;
    height: var(--fsm-height);
    margin: 0 auto;
    background: radial-gradient(ellipse at 50% 45%, var(--fsm-bg-start) 0%, var(--fsm-bg-end) 100%);
    border-radius: 18px;
    overflow: hidden;
    font-family: 'Montserrat', sans-serif;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    user-select: none;
    box-sizing: border-box;
}

/* Background World Map */
.fsm-world-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.fsm-world-bg svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fsm-dots {
    opacity: 0.62;
    transition: opacity 0.5s ease;
}

.fsm-dots circle {
    opacity: 0.88;
    transition: fill 0.3s ease;
}

/* Dynamic SVG Canvas */
.fsm-svg-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Curved Lines */
.fsm-svg-line {
    fill: none;
    stroke: #d4af37;
    stroke: var(--fsm-gold, #d4af37);
    stroke-width: 1.7px;
    stroke-linecap: round;
    stroke-dasharray: 4 3;
    animation: fsmDashFlow 30s linear infinite;
    transition: stroke 0.25s ease, stroke-width 0.25s ease, filter 0.25s ease, opacity 0.25s ease;
    opacity: 0.85;
}

.fsm-svg-line.active {
    stroke: #ffe082 !important;
    stroke-width: 2.8px !important;
    stroke-dasharray: none !important;
    opacity: 1 !important;
    filter: drop-shadow(0 0 8px rgba(255, 218, 133, 0.95)) !important;
}

@keyframes fsmDashFlow {
    to {
        stroke-dashoffset: -1000;
    }
}

/* Geographic Pins Layer */
.fsm-geo-pin-group {
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.25s ease;
}

.fsm-pin-halo {
    fill: rgba(212, 175, 55, 0.15);
    stroke: rgba(212, 175, 55, 0.45);
    stroke-width: 1;
    animation: fsmPinPulse 2.8s infinite ease-out;
    transform-origin: center;
}

.fsm-pin-core {
    fill: #090a0e;
    stroke: var(--fsm-gold);
    stroke-width: 1.6;
    transition: all 0.25s ease;
}

.fsm-pin-center {
    fill: var(--fsm-glow);
    transition: all 0.25s ease;
}

.fsm-geo-pin-group:hover .fsm-pin-core,
.fsm-geo-pin-group.active .fsm-pin-core {
    fill: var(--fsm-gold);
    stroke: #ffffff;
    filter: drop-shadow(0 0 8px rgba(255, 218, 133, 0.9));
}

.fsm-geo-pin-group:hover .fsm-pin-center,
.fsm-geo-pin-group.active .fsm-pin-center {
    fill: #ffffff;
}

@keyframes fsmPinPulse {
    0% {
        r: 3.5;
        opacity: 0.9;
    }
    100% {
        r: 14;
        opacity: 0;
    }
}

/* Central Beacon (Istanbul Focus) */
.fsm-core-target {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 38px;
    height: 38px;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
}

.fsm-sub-node-group {
    cursor: pointer;
    transition: transform 0.25s ease;
}

.fsm-sub-node-circle {
    fill: #090a0e;
    stroke: var(--fsm-gold);
    stroke-width: 1.5;
    transition: all 0.25s ease;
}

.fsm-sub-node-dot {
    fill: var(--fsm-glow);
    transition: all 0.25s ease;
}

.fsm-sub-node-group:hover .fsm-sub-node-circle,
.fsm-sub-node-group.active .fsm-sub-node-circle {
    stroke: #ffffff;
    fill: var(--fsm-gold);
    filter: drop-shadow(0 0 8px rgba(255, 218, 133, 0.9));
}

.fsm-sub-node-group:hover .fsm-sub-node-dot,
.fsm-sub-node-group.active .fsm-sub-node-dot {
    fill: #ffffff;
}

.target-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.65);
}

.ring-1 {
    inset: 9px;
    border-color: var(--fsm-glow);
}

.ring-2 {
    inset: 2px;
    border-color: rgba(212, 175, 55, 0.85);
}

.ring-3 {
    inset: -9px;
    animation: fsmCorePulse 3.2s infinite ease-out;
}

.target-dot {
    position: absolute;
    inset: 13px;
    background: var(--fsm-glow);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--fsm-glow), 0 0 24px var(--fsm-gold);
}

.core-beacon-label {
    display: none;
}

@keyframes fsmCorePulse {
    0% {
        transform: scale(0.7);
        opacity: 0.95;
    }
    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

/* ==========================================================================
   CARDS (Refined Soft Luxury Aesthetics)
   ========================================================================== */
.fsm-card {
    position: absolute;
    z-index: 5;
    background: var(--fsm-card-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--fsm-border);
    border-radius: 12px;
    padding: 10px 15px;
    box-shadow: 0 10px 28px -6px rgba(0, 0, 0, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.28s ease,
                box-shadow 0.28s ease,
                background 0.28s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
}

.fsm-card:hover,
.fsm-card.active {
    border-color: var(--fsm-border-hover);
    background: rgba(18, 22, 32, 0.92);
    box-shadow: 0 14px 34px -4px rgba(212, 175, 55, 0.3),
                0 0 18px rgba(212, 175, 55, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.16);
    transform: translateY(-3px) scale(1.015);
}

/* Connector Dot */
.card-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--fsm-glow);
    border-radius: 50%;
    border: 2px solid #090a0e;
    box-shadow: 0 0 8px var(--fsm-glow);
    transition: transform 0.2s ease, background 0.2s ease;
}

.fsm-card:hover .card-dot,
.fsm-card.active .card-dot {
    transform: scale(1.2);
    background: #ffffff;
    box-shadow: 0 0 12px #ffffff;
}

.dot-right {
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.dot-left {
    left: -5px;
    top: 50%;
    transform: translateY(-50%);
}

.dot-top {
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.dot-bottom {
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

/* Top Center (Genel Merkez) */
.card-center-top {
    top: 6%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    flex-direction: column;
    align-items: center;
    min-width: 210px;
    padding: 11px 18px;
    background: linear-gradient(180deg, rgba(28, 24, 14, 0.88), rgba(14, 17, 24, 0.85));
    border-color: rgba(212, 175, 55, 0.48);
}

.card-center-top:hover,
.card-center-top.active {
    transform: translateX(-50%) translateY(-3px) scale(1.015);
}

/* Bottom Center (Bayi) */
.card-center-bottom {
    bottom: 6%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    flex-direction: column;
    align-items: center;
    min-width: 200px;
    padding: 10px 18px;
    border-color: rgba(212, 175, 55, 0.42);
}

.card-center-bottom:hover,
.card-center-bottom.active {
    transform: translateX(-50%) translateY(-3px) scale(1.015);
}

/* Side Columns */
.fsm-cards-col {
    position: absolute;
    top: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    z-index: 5;
    pointer-events: none;
}

.fsm-cards-col .fsm-card {
    position: relative;
    pointer-events: auto;
}

.fsm-cards-left {
    left: 5%;
}

.fsm-cards-right {
    right: 5%;
}

/* Card Content Typography & Flags */
.card-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 195px;
}

.flag-wrapper {
    position: relative;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.flag-wrapper .flag-img,
.flag-img {
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    border-radius: 50% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.card-text {
    flex: 1;
}

.card-badge {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: var(--fsm-gold-light);
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.card-sub-badge {
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    color: rgba(212, 175, 55, 0.85);
    display: block;
    text-transform: uppercase;
    margin-bottom: 1px;
}

.card-title {
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 700;
    margin: 0 0 3px 0;
    letter-spacing: 0.3px;
}

.card-location {
    color: #9fa5b5;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.loc-icon {
    width: 12px !important;
    height: 12px !important;
    fill: var(--fsm-gold);
    display: inline-block;
    flex-shrink: 0;
}

.card-text h4 {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.3px;
    line-height: 1.25;
}

.card-text p {
    color: #9297a8;
    font-size: 10px;
    margin: 2px 0 0 0;
    line-height: 1.25;
}

/* Floating Tooltip for Pin Hover */
.fsm-pin-tooltip {
    position: absolute;
    pointer-events: none;
    z-index: 10;
    background: rgba(10, 12, 17, 0.94);
    border: 1px solid var(--fsm-border-hover);
    padding: 6px 12px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translate(-50%, -100%) translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.fsm-pin-tooltip.active {
    opacity: 1;
    transform: translate(-50%, -100%) translateY(-14px);
}

.fsm-m-eyebrow {
    display: none;
}

/* ==========================================================================
   RESPONSIVE (<= 991px Tablet & Mobile Grid)
   ========================================================================== */
@media (max-width: 991px) {
    .fsm-network-wrapper {
        height: auto !important;
        padding: 24px 16px 22px;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        align-items: stretch;
    }

    .fsm-svg-canvas,
    .fsm-core-target,
    .card-dot,
    .fsm-pin-tooltip {
        display: none !important;
    }

    .fsm-world-bg {
        inset: 0 0 auto 0;
        height: 220px;
        opacity: 0.35;
    }

    .fsm-cards-col {
        position: static;
        display: contents;
    }

    .fsm-card {
        position: relative !important;
        inset: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        transform: none !important;
        width: auto;
        min-width: 0 !important;
        margin: 0;
        box-sizing: border-box;
    }

    .fsm-card:hover,
    .fsm-card.active {
        transform: translateY(-2px) !important;
    }

    /* 1) Genel Merkez Hero */
    .card-center-top {
        grid-column: 1 / -1;
        order: 1;
        padding: 16px 20px;
    }

    .card-center-top .card-title {
        font-size: 19px;
    }

    /* 2) Mobil Bölüm Başlığı */
    .fsm-m-eyebrow {
        display: flex;
        grid-column: 1 / -1;
        order: 2;
        align-items: center;
        gap: 14px;
        margin: 6px 2px 2px;
        color: var(--fsm-gold-light);
        font-size: 10.5px;
        font-weight: 700;
        letter-spacing: 2.5px;
    }

    .fsm-m-eyebrow::before,
    .fsm-m-eyebrow::after {
        content: "";
        flex: 1;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.5), transparent);
    }

    /* 3) Marka & Ülke Kartları (Dikey Hizalı Grid) */
    .card-item {
        order: 3;
        flex-direction: column;
        text-align: center;
        gap: 8px;
        padding: 14px 10px;
        justify-content: center;
    }

    .card-item .flag-wrapper {
        width: 34px;
        height: 34px;
    }

    .card-item .card-text h4 {
        font-size: 11.5px;
    }

    .card-item .card-text p {
        font-size: 9.5px;
    }

    /* 4) Bayi Hero (En Altta) */
    .card-center-bottom {
        grid-column: 1 / -1;
        order: 4;
        padding: 14px 20px;
    }

    .card-center-bottom .card-title {
        font-size: 16px;
    }
}

/* Mobil Telefon: 2 Sütun */
@media (max-width: 640px) {
    .fsm-network-wrapper {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 18px 12px;
        border-radius: 14px;
    }

    .card-center-top .card-title {
        font-size: 17px;
    }
}

@media (max-width: 360px) {
    .card-item .card-text h4 {
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .fsm-svg-line,
    .ring-3,
    .fsm-pin-halo {
        animation: none !important;
    }
}
