/* ═══════════════════════════════════════════════════════════════════════
   BoylerRezistans.com — Custom Styles
   Complements Tailwind CSS CDN
   ═══════════════════════════════════════════════════════════════════════ */

/* ─── Base & Reset ──────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

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

::-webkit-scrollbar-track {
    background: #0F172A;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #334155 #0F172A;
}

/* ─── Navigation Links ──────────────────────────────────────────────── */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: #94A3B8;
    transition: all 0.2s ease;
    cursor: pointer;
}

.nav-link:hover {
    color: #ffffff;
    background-color: rgba(51, 65, 85, 0.5);
}

.nav-active {
    color: #3B82F6 !important;
    background-color: rgba(59, 130, 246, 0.1);
}

/* Mobile nav */
.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-family: 'Rubik', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    color: #94A3B8;
    transition: all 0.2s ease;
    cursor: pointer;
}

.mobile-nav-link:hover {
    color: #ffffff;
    background-color: rgba(51, 65, 85, 0.5);
}

.mobile-nav-active {
    color: #3B82F6 !important;
    background-color: rgba(59, 130, 246, 0.1);
}

/* ─── Scroll-triggered Animations ───────────────────────────────────── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Floating Animation ───────────────────────────────────────────── */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* ─── Finder Button Active State ────────────────────────────────────── */
.finder-btn.active {
    border-color: rgba(59, 130, 246, 0.5);
    background-color: rgba(59, 130, 246, 0.08);
}

.finder-btn.active span:first-child {
    color: #3B82F6;
}

/* ─── Navbar Scroll Effect ──────────────────────────────────────────── */
#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.98);
    border-color: rgba(51, 65, 85, 0.5);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ─── FAQ Chevron Rotate ────────────────────────────────────────────── */
.faq-icon.rotate-180 {
    transform: rotate(180deg);
}

/* ─── Select Dropdown Styling ───────────────────────────────────────── */
select option {
    background-color: #1E293B;
    color: #F1F5F9;
}

select optgroup {
    background-color: #0F172A;
    color: #94A3B8;
    font-weight: 600;
}

/* ─── Form Focus Glow ───────────────────────────────────────────────── */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ─── Loading Spinner ───────────────────────────────────────────────── */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Marquee Pause on Hover ────────────────────────────────────────── */
.animate-marquee:hover {
    animation-play-state: paused;
}

/* ─── Product Card Glow ─────────────────────────────────────────────── */
.group:hover .animate-glow {
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.15);
}

/* ─── Page Transition ───────────────────────────────────────────────── */
main {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ─── Responsive Adjustments ────────────────────────────────────────── */
@media (max-width: 640px) {
    .font-heading {
        letter-spacing: -0.02em;
    }
}

/* ─── Article Page: FAQ Toggle ──────────────────────────────────────── */
.faq-open .faq-answer {
    max-height: 200px !important;
    padding-bottom: 1rem !important;
}

.faq-open .faq-chevron {
    transform: rotate(180deg);
}

/* ─── Line Clamp Utilities ──────────────────────────────────────────── */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Article Content Sections ──────────────────────────────────────── */
.animate-on-scroll[style*="transition-delay"] {
    transition-property: opacity, transform;
    transition-timing-function: ease-out;
    transition-duration: 0.6s;
}

/* ─── Print Styles ──────────────────────────────────────────────────── */
@media print {
    .fixed,
    #navbar,
    footer,
    .animate-marquee {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
