:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --text-font: 'Noto Sans JP', sans-serif;
    --serif-font: 'Playfair Display', serif;
}

body {
    font-family: var(--text-font);
    overflow-x: hidden;
    color: #333;
}

.font-serif {
    font-family: var(--serif-font);
}

/* Navigation */
.navbar {
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-family: var(--serif-font);
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    position: relative;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 60vh; /* Reduced */
    background-image: url('https://images.unsplash.com/photo-1472214103451-9374bd1c798e?ixlib=rb-1.2.1&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    border-radius: 50px;
    padding: 15px 30px;
    border: none;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    width: 100%;
    transition: all 0.3s ease;
}

.search-input:focus {
    background-color: #ffffff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
    outline: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 5px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    border: none;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.search-btn:hover {
    background: var(--accent-color);
}


/* Cards */
.hover-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px); /* Reduced */
    box-shadow: 0 0.5rem 1.5rem rgba(0,0,0,.1)!important;
}

/* Global Scale Adjustments */
body {
    font-size: 0.95rem;
}

h1.display-1 {
    font-size: 3.5rem;
}

.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
}

/* Tags */
.tag-badge {
    font-size: 0.85rem;
    padding: 0.35em 0.8em;
    border-radius: 20px;
    background-color: #e9ecef;
    color: #495057;
    text-decoration: none;
    transition: all 0.2s;
    margin-right: 5px;
    display: inline-block;
}

.tag-badge:hover {
    background-color: var(--accent-color);
    color: white;
}

/* Gallery & Categories */
.category-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 200px;
    cursor: pointer;
}

.category-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.1);
}

.category-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.category-card:hover .category-overlay {
    background: rgba(0,0,0,0.6);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 8px;
    margin-bottom: 24px;
}

.gallery-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}
/* --- Masonry Gallery --- */
.grid {
  margin: 0 auto;
}

/* gutterとアイテムの間のスペースを確保 */
.grid:after {
  content: '';
  display: block;
  clear: both;
}

.grid-sizer,
.grid-item {
  width: 100%; /* Default to 1 column for mobile */
  margin-bottom: 20px;
}

.grid-item img {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transition: box-shadow 0.3s ease-in-out;
}

.grid-item img:hover {
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}


/* -- Responsive Columns -- */

/* Tablet: 2 columns */
@media (min-width: 768px) {
  .grid-sizer,
  .grid-item {
    width: calc(50% - 10px);
  }
}

/* PC: 3 columns */
@media (min-width: 992px) {
  .grid-sizer,
  .grid-item {
    width: calc(33.333% - 14px);
  }
}

/* -- Lightbox Customization -- */
.lightbox .lb-data .lb-details {
    font-family: var(--text-font);
}

.lightbox .lb-data .lb-caption {
    font-size: 1rem;
    font-weight: 400;
}

.lightbox .lb-data .lb-number {
    font-size: 0.85rem;
}

/* --- Article Styling Utility Classes --- */

/* Callout Box */
.callout {
    padding: 1.25rem;
    border-radius: 8px;
    background-color: #f8f9fa;
    border-left: 5px solid var(--accent-color);
    margin: 2rem 0;
}

.callout-title {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Image with Caption */
.img-figure {
    margin: 2rem 0;
    text-align: center;
}

.img-figure img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.img-caption {
    display: block;
    margin-top: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
    font-style: italic;
}

/* Highlighted Text */
.text-highlight {
    background: linear-gradient(transparent 60%, rgba(52, 152, 219, 0.2) 60%);
    font-weight: bold;
    padding: 0 2px;
}

/* Step List */
.step-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.step-list li {
    position: relative;
    padding-left: 3rem;
    margin-bottom: 1.5rem;
}

.step-list li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2rem;
    height: 2rem;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 2rem;
    font-weight: bold;
}
