@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400..700&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poly:ital@0;1&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap");

:root {
    --primary-text-color: #000;
    --bg-color: #ffffff;
    --btn-color: #fdfdfd;
    --btn-bg: #000;
    --header-link-hover: #000000;
    --header-link-hover-bg: #bababa36;
    --input-hover-bd-color: #232323;
    --dropdown-bg: #f3f4f6;
    --dropdown-hover-bg: #dddddd84;
    --faq-h-text: #0e0e0e;
    --faq-content-text: #1e1e1e;
    --hr-color: #e5e7eb;
    --footer-link: #282828;
    --footer-link-hover: #000;
    --header-bg: #edececa5;
    --hero-gradient: #fcfcfc;
    --hero-bg-img: url("../assets/images/background/dots-dark.svg");
}

.tw-dark {
    --primary-text-color: #fff;
    --bg-color: #000000;
    --btn-color: #000000;
    --btn-bg: #ffffff;
    --header-link-hover: #ffffff;
    --header-link-hover-bg: #8a8a8a5e;
    --input-hover-bd-color: #f8f8f8;
    --dropdown-bg: #171717;
    --dropdown-hover-bg: #2d2d2ddb;
    --faq-h-text: #efefef;
    --faq-content-text: #d4d4d4;
    --hr-color: #e1e1e195;
    --footer-link: #cfcfcf;
    --footer-link-hover: #ffffff;
    --header-bg: #232323a5;
    --hero-gradient: #000;
    --hero-bg-img: url("../assets/images/background/dots.svg");
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #000; /* Dark mode varsayılan */
    font-family: sans-serif;
}

body.modal-open {
    overflow: hidden;
}

/* ================= HEADER & NAV ================= */

header > .collapsible-header {
    display: flex;
    gap: 1rem;
    width: 100%;
    background-color: inherit;
    place-content: center;
    overflow: hidden;
    transition: width 0.3s ease, height 0.3s ease;
}

hr {
    border-color: var(--hr-color);
    border-style: solid;
}

.animated-collapse {
    transition: width 0.3s ease;
}

.header-links {
    position: relative;
    display: flex;
    align-items: center;
    min-width: fit-content;
    padding: 8px 15px;
    z-index: 2;
    cursor: pointer;
    transition: background-color 0.5s, color 0.3s;
}

.header-links::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    background-color: var(--header-link-hover-bg);
    transform: scale(40%);
    opacity: 0;
    border-radius: 8px;
    transition: all 300ms;
}

.header-links:hover {
    color: var(--header-link-hover);
}

.header-links:hover::after {
    transform: scale(100%);
    opacity: 1;
}

/* ================= HERO SECTION ================= */

