/* 
  Notojima Tourism Guide - Main Stylesheet
*/

:root {
    /* Color Palette - Brighter Ocean & Nature Theme */
    --c-primary: #0088CC;
    /* Vivid Ocean Blue */
    --c-secondary: #48CAE4;
    /* Bright Shallow Water Sky/Cyan */
    --c-accent: #FFB703;
    /* Bright Sunny Orange/Yellow */
    --c-text: #334455;
    --c-text-light: #667788;
    --c-bg-light: #F4F9F9;
    --c-bg-dark: #0077B6;
    --c-white: #FFFFFF;

    /* Typography */
    --font-base: 'Noto Sans JP', sans-serif;
    --font-heading: 'Shippori Mincho', serif;

    /* Layout */
    --container-width: 1200px;
    --container-padding: 24px;
    --header-height: 80px;

    /* Animation */
    --transition-normal: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

body {
    font-family: var(--font-base);
    color: var(--c-text);
    background-color: var(--c-white);
    -webkit-font-smoothing: antialiased;
}

/* Typography Utility */
h1,
h2,
h3,
h4,
.serif {
    font-family: var(--font-heading);
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--c-bg-light);
}

.bg-dark {
    background-color: var(--c-bg-dark);
}

.text-white {
    color: var(--c-white);
}

/* --- Header & Navigation --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 100;
    transition: var(--transition-normal);
    background: transparent;
}

.header.is-scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 var(--container-padding);
}

.logo a {
    display: flex;
    flex-direction: column;
}

.logo-jp {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--c-white);
    transition: var(--transition-normal);
}

.logo-en {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    color: var(--c-white);
    transition: var(--transition-normal);
}

.header.is-scrolled .logo-jp,
.header.is-scrolled .logo-en {
    color: var(--c-primary);
}

.global-nav {
    display: block;
}

.nav-list {
    display: flex;
    gap: 32px;
}

.nav-list a {
    color: var(--c-white);
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-normal);
    position: relative;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--c-accent);
    transition: var(--transition-normal);
}

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

.header.is-scrolled .nav-list a {
    color: var(--c-text);
}

/* Mobile Menu Button */
.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 101;
}

.menu-btn-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2px;
    background-color: var(--c-white);
    transition: var(--transition-normal);
}

.header.is-scrolled .menu-btn-line {
    background-color: var(--c-text);
}

.menu-btn-line:nth-child(1) {
    top: 14px;
}

.menu-btn-line:nth-child(2) {
    top: 21px;
}

.menu-btn-line:nth-child(3) {
    top: 28px;
}

.menu-btn.is-active .menu-btn-line:nth-child(1) {
    top: 21px;
    transform: translateX(-50%) rotate(45deg);
    background-color: var(--c-primary);
}

.menu-btn.is-active .menu-btn-line:nth-child(2) {
    opacity: 0;
}

.menu-btn.is-active .menu-btn-line:nth-child(3) {
    top: 21px;
    transform: translateX(-50%) rotate(-45deg);
    background-color: var(--c-primary);
}

/* Mobile Nav Panel */
.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--c-white);
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s;
}

.mobile-nav-panel.is-active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    text-align: center;
}

.mobile-nav-list li {
    margin-bottom: 32px;
}

.mobile-nav-list a {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--c-primary);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(-45deg, var(--c-bg-dark), var(--c-primary), #00b4d8, var(--c-secondary));
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    transform: scale(1.05);
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
}

.hero-slide.is-active {
    opacity: 1;
}

.hero-slide.is-animating {
    animation: heroPan 10s linear forwards;
}

