/**
 * Naxus V3 - UX Enhancement Fixes
 * ================================
 * Fixes for accessibility, contrast, and usability issues
 * Created: January 2026
 */

/* =============================================
   PRIORITY 1: CRITICAL CONTRAST FIXES
   ============================================= */

/* Fix light text on light backgrounds */
.bg-light-gray p,
.bg-light-gray .text-opacity-70,
.testimonial p:not(.text-white),
.meet-our-team p,
.faq-section p,
.pricing-section p,
section:not(.bg-dark) .text-opacity-70 {
    color: rgba(31, 42, 46, 0.8) !important;
    --bs-text-opacity: 0.8 !important;
}

/* Ensure section descriptions are readable on light backgrounds */
section:not(.bg-dark):not(.banner-section) h2+p,
section:not(.bg-dark):not(.banner-section) .fs-5 {
    color: rgba(31, 42, 46, 0.75) !important;
}

/* Fix card text on white/light backgrounds */
.card:not(.bg-dark):not(.bg-primary) p {
    color: rgba(31, 42, 46, 0.7) !important;
}

/* Form placeholder visibility enhancement */
input::placeholder,
textarea::placeholder {
    color: rgba(31, 42, 46, 0.5) !important;
    opacity: 1 !important;
}

/* =============================================
   PRIORITY 1: STICKY HEADER OPTIMIZATION
   ============================================= */

/* Reduce header height when fixed */
.header.fixed-header {
    padding: 12px 0 !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background-color: rgba(193, 255, 114, 0.95) !important;
}

/* Add scroll margin to sections so header doesn't overlap when jumping */
section[id] {
    scroll-margin-top: 100px;
}

/* =============================================
   PRIORITY 2: FORM ENHANCEMENTS
   ============================================= */

/* Improve form input visibility */
.form-control {
    border: 1px solid rgba(31, 42, 46, 0.2) !important;
    color: #1F2A2E !important;
}

.form-control:focus {
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 3px rgba(193, 255, 114, 0.25) !important;
}

/* Submit button harmony */
.btn-primary,
form .btn {
    color: #1F2A2E !important;
}

.btn-primary:hover,
form .btn:hover {
    background-color: #1F2A2E !important;
    color: #fff !important;
}

/* =============================================
   PRIORITY 3: VISUAL POLISH
   ============================================= */

/* Improve icon visibility */
.why-choose-us iconify-icon,
section:not(.bg-dark) iconify-icon.text-primary {
    opacity: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Optimize line lengths for readability */
section p.fs-5,
section .col-xxl-8 p {
    max-width: 700px;
}

/* Portfolio slider navigation enhancement */
.featured-projects-slider .owl-nav {
    display: flex !important;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.featured-projects-slider .owl-nav button {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: #1F2A2E !important;
    color: #fff !important;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.featured-projects-slider .owl-nav button:hover {
    background-color: var(--bs-primary) !important;
    color: #1F2A2E !important;
}

/* =============================================
   PRIORITY 4: ACCESSIBILITY ENHANCEMENTS
   ============================================= */

/* Focus states for keyboard navigation */
a:focus,
button:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--bs-primary) !important;
    outline-offset: 2px !important;
}

/* Skip default :focus removal for accessibility */
:focus:not(:focus-visible) {
    outline: none !important;
}

:focus-visible {
    outline: 2px solid var(--bs-primary) !important;
    outline-offset: 2px !important;
}

/* Improve link visibility in cards */
.card a:not(.btn) {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.card a:not(.btn):hover {
    color: var(--bs-primary);
}

/* =============================================
   ANIMATIONS & MICRO-INTERACTIONS
   ============================================= */

/* Smooth transitions for interactive elements */
.btn,
.card,
a,
input,
textarea {
    transition: all 0.2s ease-in-out;
}

/* Card hover effect */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

/* Testimonial cards: disable transform if it causes layout issues */
.testimonial .card:hover {
    transform: none;
}

/* =============================================
   FAQ - FIX UNEXPECTED GREEN DOT
   ============================================= */
.accordion-button:not(.collapsed) {
    background-color: transparent !important;
}

/* =============================================
   SERVICES REDESIGN - CRYSTALLINE PRECISION
   ============================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.service-card {
    background: rgba(26, 29, 36, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 4px;
    /* Sharp corners preferred, or very slight radius */
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--bs-primary), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover {
    background: rgba(26, 29, 36, 0.7);
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    border-color: rgba(193, 255, 114, 0.3);
    /* Primary color with opacity */
}

.service-card:hover::before {
    opacity: 1;
}

.service-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(193, 255, 114, 0.1);
    /* Primary color with opacity */
    border-radius: 50%;
    color: var(--bs-primary);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-card-icon {
    background: var(--bs-primary);
    color: #111217;
    transform: scale(1.1);
}

.service-card-title {
    /* Font inherited from theme (Manrope) */
    color: #fff;
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.service-card-desc {
    /* Font inherited from theme */
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
}

.service-list li iconify-icon {
    color: var(--bs-primary);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.service-cta {
    margin-top: auto;
    padding-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.service-card:hover .service-cta {
    opacity: 1;
    gap: 1rem;
}

/* =============================================
   HERO CANVAS ANIMATION
   ============================================= */

#hero-canvas {
    z-index: 0;
    /* Ensure it doesn't block interactions if particles are interactive later */
    pointer-events: none;
    background-color: #111217;
    /* Fallback/Base color */
}

/* Ensure content sits above canvas */
.banner-section .container {
    position: relative;
    z-index: 2;
}

/* Dark gradient overlay to ensure text readability over the animation */
.banner-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, #111217, transparent);
    z-index: 1;
    pointer-events: none;
}

/* =============================================
   ADMIN AREA DASHBOARD OVERRIDES
   ============================================= */

/* Main Container Spacing */
.admin-container {
    padding-top: 150px !important;
    padding-bottom: 60px !important;
    min-height: 100vh;
}

/* Fix Visibility: Solid gold buttons get dark text, outline buttons get neon green */
.admin-container .btn-gold,
.admin-container form .btn-gold {
    background-color: #c1ff72 !important;
    color: #111217 !important;
}

.admin-container .btn-outline-gold,
.admin-container form .btn-outline-gold {
    border: 1px solid #c1ff72 !important;
    color: #c1ff72 !important;
    /* Force neon green text */
    background-color: transparent !important;
    font-weight: 700 !important;
}

.admin-container .btn-outline-gold:hover,
.admin-container form .btn-outline-gold:hover {
    background-color: #c1ff72 !important;
    color: #111217 !important;
}

/* Table Text Visibility */
.admin-container .table,
.admin-container .table td,
.admin-container .table th {
    color: #ffffff !important;
    /* Ensure table text is always visible */
}

.admin-container .text-white-50,
.admin-container .table .text-white-50 {
    color: rgba(255, 255, 255, 0.8) !important;
}

.admin-container .text-muted,
.admin-container .table .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Form Visibility in Admin */
.admin-container .form-label {
    color: #ffffff !important;
    opacity: 0.9;
}

.admin-container .form-control,
.admin-container .form-select {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.admin-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}