/* Modern CSS for Azsoft Portfolio */

/* CSS Variables - ガーリーテーマ */
:root {
  --primary-color: #ff6b9d;
  --primary-dark: #e55a87;
  --secondary-color: #ff8fab;
  --accent-color: #ffeaa7;
  --background-color: #fef7f7;
  --surface-color: #fff0f5;
  --text-primary: #4a4a4a;
  --text-secondary: #8b7d7d;
  --text-muted: #b8a9a9;
  --border-color: #f8d7da;
  --shadow-sm: 0 1px 2px 0 rgb(255 182 193 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(255 182 193 / 0.15), 0 2px 4px -2px rgb(255 182 193 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(255 182 193 / 0.2), 0 4px 6px -4px rgb(255 182 193 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(255 182 193 / 0.25), 0 8px 10px -6px rgb(255 182 193 / 0.1);
  --border-radius: 12px;
  --border-radius-lg: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* iOS Safari viewport height fix */
:root {
  --vh: 1vh;
}

/* iOS Safariでのビューポート問題対応 */
@supports (-webkit-touch-callout: none) {
  :root {
    --vh: 1vh;
  }
  
  /* iOS Safariでのスクロール最適化 */
  body {
    -webkit-overflow-scrolling: touch;
    /* iOS Safariでのバウンス効果を制御 */
    overscroll-behavior: contain;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--background-color);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation - ガーリーテーマ */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(254, 247, 247, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: var(--transition);
}

.navbar.scrolled {
  background: rgba(254, 247, 247, 0.98);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.nav-logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.nav-logo a:hover .logo-text {
  color: var(--primary-dark);
}

.nav-logo a:hover .logo-image {
  transform: scale(1.05);
}

.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--primary-color);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}

.admin-link {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white !important;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.admin-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: white !important;
}

.admin-link::after {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
  z-index: 999;
  position: relative;
}

.bar {
  width: 25px;
  height: 3px;
  background-color: var(--text-primary);
  transition: var(--transition);
  border-radius: 2px;
}

.hamburger.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section - ガーリーテーマ */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
  color: white;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 182, 193, 0.2);
  z-index: 1;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-content {
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  display: block;
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.hero-main {
  display: block;
  font-size: 4rem;
  font-weight: 700;
  background: linear-gradient(45deg, #fff, #ffeef0, #ffb3d1);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.2rem;
  margin: 2rem 0;
  opacity: 0.95;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.hero-visual {
  position: relative;
  height: 400px;
}

.floating-elements {
  position: relative;
  width: 100%;
  height: 100%;
}

.floating-element {
  position: absolute;
  border-radius: 50%;
  background: linear-gradient(45deg, rgba(255,182,193,0.3), rgba(255,228,225,0.4));
  animation: float 6s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(255,182,193,0.2);
}

.element-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.element-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 20%;
  animation-delay: 2s;
}

.element-3 {
  width: 60px;
  height: 60px;
  bottom: 20%;
  left: 60%;
  animation-delay: 4s;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background-color: transparent;
  color: white;
  border-color: white;
}

.btn-outline:hover {
  background-color: white;
  color: var(--primary-color);
}

.btn-submit {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn-loading {
  display: none;
}

.btn-submit.loading .btn-text {
  display: none;
}

.btn-submit.loading .btn-loading {
  display: block;
}

/* Section Styles */
section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

/* Works Section */
.works {
  background-color: var(--surface-color);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.work-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.work-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.work-links {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.work-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(255, 107, 157, 0.2);
}

.work-link:hover {
  transform: translateY(-2px) scale(1.1);
  box-shadow: 0 4px 15px rgba(255, 107, 157, 0.4);
}

.work-link i {
  font-size: 0.875rem;
}

.work-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.work-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.work-category {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.work-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tag {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(255,107,157,0.2);
}

/* Skills Section */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.skill-card {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.skill-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.skill-bar {
  background-color: var(--border-color);
  border-radius: 9999px;
  height: 8px;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  border-radius: 9999px;
  transition: width 1s ease-out;
  width: 0%;
  box-shadow: 0 2px 8px rgba(255,107,157,0.3);
}

.skill-level {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.25rem;
}

/* About Section */
.about {
  background-color: var(--surface-color);
}

.about-content {
  max-width: 900px; /* 800px -> 900px に拡張 */
  margin: 0 auto;
  text-align: center;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.feature i {
  font-size: 2rem;
  color: var(--primary-color);
}

.feature span {
  font-weight: 500;
  color: var(--text-primary);
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-color: var(--surface-color);
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-primary);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.contact-method:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  transform: translateX(5px);
  box-shadow: 0 4px 15px rgba(255,107,157,0.3);
}

.contact-method i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

/* Contact Form */
.contact-form {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-family);
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* Turnstile Widget Styling */
.form-group .cf-turnstile {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
  transition: all 0.3s ease;
}

.cf-turnstile iframe {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
}

.cf-turnstile.verified {
  transform: scale(1.02);
}

.cf-turnstile.verified::after {
  content: '✓ 検証完了';
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: #10b981;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* Footer */
.footer {
  background-color: var(--text-primary);
  color: white;
  padding: 2rem 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: left;
  margin-bottom: 2rem;
}

.footer-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-section h3,
.footer-section h4 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-section p {
  opacity: 0.8;
  line-height: 1.6;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section ul li a {
  color: white;
  text-decoration: none;
  opacity: 0.8;
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.6;
}

.social-links {
  display: flex;
  gap: 1rem;
  justify-content: flex-start;
}

.social-links a {
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-links a:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(255,107,157,0.4);
}

/* Logo Image Styles */
.logo-image {
  height: 40px;
  width: auto;
  transition: var(--transition);
}

.logo-image:hover {
  transform: scale(1.05);
}

.footer-logo-image {
  height: 35px;
  filter: brightness(0) invert(1);
}

.footer-logo-image:hover {
  filter: brightness(0) invert(1) drop-shadow(0 0 10px rgba(255,255,255,0.3));
}

/* Admin Logo Styles */
.admin-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-logo-image {
  height: 30px;
  filter: brightness(0) saturate(100%) invert(100%);
}

.admin-logo .logo-text {
  color: white;
  font-weight: 600;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Pagination Styles - ガーリーテーマ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin: 3rem 0;
  padding: 1rem;
}

.pagination button {
  background: white;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 44px;
  justify-content: center;
}

.pagination button:hover:not(:disabled) {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pagination button.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.pagination button:disabled {
  background: var(--surface-color);
  color: var(--text-muted);
  border-color: var(--border-color);
  cursor: not-allowed;
  opacity: 0.6;
}

.pagination span {
  color: var(--text-muted);
  padding: 0 0.5rem;
  font-weight: 500;
}



/* Responsive Design - 復元されたモバイル対応スタイル */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 0;
    flex-direction: column;
    background-color: white;
    width: 100%;
    height: 100vh;
    height: calc(var(--vh, 1vh) * 100);
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-md);
    padding-top: 80px;
    padding-bottom: 40px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    transform: translate3d(-100%, 0, 0);
    will-change: transform;
    z-index: 998;
  }

  .nav-menu.active {
    left: 0;
    transform: translate3d(0, 0, 0);
  }

  .nav-menu li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 182, 193, 0.1);
  }

  .nav-menu li:last-child {
    border-bottom: none;
  }

  .nav-link {
    font-size: 1.1rem;
    padding: 1.5rem 1rem;
    display: block;
    width: 100%;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: rgba(255, 107, 157, 0.1);
  }

  .nav-link:hover,
  .nav-link:active {
    background-color: rgba(255, 107, 157, 0.1);
    color: var(--primary-color);
  }

  .hero-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .hero-main {
    font-size: 3rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .container {
    padding: 0 1rem;
  }

  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .social-links {
    justify-content: center;
  }

  .about-features {
    grid-template-columns: 1fr;
  }

  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .work-links {
    align-self: flex-end;
  }

  .work-link {
    width: 36px;
    height: 36px;
  }

  .work-link i {
    font-size: 1rem;
  }

  .works-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }

  section {
    padding: 3rem 0;
  }

  /* ページネーション関連のスタイル */
  .pagination {
    gap: 0.25rem;
    margin: 2rem 0;
    padding: 0.5rem;
    flex-wrap: wrap;
  }

  .pagination button {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    min-width: 36px;
  }

  .pagination span {
    padding: 0 0.25rem;
    font-size: 0.875rem;
  }

  /* ブログ関連のモバイル対応 */
  .blog-container {
    padding: 0 1rem;
  }

  .blog-filters {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .filter-section h3 {
    font-size: 1rem;
  }

  .filter-buttons {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }

  .filter-actions {
    justify-content: center;
    padding-top: 1rem;
  }
}

/* Mobile-specific adjustments for very small screens */
@media (max-width: 480px) {
  .nav-container {
    padding: 0 1rem;
  }

  .nav-menu {
    padding-top: 70px;
  }

  .nav-menu li {
    margin: 1rem 0;
  }

  .nav-link {
    font-size: 1rem;
    padding: 1rem;
  }

  .hero-main {
    font-size: 2.5rem;
  }

  .section-title {
    font-size: 2rem;
  }

  /* ページネーション関連のスタイル */
  .pagination {
    gap: 0.25rem;
  }

  .pagination button {
    padding: 0.5rem;
    font-size: 0.75rem;
    min-width: 32px;
  }

  .pagination button i {
    margin: 0;
  }
  
  .pagination button:first-child,
  .pagination button:last-child {
    padding: 0.5rem 0.75rem;
  }

  /* ブログ関連のモバイル対応 */
  .blog-filters {
    padding: 1rem;
  }

  .filter-buttons {
    gap: 0.4rem;
  }

  .filter-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.75rem;
  }

  .clear-filters-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* Success Message - ガーリーテーマ */
.success-message {
  background: linear-gradient(135deg, #ff6b9d, #ff8fab);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(-10px);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(255,107,157,0.3);
}

.success-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Blog Section */
.blog {
  background-color: var(--surface-color);
}

.blog-section, .news-section {
  padding: 5rem 0;
  background: var(--surface-color);
}

.blog-section:nth-child(odd) {
  background: white;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* News Section */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 3rem;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.news-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.news-date {
  flex-shrink: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 100px;
}

.news-content {
  flex: 1;
}

.news-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.news-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
}

.news-priority {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.news-priority.priority-3,
.news-priority.priority-4,
.news-priority.priority-5 {
  background: var(--accent-color);
  color: white;
}

/* Empty and Error States */
.empty-state, .error-state {
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
}

.empty-state i, .error-state i {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.empty-state h3, .error-state h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p, .error-state p {
  color: var(--text-secondary);
}

.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.loading-state p {
  color: var(--text-secondary);
}

/* Post page improvements */
.post-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3rem 0;
  padding: 2rem;
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  max-width: 45%;
}

.post-nav-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.post-nav-title {
  font-weight: 600;
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

.post-nav-title:hover {
  color: var(--primary-dark);
}

/* Improved loading and error states */
.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border-color);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--surface-color);
  border-radius: var(--border-radius-lg);
  margin: 2rem 0;
}

.error-state i {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.error-state h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.error-state p {
  color: var(--text-secondary);
}

/* Blog Post Card Styles - ガーリーテーマ */
.blog-post {
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-post:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.blog-post-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--surface-color), var(--border-color));
}

.blog-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.blog-post:hover .blog-post-image img {
  transform: scale(1.05);
}

.blog-post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.blog-post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  color: white;
  margin-bottom: 1rem;
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-start;
}

.blog-post-category:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-sm);
}

.blog-post-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.blog-post-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-post-date .updated-date {
  margin-left: 1rem;
  color: var(--primary-color);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

@media (max-width: 768px) {
  .blog-post-date {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
  .blog-post-date .updated-date {
    margin-left: 0;
  }
}

.blog-post-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-excerpt {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.blog-post-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-post-date .updated-date {
  margin-left: 1rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

@media (max-width: 768px) {
  .blog-post-date {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  
  .blog-post-date .updated-date {
    margin-left: 0;
  }
}

/* Blog Filters Styles - ガーリーテーマ */
.blog-filters {
  background: white;
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.filter-section {
  margin-bottom: 2rem;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-section h3::before {
  content: '';
  width: 4px;
  height: 1.2rem;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

/* カテゴリセクション用のアイコン */
.filter-section:first-child h3::after {
  content: '📁';
  margin-left: 0.25rem;
}

/* タグセクション用のアイコン */
.filter-section:nth-child(2) h3::after {
  content: '🏷️';
  margin-left: 0.25rem;
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn {
  background: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-color: var(--primary-color);
  box-shadow: var(--shadow-md);
}

.filter-btn.tag-filter {
  background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
  color: #0f172a;
  border-color: #7dd3fc;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(14, 165, 233, 0.15);
}

.filter-btn.tag-filter:hover,
.filter-btn.tag-filter.active {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  color: white;
  border-color: #0ea5e9;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.clear-filters-btn {
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.clear-filters-btn:hover {
  background: var(--text-muted);
  color: white;
  transform: translateY(-1px);
}

.clear-filters-btn::before {
  content: '✕';
  font-size: 0.75rem;
}

/* Blog Container */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Loading and Error States */
.loading, .error {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary);
}

.loading i, .error i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.error i {
  color: #ef4444;
}

.loading p, .error p {
  font-size: 1.1rem;
}



/* Blog Section Improvements */
.blog-section .section-description {
  text-align: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.blog-section .text-center {
  background: linear-gradient(135deg, var(--surface-color), rgba(255, 182, 193, 0.1));
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  margin-top: 3rem;
  border: 1px solid var(--border-color);
}

.blog-section .btn {
  font-size: 1.1rem;
  padding: 1rem 2rem;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
}

.blog-section .btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

/* タグがない場合のメッセージスタイル */
.no-tags {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.875rem;
  margin: 0;
  padding: 0.5rem 1rem;
  background: var(--surface-color);
  border-radius: var(--border-radius);
  border: 1px dashed var(--border-color);
  text-align: center;
}

/* Image Viewer Modal - 記事詳細ページ用 */
.image-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.image-viewer.active {
  display: flex;
}

.image-viewer-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-viewer img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-xl);
}

.image-viewer-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.image-viewer-close:hover {
  background: white;
  transform: scale(1.1);
}

.image-viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-primary);
  transition: var(--transition);
}

.image-viewer-nav:hover {
  background: white;
  transform: translateY(-50%) scale(1.1);
}

.image-viewer-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.image-viewer-prev {
  left: -4rem;
}

.image-viewer-next {
  right: -4rem;
}

.image-viewer-info {
  position: absolute;
  bottom: -4rem;
  left: 0;
  right: 0;
  text-align: center;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .image-viewer {
    padding: 1rem;
  }

  .image-viewer-close {
    top: -2.5rem;
    right: -0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .image-viewer-nav {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .image-viewer-prev {
    left: -3rem;
  }

  .image-viewer-next {
    right: -3rem;
  }

  .image-viewer-info {
    bottom: -3rem;
    font-size: 0.8rem;
  }
}

/* Blog Post Content Container - 記事詳細ページ用 */
.post-content {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Blog Post Image Styles - 記事詳細ページ用 */
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  cursor: pointer;
  transition: var(--transition);
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-md);
}

.post-content img:hover {
  box-shadow: var(--shadow-lg);
  transform: scale(1.02);
}

/* Blog Post Video and Media Styles - iOS対応強化 */
.post-content video {
  max-width: 100%;
  width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 1.5rem auto;
  display: block;
  box-shadow: var(--shadow-md);
  /* モバイル動画再生の改善 */
  object-fit: contain;
  background: #000;
  /* iOS Safari対応 */
  -webkit-playsinline: true;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* iOS動画コントロール最適化 */
  -webkit-media-controls-fullscreen-button: inherit;
  /* タッチ操作最適化 */
  touch-action: manipulation;
}

.post-content iframe:not(.youtube-embed iframe),
.post-content embed,
.post-content object {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  margin: 1.5rem 0;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: var(--shadow-md);
}

/* YouTube埋め込み専用スタイル - 統合・最適化版 */
.post-content .youtube-embed {
  position: relative;
  width: 100%;
  max-width: 720px;
  margin: 2rem auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-lg);
  display: block;
  box-sizing: border-box;
  /* アスペクト比の安定した実装 */
  aspect-ratio: 16 / 9;
  /* Clear any floating elements to prevent overlap */
  clear: both;
  /* Prevent layout shifts */
  contain: layout style;
  /* モバイル表示改善 - より確実な高さ確保 */
  min-height: 200px;
}

/* Modern aspect-ratio support fallback */
@supports not (aspect-ratio: 16 / 9) {
  .post-content .youtube-embed {
    height: 0;
    padding-bottom: 56.25%; /* 16:9アスペクト比 */
    aspect-ratio: unset;
    min-height: unset;
  }

  .post-content .youtube-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
}

.post-content .youtube-embed iframe {
  /* Modern browsers with aspect-ratio support */
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--border-radius-lg);
  /* モバイル最適化 */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  /* Layout containment for better performance */
  contain: layout;
  /* Iframe固有の最適化 */
  display: block;
}

/* Responsive video container for embedded content */
.post-content .video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  margin: 1.5rem 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.post-content .video-container iframe,
.post-content .video-container video,
.post-content .video-container embed,
.post-content .video-container object {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  border-radius: var(--border-radius);
}

/* Ensure all media content respects container boundaries */
.post-content * {
  max-width: 100%;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  /* Mobile-specific blog content adjustments */
  .post-content video,
  .post-content iframe,
  .post-content embed,
  .post-content object {
    margin: 1rem 0;
  }

  .post-content .video-container {
    margin: 1rem 0;
    border-radius: 8px;
  }

  /* YouTube埋め込みのモバイル対応 - 統合版 */
  .post-content .youtube-embed {
    border-radius: var(--border-radius);
    /* モバイル特有の最小高さ調整 */
    min-height: 250px;
  }

  /* モバイルでのアスペクト比fallback強化 */
  @supports not (aspect-ratio: 16 / 9) {
    .post-content .youtube-embed {
      min-height: unset;
      height: 0;
      padding-bottom: 56.25%;
    }
  }

  .post-content .youtube-embed iframe {
    border-radius: var(--border-radius);
    /* モバイルiframe最適化 */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
  }

  /* モバイルでの動画再生改善 - iOS対応強化 */
  .post-content video {
    margin: 1rem auto;
    border-radius: var(--border-radius);
    /* iOS動画再生最適化 */
    -webkit-playsinline: true;
    /* iOS Safariでのハードウェア加速 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* iOSでの動画コントロール表示改善 */
    -webkit-appearance: none;
    appearance: none;
    /* フルスクリーン対応 */
    -webkit-media-controls-fullscreen-button: inherit;
  }
}

/* 小さい画面でのYouTube埋め込み調整 - 統合版 */
@media (max-width: 480px) {
  .post-content .youtube-embed {
    max-width: calc(100% - 1rem);
    margin: 1rem 0.5rem;
    border-radius: 8px;
    /* 小画面での最小高さ */
    min-height: 200px;
  }

  /* 小画面でのアスペクト比fallback */
  @supports not (aspect-ratio: 16 / 9) {
    .post-content .youtube-embed {
      min-height: unset;
      height: 0;
      padding-bottom: 56.25%;
    }
  }

  .post-content .youtube-embed iframe {
    border-radius: 8px;
    /* 小画面iframe最適化 */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }

  /* 小画面での動画調整 - iOS対応 */
  .post-content video {
    margin: 0.8rem auto;
    border-radius: 6px;
    /* iOS小画面動画最適化 */
    max-width: calc(100% - 1.6rem);
    width: calc(100% - 1.6rem);
    /* iOS動画再生改善 */
    -webkit-playsinline: true;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* タッチ操作最適化 */
    touch-action: manipulation;
  }
}

/* ブログ記事専用のコンテナ - PC表示で幅を拡張 */
.post-container {
  max-width: 1000px; /* PC表示で幅を拡張: 800px -> 1000px */
  margin: 0 auto;
  padding: 2rem;
}

/* デスクトップでのブログ記事レイアウト最適化 */
@media (min-width: 1200px) {
  .post-container {
    max-width: 1100px; /* 大画面では更に広く */
    padding: 2rem 3rem; /* 左右の余白も増加 */
  }

  /* YouTube埋め込みも大画面で大きく表示 */
  .post-content .youtube-embed {
    max-width: 900px; /* 720px -> 900px */
  }
}

/* 中程度の画面サイズでの調整 */
@media (min-width: 769px) and (max-width: 1199px) {
  .post-container {
    max-width: 950px; /* タブレット横向きサイズ */
    padding: 2rem 2.5rem;
  }

  .post-content .youtube-embed {
    max-width: 800px;
  }
}

/* ブログ記事の読みやすさ向上 - PC表示最適化 */
@media (min-width: 769px) {
  .post-content {
    line-height: 1.8; /* 行間を少し広く */
    font-size: 1.1rem; /* フォントサイズを少し大きく */
  }

  .post-content p {
    margin-bottom: 1.5rem; /* 段落間の余白を増加 */
    max-width: none; /* 段落幅の制限を削除 */
  }

  .post-content h2,
  .post-content h3,
  .post-content h4 {
    margin-top: 2.5rem; /* 見出しの上余白を増加 */
    margin-bottom: 1.5rem;
  }

  .post-content h2 {
    font-size: 2rem;
  }

  .post-content h3 {
    font-size: 1.5rem;
  }

  .post-content h4 {
    font-size: 1.25rem;
  }

  /* コードブロックとプレタグの改善 */
  .post-content pre,
  .post-content code {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .post-content pre {
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--border-radius);
    overflow-x: auto;
  }

  /* リスト項目の調整 */
  .post-content ul,
  .post-content ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
  }

  .post-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
  }
}


