/*
Theme Name: Prof. Dr. Ebru Çöğendez Theme
Theme URI: https://profdrebrucogendez.com/
Author: Clinicode Web & App Solutions
Author URI: https://clinicode.com.tr
Description: Bu tema Clinicode Web & App Solutions ekibi tarafından, Prof. Dr. Ebru ÇÖĞENDEZ'e özel olarak tasarlanmıştır. Kopyalanması veya çoğaltılması yasaktır!
Requires at least: 6.4
Tested up to: 6.4
Requires PHP: 7.0
Version: 1.0
Text Domain: drebru
*/

:root {
    --primary-bg: #FFFFFF;
    --secondary-color: #1A2B48; /* Koyu Lacivert */
    --accent-color: #012B5B;    /* Modern Turkuaz */
    --light-bg: #F0F7FF;       /* Açık Buz Mavisi */
    --text-main: #253443;
    --text-muted: #6a6a6a;
}

body {
    margin: 0 !important;
    background-color: var(--primary-bg);
    color: var(--text-main);
    font-family: 'Quicksand', sans-serif;
}

.link {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.link:hover {
    color: var(--secondary-color);
}

.elementor-nav-menu .sub-arrow {
    padding: 10px 0px 10px 5px !important;
}

.elementor-posts .elementor-post__card .elementor-post__text {
    padding: 0 10px !important;
}

#tup-bebek .elementor-post__read-more {
    background-color: var(--secondary-color);
    padding: 5px 20px;
    color: white;
    border-radius: 10px 50px 50px 50px;
    transition: all 0.3s ease;
}

#tup-bebek .elementor-post__read-more:hover {
    background-color: var(--accent-color) !important;
}

.elementor-divider-separator {
    border-radius: 50px;
}

.bottom {
    color: white;
    font-family: 'Quicksand';
    font-size: 13px;
}

/* ========================================
   Desktop & Mobile Dropdown Menu Fixes
   ======================================== */

/* --- DESTKOP DROPDOWN --- */
@media (min-width: 1025px) {
    /* Hide specific Elementor pointer icons that might show up incorrectly on the left */
    body #masthead .elementor-nav-menu .sub-arrow,
    body #masthead .elementor-nav-menu .elementor-item-icon {
        display: none !important;
    }

    /* Hide Mobile Elements */
    .custom-mobile-toggle, .custom-mobile-menu-overlay { 
        display: none !important; 
    }

    body #masthead .elementor-nav-menu li {
        position: relative;
    }

    /* Sub-menu container */
    body #masthead .elementor-nav-menu .sub-menu {
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        z-index: 9999 !important;
        width: max-content !important;
        min-width: 300px !important;
        background: #FFFFFF !important;
        box-shadow: 0 15px 35px rgba(1, 43, 91, 0.1) !important;
        border-radius: 12px !important;
        padding: 15px 0 !important;
        margin: 0 !important;
        list-style: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        transform: translateY(15px) !important;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
        border: 1px solid rgba(1, 43, 91, 0.05) !important;
        display: block !important;
    }

    /* Show sub-menu on hover */
    body #masthead .elementor-nav-menu li.menu-item-has-children:hover > .sub-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
    }

    /* Sub-menu items */
    body #masthead .elementor-nav-menu .sub-menu li {
        width: 100% !important;
        padding: 0 !important;
        border: none !important;
    }

    body #masthead .elementor-nav-menu .sub-menu li a {
        display: block !important;
        padding: 12px 25px !important;
        color: #012B5B !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        transition: all 0.3s ease !important;
        line-height: 1.5 !important;
        border-bottom: 1px solid rgba(1, 43, 91, 0.03) !important;
    }
    
    body #masthead .elementor-nav-menu .sub-menu li:last-child a {
        border-bottom: none !important;
    }

    body #masthead .elementor-nav-menu .sub-menu li a:hover {
        background-color: #F0F7FF !important;
        color: #012B5B !important;
        padding-left: 32px !important;
    }

    /* Hide dropdown arrow indicator for parent items */
    body #masthead .elementor-nav-menu > li.menu-item-has-children > a::after {
        content: '\f107' !important;
        font-family: 'Font Awesome 5 Free' !important;
        font-weight: 900 !important;
        margin-left: 8px !important;
        font-size: 12px !important;
        transition: transform 0.3s ease !important;
        display: none !important;
    }

    /* Nested sub-menus (2nd level+) */
    body #masthead .elementor-nav-menu .sub-menu .sub-menu {
        top: -15px !important;
        left: 100% !important;
        margin-left: 5px !important;
    }
}

/* ========================================
   OVERALL & COMPONENT MOBILE LAYOUT FIXES
   ======================================== */

