/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Custom CSS Variables for Dynamic Colors */
:root {
    --primary: #6366F1;
    --secondary: #8B5CF6;
    --accent: #F59E0B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --light: #F8FAFC;
    --dark: #1E293B;
    --gradient1: #667EEA;
    --gradient2: #764BA2;
    --gradient3: #F093FB;
    --gradient4: #F5576C;
    --neon: #00F5FF;
    --purple: #8B5CF6;
    --pink: #EC4899;
    --orange: #F97316;
    --teal: #14B8A6;
}

/* Enhanced Keyframe Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px);
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from { 
        transform: translateY(50px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-20px) rotate(120deg); 
    }
    66% { 
        transform: translateY(-10px) rotate(240deg); 
    }
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(0, 245, 255, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(0, 245, 255, 0.8), 0 0 40px rgba(0, 245, 255, 0.6);
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.05); 
        opacity: 0.8;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0,-30px,0);
    }
    70% {
        transform: translate3d(0,-15px,0);
    }
    90% {
        transform: translate3d(0,-4px,0);
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes scaleIn {
    from { 
        transform: scale(0.9) rotate(-5deg); 
        opacity: 0; 
    }
    to { 
        transform: scale(1) rotate(0deg); 
        opacity: 1; 
    }
}

@keyframes morphing {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* Enhanced Animation Classes */
.animate-fade-in {
    animation: fadeIn 1.2s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

.animate-slide-up {
    opacity: 0;
    animation: slideUp 1s ease-out 0.3s forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 1s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 1s ease-out forwards;
}

.animate-zoom-in {
    animation: zoomIn 1s ease-out forwards;
}

.animate-fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse-slow {
    animation: pulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.animate-bounce-slow {
    animation: bounce 3s infinite;
}

.animate-spin-slow {
    animation: spin 8s linear infinite;
}

.animate-gradient {
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

.animate-glow {
    animation: glow 2s ease-in-out infinite alternate;
}

.animate-morphing {
    animation: morphing 8s ease-in-out infinite;
}

/* Modern Button Styles */
.btn-primary-modern {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-primary-modern:hover::before {
    left: 100%;
}

.btn-secondary-modern {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary-modern::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-secondary-modern:hover::after {
    opacity: 1;
}

.btn-cta-primary {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), var(--orange));
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-cta-primary:hover {
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px) scale(1.05);
}

.btn-cta-secondary {
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced Card Styles */
.innovation-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.innovation-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.service-card-modern {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.service-card-modern:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.stat-card-modern {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(15px);
}

.stat-card-modern:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 25px 50px rgba(255, 255, 255, 0.1);
}

/* Floating Elements */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 8s;
}

.floating-element:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 7s;
}

.floating-element:nth-child(4) {
    animation-delay: -1s;
    animation-duration: 9s;
}

/* Background Patterns */
.bg-grid-pattern {
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

.bg-dots-pattern {
    background-image: radial-gradient(circle, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.bg-pattern {
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
}

.bg-circuit-pattern {
    background-image: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.1) 50%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.1) 50%, transparent 50%);
    background-size: 20px 20px;
}

/* Timeline Styles with Enhanced Design */
.timeline-container {
    position: relative;
    padding: 3rem 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, var(--primary), var(--secondary), var(--purple));
    transform: translateX(-50%);
    border-radius: 2px;
}

.timeline-item {
    position: relative;
    padding: 3rem 0;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item.animated {
    opacity: 1;
    transform: translateY(0);
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
    animation: pulse 2s infinite;
}

.timeline-content {
    width: 45%;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-content:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-left: auto;
}

.timeline-date {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.3);
}

/* Contact Cards with Modern Animation */
.contact-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.contact-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Navbar Enhancements */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(15px) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2) !important;
}

/* Mobile Menu Animation */
.mobile-menu-open {
    transform: translateY(0) !important;
    opacity: 1 !important;
}

/* Mobile Dropdown Animation */
.mobile-dropdown-open svg {
    transform: rotate(180deg);
}

/* Parallax Effect */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Scroll Animation Observer */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-scale {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* Glass Morphism Effects */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-accent {
    background: linear-gradient(135deg, var(--accent), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading Animations */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(99, 102, 241, 0.1);
    border-left: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary), var(--purple));
}

/* Responsive Design Enhancements */
@media (max-width: 1024px) {
    .timeline-container::before {
        left: 2rem;
    }
    
    .timeline-dot {
        left: 2rem;
    }
    
    .timeline-content {
        width: calc(100% - 5rem);
        margin-left: 4rem !important;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 90vh;
    }
    
    .floating-element {
        display: none;
    }
    
    .service-card-modern:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .stat-card-modern:hover {
        transform: translateY(-5px) scale(1.02);
    }
    
    .timeline-content {
        width: calc(100% - 3rem);
        margin-left: 2rem !important;
    }
}

