/* --- GLOBAL VARIABLES & RESET --- */
:root {
    --primary-teal: #006078;
    --primary-dark: #004d61;
    --gold: #dcb345;
    --gold-hover: #c49b2f;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --border-color: #dddddd;
}

* {
    box-sizing: border-box;
}

body {
    /* Font Stack: Includes Uyghur fonts first, then English/Arabic fallbacks */
    font-family: "ALKATIP Basma", "UKIJ Tuz", "Microsoft Uighur", "Segoe UI", "Helvetica Neue", sans-serif;
    margin: 0;
    padding: 0;
    /* direction is now handled by HTML tag in index.php */
    text-align: start; /* 'start' automatically aligns Left for English, Right for Uyghur */
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- HEADER & NAVIGATION --- */
header {
    background: var(--white);
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* !!! LOGO FIX !!! */
.logo {
    height: 80px; 
    width: auto;
    display: block;
}

.logo-area h2 {
    color: var(--primary-teal);
    font-size: 1.6rem;
    margin: 0;
    line-height: 1;
}

.main-menu {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.main-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: bold;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.main-menu a:hover {
    color: var(--gold);
}

.nav-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* Standard Gold Button */
.btn-gold {
    background: var(--gold);
    color: var(--white);
    padding: 8px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.3s;
}

.btn-gold:hover {
    background: var(--gold-hover);
}

.lang-switch {
    border: 1px solid #ccc;
    padding: 5px 15px;
    border-radius: 20px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: bold;
}

.lang-switch:hover {
    background: #f0f0f0;
    color: var(--primary-teal);
}

/* --- HERO SECTION --- */
.hero {
    background-color: var(--primary-teal);
    color: var(--white);
    text-align: center; /* Always center the hero text */
    padding: 100px 20px 160px;
    position: relative;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: normal;
}

.hero-content p {
    font-size: 1.5rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto 40px;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-gold-large {
    background: var(--gold);
    color: var(--white);
    padding: 12px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    transition: transform 0.2s, background 0.3s;
}

.btn-gold-large:hover {
    background: var(--gold-hover);
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 40px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: bold;
    transition: background 0.3s, color 0.3s;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-teal);
}

.curve {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%23f8f9fa" fill-opacity="1" d="M0,224L80,213.3C160,203,320,181,480,181.3C640,181,800,203,960,208C1120,213,1280,203,1360,197.3L1440,192L1440,320L1360,320C1280,320,1120,320,960,320C800,320,640,320,480,320C320,320,160,320,80,320L0,320Z"></path></svg>');
    background-size: cover;
    background-repeat: no-repeat;
}

/* --- MAIN SECTIONS --- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    color: var(--primary-teal);
    font-size: 2.2rem;
    margin-bottom: 50px;
}

/* --- SEARCH BAR --- */
.search-bar {
    display: flex;
    max-width: 700px;
    margin: 0 auto 60px;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 1.1rem;
    font-family: inherit;
    outline: none;
}

.search-bar button {
    background: var(--primary-teal);
    color: white;
    border: none;
    padding: 0 35px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-family: inherit;
    transition: background 0.3s;
}

/* --- MEDIA GRID --- */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.media-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease;
}

.media-card:hover {
    transform: translateY(-10px);
}

.icon-box {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 25px;
}

.media-card h3 {
    color: var(--primary-dark);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.media-card p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.btn-small {
    background: var(--primary-teal);
    color: white;
    padding: 10px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
}

/* --- PATIENT PORTAL --- */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.portal-card {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.highlight-card {
    border-top: 6px solid var(--gold);
}

.portal-card h3 {
    margin-top: 0;
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-card input, 
.portal-card textarea {
    width: 100%;
    margin-bottom: 20px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background: #fafafa;
}

/* File Upload Area */
.file-upload {
    display: block;
    background: #eef2f5;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    border: 2px dashed #b0c4de;
    margin-bottom: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.file-upload:hover {
    background: #e1e9f0;
}

.file-upload span {
    font-weight: bold;
    color: var(--primary-teal);
    font-size: 1.1rem;
}

.file-upload input {
    display: none;
}

.btn-blue {
    background: var(--primary-teal);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: inherit;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 40px;
    background: var(--primary-teal);
    color: var(--white);
    margin-top: 0;
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    .main-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
}