/* ============================================================
   Cunnet Theme — System Integration CSS
   Laravel backend ile tema uyum stilleri
   ============================================================ */

/* --- Hero title --- */
.ca-hero-title {
    font-family: var(--tp-ff-sequel-bold-head);
    font-size: 125px;
    letter-spacing: -0.05em;
    line-height: 90%;
}
/* Değişen kelimelerde descender'lar (y,g,p) görünsün */
.ca-hero-title .cd-words-wrapper {
    overflow: visible;
    padding-bottom: 0.2em;
}
.ca-hero-title .cd-words-wrapper b,
.ca-hero-title .cd-words-wrapper b.is-visible {
    line-height: 1.15;
    padding-bottom: 0.15em;
    overflow: visible;
    white-space: nowrap;
}

/* Uzun kelimeler taşmasın — responsive küçültme */
@media (max-width: 1400px) { .ca-hero-title { font-size: 108px; } }
@media (max-width: 1200px) { .ca-hero-title { font-size: 90px;  } }
@media (max-width: 992px)  { .ca-hero-title { font-size: 72px;  } }
@media (max-width: 767px)  { .ca-hero-title { font-size: 54px; letter-spacing: -0.03em; } }
@media (max-width: 480px)  { .ca-hero-title { font-size: 42px;  } }

/* --- Navigation active state --- */
.tp-main-menu nav ul li.active > a,
.tp-main-menu nav ul li:has(> .tp-submenu .active) > a {
    color: #e91516;
}

/* --- Brand slider: logoların düzgün kayması --- */
.ca-brand-slider-active,
.cs-brand-slider-active {
    overflow: hidden;
}
.ca-brand-slider-active .swiper-wrapper,
.cs-brand-slider-active .swiper-wrapper {
    -webkit-transition-timing-function: linear !important;
    transition-timing-function: linear !important;
}
.ca-brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    padding: 20px 30px;
    width: auto !important;
}
.ca-brand-logo img {
    display: block;
    width: auto !important;
    height: auto !important;
    max-width: 160px;
    max-height: 65px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.6;
    transition: opacity .3s, filter .3s;
}
.ca-brand-logo:hover img {
    opacity: 1;
    filter: none;
}
@media (max-width: 767px) {
    .ca-brand-logo { height: 86px; padding: 14px 20px; }
    .ca-brand-logo img { max-width: 120px; max-height: 50px; }
}
.cunnet-system-header .tp-header-logo .logo-system {
    max-height: 48px;
    width: auto;
    display: block;
}

/* --- Header / Offcanvas logo boyutu --- */
.tp-header-logo img,
.tp-offcanvas-logo img,
.at-header-logo img {
    max-height: 44px;
    width: auto !important;
    display: inline-block;
}
/* logo-1 = light (açık bg), logo-2 = dark (koyu bg) */
.tp-header-logo img.logo-2,
.tp-offcanvas-logo img.logo-2 { display: none; }
[data-bs-theme="dark"] .tp-header-logo img.logo-1,
[data-bs-theme="dark"] .tp-offcanvas-logo img.logo-1 { display: none; }
[data-bs-theme="dark"] .tp-header-logo img.logo-2,
[data-bs-theme="dark"] .tp-offcanvas-logo img.logo-2 { display: inline-block; }

/* --- Team grid: resim uzama engel --- */
.ca-team-item .ca-portfolio-thumb,
.cunnet-team-thumb {
    display: block;
    aspect-ratio: 3/4;
    overflow: hidden;
    border-radius: 10px;
}
.ca-team-item .ca-portfolio-thumb img,
.cunnet-team-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}
/* Home team: 6 kolon grid */
.ca-team-area .col-xl-2 .ca-team-title { font-size: clamp(13px,1vw,16px); }
.ca-team-area .col-xl-2 span { font-size: 11px; }

/* --- Services başlık font küçültme --- */
.cunnet-service-light .tp-service-title {
    font-size: clamp(24px, 2.6vw, 42px) !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cunnet-service-light .about-us-title {
    font-size: clamp(28px, 3.5vw, 52px) !important;
}

/* --- FAQ logo ---  */
.ca-faq-title-wrap img {
    max-width: 180px;
    height: auto;
    display: block;
    margin-bottom: 16px;
}

/* --- Pagination from Laravel --- */
.pagination {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 40px 0;
    flex-wrap: wrap;
}
.pagination .page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    border: 1px solid rgba(20,20,20,.18);
    border-radius: 6px;
    color: inherit;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    background: #111;
    color: #fff;
    border-color: #111;
}
.pagination .page-item.disabled .page-link {
    opacity: .4;
    pointer-events: none;
}

/* --- Post content (news, services, pages) --- */
.post-content p { margin-bottom: 1.2em; }
.post-content h2, .post-content h3, .post-content h4 {
    font-weight: 700;
    margin: 1.8em 0 .6em;
    line-height: 1.2;
}
.post-content ul, .post-content ol { margin: 0 0 1.2em 1.5em; }
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: .4em; }
.post-content blockquote {
    border-left: 3px solid #e91516;
    padding-left: 20px;
    margin: 1.5em 0;
    font-style: italic;
    opacity: .8;
}
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 1.5em; overflow-x: auto; display: block; }
.post-content table td, .post-content table th {
    border: 1px solid rgba(20,20,20,.14);
    padding: 10px 14px;
}
.post-content a { text-decoration: underline; }
.post-content img { border-radius: 10px; margin: 20px 0; }
.post-content iframe, .post-content video {
    width: 100% !important;
    aspect-ratio: 16/9;
    height: auto !important;
    border-radius: 10px;
    margin: 20px 0;
}

