/**
 * Rig-LMS Homepage Styles
 * Modern, premium design with glassmorphism, gradients, and smooth animations
 * Following priority: Good design > Simple code > Performance
 */

/* ===================================
   CSS Variables & Root Styles
   =================================== */
:root {
    /* Color Palette */
    --primary: #4F46E5;
    --primary-dark: #3730A3;
    --primary-light: #818CF8;
    --secondary: #7C3AED;
    --secondary-dark: #5B21B6;
    --accent: #F59E0B;
    --accent-dark: #D97706;
    --success: #10B981;
    --success-dark: #059669;
    --dark: #1F2937;
    --dark-light: #374151;
    --light: #F3F4F6;
    --light-dark: #E5E7EB;
    --white: #FFFFFF;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, #EF4444 100%);
    --gradient-success: linear-gradient(135deg, var(--success) 0%, #3B82F6 100%);
    --gradient-dark: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 20px rgba(79, 70, 229, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   Navigation Bar
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(79, 70, 229, 0.1);
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.logo-img {
    width: 50px;
    height: 50px;
    transition: transform var(--transition-normal);
}

.logo-img:hover {
    transform: rotate(10deg) scale(1.05);
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

.logo-highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: var(--spacing-xs) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width var(--transition-normal);
}

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

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

.nav-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-hero-primary,
.btn-hero-secondary,
.btn-modal-submit {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

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

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

/* Login Button */
.btn-login {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    background: var(--gradient-success);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); REMOVED: Using video background */
    overflow: hidden;
}

/* Video Background */
.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 0;
}

/* Particles Background */
#particles-js {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
}

.btn-hero-primary {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-xl);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-hero-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: var(--shadow-xl), 0 0 30px rgba(255, 255, 255, 0.5);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
    font-size: 1.1rem;
    padding: 1rem 2rem;
}

