/*
 * Modern UI Enhancements - Vibe Tests 2025
 * Theme: Iteck (Preserved)
 * Purpose: Progressive enhancement without modifying base theme
 * Version: 1.0.0
 * Date: November 22, 2025
 */

/* ============================================
   1. ENHANCED CARD DESIGNS
   ============================================ */

.features-card.style-5 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 174, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.features-card.style-5::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #00AEFF 0%, #02b5ff 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.features-card.style-5:hover::before {
    transform: scaleX(1);
}

.features-card.style-5:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 174, 255, 0.15);
    border-color: rgba(0, 174, 255, 0.3);
}

.features-card.style-5 .card-title {
    font-weight: 600;
    color: #1a202c !important;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.4;
}

.features-card.style-5 .info {
    padding: 4px 0;
}

.features-card.style-5 .text {
    color: #475569 !important;
}

/* Card fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.features-card.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}


/* ============================================
   2. MODERN TYPOGRAPHY
   ============================================ */

/* Ensure body has white background and dark text */
body {
    background-color: #ffffff !important;
    color: #1a202c !important;
}

/* Force white backgrounds for main sections */
main {
    background-color: #ffffff !important;
}

section {
    background-color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #1a202c !important;
}

/* Ensure paragraphs are readable */
p {
    color: #334155;
}

.section-head.style-5 h2 {
    font-size: clamp(28px, 5vw, 48px);
    margin-bottom: 16px;
}

.section-head.style-5 h2 span {
    background: linear-gradient(135deg, #00AEFF 0%, #02b5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

p.text {
    color: #64748b;
    line-height: 1.6;
    font-size: 15px;
    margin-bottom: 8px;
}

header.style-6 .info h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
    margin-bottom: 20px;
}

header.style-6 .info h2 {
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 600;
    color: #64748b;
}


/* ============================================
   3. GLASSMORPHISM EFFECTS
   ============================================ */

header.style-6 {
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%, 
        rgba(248, 250, 252, 0.9) 100%);
    position: relative;
}

header.style-6::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 174, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.section-padding.bg-white {
    background: rgba(255, 255, 255, 1) !important;
}


/* ============================================
   4. IMPROVED SPACING & RHYTHM
   ============================================ */

.section-padding {
    padding: clamp(60px, 10vw, 120px) 0;
}

.mb-30 {
    margin-bottom: 32px !important;
}

.mb-60 {
    margin-bottom: 64px !important;
}

.mt-60 {
    margin-top: 64px !important;
}

.card-title {
    margin-bottom: 16px;
}

.container {
    padding-left: 20px;
    padding-right: 20px;
}


/* ============================================
   5. VERIFICATION BADGE
   ============================================ */

.fa-check-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #00AEFF 0%, #02b5ff 100%);
    border-radius: 50%;
    color: white !important;
    font-size: 11px;
    margin-left: 4px;
    box-shadow: 0 2px 8px rgba(0, 174, 255, 0.3);
    position: relative;
}

.fa-check-circle::before {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* ============================================
   6. ENHANCED BUTTONS
   ============================================ */

.btn {
    border-radius: 12px;
    padding: 12px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border: none;
    font-size: 15px;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #00AEFF 0%, #0099dd 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 174, 255, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(0, 174, 255, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: #f8fafc;
    color: #334155;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Ripple effect on click */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::after {
    width: 300px;
    height: 300px;
}


/* ============================================
   7. LOADING STATES & SKELETONS
   ============================================ */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
    min-height: 20px;
}

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

.skeleton-card {
    height: 250px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
    width: 70%;
}

