/* Optimized CSS with better performance */
body {
    font-family: 'Noto Sans JP', sans-serif;
    scroll-behavior: smooth;
    position: relative;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Optimize animations for better performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}



@keyframes backgroundFloat {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    25% { transform: translate(-10px, -5px) rotate(1deg); }
    50% { transform: translate(5px, -10px) rotate(-1deg); }
    75% { transform: translate(-5px, 5px) rotate(0.5deg); }
}

.gradient-bg {
    background: linear-gradient(135deg, #FF1493 0%, #FF4500 20%, #FFD700 40%, #FF0080 60%, #FF6347 80%, #FF1493 100%);
    background-size: 400% 400%;
    animation: gradientShift 6s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    25% { background-position: 50% 100%; }
    50% { background-position: 100% 50%; }
    75% { background-position: 50% 0%; }
    100% { background-position: 0% 50%; }
}

.peach-gradient {
    background: linear-gradient(135deg, #FF0080 0%, #FF4500 15%, #FFD700 30%, #FF1493 45%, #FF6347 60%, #FFD700 75%, #FF0080 90%, #FF4500 100%);
    background-size: 300% 300%;
    animation: gradientShift 5s ease infinite reverse;
}

.neon-glow {
    box-shadow: 0 0 20px rgba(255, 0, 110, 0.5), 0 0 40px rgba(255, 0, 110, 0.3), 0 0 60px rgba(255, 0, 110, 0.1);
}

.neon-text {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.6), 0 0 30px rgba(255, 255, 255, 0.4);
}

.card-shadow {
    box-shadow: 0 25px 50px -12px rgba(255, 20, 147, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.1),
                0 10px 20px -5px rgba(255, 69, 0, 0.3),
                0 0 30px rgba(255, 215, 0, 0.2);
    backdrop-filter: blur(20px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(25px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 32px rgba(255, 20, 147, 0.3);
}

.card-glass {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15),
                0 0 0 1px rgba(255, 255, 255, 0.1);
}

.bounce-animation {
    animation: aggressiveBounce 1.5s infinite;
}

@keyframes aggressiveBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0) scale(1);
    }
    40%, 43% {
        transform: translate3d(0,-40px,0) scale(1.1);
    }
    70% {
        transform: translate3d(0,-20px,0) scale(1.05);
    }
    90% {
        transform: translate3d(0,-5px,0) scale(1.02);
    }
}

.floating {
    animation: aggressiveFloating 2.5s ease-in-out infinite;
}

@keyframes aggressiveFloating {
    0% { transform: translate(0, 0px) rotate(0deg); }
    25% { transform: translate(5px, -15px) rotate(2deg); }
    50% { transform: translate(0, -25px) rotate(0deg); }
    75% { transform: translate(-5px, -15px) rotate(-2deg); }
    100% { transform: translate(0, 0px) rotate(0deg); }
}

.fade-in {
    animation: aggressiveFadeIn 1.2s ease-in;
}

@keyframes aggressiveFadeIn {
    from { 
        opacity: 0; 
        transform: translateY(50px) scale(0.9); 
        filter: blur(5px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
        filter: blur(0px);
    }
}

.slide-in-left {
    animation: aggressiveSlideInLeft 1.2s ease-out;
}

@keyframes aggressiveSlideInLeft {
    from { 
        opacity: 0; 
        transform: translateX(-80px) scale(0.9); 
        filter: blur(3px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
        filter: blur(0px);
    }
}

.slide-in-right {
    animation: aggressiveSlideInRight 1.2s ease-out;
}

@keyframes aggressiveSlideInRight {
    from { 
        opacity: 0; 
        transform: translateX(80px) scale(0.9); 
        filter: blur(3px);
    }
    to { 
        opacity: 1; 
        transform: translateX(0) scale(1); 
        filter: blur(0px);
    }
}

.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

.hamburger-line {
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.gradient-text {
    background: linear-gradient(135deg, #FF1493, #FFD700, #FF4500, #FF0080, #FF6347, #FF1493);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    font-weight: 900;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.pop-text {
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 3px 3px 0px rgba(0,0,0,0.1);
}

.bold-outline {
    -webkit-text-stroke: 2px #FF006E;
    text-stroke: 2px #FF006E;
    color: white;
}

.scroll-indicator {
    animation: aggressiveScrollIndicator 2.5s infinite;
}

@keyframes aggressiveScrollIndicator {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(15px) scale(1.1); }
}

.bounce-float {
    animation: bounceFloat 3s ease-in-out infinite;
}

@keyframes bounceFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10px, -20px) scale(1.1); }
    50% { transform: translate(0, -30px) scale(1.2); }
    75% { transform: translate(-10px, -20px) scale(1.1); }
}

