/* ===========================
   Brand Colors & Variables
   =========================== */
:root {
    /* New Color Palette */
    --deep-midnight-blue: #0E1A2B;
    --indigo-ink: #1E2E45;
    --fog-white: #F5F7FA;
    --slate-gray: #A6B1C4;
    --vivid-royal-blue: #3971F7;
    --sky-electric-blue: #5B8CFF;
    --burnt-amber-glow: #FFAD60;
    --muted-steel: #334055;
    
    /* Legacy support */
    --primary-blue: #3971F7;
    --primary-blue-dark: #5B8CFF;
    --text-dark: #F5F7FA;
    --text-medium: #A6B1C4;
    --text-light: #A6B1C4;
    --bg-light: #1E2E45;
    --border-light: #334055;
    --success-green: #10b981;
    --warning-yellow: #FFAD60;
}

/* ===========================
   Base Styles
   =========================== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ===========================
   Hero Section Background
   =========================== */
.hero-section {
    background-image: url('../images/hero-acews.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* ===========================
   Smooth Transitions
   =========================== */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--vivid-royal-blue) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 50%;
    background-color: var(--vivid-royal-blue);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

/* ===========================
   CTA Buttons
   =========================== */
.cta-button,
.cta-button-large {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.cta-button:hover,
.cta-button-large:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    background-color: var(--sky-electric-blue) !important;
}

.cta-button:active,
.cta-button-large:active {
    transform: translateY(0);
}

/* Special hover for white button in CTA section */
.cta-button-large:hover[style*="background-color: #F5F7FA"] {
    background-color: var(--burnt-amber-glow) !important;
    color: var(--deep-midnight-blue) !important;
}

/* ===========================
   Service Cards
   =========================== */
.service-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-blue);
}

.service-card:hover .bg-\[#0c7ff2\] {
    background-color: var(--primary-blue-dark) !important;
    transform: scale(1.05);
}

/* ===========================
   Portfolio Cards
   =========================== */
.portfolio-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.portfolio-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ===========================
   Testimonial Cards
   =========================== */
.testimonial-card {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(57, 113, 247, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--vivid-royal-blue);
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--vivid-royal-blue), var(--burnt-amber-glow));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

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

/* Dashboard Chart Bars Animation */
.testimonial-card .grid > div {
    animation: chartBarsGrow 1.5s ease-out forwards;
    transform-origin: bottom;
    opacity: 0;
}

.testimonial-card .grid > div:nth-child(odd) {
    animation-delay: 0.1s;
}

.testimonial-card .grid > div:nth-child(2n) {
    animation-delay: 0.2s;
}

.testimonial-card .grid > div:nth-child(3n) {
    animation-delay: 0.3s;
}

.testimonial-card .grid > div:nth-child(4n) {
    animation-delay: 0.4s;
}

.testimonial-card .grid > div:nth-child(5n) {
    animation-delay: 0.5s;
}

.testimonial-card .grid > div:nth-child(6n) {
    animation-delay: 0.6s;
}

/* Chart Line Animation */
.testimonial-card svg path[stroke="#FFAD60"] {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: chartLineGrow 2s ease-out 0.5s forwards;
}

/* Metric Number Count Up Animation */
.testimonial-card .text-5xl {
    animation: countUp 1.5s ease-out forwards;
}

/* Trending Arrow Animation */
.testimonial-card span[style*="color: #10b981"] svg {
    animation: trendingBounce 2s ease-in-out infinite;
}

@keyframes chartBarsGrow {
    0% {
        transform: scaleY(0);
        opacity: 0;
    }
    100% {
        transform: scaleY(1);
        opacity: 1;
    }
}

