/* 
  Withspays Premium Fintech Design System
  Focus: Clean, Modern, Scalable
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700;800&display=swap');

:root {
    /* Color Palette - Light Mode */
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-soft: #eef2ff;
    --secondary: #7c3aed;
    --secondary-hover: #6d28d9;
    --accent: #0ea5e9;
    
    /* Neutral Palette */
    --bg-main: #ffffff;
    --bg-alt: #f1f5f9; /* Slightly more contrast for light theme */
    --text-main: #020617; /* Very dark slate for high depth */
    --text-muted: #475569;
    --text-light: #64748b;
    --border: #e2e8f0;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);
    
    /* Semantic Colors */
    --success: #059669;
    --warning: #d97706;
    --error: #dc2626;

    /* Spacing & Borders */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-premium: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Hero Specific Assets */
    --hero-bg-filter: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

@keyframes float-slow {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Loading Overlay */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid var(--primary-soft);
    border-bottom-color: var(--primary);
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

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

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.flex {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Typography Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-muted { color: var(--text-muted); }

/* Components: Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary-soft);
    transform: translateY(-2px);
}

/* Components: Cards */
.card {
    background: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary);
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

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

@keyframes float-slow {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-1deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Hero Section Refinements */
.hero {
    position: relative;
    padding: 10rem 0 8rem;
    overflow: hidden;
    background: var(--bg-main);
}

.hero-visual-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.6;
    pointer-events: none;
}

.hero-visual-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-bg-filter);
    z-index: 1;
}

.floating-asset {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.1));
}

.asset-card {
    top: 20%;
    right: 5%;
    width: 280px;
    animation: float 6s ease-in-out infinite;
}

.asset-popup {
    bottom: 25%;
    left: 8%;
    width: 220px;
    animation: float-slow 8s ease-in-out infinite;
}

@media (max-width: 1200px) {
    .floating-asset {
        display: none;
    }
}

.hero .container {
    position: relative;
    z-index: 10;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-alt);
    color: var(--text-main);
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Unified Recharge Section Specifics */
.recharge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
}

.recharge-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    background: var(--bg-alt);
    cursor: pointer;
    transition: var(--transition);
}

.recharge-item:hover, .recharge-item.active {
    background: var(--primary-soft);
    color: var(--primary);
}

.recharge-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--bg-alt);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
}

.footer-col h4 {
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

/* Dark Mode Toggle Placeholder (Not active) */
.theme-toggle {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

/* Animations */
[data-aos] {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .footer-grid { grid-template-columns: 1fr; }
    .section { padding: 4rem 0; }
}

/* Staggered Animations */
.stagger-grid [data-aos] {
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-grid [data-aos]:nth-child(2) { transition-delay: 0.1s; }
.stagger-grid [data-aos]:nth-child(3) { transition-delay: 0.2s; }
.stagger-grid [data-aos]:nth-child(4) { transition-delay: 0.3s; }

/* Image Containers */
.img-container {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.img-container:hover img {
    transform: scale(1.05);
}

/* Service Card Image Styles */
.card-img-top {
    width: 100%;
    height: 180px;
    margin-bottom: 1.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-alt);
}

.card-img-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
