/* SubscriptionMonkey Custom Styles */

/* Google Sans for all headings */
h1, h2, h3, h4, h5, h6, .font-bold, .font-semibold {
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* FAQ Styles */
.faq-item {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow, background;
    cursor: pointer;
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.15);
    background: rgba(255, 107, 53, 0.02);
}

.faq-button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: background;
    cursor: pointer;
    pointer-events: none; /* Let the parent handle hover */
}

.faq-button:focus {
    outline: none;
    ring: 2px;
    ring-color: rgba(255, 107, 53, 0.3);
    pointer-events: auto;
}

.faq-content {
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: max-height, opacity, transform;
    opacity: 0;
    transform: translateY(-15px);
}

.faq-content.faq-open {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.faq-icon {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

.faq-icon i {
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform, color;
    display: inline-block;
}

.faq-active {
    background: linear-gradient(135deg, #fff8f5 0%, #ffffff 100%);
    border: 1px solid #ffede5;
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.2);
}

.faq-active .faq-button {
    background: transparent;
}

.faq-active .faq-button:hover {
    background: rgba(255, 107, 53, 0.03);
}

/* Smooth hover anticipation */
.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 1rem;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 107, 53, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.faq-item:hover::before {
    opacity: 1;
}

/* Enhanced mobile touch experience */
@media (hover: none) {
    .faq-item:hover {
        transform: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    }

    .faq-button {
        pointer-events: auto;
    }
}

/* Performance optimizations */
.faq-item * {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Smooth scrolling for the entire page */
html {
    scroll-behavior: smooth;
}

/* Enhanced smooth animations */
@media (prefers-reduced-motion: no-preference) {
    .faq-item {
        transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .faq-content {
        transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    .faq-icon i {
        transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    }
}

/* Add subtle entrance animation */
.faq-item {
    animation: fadeInUp 0.6s ease-out backwards;
}

.faq-item:nth-child(1) { animation-delay: 0.1s; }
.faq-item:nth-child(2) { animation-delay: 0.2s; }
.faq-item:nth-child(3) { animation-delay: 0.3s; }
.faq-item:nth-child(4) { animation-delay: 0.4s; }
.faq-item:nth-child(5) { animation-delay: 0.5s; }

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

/* GPU acceleration for better performance */
.faq-content,
.faq-icon,
.faq-button {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

/* Counter Animation Styles */
.stat-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.15);
}

/* Reusable glow hover effect */
.glow-card {
    background-color: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                background-color 0.3s ease;
    will-change: transform, box-shadow;
}

.glow-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(255, 107, 53, 0.18), 0 8px 22px rgba(15, 23, 42, 0.08);
    background-color: rgba(255, 107, 53, 0.035);
    border-color: rgba(255, 107, 53, 0.32);
}

.counter {
    display: inline-block;
    font-variant-numeric: tabular-nums;
    transition: all 0.3s ease;
    will-change: contents;
}

.counter.animated {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Entrance animation for stat cards */
.stat-card {
    animation: slideInUp 0.8s ease-out backwards;
}

.stat-card:nth-child(1) { animation-delay: 0.2s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.6s; }

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

/* Logo Carousel Styles */
.logo-carousel-container {
    overflow: hidden !important;
    position: relative;
    width: 100%;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 3rem 0;
}

.logo-carousel {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 4rem !important;
    animation: slideLeft 30s linear infinite !important;
    width: max-content !important;
    transform: translateZ(0);
    will-change: transform;
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
}

.logo-carousel:hover {
    animation-play-state: paused;
}

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

/* Add smooth edges */
.logo-carousel-container::before,
.logo-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 10;
    pointer-events: none;
}

.logo-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, white, transparent);
}

.logo-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, white, transparent);
}

/* Logo item styles */
.logo-item {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: inline-flex !important;
    min-width: 180px !important;
    height: 64px !important;
    align-items: center !important;
    justify-content: center !important;
    filter: grayscale(1);
}

