@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Mesh Gradients */
.mesh-gradient-vivid {
    background-color: #fdfbf7;
    background-image: 
        radial-gradient(at 50% 0%, rgba(255, 255, 255, 1) 0, transparent 50%);
}

.mesh-gradient-subtle {
    background-color: #fdfbf7;
    background-image: 
        radial-gradient(at 50% 0%, rgba(255, 255, 255, 1) 0, transparent 50%);
}

.mesh-gradient-warm {
    background-color: #fffaf0;
    background-image: 
        radial-gradient(at 0% 0%, hsla(35, 100%, 93%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(10, 100%, 94%, 1) 0, transparent 50%),
        radial-gradient(at 50% 100%, hsla(40, 100%, 96%, 1) 0, transparent 50%);
}

/* Utilities */
.animate-fade-in {
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   Page Load Animations (統一管理)
   ========================================= */

/* =========================================
   Page Load Animations (統一管理)
   ========================================= */

/* ページ読み込み時のフェードインアニメーション */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(2.5rem);
    animation: fadeInUp 1s ease-out forwards;
}

.faq-content {
    transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.faq-content.open {
    max-height: 500px;
    opacity: 1;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.open {
    transform: rotate(180deg);
}

/* Hide scrollbar for Chrome, Safari and Opera */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* =========================================
   Global Navigation System
   ========================================= */

.global-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 50;
    transition: all 0.3s ease-in-out;
    background-color: transparent;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.global-nav.scrolled {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.nav-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #000;
}

.nav-logo-text {
    font-size: 1.875rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
}

.nav-desktop-menu {
    display: none;
}
@media (min-width: 768px) {
    .nav-desktop-menu {
        display: flex;
        align-items: center;
        gap: 2.5rem;
    }
}

.nav-link {
    font-size: 1rem;
    font-weight: 700;
    color: #4b5563;
    transition: color 0.2s;
    text-decoration: none;
}
.nav-link:hover {
    color: #f57426;
}

.nav-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #f57426;
    border: 2px solid #f57426;
    border-radius: 9999px;
    transition: all 0.2s;
    text-decoration: none;
}
.nav-lang:hover {
    background-color: #f57426;
    color: white;
}

.nav-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    background-color: #f57426;
    border-radius: 9999px;
    box-shadow: 0 10px 15px -3px rgba(245, 116, 38, 0.2);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}
.nav-btn:hover {
    background-color: #ea580c;
    transform: translateY(-1px);
}

.mobile-menu-btn {
    display: block;
    padding: 1rem;
    color: #4b5563;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.mobile-menu-btn:active {
    transform: translateY(-50%) scale(0.9);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* Mobile Menu (CSS-only) */
.mobile-menu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #f3f4f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.3s ease;
}

.mobile-menu-toggle:checked ~ .mobile-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 500px;
}

.mobile-menu-toggle:checked ~ label .menu-icon-open {
    display: none;
}

.mobile-menu-toggle:checked ~ label .menu-icon-close {
    display: block;
}

