/**
 * BOBAMİD Elementor-specific CSS
 */

/* Elementor color variables for BOBAMİD */
:root {
    --e-global-color-bobamid_navy: #1a2744;
    --e-global-color-bobamid_navy_light: #243354;
    --e-global-color-bobamid_navy_dark: #111b30;
    --e-global-color-bobamid_gold: #c9a84c;
    --e-global-color-bobamid_gold_light: #dfc06e;
    --e-global-color-bobamid_white: #ffffff;
    --e-global-color-bobamid_gray_50: #f9fafb;
    --e-global-color-bobamid_gray_600: #4b5563;
}

/* Remove default Elementor borders and lines */
.elementor-widget:not(:last-child) {
    margin-bottom: 0;
}

/* Ensure no unwanted borders on Elementor sections */
.elementor-section,
.elementor-column,
.elementor-widget {
    border: none !important;
}

/* BOBAMİD specific Elementor overrides */
.elementor-element {
    --widgets-spacing: 0px;
}

/* ============================================
   FULL WIDTH - Critical for BOBAMİD pages
   ============================================ */

/* Full-width sections: ensure they span the entire viewport */
.elementor-section.elementor-section-full_width > .elementor-container {
    max-width: 100%;
    width: 100%;
}

/* Page builder canvas - no header/footer padding */
.page-template-elementor_canvas .bobamid-topbar,
.page-template-elementor_canvas #masthead,
.page-template-elementor_canvas footer {
    display: none;
}

/* Ensure Elementor pages have no extra padding or width constraints */
body.elementor-page .site-main,
.elementor-page .site-main {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: hidden;
}

/* Elementor Header Footer template - full width body */
body.page-template-elementor_header_footer .site-main {
    max-width: 100% !important;
    width: 100%;
    padding: 0;
    margin: 0;
}

/* Full-width section backgrounds while keeping content constrained */
.elementor-section-full_width .bobamid-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .elementor-section-full_width .bobamid-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Remove Elementor's default section padding when our widgets handle their own */
.elementor-section.elementor-section-full_width {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ============================================
   ELEMENTOR CONTAINER OVERRIDES
   ============================================ */

.elementor-section-full_width > .elementor-container {
    max-width: 100% !important;
}

.elementor-section.elementor-section-full_width {
    max-width: 100% !important;
    width: 100% !important;
}

.elementor-section > .elementor-container {
    flex-wrap: wrap;
}

/* ============================================
   HEADER LOGO CONSTRAINTS
   ============================================ */

.custom-logo-link {
    display: flex !important;
    align-items: center;
}

.custom-logo {
    max-height: 48px !important;
    width: 48px !important;
    max-width: 48px !important;
    height: 48px !important;
    object-fit: cover;
    border-radius: 50%;
}

/* ============================================
   SMOOTH EDIT MODE
   ============================================ */

.elementor-edit-mode .bobamid-hero {
    min-height: auto;
}

/* ============================================
   HERO SECTION - FULL WIDTH
   ============================================ */

.bobamid-hero {
    width: 100%;
}

.elementor-widget-bobamid-hero {
    width: 100%;
}

/* ============================================
   ALL BOBAMİD WIDGETS - FULL WIDTH
   ============================================ */

.elementor-widget-bobamid-hero,
.elementor-widget-bobamid-stats,
.elementor-widget-bobamid-services,
.elementor-widget-bobamid-chairman-message,
.elementor-widget-bobamid-featured-projects,
.elementor-widget-bobamid-why-us,
.elementor-widget-bobamid-news,
.elementor-widget-bobamid-cta,
.elementor-widget-bobamid-social,
.elementor-widget-bobamid-board-members,
.elementor-widget-bobamid-projects-list,
.elementor-widget-bobamid-contact-form,
.elementor-widget-bobamid-hakkimizda-content,
.elementor-widget-bobamid-mvv-cards,
.elementor-widget-bobamid-page-header {
    width: 100%;
}

/* ============================================
   ELEMENTOR COLUMN - Ensure columns are full width
   ============================================ */

.elementor-section-full_width .elementor-column {
    width: 100% !important;
}

.elementor-column .elementor-widget-wrap {
    width: 100%;
}

/* ============================================
   FIX: Elementor default section width override
   ============================================ */

.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1280px;
}