/* Prevent horizontal scroll globally caused by overflow */
html, body {
    overflow-x: hidden !important;
    position: relative;
    width: 100%;
}

/* OVERLAPPING FIX: Cookie Notice vs MyStickyElements */
#cookie-notice {
    z-index: 9999999 !important;
}
.mystickyelements-fixed {
    z-index: 9999 !important;
}

@media (max-width: 1024px) {
    /* Fixed MyStickyElements on smaller screens */
    .mystickyelements-fixed {
        bottom: 0px !important; 
    }
    
    #cookie-notice {
        display: none !important;
        bottom: 60px !important;
    }
    
    /* Header / Logo / Hamburger Layout Fix */
    body #masthead .elementor-element-fc1f401 > .e-con-inner {
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
    }
    
    body #masthead .elementor-element-559b7fe {
        width: auto !important;
        max-width: calc(100% - 60px) !important;
        flex-grow: 1;
        justify-content: flex-start !important;
        align-items: center !important;
    }
    
    /* Constrain logo image explicitly for mobile */
    body #masthead .elementor-element-559b7fe img {
        max-width: 100% !important;
        height: auto !important;
        max-height: 60px !important; /* Slightly smaller on mobile to fit nicely */
    }
    
    body #masthead .elementor-element-c90762c {
        width: auto !important;
        flex-grow: 0 !important;
        flex-shrink: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-end !important;
        align-items: center !important;
        align-self: center !important;
        padding-right: 15px !important;
    }

    /* Topbar Layout & Language Flag Fix */
    body #masthead .elementor-element-64d2a2f {
        flex-wrap: nowrap !important;
        justify-content: flex-end !important;
        align-items: center !important;
        overflow: visible !important;
        padding-right: 15px !important;
    }
    .topbar-social-wrap {
        gap: 4px !important; 
        flex-wrap: wrap !important;
    }
    body #masthead .elementor-element-a6e7a44 {
        margin-left: 8px !important;
        flex-shrink: 0 !important; 
    }
    /* Footer Headings Alignment */
    .footer-main-container h4, 
    .footer-main-container .elementor-heading-title {
        text-align: center !important;
        font-weight: bold !important;
        color: #ffffff !important;
        width: 100% !important;
        justify-content: center !important;
        font-size: 20px !important; /* Adjust if needed to match */
    }
    .footer-main-container .elementor-widget-heading {
        width: 100% !important;
        display: flex;
        justify-content: center;
    }
    .footer-main-container .elementor-divider {
        margin: 0 auto !important;
    }

    /* Treatment Stages / ts-tabs Mobile Overflow Fix */
    /* Target the Elementor Container for the Cards */
    .elementor-element-1510e4c > .e-con-inner,
    .elementor-element-1510e4c {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        scrollbar-width: none; /* Hide scrollbar Firefox */
        padding-bottom: 15px !important;
        margin-bottom: 15px !important;
        max-width: 100vw !important;
        width: 100% !important;
        gap: 15px !important; /* Space between cards */
    }
    
    .elementor-element-1510e4c::-webkit-scrollbar,
    .elementor-element-1510e4c > .e-con-inner::-webkit-scrollbar {
        display: none; /* Hide scrollbar Chrome/Safari/Edge */
    }

    /* Target the individual Stage Cards within the container */
    .elementor-element-1510e4c .elementor-element.e-con {
        flex: 0 0 85vw !important; /* Each card takes 85% of screen */
        max-width: 85vw !important;
        scroll-snap-align: center;
        margin-bottom: 0 !important; /* Remove vertical stacking margin */
    }
}

/* --- EXACT DEMO REPLICA MOBILE MENU --- */
/* Hide custom mobile menu components on desktop */
.prof-mobile-menu-toggle,
.prof-mobile-nav-dropdown {
    display: none !important;
}

