/* ================================================================
   BNE Mühendislik - Custom Styles
   Material Design 3 inspired engineering platform
   ================================================================ */

/* ------------------------------------------------------------------ */
/* Base & Utility                                                     */
/* ------------------------------------------------------------------ */
html {
    scroll-behavior: smooth;
}

/* Smooth transitions for interactive elements */
a, button, input, textarea, select {
    transition: all 0.2s ease-in-out;
}

/* Focus ring for accessibility */
*:focus-visible {
    outline: 2px solid #af101a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ------------------------------------------------------------------ */
/* Marquee Animation                                                   */
/* ------------------------------------------------------------------ */
@keyframes marquee {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    display: flex;
    animation: marquee 30s linear infinite;
    width: fit-content;
}

.animate-marquee-reverse {
    display: flex;
    animation: marquee 30s linear infinite reverse;
    width: fit-content;
}

.animate-marquee > *,
.animate-marquee-reverse > * {
    flex-shrink: 0;
}

.animate-marquee img,
.animate-marquee-reverse img {
    flex-shrink: 0;
}

.animate-marquee:hover,
.animate-marquee-reverse:hover {
    animation-play-state: paused;
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Scroll Reveal                                                       */
/* ------------------------------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for grid items */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ------------------------------------------------------------------ */
/* Bento Grid                                                          */
/* ------------------------------------------------------------------ */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

@media (max-width: 1023px) {
    .bento-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 767px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }
}

/* ------------------------------------------------------------------ */
/* Technical Grid Background Pattern                                   */
/* ------------------------------------------------------------------ */
.technical-grid {
    background-image: radial-gradient(circle, #e2e2e2 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ------------------------------------------------------------------ */
/* Product Card Hover                                                  */
/* ------------------------------------------------------------------ */
.product-card-hover:hover {
    transform: translateY(-4px);
    transition: transform 0.2s ease-in-out;
}

/* ------------------------------------------------------------------ */
/* Timeline                                                            */
/* ------------------------------------------------------------------ */
.timeline-line {
    position: relative;
}

.timeline-line::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e4beba;
    transform: translateX(-50%);
}

@media (max-width: 767px) {
    .timeline-line::before {
        left: 16px;
    }
}

/* Timeline dot */
.timeline-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #af101a;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 2px #af101a;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

@media (max-width: 767px) {
    .timeline-dot {
        left: 16px;
    }
}

/* ------------------------------------------------------------------ */
/* M3 Material Design Input Styles                                     */
/* ------------------------------------------------------------------ */
.m3-input-wrapper {
    position: relative;
    background-color: #eeeeee;
    border-bottom: 2px solid #8f6f6c;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    transition: all 0.2s ease-in-out;
}

.m3-input-wrapper:focus-within {
    background-color: #e2e2e2;
    border-bottom-color: #af101a;
}

.m3-label {
    position: absolute;
    top: 16px;
    left: 12px;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    font-family: 'Hanken Grotesk', sans-serif;
    font-size: 14px;
    color: #5b403d;
}

input:focus ~ .m3-label,
input:not(:placeholder-shown) ~ .m3-label,
textarea:focus ~ .m3-label,
textarea:not(:placeholder-shown) ~ .m3-label,
select:focus ~ .m3-label,
select:not([value=""]) ~ .m3-label,
select.has-value ~ .m3-label {
    top: 4px;
    font-size: 10px;
    color: #af101a;
}

/* ------------------------------------------------------------------ */
/* Navbar Scroll State                                                 */
/* ------------------------------------------------------------------ */
.nav-scrolled {
    background-color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ------------------------------------------------------------------ */
/* Filter Chips                                                        */
/* ------------------------------------------------------------------ */
.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 8px;
    border: 1px solid #e4beba;
    background: #ffffff;
    color: #5b403d;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip.active,
.filter-chip:hover {
    background: #af101a;
    color: #ffffff;
    border-color: #af101a;
}

/* ------------------------------------------------------------------ */
/* Image Loading Placeholder                                           */
/* ------------------------------------------------------------------ */
.img-loading {
    background: #eeeeee;
    animation: shimmer 1.5s infinite ease-in-out;
}

@keyframes shimmer {
    0%   { opacity: 0.6; }
    50%  { opacity: 1; }
    100% { opacity: 0.6; }
}

/* ------------------------------------------------------------------ */
/* Scrollbar Styling                                                   */
/* ------------------------------------------------------------------ */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #e4beba;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8f6f6c;
}

/* ------------------------------------------------------------------ */
/* Print Styles                                                        */
/* ------------------------------------------------------------------ */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
}