/* --- WhatsApp launcher z-index safe zone --- */
.tf-whatsapp-launcher { z-index: 9997; }
.back-to-top-wrapper { z-index: 9998; }

/* --- Flash / success messages --- */
.cunnet-alert {
    padding: 16px 22px;
    margin: 24px 0;
    border-radius: 10px;
    font-weight: 600;
}
.cunnet-alert-success { background: #e6f9f0; color: #1a7a4e; border: 1px solid #a3dfbf; }
.cunnet-alert-error   { background: #ffeaea; color: #c0392b; border: 1px solid #f5b7b1; }

/* --- Dark mode compatibility --- */
[data-bs-theme="dark"] .post-content blockquote { opacity: .7; }
[data-bs-theme="dark"] .post-content table td,
[data-bs-theme="dark"] .post-content table th { border-color: rgba(255,255,255,.12); }

/* --- Contact form inputs override (cunnet style) --- */
.tp-contact-form-input input,
.tp-contact-form-input textarea,
.tp-contact-form-input select {
    width: 100%;
    border: 0;
    border-bottom: 1px solid rgba(20,20,20,.2);
    background: transparent;
    padding: 12px 0 14px;
    outline: none;
    font-size: 16px;
    color: inherit;
    transition: border-color .2s;
}
.tp-contact-form-input input:focus,
.tp-contact-form-input textarea:focus { border-bottom-color: #e91516; }
.tp-contact-form-input label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 2px;
    opacity: .7;
}

/* --- Breadcrumb list --- */
.tp-breadcrumb-list ul {
    display: flex;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    font-size: 14px;
    opacity: .7;
}
.tp-breadcrumb-list ul li:not(:last-child)::after { content: '/'; margin-left: 8px; }

/* --- Mobile menu body lock --- */
body.offcanvas-open { overflow: hidden; }

/* --- Preloader --- */
#preloader {
    position: fixed; inset: 0; z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    background: #fff;
    transition: opacity .5s ease;
}
[data-bs-theme="dark"] #preloader { background: #0f0f0f; }
#preloader.loaded { opacity: 0; pointer-events: none; }
.preloader { display: flex; gap: 10px; }
.preloader span {
    width: 14px; height: 14px; border-radius: 50%;
    background: #e91516;
    animation: preloader-bounce .9s infinite alternate;
}
.preloader span:last-child { animation-delay: .45s; }
@keyframes preloader-bounce { from { transform: translateY(0); } to { transform: translateY(-18px); } }

/* --- Portfolio liste — başlık animasyonu (birebir orijinal HTML markup'ına göre) ---
   h3.tp-title-anim.fix.d-inline-block > a.tp-title-text
   "fix" = overflow:hidden, "d-inline-block" = display:inline-block
   JS, a.tp-title-text içindeki metni span.char olarak böler.
   text-shadow: 0 1.05em ile altta gizli kopya oluşur — fix/overflow:hidden bunu keser.
   Ekstra override gerekmez; sadece link rengini koru. */
.mp-portfolio-title.tp-title-anim a.tp-title-text {
    color: inherit;
    text-decoration: none;
}

/* --- Portfolio tab — tp-animate-tab Bootstrap 5 uyumu ---
   Ana CSS: .tp-animate-tab .tab-pane { display:block; position:absolute; opacity:0 }
   Bootstrap 5 "show active" ekliyor. "show" olmadan görünmüyor.
   Wrapper'a position:relative şart, aksi halde absolute paneller taşar. */
.tp-animate-tab .tab-content {
    position: relative;
    min-height: 100px;
}
/* Bootstrap 5: show + active ikisi birden gelir — ikisini de yakala */
.tp-animate-tab .tab-pane.show.active {
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 2;
    transform: none;
    transition-timing-function: ease-out;
    transition-duration: 0.3s;
    transition-delay: 0.1s;
}

/* --- cd-headline clip animasyon (index-digital-light referans) --- */
.ca-hero-title.cd-headline.clip {
    line-height: 1;
}
.ca-hero-title.cd-headline .cd-words-wrapper {
    display: inline-block;
    vertical-align: top;
    position: relative;
    overflow: hidden;
}
.ca-hero-title.cd-headline .cd-words-wrapper::after {
    top: 0;
    height: 100%;
}
.ca-hero-title.cd-headline .cd-words-wrapper b {
    white-space: nowrap;
}
.ca-hero-title.cd-headline .cd-words-wrapper b.is-visible {
    position: relative;
    display: inline-block;
}

/* --- Sayfa slider: sabit oran, yüklemede atlama yok --- */
.cunnet-page .about-me-slider-thumb {
    display: block;
    aspect-ratio: 1136 / 680;
    overflow: hidden;
    border-radius: 16px;
    background: #ececea;
}
.cunnet-page .about-me-slider-thumb > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