.hero-section {
    background-image: var(--hero-bg-img);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.hero-bg-gradient {
    background: linear-gradient(180deg, var(--hero-gradient) 23%, rgba(0, 0, 0, 0) 87%, var(--hero-gradient) 97%);
}

.purple-bg-grad {
    background: rgb(126, 34, 206);
    background: linear-gradient(90deg, #7e22ce91 8%, #625aafae 31%, #7badbbbc 76%, #54d2d0ca 89%);
    filter: blur(50px);
    opacity: 0.5;
}

/* ================= DASHBOARD 3D ================= */

#dashboard {
    transform: perspective(1200px) translateX(0px) translateY(12px) scale(0.8) rotate(0deg) rotateX(70deg);
    transition: transform 0.5;
}

.opacity-0 { opacity: 0 !important; }
.opacity-100 { opacity: 100 !important; }

/* ================= UI ELEMENTS ================= */

.btn {
    padding: 10px 15px;
    width: max-content;
    border-radius: 10px;
    color: var(--btn-color);
    background-color: var(--btn-bg);
    justify-content: center;
    align-items: center;
    display: flex;
    cursor: pointer;
}

.btn:disabled { cursor: default; }

.input {
    padding: 10px;
    background-color: transparent;
    border-radius: 5px;
    outline: none;
    min-width: 100px;
    border: 1px solid #979797;
    transition: border 0.3s;
}

.input:active, .input:focus, .input:focus-within {
    border: 1px solid var(--input-hover-bd-color) !important;
}

/* Scrollbar */
.scrollbar::-webkit-scrollbar { width: 5px; height: 20px; }
.scrollbar::-webkit-scrollbar-track { border-radius: 25px; }
.scrollbar::-webkit-scrollbar-thumb { background: #d7d7d7; border-radius: 25px; }

/* Animated Border */
.animated-border { position: relative; overflow: visible; }
.animated-border::after {
    content: '';
    position: absolute;
    top: 0px; left: -100%; width: 30%; height: 100%;
    border-radius: inherit;
    background-color: #6366f1;
    background-repeat: no-repeat;
    background-position: 0% 0%;
    filter: blur(1.5rem);
    opacity: 0.8;
    box-shadow: inset 0px 0px 20px 5px #6366f1;
    z-index: -2;
    pointer-events: none;
    animation: slide 10s ease-in-out infinite;
}
.animated-border::before { filter: blur(1.5rem); opacity: 0.3; will-change: transform; }

@keyframes slide {
    0% { left: -100%; right: 100%; }
    100% { left: 100%; right: -100%; }
}

/* Footer */
.footer-link {
    width: -moz-fit-content; width: fit-content;
    color: var(--footer-link);
    transition: color 0.3s;
}
.footer-link:hover { color: var(--footer-link-hover); }

/* FAQ Accordion */
.faq-accordion {
    background-color: inherit;
    color: var(--faq-h-text);
    cursor: pointer;
    padding: 15px 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    transition: height 0.4s;
}
.faq .content {
    padding: 0px 18px;
    color: var(--faq-content-text);
    height: max-content;
    overflow: hidden;
    background-color: transparent;
    text-align: justify;
    max-height: 0px;
    transition: max-height 0.4s, padding 0.4s;
}

/* ================= MEDIA QUERIES ================= */

@media not all and (min-width: 1024px) {
    header .collapsible-header {
        position: fixed; top: 60px; left: 0px;
        flex-direction: column;
        opacity: 0;
        height: 0vh; min-height: 0vh; width: 100vw;
        justify-content: space-between;
        padding: 5px 5% 5% 5%;
        place-items: center;
        text-align: center;
        background-color: var(--header-bg);
        overflow-y: auto;
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        box-shadow: 0px 2px 3px 2px #9f9f9f7c;
    }
}

/* ================= INTRO LOADER ================= */

#intro-loader {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background-color: #000;
    overflow: hidden;
    opacity: 1; visibility: visible;
    transition: opacity 1.0s ease-out, visibility 1.0s ease-out;
}

#intro-logo {
    width: 80vw; max-width: 600px; height: auto;
    filter: invert(1);
    opacity: 0; transform: scale(0.95);
    transition: opacity 1.2s cubic-bezier(0.2, 1, 0.3, 1), transform 1.2s cubic-bezier(0.2, 1, 0.3, 1);
    position: relative; z-index: 2;
}

#intro-logo.is-visible { opacity: 1; transform: scale(1); }
#intro-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

#intro-loader-video {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%; min-height: 100%;
    width: auto; height: auto;
    z-index: 1;
}

/* ================= FLOATING CTA ================= */

.floating-cta {
    position: fixed; right: 2rem; bottom: 2rem; z-index: 40;
    text-decoration: none;
}

.floating-cta-inner {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 18px; border-radius: 999px;
    background: #000; color: #fff;
    font-size: 0.95rem; font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer; transform: translateY(0);
    transition: all 0.3s ease;
    opacity: 0.94;
}

.floating-cta-inner span.bi { font-size: 1.2rem; }

.tw-dark .floating-cta-inner {
    background: #ffffff; color: #000000;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.15);
    border-color: rgba(0, 0, 0, 0.4);
}

@media (hover: hover) and (pointer: fine) {
    .floating-cta-inner:hover {
        transform: translateY(-3px); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5); opacity: 1;
    }
    .tw-dark .floating-cta-inner:hover { box-shadow: 0 14px 40px rgba(255, 255, 255, 0.25); }
}

