/*
Theme Name: San Martín con Gafas — Picture Window
Theme URI: https://psoesanmartin.com/
Author: Recuperación San Martín con gafas
Description: Recreación del aspecto histórico del blog San Martín de la Vega con gafas, basado en la plantilla Picture Window de Blogger.
Version: 1.0.3
License: GNU General Public License v2 or later
Text Domain: sanmartin-picture-window
*/

:root {
  --smcg-green-dark: #274e13;
  --smcg-green-link: #38761d;
  --smcg-text: #171717;
  --smcg-muted: #5f665d;
  --smcg-panel: rgba(244, 255, 236, 0.79);
  --smcg-white: #fff;
  --smcg-border: #dfe4dc;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 0;
  color: var(--smcg-text);
  font: 15px/1.45 "Trebuchet MS", Trebuchet, Arial, sans-serif;
  background: #050805 url("assets/fondo-nikada.jpg") no-repeat fixed top center;
  background-size: cover;
}

a { color: var(--smcg-green-dark); text-decoration: none; }
a:visited { color: var(--smcg-green-link); }
a:hover,
a:focus-visible { color: #4a780d; text-decoration: underline; }

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

.screen-reader-text,
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}

.skip-link:focus {
  z-index: 100000;
  top: 8px;
  left: 8px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  clip: auto;
  color: #fff;
  background: #000;
}

.site-shell {
  width: min(970px, calc(100% - 32px));
  margin: 56px auto 38px;
}

.site-header {
  overflow: hidden;
  background: #080a08;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .72);
  line-height: 0;
}

.site-header a { display: block; }

.site-header img {
  display: block;
  width: 100%;
  height: auto;
}

.main-panel {
  display: grid;
  grid-template-columns: minmax(0, 660px) minmax(220px, 270px);
  gap: 20px;
  padding: 15px 20px 26px;
  border-radius: 20px 20px 0 0;
  background: var(--smcg-panel);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
  backdrop-filter: blur(1px);
}

.posts,
.sidebar { min-width: 0; }

.archive-title,
.date-heading {
  margin: 4px 0 8px;
  color: var(--smcg-muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  text-transform: uppercase;
}

.post-card,
.comments-area {
  overflow: hidden;
  margin: 0 0 20px;
  padding: 15px 20px;
  border: 1px solid var(--smcg-border);
  border-radius: 5px;
  background: var(--smcg-white);
}

.entry-title {
  margin: 0 0 1.05em;
  color: var(--smcg-green-dark);
  font-size: 23px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.entry-title a { color: inherit; }

.entry-content {
  overflow-wrap: anywhere;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.43;
  text-align: justify;
}

.entry-content::after { display: block; clear: both; content: ""; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content p { margin: 0 0 1em; }
.entry-content img { max-width: 100%; height: auto; }
.entry-content iframe,
.entry-content video,
.entry-content embed,
.entry-content object { max-width: 100%; }

.alignleft { float: left; margin: 0 18px 14px 0; }
.alignright { float: right; margin: 0 0 14px 18px; }
.aligncenter { display: block; margin: 0 auto 14px; }

.entry-meta {
  clear: both;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #eee;
  color: #8a8a8a;
  font-size: 12px;
}

.entry-meta span + span::before { margin: 0 .45em; content: "·"; }

.page-links { clear: both; margin: 1em 0; }

.pager,
.posts-navigation .nav-links,
.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 4px 15px;
  font-size: 16px;
}

.nav-next { margin-left: auto; text-align: right; }

.sidebar { padding-top: 1px; }

.widget {
  margin: 0 0 25px;
  color: #273125;
  font-size: 13px;
}

.widget-title {
  margin: .45em 0 .65em;
  color: var(--smcg-muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.widget p { margin: .48em 0; }

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

.widget li {
  padding: 5px 0;
  border-top: 1px dashed rgba(75, 87, 72, .34);
}

.widget li:first-child { border-top: 0; }

.profile-intro {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.profile-intro img {
  width: 78px;
  height: 78px;
  object-fit: cover;
}

.profile-intro p { margin-top: 0; }
.small-link { display: inline-block; margin-top: 2px; }

.blogger-mark {
  display: inline-grid;
  width: 17px;
  height: 17px;
  margin-right: 4px;
  place-items: center;
  border-radius: 3px;
  color: #fff;
  background: #f57c00;
  font: 700 11px Arial, sans-serif;
}

.search-form { display: flex; gap: 5px; }

.search-field,
textarea,
input[type="text"],
input[type="email"],
input[type="url"] {
  min-width: 0;
  max-width: 100%;
  padding: 7px 8px;
  border: 1px solid #adb6a8;
  border-radius: 2px;
  background: rgba(255, 255, 255, .9);
}

.search-field { flex: 1; }

button,
input[type="submit"] {
  padding: 7px 10px;
  border: 1px solid #2d511c;
  border-radius: 2px;
  color: #fff;
  background: #3d6c25;
  cursor: pointer;
}

.archive-tree details { margin: 4px 0 4px 9px; }
.archive-tree > details { margin-left: 0; }
.archive-tree summary { cursor: pointer; }
.archive-tree ul { margin-left: 14px; }

.comments-title,
.comment-reply-title {
  margin: 0 0 1em;
  color: var(--smcg-green-dark);
  font-size: 20px;
}

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

.comment-body {
  margin: 0 0 14px;
  padding: 12px 0;
  border-bottom: 1px dashed #cad0c7;
}

.comment-author .avatar { float: left; margin: 0 10px 5px 0; border-radius: 50%; }
.comment-metadata { color: #777; font-size: 12px; }
.comment-content { clear: both; font-family: Georgia, "Times New Roman", serif; }
.comment-form-comment label { display: block; }
.comment-form-comment textarea { width: 100%; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
  padding: 13px 20px 22px;
  border-radius: 0 0 20px 20px;
  color: #d0d0d0;
  background: rgba(0, 0, 0, .58);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .28);
  font-size: 12px;
}

.site-footer p { margin: .4em 0; }
.site-footer a { color: #d7edca; }
.site-footer .attribution { text-align: right; }

@media (max-width: 780px) {
  body { background-attachment: scroll; }
  .site-shell { width: 100%; margin: 0; }
  .main-panel { grid-template-columns: 1fr; gap: 10px; border-radius: 0; }
  .site-footer { grid-template-columns: 1fr; gap: 8px; border-radius: 0; }
  .site-footer .attribution { text-align: left; }
}

@media (max-width: 520px) {
  .main-panel { padding: 12px; }
  .post-card,
  .comments-area { padding: 14px; }
  .entry-title { font-size: 21px; }
  .entry-content { font-size: 16px; text-align: left; }
  .entry-content [style*="float: left"],
  .entry-content [style*="float:left"],
  .entry-content [style*="float: right"],
  .entry-content [style*="float:right"],
  .alignleft,
  .alignright {
    float: none !important;
    display: block;
    margin: 0 auto 14px !important;
  }
  .site-footer { padding-inline: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
