/* AviLinx Custom Styles */

/* ========================================
   Base Styles
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    overflow-x: hidden;
}

/* ========================================
   CSS Variables
   ======================================== */

:root {
    --avilinx-teal: #016162;
    --avilinx-teal-light: #005d6c;
    --avilinx-navy: #000741;
    --avilinx-navy-light: #00043c;
    --transition-base: 0.3s ease;
}

/* ========================================
   Typography
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, var(--avilinx-teal) 0%, #02a3a4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   Buttons
   ======================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--avilinx-teal) 0%, var(--avilinx-teal-light) 100%);
    color: white;
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--avilinx-teal-light) 0%, var(--avilinx-teal) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: transparent;
    border: 2px solid white;
    color: white;
    display: inline-block;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-secondary:hover {
    background: white;
    color: var(--avilinx-navy);
}

/* ========================================
   Navigation
   ======================================== */

#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    background: var(--avilinx-navy) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

#navbar.scrolled .logo-main {
    display: none !important;
}

#navbar.scrolled .logo-white {
    display: block !important;
}

#navbar.scrolled .nav-link {
    color: white !important;
}

#navbar.scrolled .nav-link:hover,
#navbar.scrolled .nav-link.active {
    color: var(--avilinx-teal) !important;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--avilinx-teal);
    transition: width var(--transition-base);
}

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

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    position: relative;
}

.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element-delayed {
    animation: float 8s ease-in-out infinite;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

/* ========================================
   Service Cards
   ======================================== */

.service-card {
    position: relative;
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-8px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--avilinx-teal) 0%, var(--avilinx-navy) 100%);
    border-radius: 8px 8px 0 0;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

/* ========================================
   Form Styles
   ======================================== */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--avilinx-teal);
    box-shadow: 0 0 0 4px rgba(1, 97, 98, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: #9ca3af;
}

/* ========================================
   Animations
   ======================================== */

/* Fade animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Pulse animation for emphasis */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Shimmer effect */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* ========================================
   Counter Animation
   ======================================== */

.counter {
    display: inline-block;
}

.counter.counting {
    animation: countPulse 0.3s ease;
}

@keyframes countPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* ========================================
   Image Hover Effects
   ======================================== */

.image-hover-zoom {
    overflow: hidden;
}

.image-hover-zoom img {
    transition: transform 0.5s ease;
}

.image-hover-zoom:hover img {
    transform: scale(1.05);
}

/* ========================================
   Scroll Indicator
   ======================================== */

.scroll-indicator {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* ========================================
   Loading States
   ======================================== */

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ========================================
   Custom Scrollbar
   ======================================== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: var(--avilinx-teal);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--avilinx-navy);
}

/* ========================================
   Selection
   ======================================== */

::selection {
    background: var(--avilinx-teal);
    color: white;
}

::-moz-selection {
    background: var(--avilinx-teal);
    color: white;
}

/* ========================================
   Responsive Adjustments
   ======================================== */

@media (max-width: 768px) {
    .hero-section {
        min-height: 90vh;
    }

    .floating-element,
    .floating-element-delayed {
        display: none;
    }

    .service-card:hover {
        transform: translateY(-4px);
    }
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
    nav,
    footer,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }
}

/* ========================================
   Background Patterns
   ======================================== */

.dot-pattern {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='1' fill='white'/%3E%3C/svg%3E");
    background-size: 30px 30px;
}

.grid-pattern {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 10 0 L 0 0 0 10' fill='none' stroke='white' stroke-width='0.5'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100' height='100' fill='url(%23grid)'/%3E%3C/svg%3E");
}

/* ========================================
   Accessibility
   ======================================== */

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

    html {
        scroll-behavior: auto;
    }
}

/* Focus visible for keyboard navigation */
:focus-visible {
    outline: 2px solid var(--avilinx-teal);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--avilinx-navy);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