/* Loading spinner */
.spinner {
    border: 3px solid rgba(0, 174, 255, 0.1);
    border-top-color: #00AEFF;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ============================================
   8. MODERN FORM INPUTS
   ============================================ */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
select {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #ffffff;
    width: 100%;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    border-color: #00AEFF;
    box-shadow: 0 0 0 4px rgba(0, 174, 255, 0.1);
    outline: none;
    background: #ffffff;
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
textarea:hover,
select:hover {
    border-color: #cbd5e1;
}

label {
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    font-size: 14px;
    display: block;
}

.form-group {
    margin-bottom: 24px;
}

/* Floating labels effect */
.form-floating {
    position: relative;
}

.form-floating input:focus ~ label,
.form-floating input:not(:placeholder-shown) ~ label {
    transform: translateY(-24px) scale(0.9);
    color: #00AEFF;
}


/* ============================================
   9. BADGES & TAGS
   ============================================ */

.category-badge,
.badge-custom {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 174, 255, 0.1);
    color: #00AEFF;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 8px;
    margin-right: 8px;
    transition: all 0.3s ease;
}

.category-badge:hover,
.badge-custom:hover {
    background: rgba(0, 174, 255, 0.2);
    transform: translateY(-2px);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}


/* ============================================
   10. DARK MODE SUPPORT (DISABLED BY DEFAULT)
   ============================================ */

/* Dark mode is commented out to ensure proper contrast
   Uncomment to enable automatic dark mode based on system preference */

/*
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #94a3b8;
        --border-color: rgba(255, 255, 255, 0.1);
    }
    
    body {
        background: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .features-card.style-5 {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }
    
    .features-card.style-5:hover {
        background: var(--bg-tertiary);
        box-shadow: 0 12px 24px rgba(0, 174, 255, 0.2);
    }
    
    .features-card.style-5 .card-title {
        color: var(--text-primary);
    }
    
    p.text {
        color: var(--text-secondary);
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: var(--text-primary);
    }
    
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        background: var(--bg-secondary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    input:focus,
    textarea:focus,
    select:focus {
        background: var(--bg-tertiary);
    }
    
    label {
        color: var(--text-primary);
    }
    
    .section-padding.bg-white {
        background: var(--bg-primary) !important;
    }
}
*/


/* ============================================
   11. MICRO-INTERACTIONS
   ============================================ */

/* Smooth scale on hover for clickable elements */
a:not(.btn),
.clickable {
    transition: transform 0.2s ease;
}

a:not(.btn):hover,
.clickable:hover {
    transform: scale(1.02);
}

/* Icon animations */
.fa, .bi {
    transition: all 0.3s ease;
}

.fa:hover, .bi:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Image hover effects */
img {
    transition: transform 0.3s ease, filter 0.3s ease;
}

img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
}

/* Animated underline for links */
a.text-link {
    position: relative;
    text-decoration: none;
}

a.text-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00AEFF;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

a.text-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* ============================================
   12. SMOOTH SCROLLING & PARALLAX
   ============================================ */

html {
    scroll-behavior: smooth;
}

/* Parallax elements */
.head6-rocket,
.target-3d,
.hand-mega,
.head6-rating,
.head6-charts {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ============================================
   13. IMPROVED GRID LAYOUT
   ============================================ */

/* Modern responsive grid */
.row {
    display: flex;
    flex-wrap: wrap;
    /* gap: 24px; */
    margin-left: 0;
    margin-right: 0;
}

.col-lg-3 {
    flex: 1 1 calc(25% - 18px);
    min-width: 250px;
    padding: 0;
}

@media (max-width: 1199px) {
    .col-lg-3 {
        flex: 1 1 calc(33.333% - 16px);
    }
}

@media (max-width: 991px) {
    .col-lg-3 {
        flex: 1 1 calc(50% - 12px);
    }
}

@media (max-width: 575px) {
    .col-lg-3 {
        flex: 1 1 100%;
    }
    
    .row {
        gap: 16px;
    }
}

.features-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}


/* ============================================
   14. IMPROVED FLASH MESSAGES
   ============================================ */

#flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    max-width: 500px;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease;
    font-weight: 500;
}

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

#flash-message.hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 16px 24px;
    background: #1a202c;
    color: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.toast-info {
    background: linear-gradient(135deg, #00AEFF 0%, #0099dd 100%);
}


/* ============================================
   15. NAVIGATION IMPROVEMENTS
   ============================================ */

nav {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

nav.scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
}

nav a {
    transition: color 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #00AEFF;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    transform: scaleX(1);
}


/* ============================================
   16. MODAL IMPROVEMENTS
   ============================================ */

.modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 2px solid #f1f5f9;
    padding: 24px;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 2px solid #f1f5f9;
    padding: 20px 24px;
}

.modal-backdrop.show {
    opacity: 0.7;
}


/* ============================================
   17. TABLE IMPROVEMENTS
   ============================================ */

table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

thead {
    background: linear-gradient(135deg, #00AEFF 0%, #02b5ff 100%);
    color: white;
}

thead th {
    font-weight: 600;
    padding: 16px;
    border: none;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(0, 174, 255, 0.05);
}

tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}


/* ============================================
   18. UTILITY CLASSES
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, #00AEFF 0%, #02b5ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.shadow-lg {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.rounded-xl {
    border-radius: 16px;
}

.rounded-2xl {
    border-radius: 24px;
}

.transition-all {
    transition: all 0.3s ease;
}


/* ============================================
   19. RESPONSIVE IMPROVEMENTS
   ============================================ */

@media (max-width: 768px) {
    .section-padding {
        padding: 48px 0;
    }
    
    .section-head.style-5 h2 {
        font-size: 32px;
    }
    
    header.style-6 .info h1 {
        font-size: 36px;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 14px;
    }
    
    #flash-message,
    .toast {
        left: 10px;
        right: 10px;
        min-width: auto;
    }
}


/* ============================================
   20. ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus styles */
*:focus-visible {
    outline: 3px solid rgba(0, 174, 255, 0.5);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .features-card.style-5 {
        border: 2px solid #00AEFF;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}


/* ============================================
   21. PRINT STYLES
   ============================================ */

@media print {
    header.style-6,
    nav,
    footer,
    .to_top {
        display: none;
    }
    
    .features-card.style-5 {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
