/*
Theme Name: Grid Twelve Lite
Theme URI: https://example.com/
Author: You
Description: A simple grid-only theme inspired by Twenty Twelve. Template-only, no Customizer, no search.
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: grid-twelve-lite
*/

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #222;
  background: #f2f2f2;
}

/* Links */
a { color: #1e5aa8; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Images never overflow their container, anywhere in the theme */
img { max-width: 100%; height: auto; }

/* Layout container */
.site {
  width: 100%;
  max-width: 1024px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  padding-left: 20px;
  padding-right: 20px;
  padding-top: 10px;
  padding-bottom: 5px;
  background-color: crimson;
}

.site-title {
  margin: 0;
  font-size: 32px;
  font-weight: bold;
  color: #fff;
}

.site-header .site-title,
.site-header .site-title a {
  color: #fff;
}

.site-description {
  margin: 6px 0 0 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
}

.site-contact {
  margin: 10px 0 0 0;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Front hero image (front page only) */
.front-hero {
  width: 100%;
  border-bottom: 1px solid #ddd;
}

.front-hero img {
  display: block;
  width: 100%;
  height: auto;
}

/* Navigation */
.site-nav {
  border-bottom: 1px solid #ddd;
  background: #fafafa;
}

.site-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0 12px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 10px;
  align-items: center;
}

.site-nav .menu li {
  margin: 0;
  padding: 0;
}

.site-nav .menu a {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: #222;
}

.site-nav .menu a:hover {
  background: #eee;
  text-decoration: none;
}

/* "Home" link — first item in the nav menu */
.site-nav .menu li:first-child > a {
  text-transform: uppercase;
  font-weight: bold;
}

.site-nav .sub-menu {
  list-style: none;
  margin: 0;
  padding-left: 16px;
}

/* Main area (default: content + right sidebar) */
.site-main {
  flex: 1 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}

/* No-sidebar layout */
.site-main.no-sidebar {
  grid-template-columns: 1fr;
}

/* Full-width layout: breaks out of the boxed .site container to span the full browser width */
.site-main.full-width {
  grid-template-columns: 1fr;
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Content */
.content-area {
  min-width: 0;
}

.entry-title {
  margin: 0 0 12px 0;
  font-size: 24px;
}

.entry-meta {
  font-size: 13px;
  color: #666;
  margin: 0 0 16px 0;
}

.entry-content p { margin: 0 0 14px 0; }

.entry-content img {
  max-width: 100%;
  height: auto;
}

/* Sidebar */
.sidebar {
  border-left: 1px solid #ddd;
  padding-left: 18px;
}

.widget {
  margin: 0 0 18px 0;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fafafa;
}

.widget-title {
  margin: 0 0 10px 0;
  font-size: 16px;
}

/* Front page widget grid: 3 rows x 3 columns */
.front-widgets {
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.front-widgets .widget {
  margin: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid #ddd;
  padding: 16px 24px;
  color: #666;
  font-size: 13px;
  background: #fafafa;
}

/* Basic lists */
ul, ol { padding-left: 22px; }

/* Comments */
.comments-area {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid #ddd;
}

.comments-title {
  margin: 0 0 16px 0;
  font-size: 20px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-list .children {
  list-style: none;
  margin: 0 0 0 24px;
  padding: 0;
}

.comment-list article {
  padding: 14px 0;
  border-bottom: 1px solid #ddd;
}

.comment-list .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 8px;
}

.comment-author {
  font-weight: bold;
}

.comment-metadata {
  font-size: 12px;
  color: #666;
  margin: 4px 0 8px 0;
}

.comment-content p { margin: 0 0 10px 0; }

.comment-reply-link { font-size: 12px; }

.comment-respond { margin-top: 24px; }

.comment-reply-title {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.comment-form p { margin: 0 0 12px 0; }

.comment-form label {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font: inherit;
}

.comment-form textarea { min-height: 120px; }

.comment-form .form-submit input {
  padding: 10px 18px;
  background: crimson;
  color: #fff;
  border: 0;
  font: inherit;
  cursor: pointer;
}

/* Accessibility helper */
.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .site-header,
  .site-main,
  .front-widgets,
  .site-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 900px) {
  /* Stack content and sidebar */
  .site-main {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid #ddd;
    padding-top: 18px;
  }
}

@media (max-width: 900px) {
  /* Front page widgets: 2 columns */
  .front-widgets {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  /* Front page widgets: 1 column */
  .front-widgets {
    grid-template-columns: 1fr;
  }

  /* Nav: allow wrapping */
  .site-nav .menu {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    padding: 8px 12px;
  }

  .site-nav .menu a {
    padding: 8px 12px;
  }

  /* Header text scales down on small screens */
  .site-title { font-size: 24px; }
  .site-description { font-size: 14px; }
  .site-contact { font-size: 12px; }

  /* Nested comment replies indent less on narrow screens */
  .comment-list .children { margin-left: 12px; }
}