/* Logo hover effects */
.logo-carousel > div {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    display: inline-flex !important;
    min-width: 180px !important;
    height: 64px !important;
    align-items: center !important;
    justify-content: center !important;
    filter: grayscale(1);
}

.logo-carousel > div:hover {
    transform: scale(1.1);
    filter: grayscale(0) brightness(1.1);
}

/* Remove duplicate pseudo-elements */

/* Integration category hover effects */
.integration-category {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, box-shadow;
}

.integration-category:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.1);
}

/* Responsive carousel */
@media (max-width: 768px) {
    .logo-carousel {
        animation-duration: 20s;
    }

    .logo-carousel > div {
        min-width: 120px;
    }

    .logo-carousel-container::before,
    .logo-carousel-container::after {
        width: 40px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .logo-carousel {
        animation: none;
    }

    .logo-carousel:hover {
        animation: none;
    }
}

/* Header scroll effects */
header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    transition: transform 0.3s ease !important;
    will-change: transform;
    background: rgba(255, 255, 255, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(0) !important;
}

header.header-hidden {
    transform: translateY(-100%) !important;
}

header.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 107, 53, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Ensure body content doesn't go under fixed header */
body {
    padding-top: 85px;
}

/* Smooth header logo scaling */
header .logo-container {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

header.header-scrolled .logo-container img {
    height: 2rem;
}

header.header-scrolled .logo-container h1 {
    font-size: 1.25rem;
}

/* Custom CSS variables for theming */
:root {
    --monkey-orange: #ff6b35;
    --monkey-orange-hover: #e55a2b;
    --monkey-dark: #2a2a2a;
    --monkey-light: #f8f9fa;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced button styles */
.btn-primary {
    background: linear-gradient(135deg, var(--monkey-orange), #f7931e);
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
}

/* Enhanced gradient text */
.gradient-text {
    background: linear-gradient(135deg, #ff6b35, #f7931e, #ff8c42);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradient-shift 3s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Hero section enhancements */
.hero-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #ff6b35 100%);
    background-size: 300% 300%;
    animation: gradient-move 8s ease infinite;
    position: relative;
    overflow: hidden;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

@keyframes gradient-move {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Enhanced float animation */
.float-animation {
    animation: float 3s ease-in-out infinite;
    transition: var(--transition-smooth);
}

.float-animation:hover {
    animation-play-state: paused;
    transform: translateY(-10px) scale(1.05);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-5px) rotate(1deg);
    }
    66% {
        transform: translateY(-8px) rotate(-1deg);
    }
}

/* Card enhancements */
.feature-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition-smooth);
}

.feature-card:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--monkey-orange);
}

/* Loading states */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

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

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

/* Accessibility improvements */
.using-keyboard *:focus {
    outline: 2px solid var(--monkey-orange);
    outline-offset: 2px;
}

/* Dark theme support */
.dark-theme {
    background-color: var(--monkey-dark);
    color: white;
}

.dark-theme .bg-white {
    background-color: #1a1a1a;
}

.dark-theme .text-gray-600 {
    color: #a0a0a0;
}

.dark-theme .border-gray-200 {
    border-color: #333;
}

/* Scroll indicators */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--monkey-orange);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 1000;
    transition: transform 0.1s ease-out;
}

/* Image loading states */
img {
    transition: opacity 0.3s ease;
    opacity: 0;
}

img.loaded {
    opacity: 1;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--monkey-orange);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--monkey-orange-hover);
}

/* Stats animation enhancement */
.stats-counter {
    font-variant-numeric: tabular-nums;
    transition: var(--transition-smooth);
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .hero-bg {
        background-attachment: scroll;
    }

    .float-animation {
        animation: none;
    }

    .text-5xl {
        font-size: 2.5rem;
    }
}

/* Print styles */
@media print {
    .hero-bg {
        background: none;
        color: black;
    }

    .float-animation {
        animation: none;
    }

    button {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .gradient-text {
        background: none;
        -webkit-text-fill-color: initial;
        color: var(--monkey-orange);
        font-weight: bold;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .float-animation,
    .gradient-text {
        animation: none;
    }

    * {
        transition: none !important;
    }
}
