/* =====================================================
   INDYMEDIA ATHENS — style.css
   ─────────────────────────────────────────────────────
   Edit the variables in :root to retheme everything.
   Sections are clearly labelled for easy customisation.
   ===================================================== */

/* ─── 1. DESIGN TOKENS ──────────────────────────────── */
:root {
  /* Brand colors */
  --color-primary:        #c0392b;   /* IMC red — header, accents */
  --color-primary-dark:   #922b21;   /* hover / deeper red */
  --color-primary-light:  #e74c3c;   /* highlights, links hover */

  /* Page background & surfaces */
  --color-bg:             #f4f0e8;   /* warm off-white body */
  --color-surface:        #ffffff;   /* card / article bg */
  --color-surface-alt:    #eae6dd;   /* alternate stripe / sidebar bg */

  /* Text */
  --color-text:           #1a1a1a;   /* primary body text */
  --color-text-muted:     #555555;   /* dates, meta info */
  --color-text-light:     #888888;   /* secondary labels */

  /* Links */
  --color-link:           #b03020;   /* default link */
  --color-link-hover:     #e74c3c;   /* link hover */
  --color-link-visited:   #7b241c;   /* visited */

  /* Borders */
  --color-border:         #ccbfb0;   /* default border */
  --color-border-strong:  #9a8878;   /* stronger divider */

  /* Topbar & footer */
  --color-topbar-bg:      #1a1a1a;
  --color-topbar-text:    #cccccc;
  --color-footer-bg:      #1f1f1f;
  --color-footer-text:    #bbbbbb;
  --color-footer-heading: #ffffff;

  /* Header */
  --color-header-bg:      #2c2c2c;
  --color-header-text:    #ffffff;

  /* Sidebar titles */
  --color-sidebar-title-bg:   #c0392b;
  --color-sidebar-title-text: #ffffff;

  /* Publish bar */
  --color-publish-bar-bg:   #2c2c2c;
  --color-publish-bar-text: #f0d080;

  /* Calendar */
  --color-cal-today-bg:    #c0392b;
  --color-cal-today-text:  #ffffff;
  --color-cal-event-text:  #c0392b;
  --color-cal-weekend:     #888888;

  /* Typography */
  --font-ui:      'Georgia', 'Times New Roman', serif;
  --font-body:    'Georgia', 'Times New Roman', serif;
  --font-mono:    'Courier New', Courier, monospace;
  --font-sans:    Verdana, Geneva, Tahoma, sans-serif;  /* nav, labels */

  /* Spacing */
  --gap:          1rem;
  --gap-sm:       0.5rem;
  --gap-lg:       1.5rem;

  /* Layout widths */
  --sidebar-left-width:   190px;
  --sidebar-right-width:  190px;
  --max-width:            1100px;

  /* Radius & shadow */
  --radius:       2px;
  --shadow:       0 1px 3px rgba(0,0,0,0.12);
}


/* ─── 2. RESET & BASE ───────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 14px; scroll-behavior: smooth; }

body {
  font-family:      var(--font-body);
  background-color: var(--color-bg);
  color:            var(--color-text);
  line-height:      1.55;
}

a {
  color:           var(--color-link);
  text-decoration: none;
}
a:hover  { color: var(--color-link-hover); text-decoration: underline; }
a:visited { color: var(--color-link-visited); }

img { max-width: 100%; height: auto; display: block; }

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: bold;
  line-height: 1.25;
}


/* ─── 3. TOPBAR ─────────────────────────────────────── */
#topbar {
  background: var(--color-topbar-bg);
  color:       var(--color-topbar-text);
  font-family: var(--font-sans);
  font-size:   0.78rem;
  border-bottom: 1px solid #333;
}

#topbar-inner {
  max-width:     var(--max-width);
  margin:        0 auto;
  padding:       4px var(--gap);
  display:       flex;
  align-items:   center;
  gap:           var(--gap);
  flex-wrap:     wrap;
}

#lang-links,
#tool-links {
  display: flex;
  gap:     var(--gap-sm);
}

#lang-links li a,
#tool-links li a {
  color:   var(--color-topbar-text);
  padding: 2px 6px;
  border:  1px solid #555;
  border-radius: var(--radius);
  font-size: 0.75rem;
}
#lang-links li a:hover,
#tool-links li a:hover {
  background: #333;
  text-decoration: none;
}

#search-form {
  display:   flex;
  flex:      1;
  gap:       4px;
}
#search-form input {
  flex:             1;
  padding:          3px 7px;
  background:       #2a2a2a;
  border:           1px solid #555;
  color:            #eee;
  font-family:      var(--font-sans);
  font-size:        0.78rem;
  border-radius:    var(--radius);
}
#search-form button {
  background:   var(--color-primary);
  color:        #fff;
  border:       none;
  padding:      3px 10px;
  cursor:       pointer;
  border-radius: var(--radius);
  font-size:    0.78rem;
}
#search-form button:hover { background: var(--color-primary-dark); }

