/* ============================================
   CiroPAY Theme — Animations & Enhancements
   ============================================ */

/* ===== Animation Keyframes ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 20px 60px rgba(26,86,219,0.3); }
    50%      { box-shadow: 0 20px 80px rgba(26,86,219,0.5); }
}

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

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-10deg) scale(0.9); }
    to   { opacity: 1; transform: rotate(0) scale(1); }
}

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

@keyframes bounceSlow {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

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

@keyframes pulseRing {
    0%   { box-shadow: 0 0 0 0 rgba(26,86,219,0.4); }
    70%  { box-shadow: 0 0 0 20px rgba(26,86,219,0); }
    100% { box-shadow: 0 0 0 0 rgba(26,86,219,0); }
}

/* ===== Logo Enhancement ===== */
.header-logo {
    transition: transform 0.3s ease, filter 0.3s ease !important;
}
.header-logo:hover {
    filter: brightness(1.4) drop-shadow(0 0 10px rgba(59,130,246,0.5)) !important;
    transform: scale(1.03);
}

/* ===== Icon Fix - Ensure las/lar/lab icons show as FA ===== */
.las, .lar, .lab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Brands', sans-serif !important;
}
.las { font-weight: 900 !important; }
.lar { font-weight: 400 !important; }

/* ===== Hero Section ===== */
.hero-section {
    position: relative;
    overflow: hidden;
    padding: 120px 24px 60px;
    background: linear-gradient(135deg, #0b132b 0%, #1a1a3e 40%, #0f172a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Floating gradient orbs */
.hero-section::before {
    content: '';
    position: absolute;
    top: -25%;
    right: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,86,219,0.15) 0%, transparent 70%);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -5%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: float 10s ease-in-out infinite reverse;
}

/* Additional floating particle orbs */
.hero-section .orb-1,
.hero-section .orb-2,
.hero-section .orb-3 {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
.hero-section .orb-1 {
    top: 40%;
    left: 15%;
    width: 120px; height: 120px;
    background: radial-gradient(circle, rgba(6,182,212,0.08) 0%, transparent 70%);
    animation: float 7s ease-in-out infinite;
    animation-delay: -2s;
}
.hero-section .orb-2 {
    bottom: 20%;
    right: 25%;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(26,86,219,0.06) 0%, transparent 70%);
    animation: float 9s ease-in-out infinite;
    animation-delay: -4s;
}
.hero-section .orb-3 {
    top: 60%;
    right: 10%;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    animation-delay: -1s;
}

/* Hero content animation */
.hero-text {
    animation: fadeInLeft 0.8s ease-out;
}