@keyframes heroPan {
    from {
        transform: scale(1.05);
    }

    to {
        transform: scale(1);
    }
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-content {
    text-align: center;
    color: var(--c-white);
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.hero-title {
    font-size: 3.5rem;
    writing-mode: vertical-rl;
    /* Vertical writing like reference site */
    margin: 0 auto 30px;
    height: 450px;
    /* 長い文字が収まるように調整 */
}

.hero-title-line {
    display: inline-block;
    margin-left: 30px;
    /* 行間の調整 */
}

.hero-subtitle {
    font-size: 1.25rem;
    letter-spacing: 0.2em;
    font-family: var(--font-base);
    font-weight: 300;
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scroll-text {
    color: var(--c-white);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    margin-bottom: 10px;
}

.scroll-line {
    width: 1px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.scroll-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background-color: var(--c-white);
    animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(200%);
    }
}

/* --- Common Section Styles --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 3rem;
    color: var(--c-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--c-secondary);
    letter-spacing: 0.1em;
}

.section-desc {
    text-align: center;
    max-width: 600px;
    margin: -30px auto 50px;
    color: var(--c-text-light);
}

/* --- News Section --- */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    border-bottom: 1px solid #eee;
    padding: 24px 0;
    display: flex;
    align-items: center;
    gap: 24px;
    transition: var(--transition-normal);
}

.news-item:hover {
    background-color: var(--c-bg-light);
    padding-left: 16px;
    padding-right: 16px;
    margin: 0 -16px;
    border-bottom-color: transparent;
    border-radius: 8px;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    width: 220px;
}

.news-meta time {
    font-family: 'Courier New', Courier, monospace;
    color: var(--c-text-light);
}

.news-category {
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--c-white);
    font-weight: 500;
}

.tag-default {
    background-color: var(--c-secondary);
}

.tag-event {
    background-color: var(--c-accent);
}

.tag-info {
    background-color: var(--c-primary);
}

.news-title {
    font-size: 1.125rem;
    font-weight: 500;
    line-height: 1.6;
}

.news-title a {
    display: block;
}

.news-title a:hover {
    color: var(--c-secondary);
}

/* Buttons */
.btn-wrap {
    text-align: center;
    margin-top: 40px;
}

.btn-primary {
    display: inline-block;
    padding: 16px 48px;
    background-color: var(--c-primary);
    color: var(--c-white);
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition-normal);
    border: 1px solid var(--c-primary);
}

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

/* --- Card Grid (Accommodations, Experiences) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background-color: var(--c-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.card-img-wrap {
    position: relative;
    padding-top: 66%;
    /* 3:2 Aspect Ratio */
    overflow: hidden;
}

.card-img-wrap img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.card:hover .card-img-wrap img {
    transform: scale(1.08);
}

.card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--c-primary);
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    z-index: 2;
    cursor: pointer;
}