.btn-hero-secondary:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-stat-item i {
    font-size: 1.2rem;
    color: var(--accent);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* ===================================
   Section Styles
   =================================== */
.explainer-section,
.features-section,
.stats-section,
.benefits-section {
    padding: var(--spacing-xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.15rem;
    color: var(--dark-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================
   Workflow Animation Section
   =================================== */
.explainer-section {
    background: var(--light);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.section-bg-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    filter: blur(50px);
    z-index: -1;
    animation: floatShape 20s infinite linear;
}

.shape-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: var(--primary);
    animation-duration: 25s;
    animation-delay: -5s;
}

.shape-2 {
    bottom: 10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: var(--secondary);
    animation-duration: 30s;
    animation-delay: -2s;
}

.shape-3 {
    top: 40%;
    right: 20%;
    width: 300px;
    height: 300px;
    background: var(--accent);
    animation-duration: 35s;
    animation-delay: -8s;
    opacity: 0.08;
}

.shape-4 {
    bottom: -10%;
    left: 20%;
    width: 400px;
    height: 400px;
    background: var(--success);
    animation-duration: 40s;
    animation-delay: -12s;
}

.shape-5 {
    top: 20%;
    left: 40%;
    width: 200px;
    height: 200px;
    background: #EF4444;
    animation-duration: 45s;
    animation-delay: -15s;
    opacity: 0.05;
}

@keyframes floatShape {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -50px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }

    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

.workflow-animation {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-lg);
}

.workflow-svg {
    width: 100%;
    height: auto;
    max-height: 500px;
}

.step-circle {
    fill: url(#primaryGrad);
    filter: drop-shadow(0 4px 10px rgba(79, 70, 229, 0.3));
}

.step-1 {
    fill: #4F46E5;
}

.step-2 {
    fill: #7C3AED;
}

.step-3 {
    fill: #F59E0B;
}

.step-4 {
    fill: #10B981;
}

.step-icon {
    font-size: 48px;
    text-anchor: middle;
    dominant-baseline: middle;
}

.step-label {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    fill: var(--dark);
    text-anchor: middle;
}

.step-desc {
    font-size: 14px;
    fill: var(--dark-light);
    text-anchor: middle;
}

.arrow-line {
    stroke: var(--primary);
    stroke-width: 3;
    fill: none;
    stroke-dasharray: 140;
    stroke-dashoffset: 140;
}

.arrow-head {
    fill: var(--primary);
}

/* ===================================
   Features Grid
   =================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-md);
}

.feature-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 2px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: var(--radius-md);
    background: var(--gradient-primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-normal);
}

.feature-icon-accent {
    background: var(--gradient-accent);
}

.feature-icon-success {
    background: var(--gradient-success);
}

.feature-card:hover .feature-icon {
    transform: rotate(10deg) scale(1.1);
    box-shadow: var(--shadow-glow);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.feature-description {
    color: var(--dark-light);
    margin-bottom: var(--spacing-sm);
    line-height: 1.7;
}

.feature-list {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--dark-light);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.feature-list i {
    color: var(--success);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* ===================================
   Stats Section
   =================================== */
.stats-section {
    position: relative;
    background: var(--gradient-primary);
    color: var(--white);
}

.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.stats-section .section-title,
.stats-section .section-subtitle {
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    position: relative;
    z-index: 1;
}

.stat-card {
    text-align: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--accent);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.stat-number::after {
    content: '+';
    margin-left: 0.2rem;
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-xs);
}

.stat-desc {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ===================================
   Benefits Section
   =================================== */
.benefits-section {
    background: var(--light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.benefit-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.benefit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.benefit-card:hover::before {
    transform: scaleX(1);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.benefit-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: var(--spacing-sm);
    opacity: 0.3;
}

.benefit-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
}

.benefit-text {
    color: var(--dark-light);
    line-height: 1.8;
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--dark);
    color: var(--light);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.footer-logo img {
    width: 50px;
    height: 50px;
}

.footer-logo h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.footer-desc {
    color: var(--light-dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-section h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.footer-links,
.footer-contact {
    list-style: none;
}

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

.footer-links a {
    color: var(--light-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-contact li {
    color: var(--light-dark);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.footer-contact i {
    color: var(--primary-light);
    margin-top: 0.25rem;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-dark);
}

/* ===================================
   Modals
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--transition-fast);
}

.modal.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: slideUp var(--transition-normal);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--dark-light);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--primary);
    transform: rotate(90deg);
}

/* Specific positioning for styled modals */
.modal-error .modal-close,
.modal-success .modal-close {
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.modal-error .modal-close:hover {
    color: #EF4444;
    background: #FFF;
}

.modal-success .modal-close:hover {
    color: var(--success);
    background: #FFF;
}

.modal-header {
    text-align: center;
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-sm);
}

.modal-icon {
    font-size: 4rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-sm);
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-xs);
}

.modal-header p {
    color: var(--dark-light);
    font-size: 1rem;
}

.modal-form {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.form-group label i {
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--light-dark);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.btn-modal-submit {
    width: 100%;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 1rem;
    font-size: 1rem;
    margin-top: var(--spacing-sm);
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.btn-modal-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

/* Success Modal */
.modal-success {
    border-top: 5px solid var(--success);
}

.modal-success .modal-header {
    padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-md);
}

.success-animation {
    font-size: 5rem;
    color: var(--success);
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(16, 185, 129, 0.3));
    animation: successPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes successPop {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.2) rotate(10deg);
    }

    100% {
        transform: scale(1) rotate(0);
        opacity: 1;
    }
}

.modal-success h2 {
    color: var(--dark);
    font-weight: 800;
}

.modal-success p {
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 80%;
    margin: 0 auto;
    color: var(--dark-light);
}

/* Login Modal Specific Styles */
.modal-login .modal-header {
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-sm);
}

.login-icon-wrapper {
    display: inline-block;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.login-icon-wrapper .modal-icon {
    font-size: 5rem;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Password Wrapper */
.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--dark-light);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.password-toggle:hover {
    color: var(--primary);
}

/* Input Hints */
.input-hint {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    color: var(--dark-light);
    margin-top: 0.5rem;
}

.input-hint i {
    font-size: 0.75rem;
    color: var(--primary);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
    accent-color: var(--success);
}

.checkbox-label span {
    color: var(--dark);
}

/* Modal Footer */
.modal-footer {
    padding: 0 var(--spacing-md) var(--spacing-md);
    text-align: center;
}

.help-text {
    font-size: 0.9rem;
    color: var(--dark-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.help-text i {
    color: var(--primary);
}

.help-text a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--transition-fast);
}

.help-text a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Error Modal Styles */
/* Error Modal Styles */
.modal-error {
    border-top: 5px solid #EF4444;
}

.modal-error .modal-header {
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-sm);
}

.error-animation {
    font-size: 4.5rem;
    color: #EF4444;
    animation: errorShake 0.6s ease;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 6px rgba(239, 68, 68, 0.2));
}

@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.error-details {
    padding: 0 var(--spacing-md) var(--spacing-md);
}

.error-hint {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: #FFFBEB;
    /* Amber-50 */
    border: 1px solid #FCD34D;
    /* Amber-300 */
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
}

.error-hint i {
    font-size: 1.25rem;
    color: #D97706;
    /* Amber-600 */
    font-weight: bold;
    margin-top: 2px;
}

.error-hint h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: #92400E;
    /* Amber-800 */
    margin-bottom: 0.25rem;
}

.error-hint p {
    font-size: 0.9rem;
    color: #92400E;
    line-height: 1.5;
    margin: 0;
}

.error-tips {
    padding: 1rem;
    background: #F3F4F6;
    /* Gray-100 */
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.error-tips h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--dark-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-tips li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.35rem 0;
    color: var(--dark-light);
    font-size: 0.9rem;
}

.error-tips li i {
    color: var(--success);
    font-size: 0.85rem;
}

/* Button Modifiers */
.btn-try-again {
    background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.1), 0 2px 4px -1px rgba(220, 38, 38, 0.06);
}

.btn-try-again:hover {
    background: linear-gradient(135deg, #DC2626 0%, #B91C1C 100%);
    box-shadow: 0 10px 15px -3px rgba(220, 38, 38, 0.1), 0 4px 6px -2px rgba(220, 38, 38, 0.05);
}

.btn-success-action {
    background: var(--gradient-success);
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.1), 0 2px 4px -1px rgba(16, 185, 129, 0.06);
}

.btn-success-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.1), 0 4px 6px -2px rgba(16, 185, 129, 0.05);
}