.hero-text h4 {
    background: linear-gradient(135deg, var(--accent), #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out;
}

.hero-text h1 {
    color: #ffffff;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-text p {
    color: #cbd5e1;
    font-size: 1.125rem;
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 36px;
    text-shadow: 0 1px 8px rgba(0,0,0,0.2);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-visual {
    animation: fadeInRight 1s ease-out 0.2s both;
}

/* Card preview with floating animation */
.hero-card-preview {
    animation: float 6s ease-in-out infinite;
    background: linear-gradient(135deg, #1a56db, #7c3aed);
    border-radius: 20px;
    padding: 32px;
    color: #fff;
    box-shadow: 0 20px 60px rgba(26,86,219,0.3), 0 0 0 1px rgba(255,255,255,0.05);
    max-width: 380px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hero-card-preview:hover {
    animation: pulseGlow 2s ease-in-out infinite;
    transform: translateY(-5px);
}

/* ===== Section Scroll Animations ===== */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

section {
    animation: slideInSection 0.8s ease-out both;
}
section:nth-child(1) { animation-delay: 0s; }
section:nth-child(2) { animation-delay: 0.1s; }
section:nth-child(3) { animation-delay: 0.2s; }

/* Card hover animations */
[style*="--bg-card"]:hover,
[style*="background:var(--bg-card)"]:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.1) !important;
}

/* Step cards staggered animation */
.works-section [style*="display:grid"] > div {
    animation: fadeInUp 0.6s ease-out both;
}
.works-section [style*="display:grid"] > div:nth-child(1) { animation-delay: 0.1s; }
.works-section [style*="display:grid"] > div:nth-child(2) { animation-delay: 0.2s; }
.works-section [style*="display:grid"] > div:nth-child(3) { animation-delay: 0.3s; }
.works-section [style*="display:grid"] > div:nth-child(4) { animation-delay: 0.4s; }

/* Testimonial cards staggered */
.testimonial-slider > div,
.testimonials-section [style*="display:grid"] > div {
    animation: scaleIn 0.5s ease-out both;
}
.testimonials-section [style*="display:grid"] > div:nth-child(1) { animation-delay: 0.1s; }
.testimonials-section [style*="display:grid"] > div:nth-child(2) { animation-delay: 0.2s; }
.testimonials-section [style*="display:grid"] > div:nth-child(3) { animation-delay: 0.3s; }

/* Counter section - count-like animation */
.counter-section h3 {
    animation: countUp 0.6s ease-out both;
    animation-delay: 0.3s;
}

/* ===== Header Darker for Contrast ===== */
header {
    background: rgba(11, 19, 43, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

header .nav-menu a {
    color: rgba(255,255,255,0.85) !important;
}

/* Stats bar */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1200px;
    margin: -30px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.hero-stat-card {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.08);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}
.hero-stat-card:nth-child(1) { animation-delay: 0.4s; }
.hero-stat-card:nth-child(2) { animation-delay: 0.5s; }
.hero-stat-card:nth-child(3) { animation-delay: 0.6s; }
.hero-stat-card:hover {
    background: rgba(255,255,255,0.08);
    transform: translateY(-4px);
    border-color: var(--primary);
}

.hero-stat-card h3 {
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
}
.hero-stat-card p {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 4px;
}

/* ===== Button Enhancements ===== */
.btn-primary.btn-lg {
    animation: shimmer 3s linear infinite;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 50%, var(--primary) 100%);
    background-size: 200% 100%;
}

/* ===== Footer - darker to match hero ===== */
.footer-section {
    background: #0b132b !important;
}

/* Ensure content section has bg */
.about-section,
.features-section,
.works-section,
.testimonials-section,
.partners-section,
.blog-section,
.card-preview-section,
.download-section,
.counter-section,
.cta-section {
    position: relative;
}

/* Fix blank white space issue - section background fallback */
.works-section { background: var(--bg-secondary); }
.features-section { background: var(--bg-card); }
.testimonials-section { background: var(--bg-secondary); }
.partners-section { background: var(--bg-card); }
.blog-section { background: var(--bg-primary); }
.card-preview-section { background: var(--bg-card); }
.download-section { background: var(--bg-secondary); }

/* Partner logos hover */
.partners-section div[style*="filter:grayscale(1)"]:hover {
    filter: grayscale(0) !important;
    opacity: 1 !important;
}

/* Nav link colors in dark header */
.nav-menu a {
    color: rgba(255,255,255,0.75) !important;
}
.nav-menu a:hover,
.nav-menu a.active {
    color: #fff !important;
}
.btn-ghost {
    color: rgba(255,255,255,0.8) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.btn-ghost:hover {
    color: #fff !important;
    border-color: rgba(255,255,255,0.5) !important;
    background: rgba(255,255,255,0.06);
}

/* ===== Mobile Toggle — Dark Theme Fix ===== */
.mobile-toggle {
    color: #ffffff !important;
    background: rgba(255,255,255,0.1) !important;
    border-radius: 8px;
    padding: 8px 12px;
    transition: background 0.2s;
}
.mobile-toggle:hover {
    background: rgba(255,255,255,0.18) !important;
}

/* ===== Mobile Dropdown Panel — Dark Theme ===== */
.nav-mobile {
    background: #0b132b !important;
    border-left: 1px solid rgba(255,255,255,0.06) !important;
    box-shadow: -8px 0 40px rgba(0,0,0,0.4) !important;
}
.nav-mobile-close {
    color: #ffffff !important;
}
.nav-mobile a {
    color: rgba(255,255,255,0.85) !important;
    font-size: 1rem;
    font-weight: 500;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.2s;
    display: block;
}
.nav-mobile a:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    text-decoration: none;
}

/* ===== Mobile Overlay ===== */
.mobile-overlay {
    background: rgba(0,0,0,0.6) !important;
    backdrop-filter: blur(4px);
}

/* ===== Auth Pages — Dark Modern Theme ===== */
.auth-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 60px;
    background: linear-gradient(135deg, #0b132b 0%, #1a1a3e 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.auth-page-wrapper::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,86,219,0.12) 0%, transparent 70%);
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.auth-page-wrapper::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: float 10s ease-in-out infinite reverse;
}

.auth-card-modern {
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    width: 100%;
    max-width: 460px;
    padding: 48px 40px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 32px 64px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
    animation: scaleIn 0.6s ease-out;
}

.auth-card-modern .logo {
    text-align: center;
    margin-bottom: 32px;
}
.auth-card-modern .logo img {
    height: 44px;
    filter: brightness(1.2);
}

.auth-card-modern h1 {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
}

.auth-card-modern p.subtitle {
    color: #94a3b8;
    font-size: 0.9375rem;
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.auth-card-modern .form-group {
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

.auth-card-modern .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    margin-bottom: 6px;
}

.auth-card-modern .form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    font-family: var(--font);
    font-size: 0.9375rem;
    color: #fff;
    background: rgba(255,255,255,0.06);
    transition: all 0.25s;
}
.auth-card-modern .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.2);
    background: rgba(255,255,255,0.08);
}
.auth-card-modern .form-control::placeholder {
    color: rgba(255,255,255,0.35);
}