/* User Page Mobile Menu (独立実装) */
.mobile-menu-toggle-user {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mobile-menu-btn-user {
    display: block;
    padding: 1rem;
    color: #4b5563;
    background: none;
    border: none;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: transform 0.1s ease, opacity 0.1s ease;
}

.mobile-menu-btn-user:active {
    transform: translateY(-50%) scale(0.9);
    opacity: 0.7;
}

@media (min-width: 768px) {
    .mobile-menu-btn-user {
        display: none;
    }
}

.mobile-menu-user {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #f3f4f6;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, max-height 0.3s ease, padding 0.2s ease;
}

.mobile-menu-toggle-user:checked ~ .mobile-menu-user {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    max-height: 500px;
    padding: 1.5rem;
}

.menu-icon-close {
    display: none;
}

.mobile-menu-toggle:checked ~ label .menu-icon-open {
    display: none;
}

.mobile-menu-toggle:checked ~ label .menu-icon-close {
    display: block;
}

.mobile-nav-link {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f9fafb;
    text-decoration: none;
    display: block;
}

.mobile-nav-btn {
    width: 100%;
    text-align: center;
    padding: 1rem;
    background-color: #f57426;
    color: white;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    display: block;
}

/* =========================================
   Section Heading Styles
   ========================================= */

/* Section Container */
.section-header {
    margin-bottom: 4rem;
    text-align: center;
}

@media (min-width: 768px) {
    .section-header {
        margin-bottom: 7rem;
    }
}

.section-badge {
    display: inline-block;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 79, 0, 0.2);
    background-color: rgba(255, 79, 0, 0.05);
    color: #e03a00;
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.section-heading {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 800;
    color: #18181b; /* text-secondary-900 */
    margin-bottom: 1.5rem;
    font-family: 'Manrope', 'Noto Sans JP', sans-serif; /* font-display */
    line-height: 1.25;
    text-align: center;
    display: block;
    width: 100%;
    max-width: 100%;
}

/* デスクトップのみ一行で表示（スマホ・タブレットは折り返しを許可） */
@media (min-width: 1024px) {
    .section-heading {
        white-space: nowrap;
    }
}

@media (min-width: 768px) {
    .section-heading {
        font-size: 3rem; /* text-5xl */
    }
}

/* 複数行見出し用のスタイル */
.section-heading-multiline {
    white-space: normal !important;
    max-width: 56rem; /* 適切な幅に制限 */
    margin-left: auto;
    margin-right: auto;
    line-height: 1.3;
}

@media (min-width: 640px) {
    .section-heading-multiline {
        white-space: normal !important;
    }
}

@media (min-width: 768px) {
    .section-heading-multiline {
        font-size: 3rem; /* text-5xl */
        line-height: 1.2;
    }
}

@media (min-width: 1024px) {
    .section-heading-multiline {
        font-size: 3.5rem;
        max-width: 64rem;
    }
}

.section-subtitle {
    font-size: 1.125rem;
    color: #71717a; /* text-secondary-500 */
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1.25rem;
    }
}

/* =========================================
   Common Hover Animations
   ========================================= */

/* Card Hover Effect */
.hover-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.hover-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, rgba(255, 79, 0, 0.05), rgba(255, 79, 0, 0.1));
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.hover-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.hover-card:hover::before {
    opacity: 1;
}

