/* İÜ Gözlemevi — Güneş Gözlemleri. Palette shared with ist60 /sun (İÜ lacivert + altın). */
:root {
  --bg: #f7f3e8;
  --bg-gradient: linear-gradient(135deg, #fdfbf7 0%, #f5f0e1 100%);
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --border: rgba(15, 44, 89, 0.12);
  --navy: #0f2c59;
  --navy-2: #1d4480;
  --gold: #c5a059;
  --gold-soft: #f3e7cb;
  --text: #1e293b;
  --muted: #64748b;
  --ok: #16a34a;
  --warn: #ea580c;
  --bad: #dc2626;
  --weekend: #eef2f8;
  --holiday: #fdecea;
  --sun: #f59e0b;
  --radius: 16px;
  --shadow: 0 10px 25px -5px rgba(15, 44, 89, 0.08);
  --font: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
/* Light theme only, like the /sun and /mirya pages (the sites should look alike at any hour). */

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); background-image: var(--bg-gradient); background-attachment: fixed;
       color: var(--text); line-height: 1.55; font-size: 15px; min-height: 100vh; }
a { color: var(--navy-2); }
a:hover { color: var(--gold); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; color: var(--navy); }
h3 { font-size: 1.05rem; margin: 1rem 0 .5rem; color: var(--navy); }
small, .muted { color: var(--muted); }
code { font-size: .9em; }

