/*
Theme Name: ATB Laboratory Theme
Author: Antigravity
Description: Custom theme for ATB Laboratuvarı converted from static React/PHP frontend.
Version: 1.0
*/

/* =========================================
   Styles from header.php
   ========================================= */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #f39c12;
    --accent-color: #e67e22;
}

body {
    font-family: 'Poppins', sans-serif;
    padding-top: 105px;
    overflow-x: hidden;
}

@media (max-width: 991px) {
    body {
        padding-top: 110px;
    }
}

.fixed-top-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: white;
    width: 100%;
}

.navbar-toggler {
    border: 1px solid #eee;
    padding: 5px 10px;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.top-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
}

@media (max-width: 767px) {
    .top-bar {
        font-size: 0.75rem;
        padding: 10px 15px;
        /* Mobilde kenarlardan boşluk */
    }

    .top-bar .d-flex {
        justify-content: center !important;
        gap: 10px !important;
    }
}

.top-bar a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.top-bar a:hover {
    color: var(--secondary-color);
}

.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.navbar-brand img {
    height: 60px;
    transition: all 0.3s;
}

@media (max-width: 991px) {
    .navbar-brand img {
        height: 45px;
    }

    .navbar {
        padding: 10px 15px;
        /* Mobilde yanlardan pay bıraktık */
    }
}

.nav-link {
    color: var(--primary-color) !important;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

.dropdown-toggle::after {
    display: none;
}

.dropdown-item:hover {
    background-color: var(--secondary-color);
    color: white !important;
}

/* Mobil Akordiyon Menü Tasarımı */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: white;
        margin-top: 15px;
        padding: 0;
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
        max-height: 75vh;
        overflow-y: auto;
        border: 1px solid #eee;
    }

    .navbar-nav {
        align-items: flex-start !important;
        gap: 0 !important;
        padding: 10px 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-link {
        padding: 15px 20px !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        font-size: 0.95rem;
        font-weight: 600;
        color: var(--primary-color) !important;
        transition: all 0.3s ease;
    }

    .nav-link:hover,
    .nav-link:focus {
        background: linear-gradient(90deg, rgba(243, 156, 18, 0.1) 0%, transparent 100%);
        color: var(--secondary-color) !important;
    }

    .nav-link i.fas.fa-chevron-down {
        font-size: 0.7rem;
        transition: transform 0.3s ease;
        color: var(--secondary-color);
    }

    .nav-item.show .nav-link i.fas.fa-chevron-down {
        transform: rotate(180deg);
    }

    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100%;
        border: none !important;
        box-shadow: none !important;
        background: linear-gradient(180deg, #fef9e7 0%, #fff 100%) !important;
        padding: 0 !important;
        margin: 0 !important;
        border-radius: 0 !important;
        display: none;
    }

    .dropdown-menu.show {
        display: block !important;
    }

    .dropdown-item {
        padding: 12px 20px 12px 35px !important;
        border-left: 3px solid transparent;
        font-size: 0.9rem;
        color: #555 !important;
        transition: all 0.3s ease;
        position: relative;
    }

    .dropdown-item::before {
        content: '›';
        position: absolute;
        left: 20px;
        color: var(--secondary-color);
        font-weight: bold;
    }

    .dropdown-item:hover,
    .dropdown-item:focus {
        background: rgba(243, 156, 18, 0.15) !important;
        border-left-color: var(--secondary-color);
        color: var(--primary-color) !important;
        padding-left: 40px !important;
    }

    .dropdown-toggle::after {
        display: none !important;
    }
}

.fixed-top-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
}

