/* =========================================================
   الجمعية العراقية لجراحة الكلى والمسالك البولية — IUA
   Design tokens derived from the existing brand mark:
   deep teal/navy field, single acid-yellow accent swoosh,
   white wordmark, faint Islamic geometric texture.
   ========================================================= */

:root {
    /* Color */
    --navy-deep:     #052436;
    --navy-mid:      #0b4a68;
    --teal:          #0f6f92;
    --teal-bright:   #17a3c9;
    --yellow:        #eeea1c;
    --yellow-dim:    #c9c518;
    --paper:         #f6f9fb;
    --ink:           #0a2534;
    --ink-soft:      #4a6572;
    --line:          #e1e9ed;
    --white:         #ffffff;

    /* Type */
    --font-display: 'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
    --font-body:    'IBM Plex Sans Arabic', 'IBM Plex Sans', sans-serif;
    --font-data:    'Space Grotesk', 'IBM Plex Sans Arabic', sans-serif;

    /* Layout */
    --max-w: 1180px;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow-card: 0 10px 30px -12px rgba(5, 36, 54, 0.25);
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--paper);
    direction: rtl;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    margin: 0 0 0.5em;
    line-height: 1.3;
}

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* -------------------- eyebrow / labels -------------------- */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-data);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal);
    font-weight: 600;
    margin-bottom: 14px;
}
.eyebrow::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--yellow-dim);
    display: inline-block;
}

/* -------------------- buttons -------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:focus-visible {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
.btn-primary {
    background: var(--yellow);
    color: var(--navy-deep);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 24px -8px rgba(238, 234, 28, 0.55); }
.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.55);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-dark {
    background: var(--navy-deep);
    color: var(--white);
}
.btn-dark:hover { background: var(--navy-mid); }

/* -------------------- header / nav -------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(5, 36, 54, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 78px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}
.brand img { height: 42px; width: auto; }
.brand-text {
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
    max-width: 220px;
}
.brand-text span {
    display: block;
    font-family: var(--font-data);
    font-size: 11px;
    letter-spacing: 0.08em;
    color: var(--yellow);
    font-weight: 500;
    margin-top: 2px;
}
nav.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}
nav.main-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 14.5px;
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}
nav.main-nav a:hover,
nav.main-nav a.active {
    background: rgba(255,255,255,0.1);
    color: var(--white);
}
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 26px;
    cursor: pointer;
}
@media (max-width: 900px) {
    nav.main-nav {
        position: absolute;
        top: 78px;
        right: 0; left: 0;
        background: var(--navy-deep);
        flex-direction: column;
        align-items: stretch;
        padding: 10px 20px 20px;
        display: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    nav.main-nav.open { display: flex; }
    nav.main-nav a { padding: 12px 14px; }
    .nav-toggle { display: block; }
}

/* -------------------- hero -------------------- */
.hero {
    position: relative;
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(23,163,201,0.35), transparent 60%),
        linear-gradient(160deg, var(--navy-deep) 0%, var(--navy-mid) 55%, var(--teal) 100%);
    color: var(--white);
    overflow: hidden;
    padding: 96px 0 120px;
}
.hero::before {
    /* faint geometric texture, echoing the association's seal pattern */
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.10;
    background-image:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 1px, transparent 1px, transparent 26px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.5) 0, rgba(255,255,255,0.5) 1px, transparent 1px, transparent 26px);
    pointer-events: none;
}
.hero .swoosh {
    position: absolute;
    left: -6%;
    bottom: -18%;
    width: 620px;
    max-width: 60vw;
    opacity: 0.9;
    pointer-events: none;
}
.hero-grid {
    position: relative;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 48px;
    align-items: center;
}
@media (max-width: 900px) {
    .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 {
    font-size: clamp(32px, 4.6vw, 54px);
    margin-bottom: 20px;
}
.hero p.lead {
    font-size: 18px;
    color: rgba(255,255,255,0.85);
    max-width: 46ch;
    margin-bottom: 34px;
}
.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}
.hero-stats {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: var(--radius);
    overflow: hidden;
}
.hero-stats .stat {
    background: rgba(5,36,54,0.35);
    padding: 26px 22px;
}
.hero-stats .stat .num {
    font-family: var(--font-data);
    font-size: 34px;
    font-weight: 600;
    color: var(--yellow);
    display: block;
}
.hero-stats .stat .label {
    font-size: 13.5px;
    color: rgba(255,255,255,0.78);
    margin-top: 4px;
    display: block;
}

