/* =========================================================
   PAGE
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent !important;
}

canvas {
    background: transparent !important;
}


/* =========================================================
   FONT
   ========================================================= */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/webfonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

body,
p,
li,
a,
h1,
h2,
h3 {
    font-family: 'Vazirmatn', sans-serif;
}


/* =========================================================
   ADDRESS CARD
   ========================================================= */

#address-card {
    position: fixed;
    width: 500px;
    max-width: 90vw;
    max-height: 90vh;
    box-sizing: border-box;
    padding: 20px 22px;
    background: #8b0000;
    color: #ffffff;
    border: 2px solid #ff4d4d;
    border-radius: 16px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45), 0 0 25px rgba(180, 0, 0, 0.45);
    direction: rtl;
    text-align: right;
    opacity: 0;
    transform: translate(-50%, -70%) scale(0.75);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.2, 1.35, 0.4, 1);
    z-index: 100;
    overflow: hidden;
}


/* =========================================================
   VISIBLE CARD
   ========================================================= */

#address-card.visible {
    opacity: 1;
    transform: translate(-50%, -100%) scale(1);
    pointer-events: auto;
}


/* =========================================================
   HEADER
   ========================================================= */

.address-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}


/* =========================================================
   TITLE
   ========================================================= */

.address-card-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}


/* =========================================================
   BODY
   ========================================================= */

.address-card-body {
    margin-top: 14px;
    color: #ffeaea;
    font-size: 15px;
    line-height: 1.9;
    width: 100%;
    height: 100%;
}

.address-card-body p {
    margin: 7px 0;
}

.address-card-body p:first-child {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

#close-address-card {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    background: rgba(247, 212, 212, 0.35);
    color: #6b0a0a;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#close-address-card:hover {
    background: #ff3333;
    border-color: #ffffff;
    color: #ffffff;
    transform: rotate(90deg);
}


/* =========================================================
   TOP ACCENT
   ========================================================= */

#address-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 20px;
    left: 20px;
    height: 3px;
    background: #420404;
    border-radius: 0 0 4px 4px;
}


/* =========================================================
   POINTER
   ========================================================= */

.address-card-pointer {
    position: absolute;
    left: 50%;
    bottom: -10px;
    width: 20px;
    height: 20px;
    background: #8b0000;
    border-right: 2px solid #ff4d4d;
    border-bottom: 2px solid #ff4d4d;
    transform: translateX(-50%) rotate(45deg);
    z-index: -1;
}


/* =========================================================
   TV / FILM EFFECT — MATCH THE GLOBE
   ========================================================= */

#address-card {
    overflow: hidden;
}


/* Horizontal TV scanlines */

#address-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient( to bottom, rgba(255, 255, 255, 0.045) 0px, rgba(255, 255, 255, 0.045) 1px, rgba(0, 0, 0, 0.035) 2px, rgba(0, 0, 0, 0.035) 3px);
    opacity: 0.8;
    mix-blend-mode: overlay;
    z-index: 50;
}


/* Google Maps */

.address-map {
    display: block;
    width: 100%;
    height: 240px;
    box-sizing: border-box;
    margin-top: 14px;
    border: 1px solid rgba(255, 80, 80, 0.7);
    border-radius: 10px;
    overflow: hidden;
}

.earth-iframe {
    display: block;
    width: 100%;
    height: 1000px;
    max-width: 100%;
    height: 800px;
    border: none;
    background: transparent;
}

@media (max-width: 768px) {
    #address-card {
        width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
    }

    .address-card-body {
        width: 100%;
        max-width: 100%;
    }

    .address-map {
        width: 100%;
        max-width: 100%;
        height: 220px;
        box-sizing: border-box;
    }
}