/**
 * Shimomiya Theme - Components
 * ボタン、カード、その他コンポーネント
 * ステッチ風・クラフト感デザイン
 *
 * @package Shimomiya
 */

/* ==========================================================================
   Buttons - ステッチ風クラフトボタン
   背景色を濃くし白文字、内側にステッチ（点線）装飾
   ========================================================================== */

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-family: var(--font-zen);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-md);
    color: var(--color-white);
    background: var(--color-accent-red);
    border: none;
    border-radius: var(--radius-lg);
    padding: 12px 40px;
    min-width: var(--button-min-width);
    height: var(--button-height);
    letter-spacing: 0.675px;
    transition: all var(--transition-normal);
    cursor: pointer;
    position: relative;
}

/* ステッチ（点線）内枠 */
.btn-outline::before {
    content: '';
    position: absolute;
    inset: var(--stitch-offset);
    border: var(--stitch-width) dashed var(--stitch-color-light);
    border-radius: inherit;
    pointer-events: none;
}

.btn-outline:hover {
    background: var(--color-brown-dark);
    color: var(--color-white);
    opacity: 1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(211, 91, 71, 0.3);
}

.btn-outline .arrow {
    width: 13px;
    height: 11px;
    flex-shrink: 0;
}

/* Alt variant - リーフグリーン */
.btn-outline--alt {
    background: var(--color-accent-green);
}

.btn-outline--alt:hover {
    background: var(--color-brown-dark);
    box-shadow: 0 4px 12px rgba(93, 160, 68, 0.3);
}

/* Header Buttons - ピンクCTA */
.header-btn {
    font-family: var(--font-zen);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-xs);
    color: var(--color-white);
    background: var(--color-pink);
    border-radius: var(--radius-full);
    padding: 9px 16px;
    min-width: var(--header-button-min-width);
    text-align: center;
    display: inline-block;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 8px rgba(232, 82, 110, 0.3);
}

.header-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(232, 82, 110, 0.4);
}

/* ==========================================================================
   News Item - ステッチ風区切り線
   ========================================================================== */

.news-list {
    display: flex;
    flex-direction: column;
}

.news-item {
    display: flex;
    align-items: center;
    padding: 14px 0;
    gap: 42px;
    border-bottom: 2px dashed var(--stitch-color-dark);
}

.news-item:first-child {
    border-top: 2px dashed var(--stitch-color-dark);
}

.news-date {
    font-family: var(--font-noto);
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-base);
    color: var(--color-accent-green);
    letter-spacing: 1.6px;
    line-height: 1.6;
    min-width: 96px;
    flex-shrink: 0;
}

.news-title {
    font-family: var(--font-noto);
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-base);
    color: var(--color-brown-dark);
    letter-spacing: 1.6px;
    line-height: 1.6;
    transition: color var(--transition-normal);
}

.news-title:hover {
    color: var(--color-pink);
    opacity: 1;
}