/* Loading Animation - Optimized */
body {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Focus styles for better accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gradient-text {
        background: #000 !important;
        -webkit-text-fill-color: #fff !important;
        text-shadow: none !important;
    }
    
    .white-card {
        background: #fff !important;
        border: 2px solid #000 !important;
    }
}

/* Enhanced Animations */
.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Improved Mobile Menu */
.mobile-menu {
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
    transform: translateX(0);
}

/* Enhanced Form Styling */
input:focus, textarea:focus, select:focus {
    transform: scale(1.02);
}

/* Enhanced Pulse Animation for CTA */
.pulse-animation {
    animation: aggressivePulse 2s infinite;
    position: relative;
}

@keyframes aggressivePulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 20, 147, 0.8), 0 0 0 0 rgba(255, 69, 0, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(255, 20, 147, 0), 0 0 0 40px rgba(255, 69, 0, 0);
        transform: scale(1.08);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 20, 147, 0), 0 0 0 0 rgba(255, 69, 0, 0);
        transform: scale(1);
    }
}

.bounce-float {
    animation: bounceFloat 3s ease-in-out infinite;
}

@keyframes bounceFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-10px) rotate(2deg); }
    50% { transform: translateY(-20px) rotate(0deg); }
    75% { transform: translateY(-10px) rotate(-2deg); }
}

