/*
 * Beyribey Bilişim - Custom Styles
 * Modern, Professional Corporate Website
 */

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

/* Fade-in animation */
body {
    overflow-x: hidden;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Loading animation for service cards */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.service-card {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Hover animations */
.service-card:hover {
    transform: translateY(-8px);
}

/* ============================================
   NAVIGATION
   ============================================ */

/* Navigation link styles */
.nav-link {
    position: relative;
    color: #1f2937;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #1e3a8a;
}

/* Animated underline for nav links */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1e3a8a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Active nav link */
.nav-link.active::after {
    width: 100%;
}

/* Sticky header effect */
#header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* ============================================
   BUTTONS
   ============================================ */

/* Button hover effects */
button,
a.button,
.btn {
    transition: all 0.3s ease;
}

button:hover,
a.button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

button:active,
a.button:active,
.btn:active {
    transform: translateY(0);
}

/* CTA button animation */
@keyframes btnPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(30, 58, 138, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 58, 138, 0);
    }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */

#scrollToTop {
    transition: all 0.3s ease;
}

#scrollToTop.show {
    display: flex !important;
}

/* ============================================
   FORM STYLES
   ============================================ */

/* Form input focus */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #1e3a8a;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

/* Form validation styles */
input.error,
textarea.error {
    border-color: #ef4444;
}

input.success,
textarea.success {
    border-color: #10b981;
}

/* Placeholder styles */
::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* ============================================
   CARDS & SHADOWS
   ============================================ */

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover: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);
}

/* Custom shadow utilities */
.shadow-smooth {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-smooth-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
                0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Loading spinner */
.spinner {
    border: 3px solid rgba(30, 58, 138, 0.1);
    border-top-color: #1e3a8a;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Mobile menu animation */
#mobileMenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#mobileMenu.show {
    max-height: 500px;
}

/* ============================================
   GRADIENT BACKGROUNDS
   ============================================ */

.gradient-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
}

.gradient-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

/* ============================================
   TEXT UTILITIES
   ============================================ */

/* Text gradient */
.text-gradient {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   ICONS
   ============================================ */

/* Icon animations */
.icon-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Icon pulse */
.icon-pulse {
    animation: iconPulse 2s infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

/* Hero background animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-gradient {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* ============================================
   CUSTOM SCROLLBAR
   ============================================ */

/* Webkit browsers (Chrome, Safari) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #1e3a8a;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
}

.skip-to-main:focus {
    left: 0;
    background: #1e3a8a;
    color: white;
    padding: 1rem;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    /* Hide navigation, footer, and floating buttons */
    header,
    footer,
    #scrollToTop,
    .whatsapp-float {
        display: none;
    }

    /* Ensure proper page breaks */
    section {
        page-break-inside: avoid;
    }

    /* Remove backgrounds for print */
    * {
        background: white !important;
        color: black !important;
    }
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and below */
@media (max-width: 768px) {
    /* Fix header overflow on mobile */
    #header {
        overflow-x: hidden;
        overflow-y: visible;
    }

    #header nav {
        overflow-x: hidden;
        max-width: 100vw;
    }

    #header .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Disable AOS horizontal animations on mobile to prevent overflow */
    [data-aos="fade-left"],
    [data-aos="fade-right"] {
        transform: none !important;
    }

    /* Adjust font sizes */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    /* Stack cards vertically */
    .grid-responsive {
        grid-template-columns: 1fr;
    }

    /* Mobile menu */
    .mobile-menu-open {
        overflow: hidden;
    }
}

/* Mobile devices */
@media (max-width: 640px) {
    /* Reduce padding */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    /* Smaller hero text */
    .hero-title {
        font-size: 1.875rem;
    }

    /* Full width buttons on mobile */
    .btn-mobile-full {
        width: 100%;
    }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* Use GPU acceleration for animations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Lazy loading images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Text truncation */
.truncate-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Aspect ratio boxes */
.aspect-16-9 {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
    .dark-mode-support {
        /* Dark mode variables would go here */
    }
}
