/* ==========================================================================
   ADALET & ORTAK HUKUK BÜROSU - GSAP ANIMATION STYLES
   ========================================================================== */


/* Frosted Glass Navbar Enhancement */
header.sticky {
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    backdrop-filter: blur(16px) saturate(180%);
}

/* 1. Global Scroll Progress Indicator */
#scroll-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #c59b4c, #d5b271, #e4cd9f);
    z-index: 9999;
    width: 0%;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 0 8px rgba(197, 155, 76, 0.4);
}

/* 2. Initial state helper (prevents layout flash before GSAP init) */
.gsap-init-hidden {
    opacity: 0;
    transform: translateY(24px);
    will-change: transform, opacity;
}

.gsap-init-fade {
    opacity: 0;
    will-change: opacity;
}

.gsap-init-scale {
    opacity: 0;
    transform: scale(0.95);
    will-change: transform, opacity;
}

/* 3. Gold Accent Line Reveal */
.gold-accent-line {
    display: block;
    height: 2px;
    width: 48px;
    background-color: #c59b4c;
    margin-top: 8px;
    transform-origin: left center;
    transform: scaleX(0);
}

@media (prefers-reduced-motion: reduce) {
    .gold-accent-line {
        transform: scaleX(1) !important;
    }
}

/* 4. Luxury Card Hover & Magnetic Interactions */
.gsap-card {
    background-color: #ffffff;
    border: 1px solid rgba(13, 27, 42, 0.14);
    border-top: 3.5px solid var(--accent-color, #d5b271);
    border-radius: var(--btn-radius, 2px);
    box-shadow: 0 4px 16px -2px rgba(13, 27, 42, 0.06), 0 2px 4px -1px rgba(13, 27, 42, 0.03);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s ease;
    will-change: transform, box-shadow;
    position: relative;
    overflow: hidden;
}

.gsap-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-color, #d5b271);
    box-shadow: 0 16px 36px -6px rgba(13, 27, 42, 0.14), 0 0 0 1px var(--accent-color, #d5b271);
}

/* Image Zoom Wrapper */
.gsap-img-wrap {
    overflow: hidden;
    border-bottom: 1px solid rgba(13, 27, 42, 0.09);
}

.gsap-img-wrap img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.gsap-card:hover .gsap-img-wrap img {
    transform: scale(1.05);
}

/* 5. Floating Back To Top Button */
#back-to-top-btn {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    background-color: #0d1b2a;
    color: #ffffff;
    border: 1.5px solid rgba(213, 178, 113, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(13, 27, 42, 0.3);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

#back-to-top-btn:hover {
    background-color: #162a40;
    border-color: #c59b4c;
    transform: translateY(-2px);
    box-shadow: 0 6px 22px rgba(213, 178, 113, 0.35);
}

/* 6. Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .gsap-init-hidden,
    .gsap-init-fade,
    .gsap-init-scale {
        opacity: 1 !important;
        transform: none !important;
    }
    .gold-accent-line {
        transform: scaleX(1) !important;
    }
    .gsap-card {
        transition: none !important;
    }
}

/* 7. Floating WhatsApp & Floating Stack Container */
.floating-actions-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
    pointer-events: none;
}

.floating-action-item {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

@keyframes halo-pulse-whatsapp {
    0% {
        transform: scale(0.95);
        opacity: 0.85;
    }
    60% {
        transform: scale(1.55);
        opacity: 0.35;
    }
    100% {
        transform: scale(1.95);
        opacity: 0;
    }
}

@keyframes halo-pulse-phone {
    0% {
        transform: scale(0.95);
        opacity: 0.85;
    }
    60% {
        transform: scale(1.55);
        opacity: 0.35;
    }
    100% {
        transform: scale(1.95);
        opacity: 0;
    }
}

.whatsapp-pulse-halo {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: rgba(37, 211, 102, 0.7);
    pointer-events: none;
    z-index: 1;
    animation: halo-pulse-whatsapp 2.2s cubic-bezier(0.1, 0, 0.3, 1) infinite;
}

.whatsapp-pulse-halo::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: rgba(37, 211, 102, 0.5);
    animation: halo-pulse-whatsapp 2.2s cubic-bezier(0.1, 0, 0.3, 1) 1.1s infinite;
}

#whatsapp-float-btn {
    width: 50px;
    height: 50px;
    border-radius: 9999px;
    background-color: #25D366;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    z-index: 2;
}

#whatsapp-float-btn:hover {
    background-color: #20ba59;
    transform: scale(1.08);
    box-shadow: 0 6px 26px rgba(37, 211, 102, 0.65);
}

.phone-pulse-halo {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: rgba(30, 64, 175, 0.7);
    pointer-events: none;
    z-index: 1;
    animation: halo-pulse-phone 2.2s cubic-bezier(0.1, 0, 0.3, 1) infinite;
}

.phone-pulse-halo::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background-color: rgba(37, 99, 235, 0.5);
    animation: halo-pulse-phone 2.2s cubic-bezier(0.1, 0, 0.3, 1) 1.1s infinite;
}

#phone-float-btn {
    width: 50px;
    height: 50px;
    border-radius: 9999px;
    background-color: #0d1b2a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(13, 27, 42, 0.5);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    z-index: 2;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
}

#phone-float-btn:hover {
    background-color: #102a43;
    transform: scale(1.08);
    box-shadow: 0 6px 26px rgba(13, 27, 42, 0.7);
}

@keyframes phone-ring {
    0%, 100% { transform: rotate(0deg) scale(1); }
    10% { transform: rotate(-18deg) scale(1.1); }
    20% { transform: rotate(18deg) scale(1.1); }
    30% { transform: rotate(-18deg) scale(1.1); }
    40% { transform: rotate(18deg) scale(1.1); }
    50% { transform: rotate(0deg) scale(1); }
}

.phone-icon-animated {
    animation: phone-ring 2.5s infinite ease-in-out;
    transform-origin: center center;
    display: inline-block;
}

.whatsapp-icon-animated {
    animation: phone-ring 2.5s infinite ease-in-out 0.4s;
    transform-origin: center center;
    display: inline-block;
}

.whatsapp-tooltip-card {
    position: absolute;
    right: 62px;
    padding: 8px 14px;
    background: rgba(13, 27, 42, 0.95);
    color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(213, 178, 113, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    white-space: nowrap;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.floating-action-item:hover .whatsapp-tooltip-card {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 768px) {
    .whatsapp-tooltip-card {
        display: none !important;
    }
    .floating-actions-container {
        bottom: 20px;
        right: 16px;
        gap: 10px;
    }
}

#whatsapp-float-btn svg,
#whatsapp-float-btn svg path,
#phone-float-btn svg,
#phone-float-btn svg path {
    fill: #ffffff !important;
    color: #ffffff !important;
}

/* High-Priority CTA Button & Contact Form Visibility (Immune to scroll animation delays) */
.contact-cta-btn,
#iletisim a,
#iletisim .contact-cta-btn,
#iletisim .btn-primary {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: inline-flex !important;
}