@media (max-width: 1024px) {
    /* Hide the original Elementor nav toggle and dropdown on mobile to prevent duplicates */
    body #masthead .elementor-menu-toggle,
    body #masthead .elementor-nav-menu--dropdown { 
        display: none !important; 
    }
    
    /* Make the custom toggle button visible */
    .prof-mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        align-self: center;
        justify-content: center;
        z-index: 9999;
        margin: 0 0 0 auto !important;
        cursor: pointer;
        padding: 5px;
    }
    
    /* Toggle SVG Sizing and Color */
    .prof-mobile-menu-toggle svg {
        width: 1em;
        height: 1em;
        fill: #012B5B; /* Theme color */
        font-size: 28px;
        transition: transform 0.3s;
    }
    
    /* Toggle SVG Switching Logic */
    .prof-mobile-menu-toggle svg.e-eicon-close { 
        display: none; 
    }
    .prof-mobile-menu-toggle.prof-toggle-active svg.e-eicon-menu-bar { 
        display: none; 
    }
    .prof-mobile-menu-toggle.prof-toggle-active svg.e-eicon-close { 
        display: block; 
    }
    
    /* --- HERO SECTION BUTTONS FIX --- */
    /* Make the two hero buttons display side-by-side on mobile */
    .elementor-element-2292f15 {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        align-items: stretch !important;
        gap: 8px !important;
        padding: 0 10px !important; /* Prevent edge touching */
    }
    /* Scale down the buttons slightly to fit */
    .elementor-element-2292f15 .elementor-button {
        padding: 10px 5px !important; /* tighter horizontal padding */
        font-size: 11px !important; /* Smaller text */
        width: 100% !important;
        height: 100% !important; /* Equal height */
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.3 !important;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .elementor-element-2292f15 > .elementor-widget-wrap,
    .elementor-element-2292f15 > .elementor-widget-wrap > .elementor-element {
        width: calc(50% - 4px) !important; /* Account for the gap */
        margin: 0 !important;
    }
    
    /* Ensure header can anchor the full-width dropdown */
    body #masthead {
        position: relative !important;
    }
    /* Disable static positioning of inner containers so top:100% relies on #masthead */
    body #masthead .elementor-element-c90762c,
    body #masthead .elementor-element-fc1f401,
    body #masthead .e-con-inner {
        position: static !important;
    }
    
    /* The main dropdown container */
    nav.prof-mobile-nav-dropdown {
        display: block !important;
        position: absolute !important;
        top: 100% !important; /* Directly beneath header */
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        background: rgba(255, 255, 255, 0.98) !important;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
        z-index: 9998 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        max-height: 0;
        overflow: hidden;
        visibility: hidden;
        opacity: 0;
        padding: 0 !important;
        border-radius: 0 0 10px 10px;
        transform: translateY(-10px);
    }
    
    /* When active (triggered by JS) */
    nav.prof-mobile-nav-dropdown.prof-active {
        max-height: 85vh !important;
        overflow-y: auto !important;
        visibility: visible !important;
        opacity: 1 !important;
        transform: translateY(0);
        padding: 10px 0 !important;
    }
    
    /* Reset list styles */
    .prof-mobile-menu-list {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Top-level list items */
    .prof-mobile-menu-list > li {
        width: 100% !important;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .prof-mobile-menu-list > li:last-child {
        border-bottom: none;
    }
    
    /* Links */
    .prof-mobile-menu-list a {
        display: block !important;
        padding: 18px 25px !important; /* Slightly thicker padding for mobile tap targets */
        color: #333 !important;
        font-size: 16px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        transition: background 0.3s, color 0.3s !important;
        position: relative;
    }
    
    /* Hover/Active states */
    .prof-mobile-menu-list > li.current-menu-item > a,
    .prof-mobile-menu-list > li:hover > a {
        background-color: #012B5B !important; /* Theme dark blue instead of purple */
        color: #fff !important;
    }
    
    /* Submenu Icon positioning */
    .prof-submenu-icon {
        position: absolute;
        right: 25px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 14px;
        color: inherit;
        transition: transform 0.3s ease;
    }
    
    /* Open submenu parent active state */
    .prof-mobile-menu-list li.prof-open > a {
        background-color: #f0f0f0 !important;
        color: #012B5B !important;
    }
    .prof-mobile-menu-list li.current-menu-item.prof-open > a {
        background-color: #012B5B !important;
        color: #fff !important;
    }
    .prof-mobile-menu-list li.prof-open > a .prof-submenu-icon {
        transform: translateY(-50%) rotate(180deg);
    }
    
    /* Submenus (nested list) */
    .prof-mobile-menu-list .sub-menu {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background-color: transparent !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Submenu Links */
    .prof-mobile-menu-list .sub-menu li a {
        padding: 14px 25px 14px 40px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        color: #555 !important;
        border-bottom: 1px solid rgba(0,0,0,0.03);
    }
    .prof-mobile-menu-list .sub-menu li:last-child a {
        border-bottom: none;
    }
    
    .prof-mobile-menu-list .sub-menu li.current-menu-item > a,
    .prof-mobile-menu-list .sub-menu li a:hover {
        color: #012B5B !important;
        background-color: #eef2f6 !important;
    }
    /* Header layout alignment */
    body #masthead .elementor-element-fc1f401 > .e-con-inner {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    body #masthead .elementor-element-559b7fe {
        width: auto !important;
        margin: 0 !important;
        flex-grow: 0 !important;
    }
    body #masthead .elementor-element-c90762c {
        width: auto !important;
        flex-grow: 1 !important;
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
    }
}