.auth-card-modern .btn-primary {
    width: 100%;
    padding: 16px 32px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 20px rgba(26,86,219,0.3);
    animation: fadeInUp 0.6s ease-out 0.25s both;
}
.auth-card-modern .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(26,86,219,0.4);
}

.auth-card-modern .auth-links {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9375rem;
    color: #94a3b8;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
.auth-card-modern .auth-links a {
    color: var(--accent);
    font-weight: 600;
    transition: color 0.2s;
}
.auth-card-modern .auth-links a:hover {
    color: #38bdf8;
    text-decoration: none;
}

/* Auth page grid fields */
.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 520px) {
    .auth-grid-2 {
        grid-template-columns: 1fr;
    }
    .auth-card-modern {
        padding: 32px 24px;
    }
}

/* ===== Blog Page Enhancements ===== */
.blog-header-section {
    padding: 120px 24px 60px;
    background: linear-gradient(135deg, #0b132b 0%, #1a1a3e 40%, #0f172a 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.blog-header-section::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26,86,219,0.1) 0%, transparent 70%);
    pointer-events: none;
    animation: float 7s ease-in-out infinite;
}

.blog-card-modern {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: fadeInUp 0.6s ease-out both;
}
.blog-card-modern:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.1);
    border-color: rgba(26,86,219,0.15);
}
.blog-card-modern img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card-modern:hover img {
    transform: scale(1.05);
}
.blog-card-modern .card-body {
    padding: 24px;
}

/* ===== Contact Page Enhancements ===== */
.contact-header-section {
    padding: 120px 24px 60px;
    background: linear-gradient(135deg, #0b132b 0%, #1a1a3e 40%, #0f172a 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.contact-header-section::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(124,58,237,0.08) 0%, transparent 70%);
    pointer-events: none;
    animation: float 9s ease-in-out infinite;
}

.contact-info-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    transition: transform 0.3s ease;
    animation: fadeInUp 0.6s ease-out both;
}
.contact-info-card:hover {
    transform: translateY(-4px);
}

.contact-form-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.04);
    border: 1px solid var(--border-light);
    animation: fadeInUp 0.6s ease-out 0.15s both;
}

/* ===== Select/Dropdown in Auth dark forms ===== */
.auth-card-modern select.form-control {
    color: rgba(255,255,255,0.85);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
}
.auth-card-modern select.form-control option {
    background: #1a1a3e;
    color: #fff;
}

/* ===== Responsive ===== */
/* ===== Footer Enhancements ===== */
footer .footer-social a:hover i {
    transition: none !important;
}

footer .footer-col ul li a {
    transition: all 0.3s ease !important;
}

footer .footer-col ul li a:hover {
    padding-left: 6px !important;
    color: var(--primary) !important;
}

/* ===== Step counter badges animation ===== */
.works-section [style*="position:absolute;top:-12px"] {
    animation: pulseRing 2s ease-in-out infinite;
}

.works-section [style*="display:grid"] > div:hover [style*="position:absolute;top:-12px"] {
    animation: none;
    transform: scale(1.1);
}

/* Counter number gradient animation */
.counter-section h3 {
    background-size: 200% auto !important;
}

.counter-section [style*="display:grid"] > div:hover h3 {
    animation: gradientShift 2s ease infinite !important;
}

/* Choose section cards hover effect */
.about-section [style*="display:flex;flex-direction:column;gap:20px"] > div {
    border-left: 3px solid transparent;
}

.about-section [style*="display:flex;flex-direction:column;gap:20px"] > div:hover {
    border-left-color: var(--primary) !important;
}

@media (max-width: 1024px) {
    .works-section [style*="grid-template-columns:repeat"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .counter-section [style*="grid-template-columns:repeat"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .hero-stats { grid-template-columns: 1fr; margin-top: 0; }
    .hero-section { padding: 100px 16px 40px; }
    .hero-text h1 { font-size: 2rem; }
    .hero-text p { font-size: 1rem; }
    [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; gap: 32px !important; }
    .works-section [style*="grid-template-columns:repeat"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .counter-section [style*="grid-template-columns:repeat"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 520px) {
    .works-section [style*="grid-template-columns:repeat"] {
        grid-template-columns: 1fr !important;
    }
    .counter-section [style*="grid-template-columns:repeat"] {
        grid-template-columns: 1fr !important;
    }
}