.rainbow-border {
    border: 3px solid;
    border-image: linear-gradient(45deg, #FF1493, #FF4500, #FFD700, #FF0080, #FF6347, #FF1493) 1;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    0% { border-image: linear-gradient(0deg, #FF1493, #FF4500, #FFD700, #FF0080, #FF6347, #FF1493) 1; }
    100% { border-image: linear-gradient(360deg, #FF1493, #FF4500, #FFD700, #FF0080, #FF6347, #FF1493) 1; }
}

/* 白背景カードの視認性向上 */
.white-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* 白文字の視認性向上 */
.white-text {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 600;
}

/* 強化されたボタンスタイル */
.aggressive-button {
    background: linear-gradient(135deg, #FF1493, #FF4500, #FFD700);
    background-size: 200% 200%;
    animation: buttonGradient 3s ease infinite;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.aggressive-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.aggressive-button:hover::before {
    left: 100%;
}

/* 新しいアニメーション効果 */
.shake-animation {
    animation: shake 0.8s ease-in-out infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.rotate-animation {
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.bold-outline {
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        0 0 10px rgba(255, 255, 255, 0.8);
}

/* ヒーローセクションカードの背景保証 */
.hero-card {
    background: linear-gradient(135deg, var(--tw-gradient-from), var(--tw-gradient-to)) !important;
    position: relative;
    z-index: 10;
}

.hero-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    border-radius: 1rem;
    z-index: -1;
}

/* 強制的な色指定 */
.hero-card-sales {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
}

.hero-card-marketing {
    background: linear-gradient(135deg, #16a34a, #15803d) !important;
}

.hero-card-mobile {
    background: linear-gradient(135deg, #eab308, #ca8a04) !important;
}

.hero-card-seo {
    background: linear-gradient(135deg, #f97316, #ea580c) !important;
} 

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    min-height: 300px;
    display: block;
    /* スマホ最適化: タッチ操作のための設定 */
    touch-action: pan-y pinch-zoom;
    -webkit-overflow-scrolling: touch;
}

.carousel-slides {
    position: relative;
    width: 100%;
    min-height: 300px;
    /* スマホ最適化: スムーズなスクロール */
    -webkit-overflow-scrolling: touch;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 300px;
    opacity: 0;
    transition: all 0.5s ease-in-out;
    transform: translateX(100%);
    visibility: hidden;
    /* スマホ最適化: タッチ操作のための設定 */
    touch-action: pan-y pinch-zoom;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
}

.carousel-slide.prev {
    transform: translateX(-100%);
    visibility: visible;
}

/* Carousel Navigation */
.carousel-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.carousel-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    /* スマホ最適化: タッチ操作のための設定 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.carousel-btn:active {
    /* スマホ最適化: タッチ時のフィードバック */
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.8);
}

.carousel-btn i {
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    /* スマホ最適化: タッチ操作のための設定 */
    pointer-events: none;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.indicator {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
    /* スマホ最適化: タッチ操作のための設定 */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.indicator.active {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* スマホ最適化: レスポンシブ調整 */
@media (max-width: 768px) {
    .carousel-container {
        min-height: 250px;
        border-radius: 0.75rem;
    }
    
    .carousel-slides {
        min-height: 250px;
    }
    
    .carousel-slide {
        min-height: 250px;
    }
    
    .carousel-btn {
        width: 3.5rem;
        height: 3.5rem;
        /* スマホ最適化: タッチ領域を大きく */
        min-width: 44px;
        min-height: 44px;
    }
    
    .carousel-btn i {
        font-size: 1.4rem;
    }
    
    .carousel-nav {
        padding: 0 0.5rem;
    }
    
    .indicator {
        width: 0.8rem;
        height: 0.8rem;
        /* スマホ最適化: タッチ領域を大きく */
        min-width: 32px;
        min-height: 32px;
    }
    
    /* スマホ最適化: カルーセル内の画像とテキスト */
    .carousel-slide img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 0.75rem;
    }
    
    .carousel-slide .absolute {
        /* スマホ最適化: オーバーレイテキストの調整 */
        padding: 0.75rem 1rem;
        font-size: 1rem;
        line-height: 1.3;
        max-width: 90%;
        word-wrap: break-word;
    }
}

/* スマホ最適化: さらに小さい画面用 */
@media (max-width: 480px) {
    .carousel-container {
        min-height: 200px;
    }
    
    .carousel-slides {
        min-height: 200px;
    }
    
    .carousel-slide {
        min-height: 200px;
    }
    
    .carousel-btn {
        width: 3rem;
        height: 3rem;
    }
    
    .carousel-btn i {
        font-size: 1.2rem;
    }
    
    .carousel-slide .absolute {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* スマホ最適化: タッチスワイプのためのスタイル */
.carousel-slide.swiping {
    transition: none;
}

.carousel-container.swiping {
    cursor: grabbing;
}

.carousel-container.swiping .carousel-slide {
    transition: none;
}

/* スマホ最適化: タッチフィードバック */
.carousel-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* スマホ最適化: アクセシビリティ */
@media (prefers-reduced-motion: reduce) {
    .carousel-slide {
        transition: opacity 0.3s ease;
    }
    
    .carousel-btn {
        transition: background-color 0.3s ease;
    }
}

/* Auto-play animation */
@keyframes carouselFade {
    0%, 25% { opacity: 1; transform: translateX(0); }
    33%, 100% { opacity: 0; transform: translateX(-100%); }
}

.carousel-slide.auto-play {
    animation: carouselFade 8s infinite;
}

/* シンプルなモーダルスタイル */
#success-modal,
#error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

#success-modal > div,
#error-modal > div {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 28rem;
    margin: 0 1rem;
    position: relative;
}

#success-modal button,
#error-modal button {
    cursor: pointer;
}

/* フォーム送信中のボタンスタイル */
button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* スピナーアニメーション */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* オーバーレイのベース調整 */
.carousel-overlay {
    word-break: keep-all;
    overflow-wrap: anywhere;
}

/* スマホ時に文字を小さくして画像内に収める */
@media (max-width: 768px) {
    .carousel-overlay {
        font-size: 0.95rem !important; /* 約15px */
        line-height: 1.35 !important;
        padding: 0.5rem 0.75rem !important;
        max-width: 88% !important;
        border-width: 1px !important;
    }
    .carousel-overlay strong {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .carousel-overlay {
        font-size: 0.85rem !important; /* 約14px */
        line-height: 1.3 !important;
        padding: 0.4rem 0.6rem !important;
        max-width: 86% !important;
        border-width: 1px !important;
    }
    .carousel-overlay strong {
        font-size: 0.95rem !important;
    }
}