#tool-links { margin-left: auto; }


/* ─── 4. HEADER ─────────────────────────────────────── */
#site-header {
  background: var(--color-header-bg);
  color:      var(--color-header-text);
  border-bottom: 3px solid var(--color-primary);
}

#header-inner {
  max-width:   var(--max-width);
  margin:      0 auto;
  padding:     var(--gap) var(--gap);
  display:     flex;
  align-items: center;
  gap:         var(--gap-lg);
  flex-wrap:   wrap;
}

#logo-block { flex-shrink: 0; }

#site-logo {
  display:     inline-flex;
  align-items: baseline;
  gap:         4px;
  text-decoration: none;
}

#logo-imc {
  font-family:  var(--font-sans);
  font-size:    2rem;
  font-weight:  bold;
  color:        var(--color-primary);
  letter-spacing: -1px;
}

#logo-arizona {
  font-family: var(--font-ui);
  font-size:   1.7rem;
  font-weight: bold;
  color:       #fff;
  letter-spacing: 1px;
}

#site-tagline {
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       #aaa;
  margin-top:  3px;
  letter-spacing: 0.5px;
}

#main-nav { margin-left: auto; }

#main-nav ul {
  display:   flex;
  flex-wrap: wrap;
  gap:       2px;
}

#main-nav ul li a {
  display:      block;
  padding:      5px 10px;
  color:        #ddd;
  font-family:  var(--font-sans);
  font-size:    0.8rem;
  border-radius: var(--radius);
  transition:   background 0.15s;
}
#main-nav ul li a:hover {
  background:      var(--color-primary);
  color:           #fff;
  text-decoration: none;
}

#main-nav ul li a.nav-active {
  background: var(--color-primary);
  color:      #fff;
}


/* ─── 5. PUBLISH BAR ────────────────────────────────── */
#publish-bar {
  background: var(--color-publish-bar-bg);
  text-align: center;
  padding:    5px var(--gap);
  border-bottom: 1px solid #444;
}

#publish-bar a {
  color:       var(--color-publish-bar-text);
  font-family: var(--font-sans);
  font-size:   0.8rem;
  font-weight: bold;
  letter-spacing: 0.3px;
}
#publish-bar a:hover {
  color:           #fff;
  text-decoration: none;
}


/* ─── 6. THREE-COLUMN WRAPPER ───────────────────────── */
#wrapper {
  max-width: var(--max-width);
  margin:    0 auto;
  padding:   var(--gap);
  display:   grid;
  grid-template-columns: var(--sidebar-left-width) 1fr var(--sidebar-right-width);
  grid-template-areas:   "left main right";
  gap:       var(--gap);
  align-items: start;
}

#sidebar-left  { grid-area: left; }
#content       { grid-area: main; }
#sidebar-right { grid-area: right; }


/* ─── 7. SIDEBAR SHARED STYLES ──────────────────────── */
.sidebar-block {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  overflow:      hidden;
}

.sidebar-title {
  background:  var(--color-sidebar-title-bg);
  color:       var(--color-sidebar-title-text);
  font-family: var(--font-sans);
  font-size:   0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding:     5px 8px;
}

.sidebar-more {
  display:     block;
  padding:     4px 8px;
  font-size:   0.75rem;
  font-family: var(--font-sans);
  color:       var(--color-link);
  border-top:  1px solid var(--color-border);
  background:  var(--color-surface-alt);
}
.sidebar-more:hover { background: var(--color-border); text-decoration: none; }


/* ─── 8. NEWSWIRE ───────────────────────────────────── */
.newswire-list { padding: 4px 0; }

.newswire-list li {
  display:     flex;
  flex-direction: column;
  padding:     4px 8px;
  border-bottom: 1px dotted var(--color-border);
  font-size:   0.8rem;
}
.newswire-list li:last-child { border-bottom: none; }

.nw-date {
  font-family: var(--font-sans);
  font-size:   0.68rem;
  color:       var(--color-text-muted);
}

.nw-link { color: var(--color-link); line-height: 1.3; }


/* ─── 9. TOPIC & LINK LISTS ─────────────────────────── */
.topic-list li,
.imc-list li,
.media-list li,
.link-list li {
  border-bottom: 1px dotted var(--color-border);
  padding:       5px 8px;
  font-size:     0.8rem;
}
.topic-list li:last-child,
.imc-list li:last-child,
.media-list li:last-child,
.link-list li:last-child { border-bottom: none; }

.topic-list a,
.imc-list a,
.media-list a,
.link-list a {
  color:       var(--color-link);
  font-family: var(--font-sans);
}


/* ─── 10. CALENDAR ──────────────────────────────────── */
.cal-table {
  width:           100%;
  border-collapse: collapse;
  font-family:     var(--font-sans);
  font-size:       0.78rem;
}

.cal-table caption {
  padding:    4px 8px;
  font-size:  0.72rem;
  font-weight: bold;
  text-align: center;
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  color:      var(--color-text-muted);
}

