/**
 * ============================================================================
 * @project   TÜDAK Arama Kurtarma Profesyonel Teması
 * @author    Muratcan Başaran
 * @company   Argex
 * @license   Bu yazılım Argex firması tarafından oluşturulmuş ve sonsuza kadar lisanslanmıştır.
 * ============================================================================
 */

/* ============================================
   TÜDAK ARAMA KURTARMA - V3 Custom CSS
   Dark Mode, Wave Dividers, Microinteractions
   ============================================ */

/* ---- CSS Custom Properties ---- */
:root {
    --tudak-red: #b91c1c;
    --tudak-red-hover: #991b1b;
    --tudak-dark: #1f2937;
    --tudak-light: #f3f4f6;
    --tudak-gold: #d97706;
    --bg-primary: #ffffff;
    --bg-secondary: #f3f4f6;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-color: rgba(0,0,0,0.06);
}

/* ---- DARK MODE ---- */
html.dark {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-card: #1e293b;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-color: rgba(0,0,0,0.3);
}

html.dark body {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

html.dark .bg-white,
html.dark .bg-gray-50,
html.dark .bg-tudak-light {
    background-color: var(--bg-card) !important;
}

html.dark .bg-white\/95 {
    background-color: rgba(30,41,59,0.95) !important;
}

html.dark .text-gray-800,
html.dark .text-gray-700,
html.dark .text-tudak-dark {
    color: var(--text-primary) !important;
}

html.dark .text-gray-600,
html.dark .text-gray-500 {
    color: var(--text-secondary) !important;
}

html.dark .text-gray-400 {
    color: var(--text-muted) !important;
}

html.dark .border-gray-100,
html.dark .border-gray-200 {
    border-color: var(--border-color) !important;
}

html.dark .bg-gray-100,
html.dark .bg-red-50 {
    background-color: rgba(185,28,28,0.1) !important;
}

html.dark .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
}

html.dark .shadow-sm,
html.dark .shadow-lg,
html.dark .shadow-2xl {
    box-shadow: 0 4px 20px var(--shadow-color) !important;
}

html.dark input,
html.dark textarea,
html.dark select {
    background-color: var(--bg-secondary) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: var(--text-muted) !important;
}

/* ---- Preloader V3 ---- */
#tudak-preloader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#tudak-preloader.loaded {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.preloader-inner {
    text-align: center;
}
.preloader-spinner {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top-color: #1e3a8a;
    border-right-color: #1e3a8a;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
.preloader-text {
    display: block;
    color: #fff;
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 6px;
    text-transform: uppercase;
    opacity: 0.6;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Wave Section Dividers ---- */
.wave-divider {
    position: relative;
    overflow: hidden;
    line-height: 0;
}
.wave-divider svg {
    display: block;
    width: 100%;
    height: 60px;
}
.wave-divider-top svg {
    transform: rotate(180deg);
}
@media (min-width: 768px) {
    .wave-divider svg { height: 80px; }
}

/* ---- Scroll Animations ---- */
.tudak-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.tudak-animate.animated {
    opacity: 1;
    transform: translateY(0);
}
.tudak-animate-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.tudak-animate-left.animated {
    opacity: 1;
    transform: translateX(0);
}
.tudak-animate-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.tudak-animate-right.animated {
    opacity: 1;
    transform: translateX(0);
}
.tudak-animate-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.tudak-animate-scale.animated {
    opacity: 1;
    transform: scale(1);
}

/* Staggered delays */
.delay-1 { transition-delay: 0.1s !important; }
.delay-2 { transition-delay: 0.2s !important; }
.delay-3 { transition-delay: 0.3s !important; }
.delay-4 { transition-delay: 0.4s !important; }
.delay-5 { transition-delay: 0.5s !important; }

/* ---- Typewriter ---- */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: #1e3a8a;
    margin-left: 4px;
    animation: blink 0.8s step-end infinite;
    vertical-align: text-bottom;
}
@keyframes blink {
    50% { opacity: 0; }
}

/* ---- Parallax ---- */
.tudak-parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ---- Custom Scrollbar ---- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0f172a; }
::-webkit-scrollbar-thumb { background: #1e3a8a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #1e40af; }

/* ---- Back to Top ---- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 8px 25px rgba(30,58,138,0.35);
}
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
#back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(30,58,138,0.45);
}

/* ---- Navigation Dropdown ---- */
.main-navigation ul li {
    position: relative;
}
.main-navigation ul li > ul.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    list-style: none;
}
.main-navigation ul li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.main-navigation ul li > ul.sub-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.main-navigation ul li > ul.sub-menu li a:hover {
    background: rgba(30,58,138,0.06);
    color: #1e3a8a;
    padding-left: 24px;
}