/* header */
.site-header { background: #0f2c59; border-bottom: 3px solid var(--gold); padding: calc(14px + env(safe-area-inset-top, 0px)) 4% 14px;
               box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.site-header.compact { padding-top: calc(8px + env(safe-area-inset-top, 0px)); padding-bottom: 8px; }
.header-container { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1400px; margin: 0 auto; }
.logo-group { display: flex; gap: 12px; align-items: center; }
.logo-group img { height: 56px; width: auto; display: block; border-radius: 6px; }
.header-title { text-align: center; flex: 1; }
.header-title.left { text-align: left; }
.header-title a { text-decoration: none; }
.header-title h1 { margin: 0; font-size: clamp(1.1rem, 3vw, 1.7rem); font-weight: 800; letter-spacing: .5px;
                   background: linear-gradient(to right, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.site-header.compact h1 { font-size: 1.15rem; }
.header-title p { margin: 4px 0 0; color: rgba(255,255,255,.8); font-size: .9rem; }
/* Bar linking the observatory sites + TR | EN switch — identical rules in /sun and /mirya */
.site-bar { background: #0a1f40; border-bottom: 1px solid rgba(255,255,255,.08); font-family: 'Outfit', sans-serif; }
.site-bar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; max-width: 1400px;
               margin: 0 auto; padding: 6px 4%; }
.site-bar a { color: rgba(255,255,255,.75); text-decoration: none; font-size: .82rem; font-weight: 600; padding: 2px 0;
              border-bottom: 2px solid transparent; }
.site-bar a:hover { color: #fff; }
.site-bar a.on { color: #c5a059; border-bottom-color: #c5a059; }
.site-bar .lang-switch { margin: 0 0 0 auto; }
@media (max-width: 640px) { .site-bar .lang-switch { margin: 0; } }
/* TR | EN language switch — identical rules in /sun and /mirya */
.lang-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 30px; overflow: hidden;
               font-size: .8rem; font-weight: 600; letter-spacing: .5px; }
.site-bar .lang-switch a { padding: 2px 11px; color: rgba(255,255,255,.85); border: 0; font-size: .78rem; }
.site-bar .lang-switch a:hover { background: rgba(255,255,255,.12); color: #fff; }
.site-bar .lang-switch a.on { background: #c5a059; color: #0f2c59; }
.user-box { display: flex; align-items: center; gap: 8px; color: #fff; flex-wrap: wrap; justify-content: flex-end; }
.user-box small { color: rgba(255,255,255,.7); }
.user-box .btn { color: #fff; border-color: rgba(255,255,255,.35); background: transparent; }

/* nav + buttons */
.nav-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 22px auto; max-width: 1300px; padding: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: rgba(15,44,89,.05); border: 1px solid rgba(15,44,89,.18);
       color: var(--navy); padding: 8px 16px; border-radius: 999px; font: 600 .92rem var(--font); text-decoration: none; cursor: pointer;
       transition: all .2s ease; white-space: nowrap; }
.btn:hover { background: #0f2c59; border-color: #0f2c59; color: #fff; transform: translateY(-1px); }
.btn.active, .btn-primary { background: #0f2c59; border-color: #0f2c59; color: #fff; }
.btn-primary:hover { background: var(--gold); border-color: var(--gold); }
.btn-ghost { background: transparent; }
.btn-small { padding: 5px 12px; font-size: .85rem; }
.btn-danger { color: var(--bad); border-color: rgba(220,38,38,.35); }
.btn-danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.container { max-width: 1320px; margin: 0 auto; padding: 0 16px 40px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
@media (max-width: 520px) { .grid-2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
        backdrop-filter: blur(10px); margin-bottom: 20px; min-width: 0; }
.card > h2:first-child { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.card-sub { color: var(--muted); font-size: .88rem; font-weight: 400; }
.page-title { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.page-title h2 { margin: 0; font-size: 1.5rem; }
.page-title .en { color: var(--muted); font-weight: 400; font-size: 1rem; }

/* stat tiles */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--card-solid); border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 12px; padding: 12px 14px; }
.stat .v { font-size: 1.7rem; font-weight: 800; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: .82rem; color: var(--muted); }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 12px; border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; background: var(--card-solid); font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: center; white-space: nowrap; }
table.data th { background: #0f2c59; color: #fff; font-weight: 600; font-size: .85rem; position: sticky; top: 0; }
table.data td.l, table.data th.l { text-align: left; }
table.data tr:nth-child(even) td { background: rgba(15,44,89,.025); }
table.data tr.sat td { background: var(--weekend); }
table.data tr.sun td { background: color-mix(in srgb, var(--weekend) 70%, var(--navy) 8%); }
table.data tr:hover td { background: var(--gold-soft); }
table.data tfoot td { font-weight: 700; background: var(--gold-soft); }
table.data td.wrap { white-space: normal; text-align: left; }
.legend { font-size: .85rem; color: var(--muted); margin: .5rem 0 1rem; }
.t-good { color: var(--text); } .t-late { color: #059669; font-weight: 600; } .t-verylate { color: #c026d3; font-weight: 600; }

/* forms */
input, select, textarea { font: inherit; color: var(--text); background: var(--card-solid); border: 1px solid rgba(15,44,89,.25); border-radius: 10px; padding: 7px 10px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.month-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* alerts */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; border: 1px solid; }
.alert-ok { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }

/* calendar */
.cal { width: 100%; border-collapse: separate; border-spacing: 6px; table-layout: fixed; }
.cal th { font-size: .82rem; color: var(--muted); font-weight: 600; }
.cal td { background: var(--card-solid); border: 1px solid var(--border); border-radius: 12px; height: 86px; vertical-align: top; padding: 6px 8px; position: relative; }
.cal td.we { background: var(--weekend); }
.cal td.hol { background: var(--holiday); }
.cal td.out { opacity: .45; }
.cal td.today { outline: 3px solid var(--gold); }
.cal .dn { font-weight: 700; color: var(--navy); font-size: 1rem; }
.cal .dn a { text-decoration: none; }
.cal .missed .dn { color: var(--bad); }
.cal .who { font-size: 1.05rem; font-weight: 800; letter-spacing: .5px; margin-top: 4px; }
.cal .who .guest { font-size: .8rem; font-weight: 600; color: var(--muted); }
.cal .end { position: absolute; bottom: 5px; right: 8px; font-size: .75rem; color: var(--muted); }
.cal .sunicon { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%;
                background: radial-gradient(circle at 35% 35%, #fde68a, var(--sun) 60%, #d97706); box-shadow: 0 0 8px rgba(245,158,11,.6); display: block; }
.cal .holname { font-size: .7rem; color: var(--bad); line-height: 1.1; margin-top: 2px; }
@media (max-width: 640px) {
  .cal { border-spacing: 2px; } .cal td { height: 64px; padding: 3px 4px; border-radius: 8px; }
  .cal .who { font-size: .85rem; } .cal .end, .cal .holname { display: none; } .cal .sunicon { width: 14px; height: 14px; }
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--card-solid); border: 1px solid var(--border); border-radius: 999px; padding: 4px 12px; font-size: .88rem; }
.chip b { color: var(--navy); }

/* archive year grid */
.years { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; }
.years a, .years span { display: block; text-align: center; padding: 8px 4px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-solid);
                        text-decoration: none; font-weight: 700; color: var(--navy); }
.years a small { display: block; font-weight: 400; font-size: .75rem; color: var(--muted); }
.years a:hover { background: var(--gold-soft); }
.years a.cur { background: #0f2c59; color: #fff; } .years a.cur small { color: #cbd5e1; }
.years span { opacity: .35; }
.yearcal { border-collapse: separate; border-spacing: 2px; font-size: .8rem; }
.yearcal th { font-weight: 600; color: var(--muted); padding: 2px 4px; }
.yearcal td { width: 26px; height: 26px; text-align: center; border-radius: 6px; background: var(--card-solid); border: 1px solid var(--border); padding: 0; }
.yearcal td.x { background: transparent; border: none; }
.yearcal td.has { background: #f59e0b; border-color: #d97706; }
.yearcal td.has a { display: block; line-height: 24px; color: #fff; text-decoration: none; font-weight: 700; }
.yearcal td.tot { background: transparent; border: none; font-weight: 700; color: var(--navy); width: 34px; }

/* heatmap for observer detail */
.heat td.on { background: var(--navy-2); }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(5,10,20,.88); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 16px; }
.lightbox[hidden] { display: none !important; }
.lightbox figure { margin: 0; max-width: 96vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.lightbox img { max-width: 96vw; max-height: 82vh; object-fit: contain; background: #fff; border-radius: 8px; }
.lightbox figcaption { color: #fff; font-size: .95rem; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }
.lightbox figcaption a { color: var(--gold); }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); font-size: 2.4rem; color: #fff; background: none; border: none; cursor: pointer; padding: 12px; }
.lightbox .lb-prev { left: 8px; } .lightbox .lb-next { right: 8px; }
.lightbox .lb-close { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 14px; font-size: 2rem; color: #fff; background: none; border: none; cursor: pointer; }

/* modal (observation detail in calendar) */
.modal { position: fixed; inset: 0; background: rgba(5,10,20,.55); display: flex; align-items: center; justify-content: center; z-index: 900; padding: 16px; }
.modal[hidden] { display: none !important; }
.modal .card { max-width: 760px; width: 100%; max-height: 90vh; overflow: auto; margin: 0; }

.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 20px; margin: 0 0 1rem; }
.kv div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--border); padding: 5px 0; }
.kv dt, .kv .k { color: var(--muted); }
.kv .v { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.drawing-thumb { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; }
.drawing-thumb img { display: block; width: 100%; height: auto; }

.chart { width: 100%; min-height: 320px; }
.article p { max-width: 75ch; }
.article figure { margin: 1rem 0; } .article figcaption { font-size: .85rem; color: var(--muted); }

.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 24px 16px calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--border); margin-top: 20px; }
.site-footer .cite { max-width: 900px; margin: 0 auto 10px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (max-width: 700px) {
  .logo-group { gap: 6px; } .logo-group img { height: 36px; } .header-title p { display: none; }
  .nav-container { gap: 6px; margin: 14px auto; } .btn { padding: 6px 12px; font-size: .85rem; }
  .card { padding: 16px; }
}
@media print {
  .site-bar, .site-header, .nav-container, .site-footer, .month-picker, .no-print { display: none !important; }
  body { background: #fff; } .card { box-shadow: none; border: none; }
}
.ico { vertical-align: middle; color: var(--gold); } a:hover .ico { color: var(--navy); }

/* solar images (goruntuler.php) */
.latest3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.latest3 .card { margin: 0; }
.drawing-thumb.dark { background: #000; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumbs a { display: block; text-decoration: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.thumbs img { display: block; width: 100%; height: 100px; object-fit: contain; background: #000; }
.thumbs span { display: block; font-size: .72rem; color: var(--muted); padding: 3px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seq { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 14px; }
.seq video { width: 100%; max-width: 900px; display: block; border-radius: 12px; background: #000; }
.seq-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.seq-tools .btn.active { background: #0f2c59; color: #fff; }
pre.raw { white-space: pre-wrap; font-size: .78rem; background: var(--card-solid); border: 1px solid var(--border); border-radius: 10px; padding: 10px; max-height: 320px; overflow: auto; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }
details summary { cursor: pointer; font-weight: 600; color: var(--navy); margin: 8px 0; }

/* yontem.php worked example: image rows */
.fig-row { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: .6rem 0 .8rem; }
.fig-row.fig-two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.fig-row.fig-three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.fig-row.fig-one { grid-template-columns: minmax(0, 480px); }
.fig-row a { display: block; text-decoration: none; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #000; }
.fig-row img { display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.fig-row span { display: block; font-size: .8rem; color: var(--muted); background: var(--card-solid); padding: 5px 8px; }
.article .fig-chart { display: block; width: 100%; max-width: 640px; height: auto; }