/* Loading State for Login Button */
.btn-modal-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-modal-submit.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}


/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        position: relative;
        z-index: 2005;
        /* Ensure above fixed menu overlays */
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        /* Full height minus header */
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: var(--spacing-md);
        padding-bottom: 250px;
        /* Ensure space for bottom buttons */
        overflow-y: auto;
        /* Scrollable if content overflows */
        box-shadow: var(--shadow-lg);
        transition: left var(--transition-normal);
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-actions {
        flex-direction: column;
        width: 100%;
        position: fixed;
        top: auto;
        /* Reset top */
        bottom: 0;
        /* Anchor to bottom */
        left: -100%;
        padding: var(--spacing-md);
        background: var(--white);
        box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
        /* Top shadow for separation */
        transition: left var(--transition-normal);
        max-height: 250px;
        z-index: 1001;
        /* Above menu */
    }

    .nav-actions.active {
        left: 0;
    }

    .nav-actions button {
        width: 100%;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .features-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

    .hero {
        padding: 6rem 1rem 3rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Mobile Modal Optimizations */
    .modal-content {
        width: 95%;
        margin: 1rem;
        max-height: 85vh;
    }

    .modal-header {
        padding: var(--spacing-md) var(--spacing-sm) var(--spacing-xs);
    }

    .modal-form {
        padding: 0 var(--spacing-sm) var(--spacing-md);
    }

    .modal-footer {
        padding: 0 var(--spacing-sm) var(--spacing-md);
    }

    /* Adjust close button for tight spaces */
    .modal-close {
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        /* Larger touch target */
        height: 36px;
    }

    .modal-error .modal-close,
    .modal-success .modal-close {
        top: 0.5rem;
        right: 0.5rem;
    }

    /* Ensure buttons are easy to tap */
    .btn-modal-submit,
    .btn-login,
    .btn-primary,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        /* Larger vertical padding */
        min-height: 48px;
        /* standard minimum touch target */
    }

    /* Reduce animation sizes */
    .error-animation,
    .success-animation,
    .modal-icon {
        font-size: 3.5rem;
    }
}

/* ===================================
   Zigzag Workflow Layout
   =================================== */
.workflow-zigzag-container {
    padding: var(--spacing-sm) 0;
    /* Reduced from md */
    display: flex;
    flex-direction: column;
    gap: 0;
    /* Removed gap entirely */
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

/* Central Connecting Line */
.workflow-zigzag-container::before {
    content: '';
    position: absolute;
    top: 2rem;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    background-image: linear-gradient(to bottom, var(--primary) 50%, transparent 50%);
    background-size: 2px 20px;
    /* Dashed effect */
    z-index: 0;
    opacity: 0.5;
}

.workflow-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
    /* Reduced from lg */
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.workflow-row.aos-animate {
    opacity: 1;
    transform: translateY(0);
}


.workflow-content {
    flex: 1;
    padding: var(--spacing-md);
}

.step-badge {
    display: inline-block;
    background: var(--gradient-primary);
    color: var(--white);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-md);
}

.workflow-content h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: var(--spacing-sm);
    line-height: 1.3;
}

.workflow-content p {
    color: var(--dark-light);
    font-size: 1.05rem;
    line-height: 1.7;
}

.workflow-image-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: var(--spacing-md);
}

.workflow-image-wrapper img {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transition: transform var(--transition-normal);
}

.workflow-image-wrapper:hover img {
    transform: scale(1.02);
}

/* Center Nodes */
.workflow-row {
    position: relative;
    /* Ensure rows are relative for absolute nodes */
    overflow: visible;
}

.workflow-row::after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: var(--white);
    border: 4px solid var(--primary);
    border-radius: 50%;
    z-index: 100;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {

    .workflow-zigzag-container::before {
        display: none;
    }

    .workflow-row::after {
        display: none;
    }

    .workflow-row,
    .workflow-row.row-reverse {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .workflow-content {
        order: 2;
        /* Text below image on mobile implies Step 1 -> Image -> Text */
        /* Better: Text above? Let's keep Text below image for visual flow? 
                     Actually standard mobile flow is usually Image then Text or Text then Image consistently.
                     Let's make Image first then Text for all.
                  */
    }

    .workflow-image-wrapper {
        order: 1;
        width: 100%;
    }

    .workflow-row.row-normal .workflow-image-wrapper {
        order: 1;
    }

    .workflow-row.row-normal .workflow-content {
        order: 2;
    }

    .workflow-row.row-reverse .workflow-image-wrapper {
        order: 1;
    }

    .workflow-row.row-reverse .workflow-content {
        order: 2;
    }

    .workflow-content h3 {
        font-size: 1.5rem;
    }
}