/* -------------------- sections -------------------- */
section { padding: 88px 0; }
.section-alt { background: var(--white); }
.section-head {
    max-width: 640px;
    margin: 0 0 44px;
}
.section-head.center { margin-inline: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 16.5px; }

/* -------------------- about / mission -------------------- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: start;
}
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }
.mission-card {
    background: var(--navy-deep);
    color: var(--white);
    border-radius: var(--radius);
    padding: 34px;
    position: relative;
    overflow: hidden;
}
.mission-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(238,234,28,0.12));
}
.mission-card p {
    position: relative;
    font-size: 18px;
    line-height: 1.85;
}
.timeline-note {
    font-family: var(--font-data);
    color: var(--teal);
    font-weight: 600;
    font-size: 14px;
}

/* -------------------- board / people -------------------- */
.board-lead {
    text-align: center;
    background: var(--navy-deep);
    color: var(--white);
    border-radius: var(--radius);
    padding: 44px 28px;
    margin-bottom: 42px;
}
.board-lead img.avatar {
    width: 108px;
    height: 108px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 18px;
    border: 3px solid var(--yellow);
}
.board-lead .role {
    color: var(--yellow);
    font-family: var(--font-data);
    font-size: 13px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 6px;
}
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
}
.board-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    text-align: center;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.board-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.board-card img {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 14px;
    background: var(--paper);
}
.board-card h4 { font-size: 16px; margin-bottom: 3px; }
.board-card .role { color: var(--ink-soft); font-size: 13.5px; }
.committee-label {
    font-family: var(--font-data);
    font-size: 12.5px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--teal);
    font-weight: 600;
    margin: 46px 0 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.committee-label::after { content:''; flex:1; height:1px; background: var(--line); }

/* -------------------- news -------------------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
}
.news-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.news-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.news-card .thumb {
    aspect-ratio: 16/10;
    background: linear-gradient(140deg, var(--navy-mid), var(--teal));
    position: relative;
    overflow: hidden;
}
.news-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.news-card .tag {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--yellow);
    color: var(--navy-deep);
    font-family: var(--font-data);
    font-size: 11.5px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 999px;
}
.news-card .body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.news-card .date {
    font-family: var(--font-data);
    font-size: 12.5px;
    color: var(--ink-soft);
    margin-bottom: 10px;
}
.news-card h3 { font-size: 18px; margin-bottom: 10px; }
.news-card p { color: var(--ink-soft); font-size: 14.5px; flex: 1; }
.news-card .more {
    margin-top: 14px;
    font-weight: 600;
    color: var(--teal);
    font-size: 14px;
}

/* -------------------- conference banner -------------------- */
.conf-banner {
    background: linear-gradient(120deg, var(--teal), var(--navy-mid));
    border-radius: var(--radius);
    padding: 40px;
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}
.conf-banner h3 { margin-bottom: 6px; }
.conf-banner p { color: rgba(255,255,255,0.85); margin: 0; }