.cal-table th {
  text-align:  center;
  padding:     3px 2px;
  font-size:   0.68rem;
  color:       var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
  background:  var(--color-surface-alt);
}

.cal-table td {
  text-align: center;
  padding:    3px 2px;
  font-size:  0.78rem;
  border-bottom: 1px dotted var(--color-border);
}

.cal-sat, .cal-sun { color: var(--color-cal-weekend); }

.cal-today {
  background:    var(--color-cal-today-bg);
  color:         var(--color-cal-today-text);
  font-weight:   bold;
  border-radius: var(--radius);
}

.cal-event {
  color:       var(--color-cal-event-text);
  font-weight: bold;
}


/* ─── 11. EVENTS LIST ───────────────────────────────── */
.event-list { padding: 4px 0; }

.event-item {
  display:       flex;
  flex-direction: column;
  padding:       5px 8px;
  border-bottom: 1px dotted var(--color-border);
  font-size:     0.78rem;
}
.event-item:last-child { border-bottom: none; }

.event-date {
  font-family: var(--font-sans);
  font-size:   0.68rem;
  color:       var(--color-primary);
  font-weight: bold;
}

.event-title { color: var(--color-link); line-height: 1.3; }

.event-location {
  font-size:   0.68rem;
  color:       var(--color-text-muted);
  font-style:  italic;
}


/* ─── 12. MAIN CONTENT / ARTICLES ───────────────────── */
#content { min-width: 0; }

.feature-story,
.story {
  background:    var(--color-surface);
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  padding:       var(--gap);
  margin-bottom: var(--gap);
}

.feature-story { border-left: 4px solid var(--color-primary); }

.story-title {
  font-family: var(--font-ui);
  font-size:   1.15rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.feature-story .story-title { font-size: 1.3rem; }

.story-title a { color: var(--color-text); }
.story-title a:hover { color: var(--color-primary); text-decoration: none; }

.story-meta {
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       var(--color-text-muted);
  margin-bottom: var(--gap-sm);
}

.story-meta a { color: var(--color-link); }

.story-image-wrap {
  margin:        var(--gap-sm) 0;
  border:        1px solid var(--color-border);
  border-radius: var(--radius);
  overflow:      hidden;
}

.story-body p {
  margin-bottom: var(--gap-sm);
  font-size:     0.9rem;
  line-height:   1.6;
}

.story-read-more {
  font-family: var(--font-sans);
  font-size:   0.78rem;
  margin-top:  var(--gap-sm);
}

.story-divider {
  border:  none;
  border-top: 1px dotted var(--color-border);
  margin: 0 0 var(--gap) 0;
  display: none; /* hidden — articles already have bottom margin */
}


/* ─── 13. PAGINATION ────────────────────────────────── */
#pagination {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  padding:         var(--gap-sm) var(--gap);
  background:      var(--color-surface);
  border:          1px solid var(--color-border);
  border-radius:   var(--radius);
  font-family:     var(--font-sans);
  font-size:       0.78rem;
  margin-top:      var(--gap);
}

.page-info { color: var(--color-text-muted); }


/* ─── 14. FOOTER ────────────────────────────────────── */
#site-footer {
  background:  var(--color-footer-bg);
  color:       var(--color-footer-text);
  margin-top:  var(--gap-lg);
  border-top:  3px solid var(--color-primary);
}

#footer-inner {
  max-width:   var(--max-width);
  margin:      0 auto;
  padding:     var(--gap-lg) var(--gap);
  display:     grid;
  grid-template-columns: repeat(2, 1fr);
  gap:         var(--gap-lg);
}

.footer-col h4 {
  color:         var(--color-footer-heading);
  font-family:   var(--font-sans);
  font-size:     0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: var(--gap-sm);
  padding-bottom: 4px;
  border-bottom: 1px solid #444;
}

.footer-col p,
.footer-col ul li {
  font-family: var(--font-sans);
  font-size:   0.78rem;
  line-height: 1.8;
}

.footer-col a {
  color: #aaa;
}
.footer-col a:hover { color: var(--color-primary-light); }

#footer-bottom {
  text-align:  center;
  padding:     var(--gap-sm) var(--gap);
  border-top:  1px solid #333;
  font-family: var(--font-sans);
  font-size:   0.72rem;
  color:       #666;
}


/* ─── 15. RESPONSIVE ────────────────────────────────── */
@media (max-width: 900px) {
  #wrapper {
    grid-template-columns: var(--sidebar-left-width) 1fr;
    grid-template-areas:
      "left main"
      "right right";
  }
  #sidebar-right { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
  #footer-inner  { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  #wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "left"
      "right";
  }
  #header-inner  { flex-direction: column; align-items: flex-start; }
  #main-nav      { margin-left: 0; }
  #footer-inner  { grid-template-columns: 1fr; }
  #sidebar-right { grid-template-columns: 1fr; }
}
