/**
 * Pyary Malaysia - Modern Global Styles
 * Version 2.0 - Optimized for Performance & SEO
 * 
 * Table of Contents:
 * 1. CSS Variables
 * 2. Background Elements (Reusable)
 * 3. Section Styles
 * 4. Card & Component Animations
 * 5. Button Styles
 * 6. Stats & Counters
 * 7. Form Styles
 * 8. Responsive Utilities
 */

/* ========================================
   1. CSS VARIABLES
   ======================================== */
:root {
    --animate-duration: 0.6s;
    --animate-delay: 0.1s;
    --transition-base: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-primary: 0 8px 25px rgba(46, 125, 50, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* ========================================
   2. BACKGROUND ELEMENTS (Reusable)
   ======================================== */

/* Section Background Container */
.section-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Circles */
.section-bg-elements .bg-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
}

.section-bg-elements .bg-circle-light {
    border: 1px solid rgba(46, 125, 50, 0.08);
}

.section-bg-elements .bg-circle-dark {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Lines */
.section-bg-elements .bg-line {
    position: absolute;
    height: 1px;
    opacity: 0;
}

.section-bg-elements .bg-line-light {
    background: linear-gradient(90deg, transparent, rgba(46, 125, 50, 0.12), transparent);
}

.section-bg-elements .bg-line-dark {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* Dots */
.section-bg-elements .bg-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0;
}

.section-bg-elements .bg-dot-light {
    background: rgba(46, 125, 50, 0.15);
}

.section-bg-elements .bg-dot-dark {
    background: rgba(255, 255, 255, 0.25);
}

/* Standard Positions */
.bg-pos-1 { top: 10%; left: 5%; }
.bg-pos-2 { top: 30%; right: 8%; }
.bg-pos-3 { bottom: 20%; left: 10%; }
.bg-pos-4 { bottom: 35%; right: 5%; }
.bg-pos-5 { top: 50%; left: 3%; }
.bg-pos-6 { top: 70%; right: 12%; }

/* Circle Sizes */
.bg-circle-sm { width: 150px; height: 150px; }
.bg-circle-md { width: 250px; height: 250px; }
.bg-circle-lg { width: 350px; height: 350px; }

/* Line Widths */
.bg-line-sm { width: 80px; }
.bg-line-md { width: 120px; }
.bg-line-lg { width: 180px; }

/* ========================================
   3. SECTION STYLES
   ======================================== */

/* Section with Background Elements */
.section-modern {
    position: relative;
    overflow: hidden;
}

/* Section Dividers */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 1.5rem;
}

.section-divider .divider-line {
    width: 50px;
    height: 2px;
    background: var(--bs-primary);
    border-radius: 2px;
}

.section-divider .divider-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary);
    color: white;
    border-radius: 50%;
    font-size: 14px;
}

/* Section Headers */
.section-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 18px;
    background: rgba(46, 125, 50, 0.08);
    color: var(--bs-primary);
    font-size: 13px;
    font-weight: 600;
    border-radius: 25px;
    letter-spacing: 0.3px;
    margin-bottom: 1rem;
}

.section-badge i {
    margin-right: 8px;
}

.section-badge-dark {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

/* ========================================
   4. CARD & COMPONENT ANIMATIONS
   ======================================== */

/* Hover Lift Effect */
.hover-lift {
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* Hover Scale Effect */
.hover-scale {
    transition: transform var(--transition-smooth);
}

.hover-scale:hover {
    transform: scale(1.03);
}

/* Card Glow on Hover */
.hover-glow {
    transition: box-shadow var(--transition-smooth);
}

.hover-glow:hover {
    box-shadow: var(--shadow-primary);
}

/* Icon Animations */
.icon-float {
    transition: transform var(--transition-smooth);
}

.hover-lift:hover .icon-float,
.hover-scale:hover .icon-float {
    transform: translateY(-3px);
}

.icon-rotate {
    transition: transform var(--transition-smooth);
}

.hover-lift:hover .icon-rotate {
    transform: rotate(5deg) scale(1.05);
}

/* Image Zoom */
.img-zoom-container {
    overflow: hidden;
}

.img-zoom {
    transition: transform 0.6s ease;
}

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

/* ========================================
   5. BUTTON STYLES
   ======================================== */

/* Modern Button Base */
.btn-modern {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    overflow: hidden;
    transition: all var(--transition-smooth);
    cursor: pointer;
}

.btn-modern .btn-text {
    position: relative;
    z-index: 2;
}

/* Primary Button with Slide Effect */
.btn-modern-primary {
    background: #1a1a1a;
    color: white;
    border: none;
}

.btn-modern-primary .btn-hover-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bs-primary);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    z-index: 1;
}

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

.btn-modern-primary:hover .btn-hover-bg {
    transform: translateX(0);
}

/* Outline Button */
.btn-modern-outline {
    background: transparent;
    color: #1a1a1a;
    border: 2px solid #ddd;
}

.btn-modern-outline:hover {
    border-color: var(--bs-primary);
    color: var(--bs-primary);
    transform: translateY(-2px);
}

/* Light Button (for dark backgrounds) */
.btn-modern-light {
    background: white;
    color: #1a1a1a;
}

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

/* ========================================
   6. STATS & COUNTERS
   ======================================== */

.stats-modern {
    display: flex;
    align-items: center;
    gap: 24px;
}

.stats-modern .stat-item {
    text-align: left;
}

.stats-modern .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stats-modern .stat-suffix {
    font-size: 1rem;
    margin-left: 2px;
}

.stats-modern .stat-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
    opacity: 0.7;
}

.stats-modern .stat-divider {
    width: 1px;
    height: 35px;
    background: currentColor;
    opacity: 0.2;
}

/* ========================================
   7. FORM STYLES
   ======================================== */

.form-modern .form-control,
.form-modern .form-select {
    padding: 14px 18px;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-modern .form-control:focus,
.form-modern .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

.form-modern .form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

/* ========================================
   8. SCROLL INDICATOR
   ======================================== */

.scroll-indicator-modern {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.scroll-indicator-modern .scroll-mouse {
    width: 24px;
    height: 38px;
    border: 2px solid currentColor;
    border-radius: 12px;
    position: relative;
    opacity: 0.5;
}

.scroll-indicator-modern .scroll-wheel {
    width: 3px;
    height: 8px;
    background: var(--bs-primary);
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s ease-in-out infinite;
}

.scroll-indicator-modern .scroll-text {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
}

/* ========================================
   9. ANIMATIONS KEYFRAMES
   ======================================== */

@keyframes scrollWheel {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

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

@keyframes float-horizontal {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(10px); }
}

/* Fade In Animations (CSS only, no JS needed) */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   10. RESPONSIVE UTILITIES
   ======================================== */

@media (max-width: 991.98px) {
    .stats-modern {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .section-bg-elements .bg-circle-lg {
        width: 200px;
        height: 200px;
    }
    
    .hide-mobile-bg .section-bg-elements {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .stats-modern {
        gap: 16px;
    }
    
    .stats-modern .stat-divider {
        height: 25px;
    }
    
    .btn-modern {
        width: 100%;
    }
    
    .section-bg-elements .bg-line,
    .section-bg-elements .bg-dot:nth-child(n+3) {
        display: none;
    }
}

/* ========================================
   11. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* GPU Acceleration for animations */
.hover-lift,
.hover-scale,
.img-zoom,
.btn-modern,
.section-bg-elements .bg-circle,
.section-bg-elements .bg-dot {
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator-modern .scroll-wheel {
        animation: none;
    }
}
