:root {
    --bg-main: #efe6d3;
    --brown: #5b3a2e;
    --green: #2bb673;
    --card-bg: #f7f2e7;
}

/* ================= FONT DEFINITIONS ================= */

@font-face {
    font-family: 'ArabicFont';
    src: url('../fonts/Al-Qalam.ttf') format('truetype');
}

@font-face {
    font-family: 'UrduFont';
    src: url('../fonts/Jameel.ttf') format('truetype');
}

@font-face {
    font-family: 'LatinFont';
    src: url('../fonts/Roboto.ttf') format('truetype');
}

@font-face {
    font-family: 'AzeriFont';
    src: url('../fonts/SOUTHRNN.ttf') format('truetype');
}

/* ================= GLOBAL ================= */

body {
    font-family: 'LatinFont', Arial, sans-serif;
    background: var(--bg-main);
    margin: 0;
    padding-top: 75px; /* matches header height */
}

body, .arabic, .translation, .lang-ur, .lang-en, .lang-ro, .lang-az {
    font-weight: normal;
    font-synthesis: none;
}

/* ================= HEADER ================= */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 75px;

    background: rgba(91, 58, 46, 0.85);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);

    display: flex;
    align-items: center;

    padding: 0 20px;
    box-sizing: border-box;
    z-index: 3000;
}

/* LEFT - LANGUAGES */

.header-left {
    display: flex;
    align-items: center;
    gap: 14px;

    white-space: nowrap;
    flex-shrink: 0;
}

.lang-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

/* Soft separator */
.lang-link:not(:last-child)::after {
    content: "•";
    margin-left: 10px;
    opacity: 0.6;
}

/* Hover + active animation */
.lang-link::before {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--green);
    transition: width 0.25s ease;
}

.lang-link:hover::before,
.lang-link.active::before {
    width: 100%;
}

/* CENTER - LOGO */

.header-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.logo {
    height: 40px;
    width: auto;
}

/* RIGHT - ICONS */

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.icon-btn {
    font-size: 20px;
    cursor: pointer;
    color: white;
    text-decoration: none;
}

/* ================= SEARCH ================= */

.search-bar {
    display: none;
    background: var(--card-bg);
    padding: 10px;
    text-align: center;
}

.search-bar input {
    width: 90%;
    padding: 8px;
    border-radius: 20px;
    border: 1px solid #ccc;
}

/* ================= FLOATING SETTINGS ================= */

.floating-settings {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 55px;
    height: 55px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 4000;
}

/* ================= CONTENT ================= */

.container {
    max-width: 900px;
    margin: auto;
    padding: 15px;
}

.card {
    background: var(--card-bg);
    margin: 12px 0;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #d7cbb5;
}

/* ================= TEXT ================= */

.arabic {
    font-family: 'ArabicFont', serif;
    font-size: 25px;
    direction: rtl;
    text-align: right;
    line-height: 1.9;
}

.translation {
    font-size: 18px;
    margin-top: 6px;
    line-height: 1.6;
}

.lang-ur {
    font-family: 'UrduFont', serif;
    direction: rtl;
    text-align: right;
    font-size: 20px;
    line-height: 2;
}

.lang-en,
.lang-ro {
    font-family: 'LatinFont', sans-serif;
}

.lang-az {
    font-family: 'AzeriFont', sans-serif;
}

/* ================= AUDIO ================= */

.audio-bar {
    position: sticky;
    top: 75px;
    background: var(--brown);
    color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2000;
}

.audio-bar button {
    background: var(--green);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.audio-bar input[type=range] {
    flex: 1;
}

.audio-bar span {
    font-size: 14px;
}

/* ================= FORCE MOBILE FIX ================= */

@media (max-width: 768px) {

    body {
        padding-top: 65px !important;
    }

    .main-header {
        height: 65px !important;
    }

    .header-left {
        position: absolute !important;
        left: 10px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;

        display: flex !important;
        flex-wrap: nowrap !important;
        white-space: nowrap !important;

        overflow-x: auto !important;
        max-width: 55% !important;
    }

    .header-left::-webkit-scrollbar {
        display: none;
    }

    .lang-link {
        font-size: 12px !important;
        white-space: nowrap !important;
    }

    .header-center .logo {
        height: 30px !important;
    }

    .header-right {
        position: absolute !important;
        right: 10px !important;
        gap: 12px !important;
    }

    .icon-btn {
        font-size: 18px !important;
    }
}