/* Dark Card Hover Effect */
.hover-card-dark {
    background: linear-gradient(to bottom right, #18181b, #09090b);
}

.hover-card-dark::before {
    background: linear-gradient(to bottom right, rgba(255, 79, 0, 0.1), rgba(255, 79, 0, 0.05));
}

.hover-card-dark:hover {
    box-shadow: 0 20px 25px -5px rgba(255, 79, 0, 0.2), 0 10px 10px -5px rgba(255, 79, 0, 0.1);
}

/* Icon Hover Effect */
.hover-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-card:hover .hover-icon {
    transform: scale(1.1);
    background: linear-gradient(to bottom right, #ff4f00, #e03a00) !important;
}

.hover-card:hover .hover-icon i {
    color: white !important;
}

.hover-card-dark:hover .hover-icon {
    background: rgba(255, 79, 0, 0.3) !important;
    border-color: rgba(255, 79, 0, 0.5) !important;
}

.hover-card-dark:hover .hover-icon i {
    color: #ff7640 !important;
}

/* WhyNow Card Hover Effect (統一されたアニメーション) */
.whynow-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 220px; /* 閉じているときの高さを統一 */
}

@media (min-width: 768px) {
    .whynow-card {
        min-height: 240px; /* タブレット以上では少し高めに */
    }
}

.whynow-card:hover .hover-icon {
    transform: scale(1.05);
}

.whynow-card:hover .hover-icon i {
    color: #ff4f00;
}

/* WhyNow Accordion (CSS-only) */
.whynow-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.whynow-card-wrapper {
    position: relative;
}

/* Closed state (default) */
.whynow-toggle:not(:checked) + .whynow-card .icon-minus {
    display: none;
}

.whynow-toggle:not(:checked) + .whynow-card .icon-plus {
    display: block;
}

.whynow-toggle:not(:checked) + .whynow-card .details {
    grid-template-rows: 0fr;
    opacity: 0;
}

.whynow-toggle:not(:checked) + .whynow-card .details p {
    border-color: transparent;
    color: transparent;
}

/* Open state */
.whynow-toggle:checked + .whynow-card {
    background-color: white;
    border-color: #ff4f00;
    box-shadow: 0 25px 50px -12px rgba(255, 79, 0, 0.15), 0 0 0 2px rgba(255, 79, 0, 0.1);
    transform: scale(1.02);
}

.whynow-toggle:checked + .whynow-card .icon-container {
    background-color: #fff3eb;
    color: #ff4f00;
}

.whynow-toggle:checked + .whynow-card .toggle-btn {
    background-color: #fff3eb;
    color: #ff4f00;
}

.whynow-toggle:checked + .whynow-card .icon-plus {
    display: none;
}

.whynow-toggle:checked + .whynow-card .icon-minus {
    display: block;
}

.whynow-toggle:checked + .whynow-card .title {
    color: #09090b;
}

.whynow-toggle:checked + .whynow-card .summary {
    color: #3f3f46;
}

.whynow-toggle:checked + .whynow-card .details {
    grid-template-rows: 1fr;
    opacity: 1;
}

.whynow-toggle:checked + .whynow-card .details p {
    border-color: #e4e4e7;
    color: #52525b;
}

/* Icon Container Hover Effect (統一されたトンマナ) */
.icon-container {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whynow-card:hover .icon-container {
    color: #ff4f00;
    background-color: rgba(255, 79, 0, 0.1);
}

/* ダークカード用のアイコンホバー効果 */
.whynow-card:hover .icon-container.text-secondary-300 {
    color: #ff7640 !important;
    background-color: rgba(255, 79, 0, 0.2) !important;
}

/* Button Hover Effect */
.hover-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(255, 79, 0, 0.3), 0 10px 10px -5px rgba(255, 79, 0, 0.2);
}

/* Link Hover Effect */
.hover-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.hover-link:hover {
    color: #ff4f00;
    transform: translateX(2px);
}

/* =========================================
   Design Tokens (トンマナ)
   ========================================= */

:root {
    /* Colors */
    --color-primary-50: #fff3eb;
    --color-primary-100: #ffe5d6;
    --color-primary-200: #ffc8ad;
    --color-primary-300: #ffa37a;
    --color-primary-400: #ff7640;
    --color-primary-500: #ff4f00;
    --color-primary-600: #e03a00;
    --color-primary-700: #b82b00;
    --color-primary-800: #912306;
    --color-primary-900: #751f08;

    --color-secondary-50: #f4f4f5;
    --color-secondary-100: #e4e4e7;
    --color-secondary-200: #d4d4d8;
    --color-secondary-300: #a1a1aa;
    --color-secondary-400: #71717a;
    --color-secondary-500: #52525b;
    --color-secondary-600: #3f3f46;
    --color-secondary-700: #27272a;
    --color-secondary-800: #18181b;
    --color-secondary-900: #09090b;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;
    --radius-2xl: 2.5rem;
    --radius-3xl: 3rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-display: 'Manrope', 'Noto Sans JP', sans-serif;
    --font-body: 'Inter', 'Noto Sans JP', sans-serif;
}

/* =========================================
   Sustainable Ecosystem Animations
   ========================================= */

@keyframes flow {
    0% {
        left: -20%;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        left: 120%;
        opacity: 0;
    }
}

@keyframes blob {
    0% {
        transform: translate(0px, 0px) scale(1);
    }
    33% {
        transform: translate(30px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    100% {
        transform: translate(0px, 0px) scale(1);
    }
}

.animate-flow {
    animation: flow 3s linear infinite;
}

.animate-blob {
    animation: blob 10s infinite;
}

.bg-noise {
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
}

/* Sustainable Steps アニメーション（CSSのみ） */
.sustainable-step {
    opacity: 0;
    transform: translateY(2.5rem);
    animation: fadeInUp 1s ease-out forwards;
}

.sustainable-step-1 {
    animation-delay: 0.1s;
}

.sustainable-step-2 {
    animation-delay: 0.4s;
}

.sustainable-step-3 {
    animation-delay: 0.7s;
}

.sustainable-step-4 {
    animation-delay: 1s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* フローラインのアニメーション */
#flow-line {
    animation: fadeIn 1s ease-out 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* =========================================
   Hero Section Styles (トンマナ統一)
   ========================================= */

.hero-section {
    position: relative;
    padding-top: 8rem; /* pt-32 */
    padding-bottom: 6rem; /* pb-24 */
    overflow: hidden;
    background-color: #FAFAF9;
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 12rem; /* md:pt-48 */
        padding-bottom: 10rem; /* md:pb-40 */
    }
}

/* ヒーロー背景パターン（ドット） */
.hero-bg-dot {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.5);
    background-image: radial-gradient(#e5e7eb 1px, transparent 1px);
    background-size: 16px 16px;
    mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 70%, transparent 100%);
    pointer-events: none;
}

/* ヒーロー背景グラデーション要素 */
.hero-bg-gradient-1 {
    position: absolute;
    top: 0;
    right: 0;
    width: 800px;
    height: 800px;
    background: linear-gradient(to bottom left, rgba(255, 79, 0, 0.05), transparent);
    border-radius: 50%;
    filter: blur(100px);
    transform: translate(33.333%, -33.333%);
    pointer-events: none;
}

.hero-bg-gradient-2 {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 600px;
    height: 600px;
    background: linear-gradient(to top right, rgba(255, 165, 0, 0.1), transparent);
    border-radius: 50%;
    filter: blur(80px);
    transform: translate(-33.333%, 33.333%);
    pointer-events: none;
}

/* ヒーロー見出し */
.hero-heading {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 800;
    color: #18181b; /* text-secondary-900 */
    letter-spacing: -0.025em;
    line-height: 1.15;
    margin-bottom: 2rem;
    font-family: var(--font-display);
    text-align: center;
    width: 100%;
}

@media (min-width: 768px) {
    .hero-heading {
        font-size: 3rem; /* md:text-5xl */
    }
}

@media (min-width: 1024px) {
    .hero-heading {
        font-size: 4.5rem; /* lg:text-7xl */
    }
}

/* ヒーロー説明文 */
.hero-description {
    font-size: 1.125rem; /* text-lg */
    color: #52525b; /* text-secondary-600 */
    line-height: 1.75;
    font-weight: 500;
    max-width: 56rem; /* max-w-4xl */
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .hero-description {
        font-size: 1.25rem; /* md:text-xl */
    }
}

@media (min-width: 1024px) {
    .hero-description {
        font-size: 1.5rem; /* lg:text-2xl */
    }
}

/* ヒーロー説明文（小サイズ版） */
.hero-description-sm {
    font-size: 1rem; /* text-base */
    color: #52525b; /* text-secondary-600 */
    line-height: 1.75;
    font-weight: 500;
    max-width: 48rem; /* max-w-3xl */
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .hero-description-sm {
        font-size: 1.125rem; /* md:text-lg */
    }
}

@media (min-width: 1024px) {
    .hero-description-sm {
        font-size: 1.25rem; /* lg:text-xl */
    }
}

/* =========================================
   Detail Button Styles
   ========================================= */
.detail-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.detail-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    transition: left 0.3s ease;
    z-index: 0;
}

.detail-button:hover::before {
    left: 0;
}

.detail-button-text,
.detail-button-icon {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, color 0.3s ease;
}

.detail-button:hover .detail-button-icon {
    transform: translateY(2px);
}

.detail-button-secondary {
    background-color: white;
    color: #71717a;
    border-color: #e4e4e7;
}

.detail-button-secondary:hover {
    color: #3f3f46;
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.detail-button-secondary::before {
    background-color: #fef3e7;
}

.detail-button-primary {
    background-color: white;
    color: #f97316;
    border-color: #f97316;
}

.detail-button-primary:hover {
    color: #e03a00;
    border-color: #f97316;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

.detail-button-primary::before {
    background-color: #f97316;
}

.detail-button-icon {
    width: 1rem;
    height: 1rem;
}

.detail-button-open,
.detail-button-close {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    background: transparent;
    outline: none;
    box-shadow: none;
    transition: color 0.3s ease;
    cursor: pointer;
    position: relative;
}

.detail-button-open.detail-button-secondary,
.detail-button-close.detail-button-secondary {
    color: #71717a;
}

.detail-button-open.detail-button-secondary:hover,
.detail-button-close.detail-button-secondary:hover {
    color: #f97316;
    outline: none;
    box-shadow: none;
}

.detail-button-open.detail-button-primary,
.detail-button-close.detail-button-primary {
    color: #f97316;
}

.detail-button-open.detail-button-primary:hover,
.detail-button-close.detail-button-primary:hover {
    color: #e03a00;
    outline: none;
    box-shadow: none;
}

.detail-button-open:focus,
.detail-button-close:focus,
label.detail-button-open:focus,
label.detail-button-close:focus {
    outline: none;
    box-shadow: none;
}

label.detail-button-open,
label.detail-button-close {
    outline: none;
    box-shadow: none;
}

label.detail-button-open:hover,
label.detail-button-close:hover {
    outline: none;
    box-shadow: none;
}

/* =========================================
   Comparison Card Accordion (CSS-only)
   ========================================= */
.comp-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.comp-card-wrapper {
    position: relative;
}

.comp-card {
    display: flex;
    flex-direction: column;
}

/* Closed state (default) */
.comp-toggle:not(:checked) + .comp-card .comp-content {
    grid-template-rows: 0fr;
    opacity: 0;
}

.comp-toggle:not(:checked) + .comp-card .comp-footer {
    display: flex;
}

.comp-toggle:not(:checked) + .comp-card .detail-button-open {
    display: inline-flex;
}

.comp-toggle:not(:checked) + .comp-card .detail-button-close {
    display: none;
}

.comp-toggle:not(:checked) + .comp-card .detail-button-icon {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.comp-toggle:not(:checked) + .comp-card[data-type="conventional"] {
    border-color: #e4e4e7;
    filter: grayscale(0.3);
    opacity: 0.9;
}

.comp-toggle:not(:checked) + .comp-card[data-type="hth"] {
    border-color: #fed7aa;
}

/* Open state */
.comp-toggle:checked + .comp-card .comp-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.comp-toggle:checked + .comp-card .comp-footer {
    display: none;
}

.comp-toggle:checked + .comp-card .detail-button-open {
    display: none;
}

.comp-toggle:checked + .comp-card .detail-button-close {
    display: inline-flex;
}

.comp-toggle:checked + .comp-card .detail-button-icon {
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.comp-toggle:checked + .comp-card[data-type="conventional"] {
    border-color: #a1a1aa;
    filter: grayscale(0);
    opacity: 1;
}

.comp-toggle:checked + .comp-card[data-type="hth"] {
    border-color: #f97316;
}

/* Message Section Image Size Fix */
@media (min-width: 1024px) {
    .message-image-container {
        height: 800px !important;
        max-height: 800px !important;
    }
    
    .message-image-container img {
        max-height: 800px !important;
        object-fit: cover;
    }
}

/* Mobile Image Position Fix */
@media (max-width: 767px) {
    .message-image-container img {
        object-position: top center;
    }
}

/* VoiceAI Image Hover Effect (Moiré Pattern Prevention) */
.group:hover img[src*="VoiceAI"] {
    image-rendering: auto;
    backface-visibility: hidden;
    will-change: transform;
}