@keyframes chartLineGrow {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes countUp {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes trendingBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* Enhanced Dashboard Icons */
.testimonial-card svg.size-6 {
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.testimonial-card:hover svg.size-6 {
    transform: scale(1.1) rotate(5deg);
}

/* Chart Hover Effects */
.testimonial-card .grid > div:hover {
    transform: scaleY(1.05);
    filter: brightness(1.1);
    box-shadow: 0 4px 8px rgba(57, 113, 247, 0.3);
}

/* Gradient Overlay for Cards */
.testimonial-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(57, 113, 247, 0.02) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.testimonial-card:hover::after {
    opacity: 1;
}

/* ===========================
   Pricing Card
   =========================== */
.pricing-card {
    transition: all 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-blue-dark));
    border-radius: 8px 8px 0 0;
}

/* ===========================
   Social Icons
   =========================== */
.size-6 {
    transition: all 0.3s ease;
}

.size-6:hover {
    transform: scale(1.1);
}

/* ===========================
   Responsive Adjustments
   =========================== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    header {
        padding: 1rem 1.5rem;
    }
}

/* ===========================
   Performance Optimizations
   =========================== */
.service-card .size-12,
.testimonial-card img,
.portfolio-card > div {
    will-change: transform;
}

/* ===========================
   Focus States for Accessibility
   =========================== */
.nav-link:focus,
.cta-button:focus,
.cta-button-large:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* ===========================
   Loading State (Optional)
   =========================== */
.loading {
    opacity: 0;
    transform: translateY(20px);
}

.loaded {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

/* ===========================
   Chart Styles
   =========================== */
.chart-card {
    transition: all 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.line-animation {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease-in-out forwards;
}

.pulse-dot {
    animation: pulse 2s infinite;
}

.progress-bar {
    animation: fillProgress 1.5s ease-in-out forwards;
    width: 0;
}

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes fillProgress {
    from {
        width: 0;
    }
    to {
        width: var(--progress-width, 0);
    }
}

/* ===========================
   Mobile Hamburger Menu Styles
   =========================== */

/* Hamburger Button */
#mobile-menu-button {
    transition: all 0.3s ease;
}

#mobile-menu-button:hover {
    background-color: rgba(57, 113, 247, 0.1) !important;
}

#mobile-menu-button:active {
    transform: scale(0.95);
}

/* Hamburger Lines Animation */
.hamburger-line {
    transform-origin: center;
    transition: all 0.3s ease;
}

#mobile-menu-button.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#mobile-menu-button.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

#mobile-menu-button.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Overlay */
#mobile-menu-overlay {
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
    z-index: 9999;
}

#mobile-menu-overlay.open {
    transform: translateX(0);
}

/* Mobile Navigation Links */
.mobile-nav-link {
    position: relative;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    color: var(--vivid-royal-blue) !important;
    background-color: rgba(57, 113, 247, 0.1);
    transform: translateX(10px);
}

.mobile-nav-link:active {
    transform: translateX(10px) scale(0.98);
}

/* Mobile navigation link underline effect */
.mobile-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 10px;
    left: 50%;
    background: linear-gradient(90deg, var(--vivid-royal-blue), var(--burnt-amber-glow));
    transition: all 0.4s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

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

/* Mobile CTA Button */
.cta-button-mobile {
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px -5px rgba(57, 113, 247, 0.4);
    transition: all 0.3s ease;
}

.cta-button-mobile:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 35px -5px rgba(57, 113, 247, 0.6);
    background-color: var(--sky-electric-blue) !important;
}

.cta-button-mobile:active {
    transform: translateY(-1px) scale(1.02);
}

/* Mobile menu close button */
#mobile-menu-close {
    transition: all 0.2s ease;
}

#mobile-menu-close:hover {
    background-color: rgba(57, 113, 247, 0.1) !important;
    transform: rotate(90deg);
}

#mobile-menu-close:active {
    transform: rotate(90deg) scale(0.9);
}

/* Mobile menu fade-in animation for links */
#mobile-menu-overlay.open .mobile-nav-link {
    animation: mobileNavSlideIn 0.4s ease-out forwards;
    opacity: 0;
    transform: translateX(30px);
}

#mobile-menu-overlay.open .mobile-nav-link:nth-child(1) {
    animation-delay: 0.1s;
}

#mobile-menu-overlay.open .mobile-nav-link:nth-child(2) {
    animation-delay: 0.15s;
}

#mobile-menu-overlay.open .mobile-nav-link:nth-child(3) {
    animation-delay: 0.2s;
}

#mobile-menu-overlay.open .mobile-nav-link:nth-child(4) {
    animation-delay: 0.25s;
}

#mobile-menu-overlay.open .cta-button-mobile {
    animation: mobileNavSlideIn 0.4s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateX(30px);
}

@keyframes mobileNavSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Body scroll lock when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Mobile menu backdrop blur effect */
#mobile-menu-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(14, 26, 43, 0.2);
    backdrop-filter: blur(10px);
    z-index: -1;
}

/* ===========================
   Section Spacing Consistency
   =========================== */
section {
    position: relative;
}

section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
}

section:first-child::before {
    display: none;
}