.card-tag:hover {
    background: var(--c-primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.card-tags-list {
    position: absolute;
    top: 16px;
    left: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    z-index: 2;
    max-width: 85%;
}

.card-tags-list .card-tag-item {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(4px);
    color: var(--c-primary);
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.card-tags-list .card-tag-item:hover {
    background: var(--c-primary);
    color: #fff;
    transform: translateY(-2px);
}

.card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-desc {
    color: var(--c-text-light);
    font-size: 0.875rem;
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.card-link {
    color: var(--c-secondary);
    font-weight: 700;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-link::after {
    content: '→';
    transition: transform 0.3s ease;
}

.card:hover .card-link::after {
    transform: translateX(4px);
}

/* --- Load More Button --- */
.item-hidden {
    display: none;
}

.item-visible {
    display: flex;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.load-more-wrap {
    text-align: center;
    margin-top: 40px;
    width: 100%;
}

.btn-secondary {
    display: inline-block;
    padding: 14px 40px;
    background-color: transparent;
    color: var(--c-primary);
    border-radius: 30px;
    font-weight: 500;
    letter-spacing: 0.05em;
    transition: var(--transition-normal);
    border: 2px solid var(--c-primary);
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-secondary[style*="display: none"] {
    display: none !important;
}

/* --- Access Section --- */
.access-content {
    display: flex;
    gap: 60px;
    align-items: stretch;
}

.access-info {
    flex: 1;
    padding: 40px 0;
}

.access-title {
    font-size: 3rem;
    color: var(--c-accent);
    line-height: 1;
    margin-bottom: 16px;
}

.access-subtitle {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.access-desc {
    margin-bottom: 32px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
}

.access-routes li {
    margin-bottom: 16px;
    padding-left: 24px;
    position: relative;
}

.access-routes li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background-color: var(--c-accent);
    border-radius: 50%;
}

.access-map-wrapper {
    flex: 1;
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
}

.dummy-map {
    width: 100%;
    height: 100%;
    background-color: #4a5c6e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
}

/* --- Footer --- */
.footer {
    background-color: var(--c-primary);
    color: var(--c-white);
    padding: 80px 0 20px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
}

.footer-logo {
    font-size: 1.75rem;
    margin-bottom: 16px;
}

.footer-address {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
}

.footer-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-top: 12px;
    max-width: 440px;
}

.footer-links-wrap {
    display: flex;
    gap: 80px;
}

.footer-links-group h3 {
    font-size: 1.125rem;
    margin-bottom: 20px;
    color: var(--c-accent);
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition-normal);
}

.footer-links a:hover {
    color: var(--c-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* --- Animations (Scroll Reveal) --- */
.section-fade {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-fade.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive Design --- */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
        height: 400px;
    }

    .hero-title-line {
        margin-left: 20px;
    }

    .access-content {
        flex-direction: column;
        gap: 40px;
    }

    .access-map-wrapper {
        min-height: 300px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 40px;
    }

    .footer-links-wrap {
        gap: 40px;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    :root {
        --container-padding: 16px;
        --header-height: 60px;
    }

    .logo-jp {
        font-size: 1.15rem;
        white-space: nowrap;
    }

    .section {
        padding: 60px 0;
    }

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

    .global-nav {
        display: none;
    }

    .menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
        height: 280px;
    }

    .hero-title-line {
        margin-left: 10px;
    }

    .news-meta {
        width: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-bottom: 8px;
    }

    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Detail Page Styles --- */
.detail-wrap {
    max-width: 900px;
    margin: 0 auto;
    background: var(--c-white);
    padding: 60px;
    border-radius: 12px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--c-text-light);
    margin-bottom: 24px;
}

.breadcrumb a {
    color: var(--c-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.detail-header {
    margin-bottom: 32px;
    text-align: center;
}

.detail-tag {
    display: inline-block;
    background: var(--c-primary);
    color: var(--c-white);
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.detail-title {
    font-size: 3rem;
    color: var(--c-text);
    line-height: 1.4;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 8px;
}

.detail-catchphrase {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c-primary);
    margin-top: 16px;
    margin-bottom: 0;
}

.detail-hero {
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 32px;
}

.detail-main-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
}

/* ギャラリー（複数画像サムネイル） */
.detail-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    margin-bottom: 48px;
}

.gallery-thumb {
    width: 100px;
    height: 70px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.gallery-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.gallery-thumb.is-active {
    opacity: 1;
    border-color: var(--c-primary);
    box-shadow: 0 2px 8px rgba(0, 136, 204, 0.3);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .detail-gallery {
        gap: 8px;
        margin-bottom: 32px;
    }
    .gallery-thumb {
        width: 80px;
        height: 56px;
    }
}

.detail-content-wrap {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.detail-main-text {
    width: 100%;
}

.detail-info-box {
    width: 100%;
    background: var(--c-bg-light);
    padding: 40px;
    border-radius: 8px;
}

.detail-subtitle {
    font-size: 1.5rem;
    color: var(--c-primary);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-bg-light);
}

.detail-text {
    line-height: 1.8;
    color: var(--c-text);
    margin-bottom: 24px;
    font-size: 1rem;
}

.detail-text a {
    color: var(--c-primary);
    text-decoration: underline;
    word-break: break-all;
    transition: var(--transition-normal);
}

.detail-text a:hover {
    color: var(--c-secondary);
    text-decoration: none;
}

/* 設備・アメニティ */
.amenities-wrap {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #eee;
}

.amenities-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--c-text);
    border-left: 5px solid var(--c-primary);
    padding-left: 16px;
}

.amenities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.amenities-list li {
    background: #f0f4f8;
    color: var(--c-text);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    border: 1px solid #dcdfe3;
}

/* 基本情報テーブル */
.detail-info-title {
    font-size: 1.4rem;
    margin-bottom: 24px;
    color: var(--c-text);
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid var(--c-primary);
    padding-bottom: 12px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-white);
    border: 1px solid #dcdfe3;
}

.detail-table th,
.detail-table td {
    padding: 16px;
    border: 1px solid #dcdfe3;
    font-size: 0.95rem;
    vertical-align: top;
}

.detail-table th {
    text-align: left;
    white-space: nowrap;
    color: var(--c-primary);
    width: 110px;
    font-weight: 700;
    background: #f7f9fc;
}

.detail-table td {
    line-height: 1.6;
}

.detail-btn {
    padding: 16px 24px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    transition: all 0.3s;
}

.detail-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

@media (max-width: 768px) {
    .detail-wrap {
        padding: 32px 20px;
    }

    .detail-content-wrap {
        flex-direction: column;
        gap: 40px;
    }

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

    .detail-table th,
    .detail-table td {
        display: block;
        width: 100%;
    }

    .detail-table th {
        border-bottom: none;
    }
}

/* ==========================================
   Footer Banners
   ========================================== */
.footer-banners {
    padding: 24px 0;
    border-top: 1px solid #e5e7eb;
    background-color: var(--c-bg-light);
}

.banner-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.banner-list li {
    display: block;
}

.banner-list li a,
.banner-list li img {
    display: block;
    width: 220px; /* バナーの横幅を220pxに固定して適切なサイズに */
    height: auto;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.banner-list li a:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   Tag Filter UI (Section Filter Pills)
   ========================================== */
.tag-filter-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 28px auto 36px;
    max-width: 900px;
    padding: 0 16px;
}

.tag-filter-btn {
    background: #fff;
    color: var(--c-text);
    border: 1px solid #d1d5db;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

.tag-filter-btn:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.tag-filter-btn.is-active {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    box-shadow: 0 4px 12px rgba(10, 77, 104, 0.3);
    font-weight: 700;
}

.tag-filter-btn .tag-count {
    font-size: 0.75rem;
    opacity: 0.75;
    background: rgba(0, 0, 0, 0.08);
    padding: 2px 6px;
    border-radius: 10px;
}

.tag-filter-btn.is-active .tag-count {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   Global Tag & Keyword Search Section
   ========================================== */
.search-section {
    padding: 48px 0;
    background: linear-gradient(180deg, #f0f7fa 0%, #ffffff 100%);
    border-bottom: 1px solid #e2e8f0;
}

.search-card {
    background: #ffffff;
    max-width: 860px;
    margin: 0 auto;
    padding: 36px 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(10, 77, 104, 0.08);
    border: 1px solid rgba(10, 77, 104, 0.08);
}

.search-header {
    text-align: center;
    margin-bottom: 24px;
}

.search-title {
    font-size: 1.5rem;
    color: var(--c-primary);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.search-title-icon {
    font-size: 1.3rem;
}

.search-desc {
    font-size: 0.92rem;
    color: var(--c-text-light);
}

.search-input-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto 24px;
}

.search-input {
    width: 100%;
    padding: 14px 48px 14px 20px;
    font-size: 1rem;
    border: 2px solid #cbd5e1;
    border-radius: 30px;
    background: #f8fafc;
    color: var(--c-text);
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: var(--c-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(10, 77, 104, 0.12);
}

.search-clear-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.1rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    display: none;
    line-height: 1;
}

.search-clear-btn:hover {
    color: var(--c-primary);
}

/* Popular Tag Cloud */
.popular-tags-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.88rem;
}

.popular-tags-label {
    font-weight: 700;
    color: var(--c-primary);
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.popular-tag-btn {
    background: #edf6f9;
    color: var(--c-primary);
    border: 1px solid #cce3de;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.popular-tag-btn:hover {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(10, 77, 104, 0.2);
}

/* Search Results Area */
.search-results-area {
    margin-top: 32px;
    padding-top: 28px;
    border-top: 1px dashed #cbd5e1;
    display: none;
}

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.search-results-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-primary);
}

.search-results-count {
    color: var(--c-secondary);
    font-weight: 700;
}

.search-results-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 0.88rem;
    cursor: pointer;
    text-decoration: underline;
}

.search-results-close:hover {
    color: var(--c-primary);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.search-no-result {
    text-align: center;
    padding: 40px 0;
    color: var(--c-text-light);
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .search-card {
        padding: 24px 16px;
    }

    .tag-filter-wrap {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .tag-filter-wrap::-webkit-scrollbar {
        display: none;
    }

    .tag-filter-btn {
        flex-shrink: 0;
        font-size: 0.82rem;
        padding: 6px 14px;
    }

    .popular-tags-wrap {
        justify-content: flex-start;
    }
}