/* Menu underline effect */
.main-navigation ul > li > a {
    position: relative;
    padding-bottom: 4px;
}
.main-navigation ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #1e3a8a;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}
.main-navigation ul > li:hover > a::after,
.main-navigation ul > li.current-menu-item > a::after {
    width: 100%;
}
.main-navigation ul > li.current-menu-item > a {
    color: #1e3a8a !important;
}

/* ---- Glassmorphism Card ---- */
.tudak-glass {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
}

/* ---- Pulse Ring Animation ---- */
.pulse-ring {
    position: relative;
}
.pulse-ring::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #1e3a8a;
    animation: pulse-ring-anim 2s ease-out infinite;
}
@keyframes pulse-ring-anim {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

/* ---- Team Cards ---- */
.team-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}
.team-card .team-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(15,23,42,0.95) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.team-card:hover .team-overlay {
    opacity: 1;
}
.team-card .team-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: #fff;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.team-card:hover .team-info {
    transform: translateY(0);
}

/* ---- Timeline ---- */
.tudak-timeline {
    position: relative;
    padding-left: 40px;
}
.tudak-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #1e3a8a, var(--border-color));
    border-radius: 3px;
}
.tudak-timeline-item {
    position: relative;
    margin-bottom: 32px;
    padding-left: 20px;
}
.tudak-timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 6px;
    width: 14px;
    height: 14px;
    background: #1e3a8a;
    border: 3px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: 0 0 0 3px #1e3a8a;
}
.tudak-timeline-item.upcoming::before {
    animation: pulse-ring-anim 2s ease-out infinite;
}

/* ---- Donation IBAN ---- */
.iban-display {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    letter-spacing: 2px;
    font-weight: 700;
    background: rgba(255,255,255,0.08);
    padding: 16px 24px;
    border-radius: 10px;
    border: 1px dashed rgba(255,255,255,0.25);
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: all;
}
.iban-display:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.4);
    transform: scale(1.02);
}

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 8px;
}
html.dark .skeleton {
    background: linear-gradient(90deg, #1e293b 25%, #334155 50%, #1e293b 75%);
    background-size: 200% 100%;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Card hover microinteractions ---- */
.card-hover {
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}
.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ---- Particle Canvas ---- */
#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ---- Accordion (FAQ) ---- */
.accordion-item {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}
.accordion-item.active {
    border-color: #1e3a8a;
    box-shadow: 0 4px 20px rgba(30,58,138,0.08);
}
.accordion-header {
    padding: 18px 24px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}
.accordion-header:hover {
    color: #1e3a8a;
}
.accordion-header i {
    transition: transform 0.3s ease;
    font-size: 14px;
}
.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}
.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--bg-card);
}
.accordion-item.active .accordion-body {
    max-height: 500px;
}
.accordion-body-inner {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---- Lightbox (Gallery) ---- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.4s ease;
}
.lightbox-overlay.active img {
    transform: scale(1);
}

/* ---- Multi-Step Form ---- */
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}
.step-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
}
.step-dot.active {
    background: #1e3a8a;
    transform: scale(1.3);
}
.step-dot.completed {
    background: #22c55e;
}
.form-step {
    display: none;
    animation: fadeInUp 0.4s ease;
}
.form-step.active {
    display: block;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- WhatsApp Floating Button ---- */
#tudak-whatsapp-btn {
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
#tudak-whatsapp-btn.visible {
    opacity: 1;
    visibility: visible;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .tudak-parallax {
        background-attachment: scroll;
    }
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
    }
    #tudak-whatsapp-btn {
        bottom: 20px;
        left: 16px;
        width: 48px;
        height: 48px;
    }
    .wave-divider svg {
        height: 40px;
    }
}
