/* ==========================================================================
   DogSlim - Additional CSS (WordPress カスタマイザー > 追加CSS に貼り付け)
   Site-wide: header, footer, global typography, buttons, links
   ========================================================================== */

/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;500;600;700&display=swap');

/* --- CSS Custom Properties --- */
:root {
  --ds-deep: #1B4332;
  --ds-medium: #2D6A4F;
  --ds-light: #52B788;
  --ds-accent: #D4A574;
  --ds-accent-dark: #B8860B;
  --ds-bg: #FAFAF7;
  --ds-surface: #FFFFFF;
  --ds-text: #1A1A1A;
  --ds-text-secondary: #6B6560;
  --ds-border: #E8E4DF;
  --ds-subtle: #F5F2ED;
  --ds-font-serif: "Noto Serif JP", "Georgia", "Times New Roman", serif;
  --ds-font-body: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
}

/* --- Global Reset & Body --- */
body {
  font-family: var(--ds-font-body);
  color: var(--ds-text);
  background-color: var(--ds-bg);
  line-height: 1.8;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Global Typography --- */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.ast-archive-title {
  font-family: var(--ds-font-serif);
  color: var(--ds-text);
  letter-spacing: 0.02em;
  line-height: 1.4;
  font-weight: 600;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.625rem); }

p, li, td, th {
  line-height: 1.9;
  color: var(--ds-text);
}

.entry-content p {
  margin-bottom: 1.6em;
  line-height: 2.0;
}

/* --- Global Link Styles --- */
a {
  color: var(--ds-medium);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--ds-deep);
}

