/*
Theme Name: AI Insight
Theme URI: https://yojigen.llc/blog/
Author: 合同会社四次元
Author URI: https://yojigen.llc/
Description: 中小企業のためのAI活用メディア - AIインサイト用カスタムテーマ
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ai-insight
*/

/* Tailwind CSS CDN is loaded via functions.php */

/* Custom Styles */
:root {
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
}

/* Animation */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fade-in 0.5s ease-out forwards;
}

/* Typography */
.font-serif {
  font-family: 'Noto Serif JP', Georgia, serif;
}

/* Line clamp utilities */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Header scroll effect */
.header-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Hero section */
.hero-gradient {
  background: linear-gradient(to right, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7), transparent);
}

/* Post card hover effect */
.post-card:hover {
  border-color: #f1f5f9;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.post-card:hover .post-card-image {
  transform: scale(1.1);
}

.post-card:hover .post-card-title {
  color: #1d4ed8;
}

/* Dropdown menu */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Prose styles for article content */
.prose {
  color: #334155;
  line-height: 1.8;
}

/* H2 with blue bottom border */
.prose h2 {
  font-family: 'Noto Serif JP', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2563eb;
  display: inline-block;
  padding-right: 2rem;
}

/* H3 with blue left bar */
.prose h3 {
  font-family: 'Noto Serif JP', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.prose h3::before {
  content: '';
  display: block;
  width: 0.375rem;
  height: 1.5rem;
  background-color: #2563eb;
  flex-shrink: 0;
}

.prose p {
  margin-bottom: 1.5rem;
}

.prose ul, .prose ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose blockquote {
  background: #f8fafc;
  padding: 1.5rem;
  border-left: 4px solid #0f172a;
  margin: 2rem 0;
  font-style: italic;
}

.prose img {
  border-radius: 2px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.prose a {
  color: #2563eb;
  text-decoration: underline;
}

.prose a:hover {
  color: #1d4ed8;
}

/* Sidebar widgets */
.widget {
  margin-bottom: 3rem;
}

.widget-title {
  font-family: 'Noto Serif JP', Georgia, serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

/* Mobile menu */
.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border-top: 1px solid #f1f5f9;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Button styles */
.btn-primary {
  background-color: #0f172a;
  color: white;
  padding: 0.625rem 1.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background-color 0.3s;
}

.btn-primary:hover {
  background-color: #2563eb;
}

/* Sticky sidebar */
.sticky-sidebar {
  position: sticky;
  top: 6rem;
}

/* Newsletter form */
.newsletter-input {
  background-color: #1e293b;
  border: 1px solid #334155;
  color: white;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  width: 100%;
}

.newsletter-input:focus {
  outline: none;
  border-color: #2563eb;
}

.newsletter-btn {
  background-color: #2563eb;
  color: white;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  width: 100%;
  transition: background-color 0.3s;
}

.newsletter-btn:hover {
  background-color: #1d4ed8;
}

/* WordPress specific overrides */
.wp-block-image {
  margin: 2rem 0;
}

.wp-block-image img {
  border-radius: 2px;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a, .pagination span {
  padding: 0.5rem 1rem;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-weight: 600;
  transition: all 0.3s;
}

.pagination a:hover, .pagination .current {
  background-color: #0f172a;
  color: white;
  border-color: #0f172a;
}

/* ========================================
   Table of Contents (目次)
   ======================================== */
.toc-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  padding: 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.toc-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.toc-box-header svg {
  color: #2563eb;
  width: 20px;
  height: 20px;
}

.toc-box-header span {
  font-weight: 700;
  color: #1e293b;
}

.toc-box ol {
  list-style: decimal;
  list-style-position: inside;
  margin: 0;
  padding: 0;
}

.toc-box ol li {
  padding: 0.5rem 0;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: color 0.2s;
}

.toc-box ol li:hover {
  color: #2563eb;
}

.toc-box ol li a {
  text-decoration: none;
  color: inherit;
}

.toc-box ol li a:hover {
  color: #2563eb;
}

/* ========================================
   Point Box (ポイントボックス - 青)
   ======================================== */
.point-box {
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  border-radius: 0 2px 2px 0;
  padding: 1.5rem;
  margin: 2rem 0;
}

.point-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.point-box-header svg {
  color: #2563eb;
  width: 20px;
  height: 20px;
}

.point-box-header span {
  font-weight: 700;
  color: #1e40af;
}

.point-box p {
  color: #334155;
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.7;
}

.point-box p strong {
  color: #1e293b;
}

/* ========================================
   Alert Box (注意ボックス - 赤)
   ======================================== */
.alert-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 2px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.alert-box-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: #dc2626;
}

.alert-box-header svg {
  width: 20px;
  height: 20px;
}

.alert-box-header span {
  font-weight: 700;
}

.alert-box p {
  color: #334155;
  font-size: 0.9375rem;
  margin: 0;
  line-height: 1.7;
}

/* ========================================
   Styled Table (デザインテーブル)
   ======================================== */
.prose table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin: 2.5rem 0;
  font-size: 0.9375rem;
}

.prose table thead {
  background: #f1f5f9;
}

.prose table thead tr {
  border-bottom: 1px solid #e2e8f0;
}

.prose table th {
  padding: 1rem;
  font-weight: 700;
  color: #334155;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: left;
}

/* Highlighted column header (AI活用モデル) */
.prose table th.highlight {
  background: rgba(239, 246, 255, 0.5);
  color: #1d4ed8;
}

.prose table tbody tr {
  border-bottom: 1px solid #f1f5f9;
  transition: background-color 0.2s;
}

.prose table tbody tr:hover {
  background: #f8fafc;
}

.prose table tbody tr:last-child {
  border-bottom: none;
}

.prose table td {
  padding: 1rem;
  color: #475569;
}

.prose table td:first-child {
  font-weight: 700;
  color: #1e293b;
}

/* Highlighted column cells */
.prose table td.highlight {
  background: rgba(239, 246, 255, 0.3);
  font-weight: 700;
  color: #1d4ed8;
}

/* Improvement rate cells (green) */
.prose table td.improvement {
  color: #16a34a;
  font-weight: 700;
}

.table-note {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: right;
  margin-top: 0.5rem;
}

/* ========================================
   Numbered List Cards (チェックリスト)
   ======================================== */
.numbered-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.numbered-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background: white;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-radius: 2px;
  margin-bottom: 1rem;
}

.numbered-list li:last-child {
  margin-bottom: 0;
}

.numbered-list .number {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #dbeafe;
  color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 0.125rem;
}

.numbered-list .content strong {
  display: block;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.numbered-list .content span {
  font-size: 0.875rem;
  color: #475569;
}

/* ========================================
   Prose List Improvements
   ======================================== */
.prose ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.prose ul li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.prose ul li::marker {
  color: #2563eb;
}

.prose ol {
  list-style: decimal;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.prose ol li {
  margin-bottom: 0.75rem;
  padding-left: 0.25rem;
}

.prose ol li::marker {
  color: #2563eb;
  font-weight: 600;
}

/* ========================================
   Fukidashi (吹き出し) Overrides
   ======================================== */
.fuki-icon img,
.speech-icon img,
.fuki .fuki-icon img,
.speech-wrap .speech-icon img {
  margin: 0 !important;
}