/* ============================================
   PAGE HEADER - Ensure proper full-width rendering
   ============================================ */

.elementor-widget-bobamid_page_header .bobamid-page-header {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
}

/* ============================================
   HAKKIMIZDA - Ensure proper full-width rendering
   ============================================ */

.elementor-widget-bobamid_hakkimizda_content .bobamid-section,
.elementor-widget-bobamid_mvv_cards .bobamid-section {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
    max-width: 100vw;
}

/* ============================================
   HEADER / FOOTER ELEMENTOR WIDGET STYLES
   For native Elementor widgets (icon-list, social-icons, etc.)
   ============================================ */

/* Top bar section */
.bobamid-topbar-section .elementor-icon-list-item {
    padding: 0;
    margin: 0;
}

.bobamid-topbar-section .elementor-icon-list-text {
    font-size: 0.8125rem;
}

/* Main header section - vertical alignment */
.bobamid-main-header .elementor-column {
    align-items: center !important;
}

.bobamid-main-header .elementor-widget-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Header navigation icon-list: display horizontally */
.bobamid-header-nav .elementor-icon-list-items {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.bobamid-header-nav .elementor-icon-list-item {
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
}

.bobamid-header-nav .elementor-icon-list-item a {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.bobamid-header-nav .elementor-icon-list-item a:hover {
    background: rgba(26,39,68,0.05);
}

/* Hide icon placeholders in nav icon-list (text-only nav) */
.bobamid-header-nav .elementor-icon-list-icon {
    display: none !important;
}

/* Header CTA button alignment */
.bobamid-header-cta .elementor-button-wrapper {
    display: flex;
    justify-content: flex-end;
}

/* Logo column in header - items inline */
.bobamid-main-header .elementor-widget-image {
    margin-bottom: 0;
}

.bobamid-main-header .elementor-widget-heading {
    margin-bottom: 0;
}

/* Footer social icons styling */
.bobamid-footer-social .elementor-social-icons-wrapper {
    gap: 12px;
}

/* Footer icon-list links */
.bobamid-footer-section .elementor-icon-list-item a:hover .elementor-icon-list-text {
    color: #c9a84c !important;
}

/* ============================================
   HEADER/FOOTER TEMPLATE PAGE STYLES
   ============================================ */

.page-template-elementor_canvas .bobamid-topbar-section,
.page-template-elementor_canvas .bobamid-main-header {
    max-width: 100% !important;
    width: 100% !important;
}

/* ============================================
   RESPONSIVE - Header Footer Elementor
   Top bar hidden on tablet/mobile (like PHP fallback)
   Nav and CTA hidden on mobile, shown on desktop
   ============================================ */

@media (max-width: 1023px) {
    /* Hide top bar on tablet/mobile (matches PHP fallback behavior) */
    .bobamid-topbar-section {
        display: none !important;
    }
    /* Hide desktop nav on mobile */
    .bobamid-header-nav .elementor-icon-list-items {
        display: none !important;
    }
    /* Hide CTA on mobile */
    .bobamid-header-cta {
        display: none !important;
    }
    /* Make logo column full width on mobile */
    .bobamid-main-header .elementor-column {
        width: 100% !important;
    }
}

/* Show nav and CTA on desktop */
@media (min-width: 1024px) {
    .bobamid-header-nav .elementor-icon-list-items {
        display: flex !important;
    }
    .bobamid-header-cta {
        display: block !important;
    }
}


/* ============================================
   Z-INDEX FIXES - Header above page header
   ============================================ */

/* Ensure Elementor header location is above all content */
.elementor-location-header {
    position: relative;
    z-index: 9999 !important;
}

/* Ensure HFE header is above page header */
.hfe-header {
    position: relative;
    z-index: 9999 !important;
}

/* Ensure header dropdown menu is above all content */
.bobamid-nav-menu .sub-menu,
.hfe-header .bobamid-nav-dropdown .sub-menu {
    z-index: 10000 !important;
}

/* Ensure page header section stays below header */
.elementor-widget-bobamid_page_header,
.bobamid-page-header {
    position: relative;
    z-index: 1 !important;
}

/* Ensure Elementor sections with page headers don't overlap header */
.elementor-section:first-child .bobamid-page-header {
    position: relative;
    z-index: 1 !important;
}