/* -------------------- contact -------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 48px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info-card {
    background: var(--navy-deep);
    color: var(--white);
    border-radius: var(--radius);
    padding: 34px;
}
.contact-info-card .row {
    display: flex;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.contact-info-card .row:last-child { border-bottom: none; }
.contact-info-card .row .k { color: var(--yellow); font-family: var(--font-data); font-size: 12.5px; min-width: 90px; }

form.contact-form { display: grid; gap: 16px; }
form.contact-form .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { form.contact-form .two-col { grid-template-columns: 1fr; } }
.field label {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--ink);
}
.field input, .field textarea, .field select {
    width: 100%;
    padding: 13px 14px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--white);
    color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 3px rgba(23,163,201,0.18);
}
.field textarea { min-height: 130px; resize: vertical; }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 14.5px;
    margin-bottom: 18px;
}
.alert-success { background: #e7f7ee; color: #146c3e; border: 1px solid #b8e6cc; }
.alert-error { background: #fdecec; color: #a52121; border: 1px solid #f3bcbc; }

/* -------------------- footer -------------------- */
footer.site-footer {
    background: var(--navy-deep);
    color: rgba(255,255,255,0.75);
    padding: 56px 0 26px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 40px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }
footer.site-footer h4 {
    color: var(--white);
    font-size: 14px;
    letter-spacing: 0.04em;
    margin-bottom: 16px;
}
footer.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
footer.site-footer a:hover { color: var(--yellow); }
.footer-bottom {
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 13px;
}

/* -------------------- misc pages (about text) -------------------- */
.prose { font-size: 17px; color: var(--ink); }
.prose p { margin: 0 0 1.2em; }
.prose h2 { margin-top: 1.6em; }

.page-hero {
    background: linear-gradient(160deg, var(--navy-deep), var(--navy-mid));
    color: var(--white);
    padding: 64px 0;
}
.page-hero h1 { margin-bottom: 8px; }
.page-hero p { color: rgba(255,255,255,0.8); margin: 0; }
.breadcrumbs { font-size: 13px; color: rgba(255,255,255,0.6); margin-bottom: 14px; font-family: var(--font-data); }
.breadcrumbs a { color: rgba(255,255,255,0.8); }

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--ink-soft);
}

/* -------------------- gallery: conference cards -------------------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 26px;
}
.conf-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.conf-card:hover { box-shadow: var(--shadow-card); transform: translateY(-3px); }
.conf-card-media {
    aspect-ratio: 4/3;
    position: relative;
    background: linear-gradient(140deg, var(--navy-mid), var(--teal));
    overflow: hidden;
}
.conf-card-media img { width: 100%; height: 100%; object-fit: cover; }
.conf-year {
    position: absolute;
    top: 12px; left: 12px;
    background: var(--yellow);
    color: var(--navy-deep);
    font-family: var(--font-data);
    font-weight: 700;
    font-size: 13px;
    padding: 5px 13px;
    border-radius: 999px;
}
.conf-card-body { padding: 20px 22px; }
.conf-card-body h3 { font-size: 17px; margin-bottom: 6px; }
.conf-loc { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 10px; }
.conf-count {
    display: inline-block;
    font-family: var(--font-data);
    font-size: 12px;
    color: var(--teal);
    font-weight: 600;
}

/* -------------------- gallery: photo grid -------------------- */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}
.photo-item {
    padding: 0;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--paper);
    cursor: pointer;
    display: block;
}
.photo-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.25s ease;
}
.photo-item:hover img { transform: scale(1.06); }
.photo-item:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }

/* -------------------- lightbox -------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(5, 20, 30, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
    max-width: min(90vw, 1100px);
    max-height: 82vh;
    border-radius: 8px;
    box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
}
.lb-close {
    position: absolute;
    top: 20px; left: 24px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 44px; height: 44px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
}
.lb-close:hover { background: rgba(255,255,255,0.2); }
.lb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: none;
    width: 52px; height: 52px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
.lb-nav:hover { background: rgba(255,255,255,0.22); }
.lb-prev { right: 24px; }
.lb-next { left: 24px; }
.lb-caption {
    position: absolute;
    bottom: 26px;
    color: rgba(255,255,255,0.85);
    font-size: 14.5px;
    text-align: center;
    max-width: 80vw;
}
@media (max-width: 700px) {
    .lightbox { padding: 16px; }
    .lb-nav { width: 42px; height: 42px; font-size: 22px; }
    .lb-prev { right: 8px; } .lb-next { left: 8px; }
}
