/* ============================================================
   style-theory.css — Theory Article Pages
   YooStudio V2 "Obsidian Prism" — dark readable text + Roboto
   ============================================================ */

/* ── Google Fonts: Roboto ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* {
  box-sizing: border-box;
}

/* ── Body & Base ──────────────────────────────────────────── */
body {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: #1a1a2e;
  background-color: #f4f6f8;
  margin: 0;
  padding: 0;
}

/* ── Page header bar ──────────────────────────────────────── */
#header {
  margin-top: 0;
  margin-bottom: 0;
  padding: 14px 24px;
  position: relative;
  z-index: 100;
  width: 100%;
  border-bottom: 2px solid rgba(0, 181, 161, 0.4);
  background: linear-gradient(135deg, #0d1b2a 0%, #1a2e44 100%);
  color: #e8e8ed;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: none;
}

/* ── Headings ─────────────────────────────────────────────── */
h1 {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #0d1b2a;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

h2, h3 {
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  color: #0d1b2a;
  font-weight: 700;
}

h2 {
  font-size: 18px;
  margin-top: 1.4em;
  margin-bottom: 0.5em;
}

h3 {
  font-size: 15px;
  margin-top: 1.2em;
  margin-bottom: 0.4em;
  color: #163958;
}

/* ── Article layout ───────────────────────────────────────── */
article {
  float: left;
  padding: 24px 28px;
  width: 100%;
  background-color: #ffffff;
  color: #1a1a2e;
  border-radius: 0;
}

p {
  color: #2d2d44;
  margin-bottom: 0.85em;
}

strong {
  color: #0d1b2a;
  font-weight: 700;
}

/* ── Title bar (section headings) ────────────────────────── */
.title {
  width: 100%;
  font-size: 1.1rem;
  margin: 0.5rem 0;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(135deg, #0d4f8c 0%, #0a7ea4 100%);
  color: #ffffff;
  text-shadow: none;
  padding: 10px 16px 10px 20px;
  letter-spacing: 0.04em;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

/* ── Row / Column grid (image thumbnails) ────────────────── */
.main {
  position: relative;
  width: 50%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  padding: 0 8px;
}

.column {
  position: relative;
  float: flex;
  max-width: 25%;
  padding: 0 8px;
  cursor: pointer;
}

.column img {
  opacity: 1;
  margin-top: 16px;
  vertical-align: middle;
  width: 100%;
  z-index: 1;
  border-radius: 4px;
  transition: opacity 0.35s ease;
}

.column:hover img {
  opacity: 0.25;
}

.middle {
  transition: opacity 0.4s ease;
  opacity: 0;
  width: 90%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

.column:hover .middle {
  opacity: 1;
}

.text {
  font-weight: 700;
  font-size: 13px;
  padding: 4px 8px;
  background: #0a7ea4;
  color: #ffffff;
  border-radius: 4px;
}

/* ── Definition lists (formula boxes) ───────────────────── */
dl {
  padding: 14px 16px;
  background: #e8f4fb;
  border-left: 3px solid #0a7ea4;
  border-radius: 4px;
  margin: 12px 0;
  color: #1a1a2e;
}

dt {
  font-weight: 500;
  color: #163958;
  line-height: 1.8;
}

dd {
  color: #2d2d44;
  margin-left: 1.2em;
}

/* ── Buttons ──────────────────────────────────────────────── */
button {
  color: #ffffff;
  background: #0a7ea4;
  border: 1px solid #056f91;
  border-radius: 6px;
  margin: 5px;
  padding: 7px 16px;
  font-size: 14px;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-weight: 500;
  cursor: pointer;
  display: inline-block;
  position: relative;
  transition: background 0.25s ease, border-color 0.25s ease;
}

button::after {
  content: "\00ab";
  float: left;
  opacity: 0.5;
  top: 14px;
  right: 20px;
  transition: opacity 0.3s ease, right 0.3s ease;
}

button:hover {
  background: #0d5f80;
  border-color: #0a4f6a;
  padding-right: 24px;
  padding-left: 24px;
}

button:hover::after {
  opacity: 1;
  right: 10px;
}

button:active {
  background: #083f55;
}

/* ── Inputs ───────────────────────────────────────────────── */
input {
  border: 2px solid #0a7ea4;
  border-radius: 7px;
  text-align: center;
  background: #ffffff;
  color: #1a1a2e;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  padding: 4px 8px;
  font-size: 13px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
  border-color: #056f91;
  box-shadow: 0 0 0 3px rgba(10, 126, 164, 0.15);
  outline: none;
}

/* ── Selects ──────────────────────────────────────────────── */
select {
  margin-bottom: 8px;
  margin-top: 8px;
  outline: 0;
  background: #0d4f8c;
  color: #ffffff;
  border: 1px solid #056f91;
  padding: 5px 10px;
  border-radius: 8px;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

select:hover,
select:focus {
  background: #0a3d6e;
  outline: none;
}

/* ── Labels ───────────────────────────────────────────────── */
.label {
  font-weight: 700;
  font-size: 15px;
  margin-left: 0;
  color: #0d1b2a;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
}

/* ── Fraction display ─────────────────────────────────────── */
.fraction {
  display: inline-block;
  vertical-align: middle;
  margin: 0 0.2em 0.4em;
  text-align: center;
  font-size: 1em;
  color: #1a1a2e;
}

.fraction > span {
  display: block;
  padding-top: 0.15em;
}

.fraction span.fdn {
  border-top: 1px solid #0a7ea4;
}

.fraction span.bar {
  display: none;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
  background: #e8f4fb;
  border-top: 1px solid rgba(10, 126, 164, 0.3);
  font-size: 13px;
  font-family: 'Roboto', Helvetica, Arial, sans-serif;
  color: #2d2d44;
  text-align: center;
  padding: 12px 16px;
}

/* ── Content sections ─────────────────────────────────────── */
.content {
  padding: 14px 0;
  color: #1a1a2e;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 650px) {
  #header {
    display: none;
  }

  body {
    font-size: 14px;
  }

  article {
    padding: 16px;
  }

  .column {
    max-width: 50%;
  }

  button {
    font-size: 13px;
    padding: 6px 12px;
  }

  dl {
    padding: 10px 12px;
    font-size: 13px;
  }
}