@media (max-width: 640px) {
    .hero-section {
        min-height: 80vh;
    }
    
    .innovation-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .btn-primary-modern,
    .btn-secondary-modern,
    .btn-cta-primary,
    .btn-cta-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .floating-element,
    .animate-float,
    .animate-pulse-slow,
    .animate-bounce-slow,
    .animate-spin-slow {
        animation: none !important;
    }
    
    .glass,
    .glass-dark {
        background: white !important;
        backdrop-filter: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .glass,
    .glass-dark {
        background: white !important;
        backdrop-filter: none !important;
        border: 2px solid black !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles for Accessibility */
.btn-primary-modern:focus,
.btn-secondary-modern:focus,
.btn-cta-primary:focus,
.btn-cta-secondary:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .timeline-content {
        background: rgba(30, 41, 59, 0.95);
        color: white;
    }
    
    .innovation-card,
    .service-card-modern {
        background: rgba(30, 41, 59, 0.95);
        color: white;
    }
}

/* Professional Logo Styles */
.logo-header {
    height: 8rem; /* 128px */
    width: 8rem; /* 128px */
    max-width: 100%;
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.logo-header:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.logo-footer {
    height: 130px; /* 130px */
    width: 130px; /* 130px */
    object-fit: contain;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.1));
}

.logo-footer:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.2));
}

/* Logo Container Styles */
.logo-container-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.logo-container-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Logo Text Styles */
.logo-text-primary {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.logo-text-secondary {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.logo-text-footer-primary {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff, #e0e7ff, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text-footer-secondary {
    font-size: 0.875rem;
    font-weight: 500;
    color: #9ca3af;
}

/* Responsive Logo Styles */
@media (max-width: 1024px) {
    .logo-header {
        height: 6rem; /* 96px */
        width: 6rem; /* 96px */
    }
    
    .logo-footer {
        height: 5rem; /* 56px */
        width: 5rem; /* 56px */
    }
    
    .logo-text-primary {
        font-size: 1.375rem;
    }
    
    .logo-text-footer-primary {
        font-size: 1.75rem;
    }
}

@media (max-width: 768px) {
    .logo-header {
        height: 5rem; /* 80px */
        width: 5rem; /* 80px */
    }
    
    .logo-footer {
        height: 5rem; /* 52px */
        width: 5rem; /* 52px */
    }
    
    .logo-text-primary {
        font-size: 1.25rem;
    }
    
    .logo-text-secondary {
        font-size: 0.6875rem;
    }
    
    .logo-text-footer-primary {
        font-size: 1.625rem;
    }
    
    .logo-text-footer-secondary {
        font-size: 0.8125rem;
    }
    
    .logo-container-header {
        gap: 0.5rem;
    }
    
    .logo-container-footer {
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }
}

@media (max-width: 640px) {
    .logo-header {
        height: 5rem; /* 64px */
        width: 5rem; /* 64px */
    }
    
    .logo-footer {
        height: 5rem; /* 48px */
        width: 5rem; /* 48px */
    }
    
    .logo-text-primary {
        font-size: 1.125rem;
    }
    
    .logo-text-secondary {
        font-size: 0.625rem;
    }
    
    .logo-text-footer-primary {
        font-size: 1.5rem;
    }
    
    .logo-container-header {
        gap: 0.375rem;
    }
    
    .logo-container-footer {
        gap: 0.625rem;
        margin-bottom: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .logo-header {
        height: 5rem; /* 56px */
        width: 5rem; /* 56px */
    }
    
    .logo-footer {
        height: 5rem; /* 44px */
        width: 5rem; /* 44px */
    }
    
    .logo-text-primary {
        font-size: 1rem;
    }
    
    .logo-text-footer-primary {
        font-size: 1.375rem;
    }
}

/* High DPI Display Support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-header,
    .logo-footer {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Logo Animation for Loading */
.logo-loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Logo Focus States for Accessibility */
.logo-container-header:focus-within .logo-header,
.logo-container-footer:focus-within .logo-footer {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Footer Specific Styles */
footer {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

footer .container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Footer Grid Layout Fix */
footer .grid {
    display: grid;
    width: 100%;
    gap: 2rem;
}

/* Footer Content Padding */
footer .py-16 {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Footer Text Alignment */
footer p, footer span {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Footer Links Hover Effect */
footer a {
    transition: all 0.3s ease;
}

/* Newsletter Input Fix */
footer input[type="email"] {
    width: 100%;
    box-sizing: border-box;
}

/* Social Icons Container */
footer .flex.space-x-4 {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

@media (min-width: 1024px) {
    footer .flex.space-x-4 {
        justify-content: flex-end;
    }
}

/* Footer Responsive Adjustments */
@media (max-width: 768px) {
    footer .grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: 1fr;
    }
    
    footer .lg\:col-span-2 {
        grid-column: span 1;
    }
    
    footer .flex-col.lg\:flex-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    footer .text-center.lg\:text-left {
        text-align: center;
    }
    
    footer .justify-center.lg\:justify-start {
        justify-content: center;
    }
}

/* Fix Footer Border Gradient */
footer .border-gradient-to-r {
    border-image: linear-gradient(to right, var(--primary), var(--secondary)) 1;
}

/* Footer Background Pattern Fix */
footer .bg-circuit-pattern {
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 50%, transparent 50%),
        linear-gradient(rgba(255, 255, 255, 0.05) 50%, transparent 50%);
    background-size: 20px 20px;
}

/* Ensure Footer is Full Width */
#footer-placeholder {
    width: 100%;
    margin: 0;
    padding: 0;
}