.search-btn {
    color: var(--secondary-color);
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-btn:hover {
    transform: scale(1.1);
}

/* Utility Classes */
.section-title-wrapper {
    margin-bottom: 50px;
    text-align: center;
}

@media (max-width: 767px) {
    .section-title-wrapper {
        margin-bottom: 30px;
    }
}

.section-subtitle {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

@media (max-width: 767px) {
    .section-subtitle {
        font-size: 0.75rem;
    }
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2rem;
}

@media (max-width: 767px) {
    .section-title {
        font-size: 1.6rem;
    }
}

.btn-primary-ats {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary-ats:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: scale(1.05);
}

/* =========================================
   Styles from home.php
   ========================================= */
/* Owl Carousel Okları Orta Hizalama */
.products-owl {
    position: relative;
}

.units-owl {
    position: relative;
}

.videos-owl {
    position: relative;
}

.products-owl .owl-nav,
.units-owl .owl-nav,
.videos-owl .owl-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 10;
    margin-top: 0 !important;
    padding: 0 10px;
}

.products-owl .owl-nav button,
.units-owl .owl-nav button,
.videos-owl .owl-nav button {
    pointer-events: auto;
    background: white !important;
    width: 45px;
    height: 45px;
    border-radius: 50% !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
    margin: 0 !important;
    transition: all 0.3s !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none !important;
    padding: 0 !important;
}

.products-owl .owl-nav button:hover,
.units-owl .owl-nav button:hover,
.videos-owl .owl-nav button:hover {
    background: var(--secondary-color) !important;
    color: white !important;
}

.products-owl .owl-nav button.owl-prev,
.units-owl .owl-nav button.owl-prev,
.videos-owl .owl-nav button.owl-prev {
    order: 1;
}

.products-owl .owl-nav button.owl-next,
.units-owl .owl-nav button.owl-next,
.videos-owl .owl-nav button.owl-next {
    order: 2;
}

.units-owl .owl-stage {
    margin: 0 !important;
}

.units-owl .item {
    padding: 0 12px;
}

/* Responsive */
@media (max-width: 768px) {

    .products-owl .owl-nav,
    .units-owl .owl-nav,
    .videos-owl .owl-nav {
        padding: 0 5px;
    }

    .products-owl .owl-nav button,
    .units-owl .owl-nav button,
    .videos-owl .owl-nav button {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

.hero-slide-wrapper {
    height: 700px;
    background-size: cover;
    background-position: center;
}

.hover-up:hover {
    transform: translateY(-10px);
}

.transition-all {
    transition: all 0.4s ease-in-out;
}

.object-fit-cover {
    object-fit: cover;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.group:hover .group-hover-scale {
    transform: scale(1.1);
}

.group:hover .group-hover-orange {
    color: var(--secondary-color) !important;
}

/* Unit Card Styles */
.unit-card {
    cursor: pointer;
}

.unit-card .unit-img {
    transition: transform 0.5s ease;
}

.unit-card:hover .unit-img {
    transform: scale(1.1);
}

.unit-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding-top: 100px !important;
}

/* Product Card Styles */
.product-row {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(243, 156, 18, 0.2);
}

.product-img-wrapper {
    height: 180px;
    position: relative;
    overflow: hidden;
}

.product-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img-wrapper img {
    transform: scale(1.1);
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.product-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
}

.product-card:hover .product-overlay {
    opacity: 1;
    transform: translateY(0);
}

.product-info {
    padding: 20px;
    text-align: center;
    background: white;
}

.product-info h6 {
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    font-size: 0.95rem;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blog Card Styles */
.blog-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(243, 156, 18, 0.2);
}

.blog-img-wrapper {
    height: 220px;
    position: relative;
    overflow: hidden;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-img-wrapper img {
    transform: scale(1.1);
}

.blog-date {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 600;
}

.blog-content {
    padding: 25px;
}

.blog-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-title {
    color: var(--secondary-color);
}

.blog-excerpt {
    color: #6c757d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-link {
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-link {
    letter-spacing: 1px;
}

/* =========================================
   Styles from footer.php
   ========================================= */
.fixed-bottom-end {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
}

.float-btn {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.float-btn:hover {
    transform: scale(1.1) rotate(5deg);
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Mobil alt navbar */
@media (max-width: 991px) {
    body {
        padding-bottom: 70px;
    }

    .mobile-nav-item {
        transition: all 0.3s;
        border-bottom: 3px solid transparent;
    }

    .mobile-nav-item:hover {
        background-color: rgba(255, 255, 255, 0.05);
    }

    .mobile-nav-item:active {
        background-color: rgba(255, 255, 255, 0.1);
    }
}

.footer-link {
    transition: all 0.3s;
}

.footer-link:hover {
    color: var(--secondary-color) !important;
    padding-left: 5px;
}

.hover-orange:hover {
    color: var(--secondary-color) !important;
}

/* Fix WordPress Menu Output to match Bootstrap */
.dropdown-menu .nav-link {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    clear: both;
    font-weight: 400;
    color: #212529 !important;
    white-space: nowrap;
}

.dropdown-menu .nav-link:hover {
    color: #1e2125 !important;
    background-color: #e9ecef;
}

/* 
   FIX: Dropdown Flickering (Zipping) on Desktop 
   Uses a transparent pseudo-element to bridge the gap between nav-link and dropdown-menu
*/
@media (min-width: 992px) {

    /* Main Dropdown Hover Logic */
    .navbar .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        margin-top: 0;
        /* Attach directly to bottom */
        animation: simpleFadeIn 0.2s ease-in-out;
    }

    /* Bridge FIX: Position dropdown parent for absolute positioning */
    .navbar .nav-item.dropdown {
        position: relative;
    }

    /* Invisible bridge to prevent menu from closing when moving mouse down */
    .navbar .nav-item.dropdown::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 100%;
        height: 20px;
        background: transparent;
        z-index: 50;
    }

    /* Dropdown arrow icon (FontAwesome) */
    .navbar-nav .dropdown-toggle::after {
        content: "\f107" !important;
        font-family: "Font Awesome 5 Free", "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        border: none !important;
        display: inline-block !important;
        margin-left: 5px !important;
        vertical-align: middle !important;
        font-size: 0.75em;
        color: inherit !important;
        line-height: inherit;
    }
}

/* Ensure consistent layout: Text and Icon side-by-side */
.navbar-nav .nav-link {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    font-weight: 500 !important;
    transition: color 0.2s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--secondary-color) !important;
}

/* Simple Animation */
@keyframes simpleFadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide mobile CTA button on desktop */
@media (min-width: 992px) {
    .mobile-menu-cta {
        display: none !important;
    }
}

/* Mobile hamburger button - always visible on mobile */
@media (max-width: 991px) {
    .navbar-toggler {
        display: block;
        position: relative;
        z-index: 10001;
        border: none;
        padding: 10px;
        background: transparent;
    }

    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }

    /* Hamburger icon */
    .navbar-toggler-icon {
        background-image: none !important;
        position: relative;
        width: 26px;
        height: 2px;
        background: #1f2937;
        display: block;
        transition: all 0.3s ease;
    }

    .navbar-toggler-icon::before,
    .navbar-toggler-icon::after {
        content: '';
        position: absolute;
        width: 26px;
        height: 2px;
        background: #1f2937;
        left: 0;
        transition: all 0.3s ease;
    }

    .navbar-toggler-icon::before {
        top: -8px;
    }

    .navbar-toggler-icon::after {
        top: 8px;
    }

    /* X when menu is open */
    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
        background: transparent;
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::before {
        transform: rotate(45deg);
        top: 0;
    }

    .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon::after {
        transform: rotate(-45deg);
        top: 0;
    }
}

/* ============================================
   MOBILE MENU STYLES (Clean & Minimal)
   ============================================ */
@media (max-width: 991px) {

    /* Full-screen mobile menu */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: auto;
        max-height: 100vh;
        background: #ffffff;
        z-index: 9999;
        padding: 0;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .navbar-collapse.show {
        transform: translateX(0);
    }

    /* Mobile CTA Button - Full width at top */
    .mobile-menu-cta {
        display: block;
        width: 100%;
        padding: 20px;
        background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
        color: #fff !important;
        text-align: center;
        font-weight: 600;
        font-size: 16px;
        text-decoration: none;
        border: none;
        margin: 0;
        transition: background 0.3s ease;
    }

    .mobile-menu-cta:hover,
    .mobile-menu-cta:active,
    .mobile-menu-cta:focus {
        background: linear-gradient(135deg, var(--secondary-color) 0%, #ff9800 100%) !important;
        color: #fff !important;
    }

    .mobile-menu-cta i {
        margin-right: 8px;
    }

    /* Menu container */
    .navbar-nav {
        width: 100%;
        padding: 0;
        gap: 0 !important;
        margin: 0;
    }

    /* AGGRESSIVE RESET - Prevent ALL visual changes */
    .navbar-nav *,
    .navbar-nav a,
    .navbar-nav li,
    .navbar-nav .nav-link,
    .navbar-nav .dropdown-toggle,
    .navbar-nav .dropdown-item {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        outline: none !important;
        transition: none !important;
    }

    /* Remove ALL pseudo-class effects */
    .navbar-nav *:hover,
    .navbar-nav *:active,
    .navbar-nav *:focus,
    .navbar-nav *:visited,
    .navbar-nav a:hover,
    .navbar-nav a:active,
    .navbar-nav a:focus,
    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:active,
    .navbar-nav .nav-link:focus,
    .navbar-nav .dropdown-item:hover,
    .navbar-nav .dropdown-item:active,
    .navbar-nav .dropdown-item:focus {
        background: inherit !important;
        color: inherit !important;
        text-decoration: none !important;
        outline: none !important;
        box-shadow: none !important;
    }

    .navbar-nav .nav-item {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
    }

    /* Menu links */
    .navbar-nav .nav-link {
        padding: 16px 20px !important;
        font-size: 15px;
        font-weight: 500;
        color: #1f2937 !important;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        background: #fff !important;
    }

    /* Dropdown menu */
    .navbar-nav .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
        background: #f9fafb;
        display: none;
    }

    .navbar-nav .dropdown-menu.show {
        display: block;
    }

    /* Dropdown items */
    .navbar-nav .dropdown-item {
        padding: 12px 20px 12px 40px !important;
        font-size: 14px;
        color: #4b5563 !important;
        border-bottom: 1px solid #e5e7eb;
        background: #f9fafb !important;
    }

    .navbar-nav .dropdown-item:last-child {
        border-bottom: none;
    }

    /* Dropdown arrow */
    .navbar-nav .dropdown-toggle::after {
        content: "\f107" !important;
        font-family: "Font Awesome 5 Free", "Font Awesome 6 Free" !important;
        font-weight: 900 !important;
        border: none !important;
        display: inline-block !important;
        margin-left: auto;
        font-size: 12px;
        transition: transform 0.3s ease;
        color: #9ca3af;
    }

    .navbar-nav .dropdown.show .dropdown-toggle::after {
        transform: rotate(180deg);
    }

    /* Remove active state - causes unwanted highlighting */

    /* Backdrop */
    .navbar-collapse.show::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    /* Remove desktop effects */
    .navbar .nav-item.dropdown::after {
        display: none;
    }

    /* Scrollbar styling */
    .navbar-collapse::-webkit-scrollbar {
        width: 6px;
    }

    .navbar-collapse::-webkit-scrollbar-track {
        background: #f3f4f6;
    }

    .navbar-collapse::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
    }

    .navbar-collapse::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }
}