@media (max-width: 768px) {
    .floating-cta { right: 1.2rem; bottom: 1.4rem; }
    .floating-cta-inner { padding: 8px 14px; font-size: 0.9rem; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
}

/* ================= CHAT STYLES ================= */

.chat-msg {
    max-width: 80%; padding: 12px 16px; border-radius: 14px;
    margin-bottom: 10px; animation: fadeIn 0.3s ease forwards;
}

.chat-user { background: #4f46e5; color: #fff; margin-left: auto; }
.chat-bot { background: #e5e7eb; color: #111; }
.tw-dark .chat-bot { background: #2d2d2d; color: #eee; }
.chat-error { background: #ffe5e5; color: #a10000; border-left: 4px solid #ff4d4d; }
.tw-dark .chat-error { background: #402424; color: #ff9d9d; border-left-color: #ff6969; }

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

/* ================= UNIVERSAL SLIDE PANEL ================= */

.global-panel {
    position: fixed; top: 0; right: -65%;
    width: 65vw; max-width: 1000px; height: 100vh;
    background: var(--bg-color); color: var(--primary-text-color);
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
    overflow-y: auto;
    transition: right 0.5s cubic-bezier(0.25, 1, 0.3, 1);
    z-index: 100;
}

body.panel-open .global-panel { right: 0; }

.global-panel-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0; transition: opacity 0.3s ease;
    pointer-events: none; z-index: 90;
}

body.panel-open .global-panel-overlay { opacity: 1; pointer-events: all; }
body.panel-open #main-wrapper {
    transform: translateX(-8%) scale(0.94);
    filter: blur(4px);
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.3, 1), filter 0.45s ease;
}

.panel-media-player {
    position: relative; padding-top: 56.25%;
    margin-bottom: 1rem; background: #000; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}
.panel-media-player video, .panel-media-player img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover;
}

.global-panel-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 26px; border-bottom: 1px solid rgba(200, 200, 200, 0.3); font-size: 1.2rem;
}
.global-panel-content { padding: 30px; line-height: 1.6; }

/* Panel Cards & Grid */
.panel-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem; margin: 1.5rem 0;
}

.panel-card {
    display: flex; flex-direction: column; justify-content: space-between;
    background: #ffffff; border: 1px solid #e5e7eb; border-radius: 16px;
    padding: 1.5rem; transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative; overflow: hidden; height: 100%;
}
.tw-dark .panel-card { background: #18181b; border-color: #27272a; }
.panel-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1); border-color: #4f46e5; }

.panel-card h4 {
    font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 10px; color: #111;
}
.tw-dark .panel-card h4 { color: #fff; }
.panel-card h4 i { font-size: 1.2rem; padding: 8px; background: rgba(79, 70, 229, 0.1); border-radius: 8px; color: #4f46e5; }
.panel-card p { font-size: 0.95rem; color: #52525b; margin-bottom: 1rem; flex-grow: 1; }
.tw-dark .panel-card p { color: #a1a1aa; }
a.panel-card { text-decoration: none; cursor: pointer; }

/* Tags */
.panel-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; width: 100%; }
.panel-tag {
    font-size: 0.75rem; font-weight: 600; padding: 6px 12px;
    border-radius: 999px; background: #f3f4f6; color: #4b5563;
    border: 1px solid transparent; transition: all 0.2s; white-space: nowrap;
}
.tw-dark .panel-tag { background: #27272a; color: #d4d4d8; }
.panel-card:hover .panel-tag { background: #eef2ff; color: #4f46e5; border-color: #c7d2fe; }
.tw-dark .panel-card:hover .panel-tag { background: #312e81; color: #c7d2fe; border-color: #4338ca; }

/* Panel List & Button */
.panel-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.panel-list li {
    display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px;
    font-size: 1rem; color: #3f3f46; padding: 8px; border-radius: 8px; transition: background 0.2s;
}
.tw-dark .panel-list li { color: #d4d4d8; }
.panel-list li:hover { background: rgba(0, 0, 0, 0.03); }
.tw-dark .panel-list li:hover { background: rgba(255, 255, 255, 0.05); }
.panel-list li i { color: #10b981; font-size: 1.1rem; flex-shrink: 0; margin-top: 2px; }

.panel-btn {
    display: flex; align-items: center; justify-content: center; width: 100%;
    padding: 16px; margin-top: 2rem;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #fff; border-radius: 12px; font-weight: 600; font-size: 1rem;
    text-decoration: none; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}
.tw-dark .panel-btn { background: linear-gradient(135deg, #fff 0%, #e5e5e5 100%); color: #000; }
.panel-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25); }

/* ================= HORIZONTAL SCROLL ================= */

/* KAPSAYICI */
#skills-section {
    width: 100%;
    height: 100vh; /* Tam ekran yüksekliği şart */
    overflow: hidden; /* Taşmaları gizle */
    display: flex;
    align-items: center;
    background-color: var(--bg-color); /* Temana uygun arka plan */
}

.skills-track {
    display: flex;
    gap: 4rem; /* Kartlar arası boşluk */
    padding-left: 5vw; /* Sol boşluk */
    width: max-content; /* İçerik kadar genişlik */
    will-change: transform; /* Performans için */
}

.skill-card {
    min-width: 400px; /* Kart genişliği */
    height: 500px;
    background: rgba(255, 255, 255, 0.05); /* Glassmorphism */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

/* KARTLAR */
.skill-card {
    /* Kart ayarların gayet iyi, dokunmaya gerek yok */
    width: 400px; 
    height: 500px; 
    flex-shrink: 0; /* Kartların sıkışmasını engeller */
    background: #f2f3f4; 
    border: 1px solid #e5e7eb; 
    border-radius: 24px;
    padding: 2rem; 
    display: flex; 
    flex-direction: column;
    justify-content: center; 
    align-items: center; 
    gap: 1.5rem;
    transition: transform 0.3s ease;
    
    /* Kartların padding hesabını da garantiye alalım */
    box-sizing: border-box; 
}

.tw-dark .skill-card { background: #141414; border-color: #1f2123; }
.skill-card:hover { transform: scale(1.02); border-color: #6366f1; }

@media (max-width: 768px) {
    .skill-card { width: 300px; height: 400px; padding: 1.5rem; }
    .skills-track { gap: 2rem; }
}

/* ================= SLIDESHOW ================= */

.slideshow {
    width: 100%; max-width: 100%; margin: 0 auto;
    padding: 40px 0; height: auto; overflow: visible;
}
.grid {
    display: grid; gap: 12px; width: 100%; height: auto;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.tile {
    aspect-ratio: 1 / 1; width: 100%; border-radius: 12px;
    background-size: cover; background-position: center;
    opacity: 0; transform: scale(0.96);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.tile.show { opacity: 1; transform: scale(1); }

@media (max-width: 768px) {
    .slideshow .grid { grid-template-columns: repeat(2, 1fr) !important; grid-auto-rows: 140px; gap: 12px; overflow: hidden; }
    .slideshow .tile { height: 100% !important; }
    .slideshow .tile:nth-child(n+7) { display: none; }
}

/* ================= REVEAL EFFECTS ================= */

.reveal-fade {
    opacity: 0; transform: translateY(60px) scale(.95); filter: blur(10px);
    transition: all 0.6s cubic-bezier(.2, .7, .3, 1);
}
.reveal-fade.visible { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }

.reveal-left {
    opacity: 0; transform: translateX(-70px) translateY(10px) scale(.95); filter: blur(12px);
    transition: all 1s cubic-bezier(.2, .7, .3, 1);
}
.reveal-left.visible { opacity: 1; transform: translateX(0) translateY(0) scale(1); filter: blur(0); }

.reveal-right {
    opacity: 0; transform: translateX(70px) translateY(10px) scale(.95); filter: blur(12px);
    transition: all 1s cubic-bezier(.2, .7, .3, 1);
}
.reveal-right.visible { opacity: 1; transform: translateX(0) translateY(0) scale(1); filter: blur(0); }

.reveal-animate {
    opacity: 0; transform: translateY(50px) scale(0.97); will-change: opacity, transform;
}
.parallax-item { transform: translateY(40px); }

/* ================= OTHER COMPONENTS ================= */

.ref-logo {
    width: 140px; height: 80px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.08); backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    display: flex; justify-content: center; align-items: center;
    transition: all .3s ease; padding: 12px; cursor: pointer;
}
.ref-logo img {
    max-width: 100%; max-height: 100%; object-fit: contain;
    filter: grayscale(1); opacity: .8; transition: all .3s ease;
}
.ref-logo:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15); background: rgba(255, 255, 255, 0.15);
}
.ref-logo:hover img { filter: grayscale(0); opacity: 1; }

.stat-card {
    padding: 18px; border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px); text-align: center;
}

.custom-services-grid {
    display: grid; gap: 1.5rem; grid-template-columns: 1fr;
}
@media (min-width: 768px) { .custom-services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .custom-services-grid { grid-template-columns: repeat(3, 1fr); } }

/* ================= MASK VIDEO ================= */

.lapland-mask-wrapper {
    position: relative; width: 100%; max-width: 1100px;
    margin: 0 auto; overflow: hidden;
}
.lapland-mask-wrapper video { width: 100%; height: auto; display: block; }
.lapland-mask-wrapper svg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.lapland-mask-wrapper svg text {
    font-family: 'Montserrat', sans-serif; font-weight: 900;
    text-transform: uppercase; font-size: 48px; fill: #000;
}
.lapland-mask-wrapper svg > rect {
    mask: url(#lapland-mask); -webkit-mask: url(#lapland-mask);
}
.mask-video {
    width: 100%; height: 300px; object-fit: cover;
}

/* Harf Animasyonu */
.letter-anim {
    opacity: 0; /* Başlangıçta görünmez (Yani video görünmez, beyaz perde görünür) */
    animation: revealLetter 0.8s forwards cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

@keyframes revealLetter {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1; /* Görünür olunca maske delinir ve video görünür */
    }
}

/* HORIZONTAL SCROLL STİLİ */
#sectionPin {
    /* Kaydırma sırasında taşmaları gizle */
    overflow: hidden; 
}

.pin-wrap {
    /* İçeriklerin yan yana gelmesi için */
    height: 100vh;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    /* Önemli: Genişlik JS ile hesaplanacak ama flex-nowrap şart */
    flex-wrap: nowrap;
}

.pin-item {
    /* Öğelerin küçülmesini engelle */
    flex-shrink: 0; 
}

/* =========================================
   FORM INPUT & TEXTAREA DÜZELTMELERİ
   ========================================= */

/* Genel Input Stili */
input, select, textarea {
    width: 100%;
    background-color: #f9fafb; /* Açık gri zemin */
    color: #111827 !important; /* Siyah yazı (Zorunlu) */
    border: 1px solid #e5e7eb;
}

/* Dark Mod Input Stili */
.tw-dark input, 
.tw-dark select, 
.tw-dark textarea {
    background-color: #1f1f1f !important; /* Koyu gri zemin (Zorunlu) */
    color: #ffffff !important; /* Beyaz yazı (Zorunlu) */
    border-color: #374151 !important;
}

/* Placeholder (İpucu yazısı) Rengi */
.tw-dark ::placeholder {
    color: #9ca3af !important; /* Okunabilir gri */
    opacity: 1;
}

/* İstatistik Kutuları (Hakkımızda Paneli İçin) */
.stats-box {
    background-color: #f3f4f6;
    color: #ffffff;
}
.tw-dark .stats-box {
    background-color: #1f1f1f !important; /* Koyu zemin */
    border: 1px solid #333;
}
/* İstatistik Alt Metinleri (Marka/Proje yazıları) */
.tw-dark .stats-label {
    color: #9ca3af !important; /* Açık gri */
}