/* ==========================================================================
   COPOLIA Landing Page - Custom Styles
   ========================================================================== */

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */
:root {
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #14b8a6 50%, #059669 100%);
    --gradient-secondary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow-color: rgba(16, 185, 129, 0.15);
}

.dark {
    --glass-bg: rgba(17, 24, 39, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(16, 185, 129, 0.1);
}

/* ==========================================================================
   Base Styles
   ========================================================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection styling */
::selection {
    background-color: rgba(16, 185, 129, 0.3);
    color: inherit;
}

/* ==========================================================================
   Typography
   ========================================================================== */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==========================================================================
   Glass Morphism
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.glass-card-strong {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.dark .glass-card-strong {
    background: rgba(17, 24, 39, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Background Patterns
   ========================================================================== */
.bg-grid-pattern {
    background-image:
        linear-gradient(rgba(16, 185, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ==========================================================================
   Animations
   ========================================================================== */

/* Float animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 8s ease-in-out infinite;
    animation-delay: 2s;
}

/* Bounce slow */
@keyframes bounce-slow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-bounce-slow {
    animation: bounce-slow 3s ease-in-out infinite;
}

/* Pulse slow */
@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Fade in up */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Fade in left */
@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-fade-in-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

/* Animation delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* ==========================================================================
   Scroll Reveal Animations
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered reveal delays */
.reveal.delay-100,
.reveal-left.delay-100,
.reveal-right.delay-100 {
    transition-delay: 0.1s;
}

.reveal.delay-200,
.reveal-left.delay-200,
.reveal-right.delay-200 {
    transition-delay: 0.2s;
}

.reveal.delay-300,
.reveal-left.delay-300,
.reveal-right.delay-300 {
    transition-delay: 0.3s;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
#header {
    transition: all 0.3s ease;
}

#header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.dark #header.scrolled {
    background: rgba(17, 24, 39, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Navigation link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #10b981, #14b8a6);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* ==========================================================================
   Button Styles
   ========================================================================== */
.btn-primary {
    background: var(--gradient-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-color);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.btn-secondary {
    background: transparent;
    border: 2px solid #10b981;
    color: #10b981;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #10b981;
    color: white;
    transform: translateY(-2px);
}

/* ==========================================================================
   Card Hover Effects
   ========================================================================== */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .card-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-item {
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    cursor: pointer;
}

.faq-question i {
    transition: transform 0.3s ease;
}

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

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

.faq-item.active .faq-answer {
    max-height: 500px;
}

/* ==========================================================================
   Form Styles
   ========================================================================== */
input:focus {
    outline: none;
}

input::placeholder {
    color: inherit;
    opacity: 0.6;
}

/* Autofill styles */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.1) inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* ==========================================================================
   Gradient Animations
   ========================================================================== */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
}

/* ==========================================================================
   Shimmer Effect
   ========================================================================== */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */
::-webkit-scrollbar {
    width: 10px;
}

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

.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #10b981, #059669);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #059669, #047857);
}

/* ==========================================================================
   Mobile Menu Animation
   ========================================================================== */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block;
}

/* ==========================================================================
   Icon Animations
   ========================================================================== */
.icon-spin {
    transition: transform 0.3s ease;
}

.icon-spin:hover {
    transform: rotate(15deg);
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .glass-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .reveal,
    .reveal-left,
    .reveal-right {
        transform: translateY(20px);
    }

    .reveal-left,
    .reveal-right {
        transform: translateY(20px);
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .no-print {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .glass-card {
        background: white !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus styles for keyboard navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-balance {
    text-wrap: balance;
}

.transition-smooth {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hide scrollbar but keep functionality */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

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

.dark .skeleton {
    background: linear-gradient(
        90deg,
        #374151 25%,
        #4b5563 50%,
        #374151 75%
    );
    background-size: 200% 100%;
}

/* ==========================================================================
   Notification Badge Pulse
   ========================================================================== */
@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.badge-pulse {
    animation: badge-pulse 2s ease-in-out infinite;
}

/* ==========================================================================
   Hero Section Enhancements
   ========================================================================== */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ==========================================================================
   Pricing Card Glow
   ========================================================================== */
.pricing-glow {
    position: relative;
}

.pricing-glow::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #10b981, #14b8a6, #10b981);
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pricing-glow:hover::before {
    opacity: 1;
}

/* ==========================================================================
   Testimonial Card Quotes
   ========================================================================== */
.testimonial-quote::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 80px;
    font-family: Georgia, serif;
    color: rgba(16, 185, 129, 0.1);
    line-height: 1;
}

/* ==========================================================================
   Counter Animation (for stats)
   ========================================================================== */
.counter {
    display: inline-block;
}

/* ==========================================================================
   Tooltip Styles
   ========================================================================== */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 8px 12px;
    background: #1f2937;
    color: white;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 100;
}

.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* ==========================================================================
   Star Rating Animation
   ========================================================================== */
.star-rating i {
    transition: transform 0.2s ease;
}

.star-rating i:hover {
    transform: scale(1.2);
}

/* ==========================================================================
   Section Dividers
   ========================================================================== */
.section-divider {
    position: relative;
    overflow: hidden;
}

.section-divider::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(16, 185, 129, 0.3),
        transparent
    );
}
