/* ============================================
   WARISAN TC - Main Stylesheet
   ============================================ */

/* === Base Reset & Typography === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

::selection {
    background-color: #d4982e;
    color: #ffffff;
}

/* === Scrollbar === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #d4982e;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b87a23;
}

/* === Navigation === */
.nav-text-color {
    color: #ffffff;
    transition: color 0.3s ease;
}

.nav-scrolled .nav-text-color {
    color: #1a1a1a;
}

#navbar.nav-scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

#navbar.nav-scrolled .nav-text-color {
    color: #1a1a1a;
}

/* === Preloader === */
.loader-ring {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(212, 152, 46, 0.2);
    border-top-color: #d4982e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#preloader.loaded {
    opacity: 0;
    pointer-events: none;
}

/* === Particle Effect === */
.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(212, 152, 46, 0.3);
    border-radius: 50%;
    animation: float-particle 15s infinite ease-in-out;
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 12s;
}

.particle:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 15s;
}

.particle:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.particle:nth-child(4) {
    left: 70%;
    animation-delay: 1s;
    animation-duration: 14s;
}

.particle:nth-child(5) {
    left: 90%;
    animation-delay: 3s;
    animation-duration: 16s;
}

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.5;
    }
    50% {
        transform: translateY(-50vh) scale(1);
        opacity: 0.3;
    }
    90% {
        opacity: 0.1;
    }
}

/* === Portfolio Filter Active === */
.portfolio-filter.active {
    background-color: #d4982e !important;
    color: #ffffff !important;
}

/* === Portfolio Item Hidden === */
.portfolio-item.hidden {
    display: none;
}

/* === Contact Form Success === */
.form-success {
    animation: successPulse 0.5s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* === Toast Notification === */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    color: #ffffff;
    padding: 16px 24px;
    border-radius: 4px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #d4982e;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast .toast-icon {
    width: 20px;
    height: 20px;
    color: #d4982e;
}

/* === Smooth Link Hover === */
a {
    text-decoration: none;
}

/* === Focus Styles for Accessibility === */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #d4982e;
    outline-offset: 2px;
}

/* === Image Responsive === */
img {
    max-width: 100%;
    height: auto;
}

/* === WhatsApp Floating Popup === */
.wa-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    animation: waFloat 3s ease-in-out infinite;
}

.wa-card {
    position: relative;
    background: white;
    border-radius: 18px;
    padding: 14px 16px;
    padding-right: 45px;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 320px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.06);
    transition: 0.3s ease;
}

.wa-card:hover {
    transform: translateY(-3px);
}

.wa-button {
    position: relative;
    flex-shrink: 0;
}

.wa-icon {
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(37,211,102,0.4);
}

.wa-svg {
    width: 30px;
    height: 30px;
    color: white;
}

.wa-notification {
    position: absolute;
    top: 0;
    right: 0;
    width: 14px;
    height: 14px;
    background: red;
    border-radius: 999px;
    border: 2px solid white;
    animation: pulse 1.5s infinite;
}

.wa-status {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
}

.wa-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.wa-text {
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

.wa-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 14px;
    cursor: pointer;
    color: #999;
}

.wa-close:hover {
    color: #111;
}

@keyframes waFloat {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-6px);
    }
    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* MOBILE */
@media (max-width: 640px) {

    .wa-popup {
        left: 12px;
        right: 12px;
        bottom: 12px;
    }

    .wa-card {
        max-width: 100%;
        width: 100%;
    }

}