@media (max-width: 768px) {
    .news-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ==========================================================================
   Service Card - ステッチ枠付きカード
   オレンジのダッシュ枠で手作り感を演出
   ========================================================================== */

.service-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: var(--service-card-height);
    display: flex;
    flex-direction: column;
    border: 3px dashed var(--color-accent-orange);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.service-card-image {
    position: relative;
    height: 262px;
    margin: 44px 44px 0;
}

.service-card-image-bg {
    position: absolute;
    top: 1.6px;
    left: 3.84px;
    width: 440px;
    height: 260px;
    background: var(--color-service-image-bg);
    border-radius: var(--radius-md);
}

.service-card-image img {
    position: relative;
    width: var(--service-card-image-width);
    height: var(--service-card-image-height);
    object-fit: cover;
    border-radius: var(--radius-md);
    z-index: 1;
}

.service-card-content {
    padding: 0 var(--card-padding-lg) var(--card-padding-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-en {
    font-family: var(--font-noto);
    font-weight: var(--font-weight-medium);
    font-size: var(--font-size-xl);
    color: var(--color-yellow-text);
    line-height: 43px;
    margin-top: 20px;
    text-transform: capitalize;
}

.service-card-title {
    font-family: var(--font-zen);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-3xl);
    color: var(--color-text);
    letter-spacing: 1.2px;
    line-height: 44.8px;
    margin: 5px 0 0;
}

.service-card-title .prefix {
    font-size: var(--font-size-xl);
}

.service-card-text {
    font-family: var(--font-noto);
    font-weight: var(--font-weight-normal);
    font-size: var(--font-size-lg);
    color: var(--color-text);
    line-height: 40px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.service-card .btn-outline {
    align-self: flex-start;
}

@media (max-width: 1200px) {
    .service-card {
        height: auto;
    }

    .service-card-image {
        margin: 20px;
        height: auto;
    }

    .service-card-image-bg {
        display: none;
    }

    .service-card-image img {
        width: 100%;
        height: auto;
    }

    .service-card-content {
        padding: 0 20px 20px;
    }
}

@media (max-width: 768px) {
    .service-card-image {
        margin: 15px;
    }

    .service-card-content {
        padding: 0 15px 15px;
    }

    .service-card .btn-outline {
        align-self: stretch;
        width: 100%;
        min-width: 0;
        white-space: nowrap;
    }
}

/* ==========================================================================
   Thumbnail Gallery - ポラロイド風フレーム + 無限横スクロール
   白枠パディングとシャドウで写真感を演出
   ========================================================================== */

.thumbnail-track {
    display: flex;
    gap: var(--thumbnail-gap);
    width: max-content;
    animation: scroll-left 30s linear infinite;
}

.thumbnail-track:hover {
    animation-play-state: paused;
}

.thumbnail-row {
    display: flex;
    gap: var(--thumbnail-gap);
}

.thumbnail-item {
    width: var(--thumbnail-size);
    height: var(--thumbnail-size);
    flex-shrink: 0;
    overflow: visible;
    background: var(--color-white);
    padding: 7px;
    border-radius: 6px;
    box-shadow: var(--shadow-photo);
    position: relative;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    transition: transform var(--transition-normal);
}

.thumbnail-item:hover img {
    transform: scale(1.08);
}

/* ==========================================================================
   Thumbnail Bubble - 可愛い吹き出し
   クラフト感に合わせた丸みのある吹き出し装飾
   ========================================================================== */

.thumbnail-bubble {
    position: absolute;
    top: -12px;
    right: -8px;
    z-index: 3;
    font-family: var(--font-zen);
    font-weight: var(--font-weight-bold);
    font-size: 14px;
    letter-spacing: 0.5px;
    color: var(--color-white);
    background: var(--color-accent-red);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(211, 91, 71, 0.35);
    pointer-events: none;
    border: 1.5px dashed rgba(255, 255, 255, 0.5);
    transform: rotate(3deg);
}

/* しっぽ（三角） */
.thumbnail-bubble::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 14px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 7px solid var(--color-accent-red);
}

/* 色バリエーション - nth-child で交互に */
.thumbnail-item:nth-child(2) .thumbnail-bubble {
    background: var(--color-accent-green);
    box-shadow: 0 2px 8px rgba(93, 160, 68, 0.35);
    transform: rotate(-2deg);
}
.thumbnail-item:nth-child(2) .thumbnail-bubble::after {
    border-top-color: var(--color-accent-green);
}

.thumbnail-item:nth-child(3) .thumbnail-bubble {
    background: var(--color-accent-orange);
    box-shadow: 0 2px 8px rgba(242, 167, 59, 0.35);
    transform: rotate(4deg);
}
.thumbnail-item:nth-child(3) .thumbnail-bubble::after {
    border-top-color: var(--color-accent-orange);
}

.thumbnail-item:nth-child(4) .thumbnail-bubble {
    background: var(--color-pink);
    box-shadow: 0 2px 8px rgba(232, 82, 110, 0.35);
    transform: rotate(-3deg);
}
.thumbnail-item:nth-child(4) .thumbnail-bubble::after {
    border-top-color: var(--color-pink);
}

.thumbnail-item:nth-child(5) .thumbnail-bubble {
    background: var(--color-accent-blue);
    box-shadow: 0 2px 8px rgba(101, 184, 214, 0.35);
    transform: rotate(2deg);
}
.thumbnail-item:nth-child(5) .thumbnail-bubble::after {
    border-top-color: var(--color-accent-blue);
}

.thumbnail-item:nth-child(6) .thumbnail-bubble {
    background: var(--color-accent-green);
    box-shadow: 0 2px 8px rgba(93, 160, 68, 0.35);
    transform: rotate(-4deg);
}
.thumbnail-item:nth-child(6) .thumbnail-bubble::after {
    border-top-color: var(--color-accent-green);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (max-width: 991px) {
    .thumbnail-item {
        width: 150px;
        height: 150px;
    }

    .thumbnail-bubble {
        font-size: 12px;
        padding: 3px 8px;
        top: -10px;
        right: -6px;
    }
}

@media (max-width: 576px) {
    .thumbnail-item {
        width: 120px;
        height: 120px;
        padding: 5px;
    }

    .thumbnail-track {
        animation-duration: 20s;
    }

    .thumbnail-bubble {
        font-size: 11px;
        padding: 2px 7px;
        top: -9px;
        right: -5px;
    }

    .thumbnail-bubble::after {
        bottom: -5px;
        border-left-width: 4px;
        border-right-width: 4px;
        border-top-width: 6px;
    }
}

/* ==========================================================================
   Gallery - ポラロイド風 2列横スクロール
   ========================================================================== */

.gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow: hidden;
}

.gallery-row {
    display: flex;
    width: max-content;
    gap: 20px;
}

.gallery-row--top {
    animation: gallery-scroll-left 40s linear infinite;
}

.gallery-row--bottom {
    animation: gallery-scroll-right 35s linear infinite;
}

.gallery-row:hover {
    animation-play-state: paused;
}

.gallery-row-inner {
    display: flex;
    gap: 20px;
}

.gallery-item {
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-white);
    padding: 7px;
    box-shadow: var(--shadow-photo);
}

.gallery-item img {
    height: 100%;
    width: auto;
    display: block;
    border-radius: 4px;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* 上段 */
.gallery-row--top .gallery-item {
    height: 294px;
}

/* 下段 */
.gallery-row--bottom .gallery-item {
    height: 234px;
}

@keyframes gallery-scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-50% - 10px));
    }
}

@keyframes gallery-scroll-right {
    0% {
        transform: translateX(calc(-50% - 10px));
    }
    100% {
        transform: translateX(0);
    }
}

@media (max-width: 991px) {
    .gallery-row--top .gallery-item {
        height: 214px;
    }
    .gallery-row--bottom .gallery-item {
        height: 174px;
    }
}

@media (max-width: 576px) {
    .gallery-row--top {
        animation-duration: 25s;
    }
    .gallery-row--bottom {
        animation-duration: 22s;
    }
    .gallery-row--top .gallery-item {
        height: 164px;
    }
    .gallery-row--bottom .gallery-item {
        height: 134px;
    }
}
