/**
 * Modern UI/UX Enhancements
 * Version 2.0 - Contemporary Design System
 */

/* ========================================
   MODERN COLOR PALETTE
   ======================================== */

:root {
    /* Primary Colors */
    --primary-50: #e3f2fd;
    --primary-100: #bbdefb;
    --primary-200: #90caf9;
    --primary-300: #64b5f6;
    --primary-400: #42a5f5;
    --primary-500: #2196f3;
    --primary-600: #1e88e5;
    --primary-700: #1976d2;
    --primary-800: #1565c0;
    --primary-900: #0d47a1;
    
    /* Neutral Colors */
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    
    /* Semantic Colors */
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --info: #2196f3;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-sunset: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --gradient-ocean: linear-gradient(135deg, #2e3192 0%, #1bffff 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
}

/* ========================================
   MODERN TYPOGRAPHY
   ======================================== */

/* Enhanced Font Stack */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Heading Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-6);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    margin-bottom: var(--space-5);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-4);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: var(--space-3);
}

/* Text Utilities */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-balance {
    text-wrap: balance;
}

.lead-text {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--gray-600);
}

/* ========================================
   MODERN CARDS
   ======================================== */

.modern-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-100);
}

.modern-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.modern-card-header {
    padding: var(--space-6);
    border-bottom: 1px solid var(--gray-100);
}

.modern-card-body {
    padding: var(--space-6);
}

.modern-card-footer {
    padding: var(--space-6);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* Gradient Card */
.gradient-card {
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-lg);
}

.gradient-card h1,
.gradient-card h2,
.gradient-card h3,
.gradient-card h4,
.gradient-card h5,
.gradient-card h6 {
    color: white;
}

/* ========================================
   MODERN BUTTONS
   ======================================== */

.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.5;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-modern:active {
    transform: translateY(0);
}

/* Button Variants */
.btn-primary-modern {
    background: var(--gradient-primary);
    color: white;
}

.btn-outline-modern {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-500);
}

.btn-outline-modern:hover {
    background: var(--primary-500);
    color: white;
}

.btn-ghost-modern {
    background: transparent;
    color: var(--primary-500);
}

.btn-ghost-modern:hover {
    background: var(--primary-50);
}

/* Button Sizes */
.btn-sm-modern {
    padding: var(--space-2) var(--space-4);
    font-size: 0.875rem;
}

.btn-lg-modern {
    padding: var(--space-4) var(--space-8);
    font-size: 1.125rem;
}

/* ========================================
   MODERN FORMS
   ======================================== */

.form-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-group-modern {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-label-modern {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
    letter-spacing: 0.025em;
}

.form-input-modern {
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.form-input-modern:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.form-input-modern::placeholder {
    color: var(--gray-400);
}

/* Floating Label */
.form-floating-modern {
    position: relative;
}

.form-floating-modern input {
    padding-top: var(--space-6);
}

.form-floating-modern label {
    position: absolute;
    top: var(--space-3);
    left: var(--space-4);
    transition: all 0.2s ease;
    pointer-events: none;
    color: var(--gray-500);
}

.form-floating-modern input:focus + label,
.form-floating-modern input:not(:placeholder-shown) + label {
    top: var(--space-2);
    font-size: 0.75rem;
    color: var(--primary-500);
}

/* ========================================
   BADGES & TAGS
   ======================================== */

.badge-modern {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-primary {
    background: var(--primary-100);
    color: var(--primary-700);
}

.badge-success {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-warning {
    background: #fff3e0;
    color: #e65100;
}

.badge-error {
    background: #ffebee;
    color: #c62828;
}

/* ========================================
   MODERN NAVBAR
   ======================================== */

.navbar-modern {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-100);
    box-shadow: var(--shadow-sm);
}

.navbar-modern .nav-link {
    font-weight: 500;
    color: var(--gray-700);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.navbar-modern .nav-link:hover {
    background: var(--gray-50);
    color: var(--primary-500);
}

.navbar-modern .nav-link.active {
    background: var(--primary-50);
    color: var(--primary-600);
}

/* ========================================
   SECTION HEADERS
   ======================================== */

.section-header-modern {
    text-align: center;
    margin-bottom: var(--space-12);
}

.section-subtitle {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-500);
    margin-bottom: var(--space-2);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-4);
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Decorative Line */
.section-divider-modern {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    margin: var(--space-4) auto;
}

/* ========================================
   MODERN GRID LAYOUTS
   ======================================== */

.grid-modern {
    display: grid;
    gap: var(--space-6);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* ========================================
   MODERN IMAGES
   ======================================== */

.img-modern {
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.img-modern:hover {
    box-shadow: var(--shadow-xl);
    transform: scale(1.02);
}

/* Image Overlay */
.img-overlay-modern {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.img-overlay-modern::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.img-overlay-modern:hover::after {
    opacity: 1;
}

/* ========================================
   MODERN ALERTS
   ======================================== */

.alert-modern {
    padding: var(--space-4) var(--space-6);
    border-radius: var(--radius-lg);
    border-left: 4px solid;
    display: flex;
    align-items: start;
    gap: var(--space-3);
}

.alert-success-modern {
    background: #e8f5e9;
    border-color: var(--success);
    color: #2e7d32;
}

.alert-warning-modern {
    background: #fff3e0;
    border-color: var(--warning);
    color: #e65100;
}

.alert-error-modern {
    background: #ffebee;
    border-color: var(--error);
    color: #c62828;
}

.alert-info-modern {
    background: #e3f2fd;
    border-color: var(--info);
    color: #1565c0;
}

/* ========================================
   MODERN FOOTER
   ======================================== */

.footer-modern {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: var(--space-16) 0 var(--space-8);
}

.footer-modern h5 {
    color: white;
    font-size: 1.125rem;
    margin-bottom: var(--space-4);
}

.footer-modern a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-modern a:hover {
    color: white;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Spacing */
.p-modern { padding: var(--space-6); }
.px-modern { padding-left: var(--space-6); padding-right: var(--space-6); }
.py-modern { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.m-modern { margin: var(--space-6); }
.mx-modern { margin-left: var(--space-6); margin-right: var(--space-6); }
.my-modern { margin-top: var(--space-6); margin-bottom: var(--space-6); }

/* Shadows */
.shadow-modern-sm { box-shadow: var(--shadow-sm); }
.shadow-modern-md { box-shadow: var(--shadow-md); }
.shadow-modern-lg { box-shadow: var(--shadow-lg); }
.shadow-modern-xl { box-shadow: var(--shadow-xl); }

/* Border Radius */
.rounded-modern-sm { border-radius: var(--radius-sm); }
.rounded-modern-md { border-radius: var(--radius-md); }
.rounded-modern-lg { border-radius: var(--radius-lg); }
.rounded-modern-xl { border-radius: var(--radius-xl); }
.rounded-modern-full { border-radius: var(--radius-full); }

/* Background Gradients */
.bg-gradient-primary { background: var(--gradient-primary); }
.bg-gradient-success { background: var(--gradient-success); }
.bg-gradient-sunset { background: var(--gradient-sunset); }
.bg-gradient-ocean { background: var(--gradient-ocean); }

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */

@media (max-width: 768px) {
    :root {
        --space-6: 1rem;
        --space-8: 1.5rem;
        --space-10: 2rem;
        --space-12: 2.5rem;
        --space-16: 3rem;
    }
    
    .section-header-modern {
        margin-bottom: var(--space-8);
    }
    
    .grid-modern {
        gap: var(--space-4);
    }
}
