/* ============================================
   SEFA Parket Laminat — Custom Styles
   ============================================ */

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #c9a96e;
    color: #0a1628;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #1a3a6b;
}

/* === Preloader === */
@keyframes loading-bar {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.animate-loading-bar {
    animation: loading-bar 1.8s ease-in-out forwards;
}

#preloader.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* === Navigation Active Link === */
.nav-link.active {
    position: relative;
    color: #0a1628;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #c9a96e;
    border-radius: 2px;
}

/* === Navbar Scrolled === */
#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(20px);
}

/* === Mobile Menu Hamburger Animation === */
.mobile-open .hamburger-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.mobile-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-open .hamburger-line:nth-child(3) {
    width: 24px;
    transform: translateY(-4px) rotate(-45deg);
}

/* === Hero Slider === */
.hero-slide {
    will-change: opacity;
}

.slider-dot.active {
    background-color: #c9a96e;
    width: 2rem;
    border-radius: 9999px;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-animate] {
    opacity: 0;
}

[data-animate].animated {
    animation-duration: 0.8s;
    animation-fill-mode: forwards;
    animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-animate="fade-in"].animated {
    animation-name: fadeInUp;
}

[data-animate="slide-up"].animated {
    animation-name: slideUp;
}

/* === Pulse Slow Animation (WhatsApp) === */
@keyframes pulseSlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
}

.animate-pulse-slow {
    animation: pulseSlow 2s ease-in-out infinite;
}

/* === Product Card Hover === */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #c9a96e, #1a3a6b);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover::before {
    opacity: 1;
}

/* === Gallery Lightbox Effect === */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    transition: background 0.3s ease;
    pointer-events: none;
    border-radius: 1rem;
}

/* === Filter Tabs === */
.filter-tab.active {
    background-color: #0a1628;
    color: white;
}

/* === Product Item Filter Animation === */
.product-item {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.product-item.hidden-filter {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

.product-item.show-filter {
    opacity: 1;
    transform: scale(1);
    position: relative;
    pointer-events: auto;
}

/* === FAQ Accordion === */
.faq-item.active .faq-toggle i {
    transform: rotate(45deg);
}

.faq-item.active .faq-content {
    max-height: 200px;
}

.faq-item.active {
    border-color: #c9a96e;
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.15);
}

/* === Counter Animation === */
.counter {
    font-variant-numeric: tabular-nums;
}

/* === Contact Form Focus Styles === */
input:focus,
select:focus,
textarea:focus {
    border-color: #c9a96e !important;
    box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.1);
}

/* === Back to Top Visible State === */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* === Hide Scrollbar Utility === */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* === Timeline Responsive === */
@media (max-width: 768px) {
    .timeline-line {
        display: none;
    }
}

/* === Image Lazy Load === */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* === Print Styles === */
@media print {
    .bg-sefa-navy,
    nav,
    footer,
    #back-to-top,
    .animate-pulse-slow,
    #preloader {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* === Smooth Hover Transitions === */
a, button {
    transition: all 0.3s ease;
}

/* === Text Balance for Headings === */
h1, h2, h3 {
    text-wrap: balance;
}

/* === Form Submit Animation === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

/* === Gradient Border Effect === */
.gradient-border {
    position: relative;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, #c9a96e, #1a3a6b);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}
