/*
Theme Name: Tsaberlen Steel Works
Theme URI: https://tsaberlen.gr
Author: Tsaberlen Steel Works
Description: Olive-green industrial theme for Tsaberlen Steel Works. Styling only - it renders your existing pages, posts and menus exactly as they are without adding or replacing any content.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tsaberlen-steel
Tags: olive, industrial, business, custom-menu, custom-logo, featured-images, translation-ready, block-styles, wide-blocks
*/

:root {
  --ts-bg: #b4bf6e;
  --ts-surface: #c0ca82;
  --ts-surface-2: #c9d28f;
  --ts-button: #e5ebbd;
  --ts-button-hover: #eef2d4;
  --ts-text: #33391f;
  --ts-muted: #545c33;
  --ts-border: rgba(51, 57, 31, 0.28);
  --ts-radius: 8px;
  --ts-max: 80rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: var(--ts-bg);
  color: var(--ts-text);
  font-family: "Barlow", "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.site-title, .ts-nav a, .ts-button, .wp-block-button__link, button, input[type="submit"] {
  font-family: "Bebas Neue", "Barlow", Impact, sans-serif;
  letter-spacing: 0.03em;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--ts-text);
  line-height: 1.05;
  margin: 2.2rem 0 1rem;
  font-weight: 400;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.35rem; }

p, ul, ol, table, figure, pre { margin: 0 0 1.25rem; }

a { color: var(--ts-text); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: #1f2312; }

img, iframe, video { max-width: 100%; height: auto; }

hr, .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--ts-border);
  margin: 2.5rem 0;
}

/* ---------- layout ---------- */
.ts-container {
  width: 100%;
  max-width: var(--ts-max);
  margin: 0 auto;
  padding: 0 1rem;
}

.site-content { padding: 2.5rem 0 4rem; }

.entry-content > * { margin-left: auto; margin-right: auto; }

.entry-content .alignwide { max-width: min(100%, 1200px); }
.entry-content .alignfull { max-width: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(180, 191, 110, 0.96);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--ts-border);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}

.site-branding a { text-decoration: none; display: inline-flex; align-items: baseline; gap: 0.5rem; }
.site-title { font-size: 1.9rem; line-height: 1; white-space: nowrap; }
.site-title-sub { font-size: 1.15rem; line-height: 1; color: var(--ts-muted); white-space: nowrap; }
.custom-logo { max-height: 48px; width: auto; }

.ts-nav ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem; margin: 0; padding: 0; }
.ts-nav a {
  display: inline-block;
  padding: 0.5rem 0.7rem;
  font-size: 1.05rem;
  text-decoration: none;
  color: var(--ts-muted);
  border-radius: var(--ts-radius);
}
.ts-nav a:hover { background-color: var(--ts-surface-2); color: var(--ts-text); }
.ts-nav .current-menu-item > a,
.ts-nav .current_page_item > a { background-color: var(--ts-surface-2); color: var(--ts-text); }

.ts-nav-toggle {
  display: none;
  background: var(--ts-button);
  color: var(--ts-text);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  padding: 0.5rem 0.8rem;
  font-size: 1rem;
  cursor: pointer;
}

@media (max-width: 980px) {
  .ts-nav-toggle { display: inline-block; }
  .ts-nav {
    display: none;
    width: 100%;
    padding-bottom: 1rem;
  }
  .site-header-inner { flex-wrap: wrap; }
  .ts-nav.is-open { display: block; }
  .ts-nav ul { flex-direction: column; align-items: stretch; gap: 0.25rem; }
  .ts-nav a { padding: 0.7rem 0.8rem; font-size: 1.15rem; }
}

/* ---------- buttons ---------- */
.ts-button,
.wp-block-button__link,
button,
input[type="submit"],
input[type="button"] {
  display: inline-block;
  background-color: var(--ts-button);
  color: var(--ts-text) !important;
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  padding: 0.7rem 1.4rem;
  font-size: 1.15rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.ts-button:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover { background-color: var(--ts-button-hover); }

.wp-block-button.is-style-outline .wp-block-button__link {
  background-color: transparent;
  border: 1px solid var(--ts-text);
}

/* ---------- content elements ---------- */
blockquote, .wp-block-quote {
  margin: 2rem 0;
  padding: 1rem 1.5rem;
  background-color: var(--ts-surface);
  border-left: 4px solid var(--ts-text);
  border-radius: var(--ts-radius);
}

table, .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--ts-surface);
  border-radius: var(--ts-radius);
  overflow: hidden;
}

th, td { border: 1px solid var(--ts-border); padding: 0.75rem 1rem; text-align: left; }
th { background-color: var(--ts-surface-2); font-family: "Bebas Neue", sans-serif; font-size: 1.1rem; letter-spacing: 0.03em; }

.wp-block-table figcaption, .wp-element-caption, figcaption {
  color: var(--ts-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

.wp-block-image img { border-radius: var(--ts-radius); }

.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: var(--ts-radius); }

ul, ol { padding-left: 1.3rem; }
li { margin-bottom: 0.4rem; }

code, pre {
  background-color: var(--ts-surface);
  border-radius: var(--ts-radius);
  padding: 0.15rem 0.4rem;
}
pre { padding: 1rem; overflow-x: auto; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"],
input[type="search"], input[type="number"], input[type="password"], textarea, select {
  width: 100%;
  max-width: 100%;
  background-color: var(--ts-surface);
  color: var(--ts-text);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  padding: 0.65rem 0.8rem;
  font-family: inherit;
  font-size: 1rem;
}

input:focus, textarea:focus, select:focus { outline: 2px solid var(--ts-muted); outline-offset: 1px; }

/* ---------- posts ---------- */
.entry-header { margin-bottom: 1.5rem; }
.entry-meta { color: var(--ts-muted); font-size: 0.95rem; }
.entry-title { margin-top: 0; }
.entry-title a { text-decoration: none; }

.post-list { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.post-card {
  background-color: var(--ts-surface);
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.post-card img { width: 100%; height: 200px; object-fit: cover; display: block; }
.post-card-body { padding: 1rem 1.25rem 1.5rem; }
.post-card h2 { font-size: 1.6rem; margin: 0.4rem 0 0.6rem; }

.featured-image { margin-bottom: 1.5rem; }
.featured-image img { width: 100%; border-radius: var(--ts-radius); }

.ts-pagination { margin-top: 2.5rem; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.ts-pagination .page-numbers {
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--ts-border);
  border-radius: var(--ts-radius);
  text-decoration: none;
  background-color: var(--ts-surface);
}
.ts-pagination .page-numbers.current { background-color: var(--ts-button); }

/* ---------- footer ---------- */
.site-footer {
  background-color: var(--ts-surface);
  border-top: 1px solid var(--ts-border);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.site-footer-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.site-footer h2, .site-footer h3, .site-footer .widget-title { font-size: 1.4rem; margin-top: 0; }
.site-footer ul { list-style: none; padding: 0; }
.site-footer a { text-decoration: none; color: var(--ts-muted); }
.site-footer a:hover { color: var(--ts-text); }

.footer-menu ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 1rem; }

.site-credit {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ts-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--ts-muted);
}

/* ---------- accessibility ---------- */
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; overflow: hidden; position: absolute !important;
  word-wrap: normal !important;
}

.skip-link:focus {
  position: fixed; top: 8px; left: 8px; z-index: 200;
  background: var(--ts-button); padding: 0.6rem 1rem; border-radius: var(--ts-radius);
  clip: auto; clip-path: none; height: auto; width: auto;
}

.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { margin-left: auto; margin-right: auto; display: block; }
.sticky, .gallery-caption, .bypostauthor { }
