/* ==========================================================================
   top.css - トップページ専用スタイル
   ========================================================================== */

/* ==========================================================================
   Hero Section - 白基調
   ========================================================================== */
.hero-section {
    position: relative;
    background: var(--white);
    overflow: hidden;
    padding: 4rem 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(45, 164, 167, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(109, 213, 237, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    background: var(--gradient-primary);
    padding: 0.375rem 1rem;
    border-radius: 50px;
    font-size: 0.8125rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
}

.hero-badge i {
    color: #FFD700;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

.hero-title-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-btn {
    background: var(--gradient-primary);
    color: var(--white);
    font-weight: 600;
    padding: 0.875rem 2rem;
    border-radius: 50px;
    border: none;
    box-shadow: 0 4px 20px rgba(45, 164, 167, 0.3);
}

.hero-btn:hover {
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(45, 164, 167, 0.4);
}

.hero-image-wrapper {
    position: relative;
}

.hero-image-wrapper img {
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    aspect-ratio: 741 / 461;
    object-fit: cover;
}

.hero-float-card {
    position: absolute;
    background: var(--white);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(45, 164, 167, 0.1);
    animation: float 3s ease-in-out infinite;
}

.hero-float-card.card-1 {
    top: 20px;
    right: -20px;
    animation-delay: 0s;
}

.hero-float-card.card-2 {
    bottom: 40px;
    left: -30px;
    animation-delay: 1.5s;
}

.hero-float-card i {
    color: var(--primary-color);
}

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

/* ==========================================================================
   Category Navigation
   ========================================================================== */
.category-nav {
    background: var(--white);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.category-nav .nav-pills {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.category-nav .nav-item {
    flex-shrink: 0;
}

.category-nav .nav-pills .nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.625rem 1.25rem;
    border-radius: 50px;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: var(--transition);
}

.category-nav .nav-pills .nav-link i {
    font-size: 1rem;
}

/* カテゴリーナビアイコン（マスク方式） */
.category-nav .nav-pills .nav-link .category-nav-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* アクティブ時: 白に */
.category-nav .nav-pills .nav-link.active .category-nav-icon {
    background-color: #fff !important;
}

.category-nav .nav-pills .nav-link:hover {
    color: var(--primary-color);
    background: rgba(45, 164, 167, 0.06);
    border-color: rgba(45, 164, 167, 0.15);
}

.category-nav .nav-pills .nav-link.active {
    background: var(--gradient-primary);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(45, 164, 167, 0.3);
}

/* スクロールバー非表示（横スクロール時） */
.category-nav .nav-pills::-webkit-scrollbar {
    display: none;
}

.category-nav .nav-pills {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ==========================================================================
   Horizontal Card - トップページ専用
   ========================================================================== */
.card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
}

.card-horizontal .card-img-side {
    width: 40%;
    min-width: 40%;
    max-width: 40%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    aspect-ratio: 741 / 461;
}

.card-horizontal .card-img-side img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 16px 0 0 16px;
    display: block;
    transition: transform 0.5s ease;
}

/* ホバー効果：他のカードと同じように画像を拡大 */
.card-horizontal.card-hover:hover .card-img-side img {
    transform: scale(1.05);
}

.card-horizontal .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.card-horizontal .card-body .category-tag {
    align-self: flex-start;
}

.card-horizontal .card-body .card-title {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ==========================================================================
   Popular Section
   ========================================================================== */
.popular-section .rank-number {
    font-size: 1.75rem;
    font-weight: 700;
    min-width: 50px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.popular-section .rank-number.rank-1 {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popular-section .rank-number.rank-2 {
    background: linear-gradient(135deg, #C0C0C0, #A0A0A0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popular-section .rank-number.rank-3 {
    background: linear-gradient(135deg, #CD7F32, #B8860B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popular-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.popular-item:last-child {
    border-bottom: none;
}

.popular-item:hover {
    background: rgba(45, 164, 167, 0.03);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.popular-thumb {
    width: 100px;
    aspect-ratio: 741 / 461;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ==========================================================================
   Newsletter Section - 白基調
   ========================================================================== */
.newsletter-card {
    background: var(--white);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    background-image: linear-gradient(white, white), var(--gradient-primary);
    background-origin: border-box;
    background-clip: padding-box, border-box;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(45, 164, 167, 0.05) 0%, transparent 60%);
}

.newsletter-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
}

.newsletter-title {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 通常フォーム用（Bootstrap input-group） */
.newsletter-form .input-group .form-control {
    border: 1px solid #e0e0e0;
    padding: 0.875rem 1.25rem;
    border-radius: 50px 0 0 50px;
}

.newsletter-form .input-group .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: none;
}

.newsletter-form .input-group .btn {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 0 50px 50px 0;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
}

.newsletter-form .input-group .btn:hover {
    opacity: 0.9;
    color: var(--white);
}

/* Contact Form 7用ニュースレタースタイル */
.newsletter-card .wpcf7 {
    width: 100%;
}

.newsletter-card .wpcf7-form p {
    margin-bottom: 0.75rem;
}

.newsletter-card .wpcf7-form p:last-of-type {
    margin-bottom: 0;
}

.newsletter-card .wpcf7-form p br {
    display: none;
}

.newsletter-card .wpcf7-form .wpcf7-form-control-wrap {
    display: block;
    margin-bottom: 0.75rem;
}

.newsletter-card .wpcf7-form input[type="text"],
.newsletter-card .wpcf7-form input[type="email"] {
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.newsletter-card .wpcf7-form input[type="text"]:focus,
.newsletter-card .wpcf7-form input[type="email"]:focus {
    outline: none;
    border-color: #2DA4A7;
    box-shadow: 0 0 0 3px rgba(45, 164, 167, 0.1);
}

.newsletter-card .wpcf7-form input[type="text"]::placeholder,
.newsletter-card .wpcf7-form input[type="email"]::placeholder {
    color: #adb5bd;
}

.newsletter-card .wpcf7-form input[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #2DA4A7, #6DD5ED);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.newsletter-card .wpcf7-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(45, 164, 167, 0.3);
}

.newsletter-card .wpcf7-spinner {
    display: inline-block;
    margin-left: 0.5rem;
}

.newsletter-card .wpcf7-response-output {
    margin: 1rem 0 0 !important;
    padding: 0.75rem !important;
    border-radius: 8px !important;
    font-size: 0.875rem;
    text-align: left;
}

.newsletter-card .wpcf7 form.sent .wpcf7-response-output {
    border-color: #10B981 !important;
    background: #ECFDF5;
    color: #059669;
}

.newsletter-card .wpcf7 form.invalid .wpcf7-response-output {
    border-color: #EF4444 !important;
    background: #FEF2F2;
    color: #DC2626;
}

.newsletter-card .wpcf7-not-valid-tip {
    color: #EF4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
    text-align: left;
}

/* ==========================================================================
   Category Posts Section
   ========================================================================== */
.category-posts-section .card-header {
    background: var(--white);
    border-bottom: 2px solid;
    border-image: var(--gradient-primary) 1;
    padding: 1rem 1.25rem;
}

.category-posts-section .card-header h3 {
    display: flex;
    align-items: center;
}

/* カテゴリーヘッダーアイコン（マスク方式） */
.category-header-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    flex-shrink: 0;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.category-post-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    transition: var(--transition);
}

.category-post-item:last-child {
    border-bottom: none;
}

.category-post-item:hover {
    padding-left: 0.5rem;
}

.category-post-thumb {
    width: 100px;
    aspect-ratio: 741 / 461;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

/* ==========================================================================
   Responsive - Top Page
   ========================================================================== */
@media (max-width: 991.98px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-image-wrapper {
        margin-bottom: 1.5rem;
    }
    
    .hero-description {
        font-size: 0.9375rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 1.5rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }
    
    .hero-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .card-horizontal {
        flex-direction: column;
    }

    .card-horizontal .card-img-side {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .card-horizontal .card-img-side img {
        border-radius: 16px 16px 0 0;
        height: auto;
        min-height: auto;
        aspect-ratio: 741 / 461;
    }
}

/* モバイル用画像オーバーレイ */
.hero-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
    border-radius: 0 0 16px 16px;
}

.hero-overlay-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
}

.hero-overlay-stats i {
    color: #fff;
}