.entry-content a {
  color: var(--ds-medium);
  border-bottom: 1px solid var(--ds-border);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.entry-content a:hover {
  color: var(--ds-deep);
  border-bottom-color: var(--ds-deep);
}

/* --- Global Button Styles --- */
.wp-block-button__link,
button,
input[type="submit"],
.ast-button,
.button {
  font-family: var(--ds-font-body);
  background-color: var(--ds-deep);
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 14px 32px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.15s ease;
  display: inline-block;
  text-align: center;
  line-height: 1.5;
}

.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover,
.ast-button:hover,
.button:hover {
  background-color: #15372A;
  color: #FFFFFF;
  transform: translateY(-1px);
}

.wp-block-button__link:active,
button:active,
input[type="submit"]:active {
  transform: translateY(0);
}

/* Outline button variant */
.wp-block-button.is-style-outline .wp-block-button__link {
  background: transparent;
  color: var(--ds-deep);
  border: 1px solid var(--ds-deep);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background-color: var(--ds-deep);
  color: #FFFFFF;
}

/* --- Site Header --- */
.ast-primary-header,
.site-header,
header.site-header {
  background-color: var(--ds-surface);
  border-bottom: 1px solid var(--ds-border);
  box-shadow: none;
}

.site-title,
.site-title a,
.ast-site-identity .site-title a {
  font-family: var(--ds-font-serif);
  color: var(--ds-deep);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-title a:hover {
  color: var(--ds-medium);
}

/* Site description / tagline */
.site-description {
  color: var(--ds-text-secondary);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

/* Navigation */
.main-navigation a,
.ast-header-sections-navigation a,
.main-header-menu a {
  font-family: var(--ds-font-body);
  color: var(--ds-text);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.main-navigation a:hover,
.ast-header-sections-navigation a:hover,
.main-header-menu a:hover {
  color: var(--ds-medium);
}

.main-header-menu > .menu-item > a {
  padding: 0 18px;
}

/* Active menu item */
.main-navigation .current-menu-item > a,
.main-header-menu .current-menu-item > a {
  color: var(--ds-deep);
}

/* --- Site Footer --- */
.site-footer,
.ast-footer,
footer.site-footer {
  background-color: #2C2825;
  color: #B8B3AD;
  border-top: none;
}

.site-footer a {
  color: #D4D0CB;
  transition: color 0.2s ease;
  border-bottom: none;
}

.site-footer a:hover {
  color: #FFFFFF;
}

.ast-footer-copyright,
.ast-small-footer {
  background-color: #241F1D;
  color: #8A857F;
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
}

.ast-small-footer a {
  color: #A09A94;
}

.ast-small-footer a:hover {
  color: #FFFFFF;
}

/* Footer widget headings */
.site-footer .widget-title,
.ast-footer .widget-title {
  font-family: var(--ds-font-serif);
  color: #FFFFFF;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.25rem;
}

/* Footer widget text */
.site-footer .widget,
.ast-footer .widget {
  color: #B8B3AD;
  font-size: 0.875rem;
  line-height: 1.8;
}

/* --- Scroll to Top Button --- */
#ast-scroll-top,
.ast-scroll-top-icon,
.scroll-to-top {
  background-color: var(--ds-deep) !important;
  color: #FFFFFF !important;
  border-radius: 4px;
  width: 42px;
  height: 42px;
  line-height: 42px;
  font-size: 18px;
  border: none;
  box-shadow: none;
  opacity: 0.85;
  transition: opacity 0.2s ease, background-color 0.2s ease;
}

#ast-scroll-top:hover,
.scroll-to-top:hover {
  opacity: 1;
  background-color: #15372A !important;
}

/* --- Breadcrumbs --- */
.ast-breadcrumbs,
nav.ast-breadcrumbs {
  font-size: 0.8125rem;
  color: var(--ds-text-secondary);
  padding: 12px 0;
}

.ast-breadcrumbs a {
  color: var(--ds-text-secondary);
  border-bottom: none;
}

.ast-breadcrumbs a:hover {
  color: var(--ds-medium);
}

/* --- Blog Post Cards (Archive) --- */
.ast-article-single,
.ast-article-post {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.ast-article-post:hover {
  box-shadow: 0 2px 12px rgba(27, 67, 50, 0.06);
}

.ast-article-post .entry-title a {
  font-family: var(--ds-font-serif);
  color: var(--ds-text);
  border-bottom: none;
}

.ast-article-post .entry-title a:hover {
  color: var(--ds-medium);
}

.ast-article-post .entry-meta,
.ast-article-post .entry-meta a {
  color: var(--ds-text-secondary);
  font-size: 0.8125rem;
}

/* --- Sidebar Widgets --- */
.widget {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 24px;
}

.widget .widget-title {
  font-family: var(--ds-font-serif);
  font-size: 1rem;
  color: var(--ds-deep);
  border-bottom: 1px solid var(--ds-border);
  padding-bottom: 12px;
  margin-bottom: 16px;
}

/* --- Form Elements Global --- */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="search"],
textarea,
select {
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  padding: 10px 14px;
  font-family: var(--ds-font-body);
  font-size: 0.9375rem;
  color: var(--ds-text);
  background-color: var(--ds-surface);
  transition: border-color 0.2s ease;
  line-height: 1.6;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--ds-medium);
  outline: none;
  box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.08);
}

/* --- Horizontal Rule --- */
hr,
.wp-block-separator {
  border: none;
  border-top: 1px solid var(--ds-border);
  margin: 2.5rem 0;
}

.wp-block-separator.is-style-wide {
  border-top: 1px solid var(--ds-border);
}

/* --- Blockquote --- */
blockquote,
.wp-block-quote {
  border-left: 3px solid var(--ds-accent);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  background: var(--ds-subtle);
  font-family: var(--ds-font-serif);
  font-style: normal;
  color: var(--ds-text);
}

blockquote p {
  font-size: 1.0625rem;
  line-height: 1.9;
}

/* --- Table Global --- */
table {
  border-collapse: collapse;
  width: 100%;
}

table th {
  background-color: var(--ds-subtle);
  font-weight: 600;
  font-size: 0.875rem;
  text-align: left;
}

table th,
table td {
  border: 1px solid var(--ds-border);
  padding: 12px 16px;
  font-size: 0.9375rem;
}

table tr:nth-child(even) {
  background-color: rgba(245, 242, 237, 0.5);
}

/* --- Astra Specific Overrides --- */
.ast-container {
  max-width: 1140px;
}

.ast-separate-container .ast-article-single {
  background: var(--ds-surface);
  border: 1px solid var(--ds-border);
  border-radius: 4px;
  box-shadow: none;
}

/* Remove Astra default box shadow */
.ast-separate-container .ast-article-post,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-comment-list li {
  box-shadow: none;
}

/* --- Selection Color --- */
::selection {
  background-color: rgba(82, 183, 136, 0.2);
  color: var(--ds-text);
}

/* --- Print Styles --- */
@media print {
  body {
    color: #000;
    background: #fff;
  }
  .site-header, .site-footer, #ast-scroll-top {
    display: none;
  }
}
