/* ==================== CUSTOM CSS (Tailwind ile yapılamayan/zor olan şeyler) ==================== */

/* Smooth scroll & prevent horizontal overflow */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Prevent logo shift on mobile */
@media (max-width: 767px) {
    header nav {
        display: grid !important;
        grid-template-columns: 40px 1fr 40px;
        align-items: center;
    }
    
    header nav .brand {
        position: static !important;
        transform: none !important;
        justify-self: center;
    }
    
    header nav .burger {
        justify-self: start;
    }
}

/* Tablet navigation adjustments (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    header nav > ul {
        gap: 1rem !important;
    }
    
    header nav > ul a {
        font-size: 0.8rem;
    }
    
    header nav > div:last-child {
        gap: 0.5rem !important;
    }
    
    header nav > div:last-child input {
        width: 120px !important;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    header nav > div:last-child button {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
}

/* Hero section dark blue background (right side on desktop) */
@media (min-width: 768px) {
    .hero-section::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 45%;
        height: 100%;
        background-color: #0f2b5c;
        border-radius: 30px 0 0 30px;
        z-index: 0;
    }
}

/* Burger menu animation */
.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile menu active state - override hidden class */
.mobile-menu.active {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Mobile menu base styles */
.mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.hidden {
    display: none;
}

.mobile-menu.active.hidden {
    display: flex !important;
}

/* Touch devices - disable hover effects */
@media (hover: none) {
    button:hover,
    a:hover {
        transform: none !important;
    }
}

/* Print styles */
@media print {
    header, footer, button, .hero-actions, .demo-actions {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        background: white !important;
        color: black !important;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* ==================== SCROLL REVEAL ANIMATIONS ==================== */

/* Initial hidden state for animated elements */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.from-left {
    transform: translateX(-40px);
}

.reveal.from-right {
    transform: translateX(40px);
}

.reveal.from-bottom {
    transform: translateY(40px);
}

.reveal.scale-in {
    transform: scale(0.9);
}

/* Active/visible state */
.reveal.active {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Staggered delay for children */
.reveal-stagger > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger > *:nth-child(2) { transition-delay: 100ms; }
.reveal-stagger > *:nth-child(3) { transition-delay: 200ms; }
.reveal-stagger > *:nth-child(4) { transition-delay: 300ms; }
.reveal-stagger > *:nth-child(5) { transition-delay: 400ms; }
.reveal-stagger > *:nth-child(6) { transition-delay: 500ms; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .reveal.active {
        transform: none;
    }
}
