/* ===================================
   投資情報比較サイト - カスタムスタイル
   金融系プロフェッショナルデザイン
   =================================== */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    color: #374151;
    background-color: #f9fafb;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.animate-bounce-in {
    animation: bounce-in 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Smooth Scroll Offset */
.scroll-mt-24 {
    scroll-margin-top: 6rem;
}

/* Typography Enhancements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.text-gradient {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.4);
}

/* Card Styles */
.card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

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

/* Table Enhancements */
#serviceTable {
    border-collapse: separate;
    border-spacing: 0;
}

#serviceTable thead th {
    position: sticky;
    top: 80px;
    z-index: 10;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
}

#serviceTable thead th:hover {
    background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
}

#serviceTable tbody tr {
    transition: all 0.2s ease;
}

#serviceTable tbody tr:hover {
    background-color: #f0fdf4;
    transform: scale(1.01);
}

#serviceTable tbody tr[data-featured="true"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid #fbbf24;
    font-weight: 600;
}

/* Sort Icons */
.fas.fa-sort {
    opacity: 0.5;
    transition: opacity 0.2s;
}

th:hover .fas.fa-sort {
    opacity: 1;
}

/* Fixed CTA Sidebar */
#fixedCTA {
    transition: opacity 0.3s ease;
}

#fixedCTA.visible {
    opacity: 1 !important;
}

/* FAQ Accordion */
.faq-button i {
    transition: transform 0.3s ease;
}

.faq-button.active i {
    transform: rotate(180deg);
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-content.show {
    max-height: 1000px;
}

/* Exit Popup */
#exitPopup {
    backdrop-filter: blur(4px);
}

#exitPopup.show {
    display: flex !important;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* Print Styles */
@media print {
    header, footer, #fixedCTA, #exitPopup {
        display: none !important;
    }
    
    body {
        background: white;
    }
    
    .no-print {
        display: none !important;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #serviceTable {
        font-size: 0.875rem;
    }
    
    #serviceTable thead th,
    #serviceTable tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .text-3xl {
        font-size: 1.875rem;
    }
    
    .text-5xl {
        font-size: 2.5rem;
    }
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Highlight Featured Service */
.featured-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 6px rgba(251, 191, 36, 0.4);
    animation: pulse 2s infinite;
}

/* Smooth Hover Effects */
a, button {
    transition: all 0.3s ease;
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Star Ratings */
.star-rating {
    display: inline-flex;
    gap: 2px;
}

.star-rating .fa-star {
    color: #fbbf24;
}

/* Price Badge */
.price-badge {
    display: inline-block;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Comparison Badge */
.comparison-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-excellent {
    background: #d1fae5;
    color: #065f46;
}

.badge-good {
    background: #dbeafe;
    color: #1e40af;
}

.badge-average {
    background: #fef3c7;
    color: #92400e;
}

.badge-poor {
    background: #fee2e2;
    color: #991b1b;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #10b981 50%, transparent 100%);
    margin: 3rem 0;
}

/* Testimonial Card */
.testimonial {
    background: white;
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.testimonial::before {
    content: '"';
    font-size: 3rem;
    color: #10b981;
    opacity: 0.2;
    line-height: 0;
}

/* Sticky Table Header on Mobile */
@media (max-width: 640px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Icon Badges */
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%);
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Utility Classes */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-lg {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #10b981 0%, #14b8a6 100%) border-box;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Performance Optimizations */
.will-change-transform {
    will-change: transform;
}

.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
}
