/**
 * Yazgu Footer Stilleri
 * Version: 10.2
 */

/* =====================================================
   CSS DEĞİŞKENLERİ - YEŞİL PALET
   ===================================================== */
:root {
    /* Arka Plan Renkleri */
    --yazgu-bg: #ECFDF5;
    --yazgu-hover-bg: #D1FAE5;
    --yazgu-active-bg: #A7F3D0;
    --yazgu-border: #A7F3D0;
    
    /* Metin Renkleri */
    --yazgu-text: #064E3B;
    --yazgu-text-dark: #022C22;
    --yazgu-text-hover: #047857;
    
    /* Ana/Vurgu Renkleri */
    --yazgu-primary: #059669;
    --yazgu-primary-dark: #047857;
    --yazgu-active: #10B981;
    
    /* Bildirim Badge */
    --yazgu-badge-bg: #EF4444;
    --yazgu-badge-text: #FFFFFF;
    
    /* Gölge */
    --yazgu-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --yazgu-shadow-light: 0 -2px 15px rgba(0, 0, 0, 0.08);
}

/* =====================================================
   FOOTER ANA YAPI
   ===================================================== */
#yazgu-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: var(--yazgu-bg) !important;
    box-shadow: var(--yazgu-shadow-light) !important;
    z-index: 9999998 !important;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    padding: 12px 0 8px 0 !important;
    border-top: 1px solid var(--yazgu-border) !important;
}

#yazgu-footer.yazgu-hide {
    transform: translateY(100%) !important;
}

/* =====================================================
   FOOTER İÇ - MASAÜSTÜ %80
   ===================================================== */
.yazgu-footer-inner {
    max-width: 80%;
    width: 80%;
    margin: 0 auto;
    padding: 0;
}

/* =====================================================
   FOOTER MENÜ
   ===================================================== */
.yazgu-footer-menu {
    display: flex;
    justify-content: space-around;
    align-items: center;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.yazgu-footer-menu li {
    flex: 1;
    text-align: center;
    position: relative;
}

.yazgu-footer-menu li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    padding: 8px 5px !important;
    border-radius: 12px;
    transition: all 0.3s ease !important;
    position: relative;
}

.yazgu-footer-menu li a:hover {
    background: var(--yazgu-hover-bg) !important;
}

.yazgu-footer-menu li a:active,
.yazgu-footer-menu li.active a {
    background: var(--yazgu-active-bg) !important;
}

/* =====================================================
   İCONLAR
   ===================================================== */
.yazgu-footer-menu li a .yazgu-icon {
    font-size: 24px;
    color: var(--yazgu-text);
    margin-bottom: 4px;
    line-height: 1;
    transition: color 0.3s ease;
}

.yazgu-footer-menu li a .yazgu-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--yazgu-text);
    fill: none;
    stroke-width: 1.5;
    transition: all 0.3s ease;
}

/* Hover durumu */
.yazgu-footer-menu li a:hover .yazgu-icon {
    color: var(--yazgu-primary);
}

.yazgu-footer-menu li a:hover .yazgu-icon svg {
    stroke: var(--yazgu-primary);
    stroke-width: 2;
}

/* Aktif durumu */
.yazgu-footer-menu li.active a .yazgu-icon {
    color: var(--yazgu-active);
}

.yazgu-footer-menu li.active a .yazgu-icon svg {
    stroke: var(--yazgu-active);
    stroke-width: 2.5;
    fill: var(--yazgu-active);
    fill-opacity: 0.15;
}

/* =====================================================
   MENÜ YAZISI
   ===================================================== */
.yazgu-footer-menu li a .yazgu-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--yazgu-text);
    line-height: 1.2;
    margin-top: 2px;
    transition: all 0.3s ease;
}

/* Sosyal Medya - Masaüstü/Mobil yazı değişimi */
.yazgu-label-mobile {
    display: none;
}

.yazgu-label-desktop {
    display: inline;
}

/* Hover durumu */
.yazgu-footer-menu li a:hover .yazgu-label {
    color: var(--yazgu-primary);
}

/* Aktif durumu */
.yazgu-footer-menu li.active a .yazgu-label {
    font-weight: 700;
    color: var(--yazgu-active);
}

/* =====================================================
   SAYAÇ (BADGE)
   ===================================================== */
.yazgu-footer-menu li a .yazgu-badge-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yazgu-footer-menu li a .yazgu-msg-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    background: #EF4444;
    color: var(--yazgu-badge-text);
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    animation: badge-pulse 2s infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.yazgu-footer-menu li a .yazgu-msg-badge:empty {
    display: none;
}

/* =====================================================
   RESPONSİVE - MOBİL %100
   ===================================================== */
@media (max-width: 768px) {
    .yazgu-footer-inner {
        max-width: 100% !important;
        padding: 0 5px;
    }

    #yazgu-footer {
        padding: 6px 0 !important;
        padding-bottom: calc(6px + env(safe-area-inset-bottom)) !important;
    }

    .yazgu-footer-menu li a {
        padding: 6px 3px !important;
    }

    .yazgu-footer-menu li a .yazgu-icon svg {
        width: 22px;
        height: 22px;
    }

    .yazgu-footer-menu li a .yazgu-label {
        font-size: 10px;
    }
    
    /* Mobilde "Sosyal" göster, masaüstünde "Sosyal Medya" göster */
    .yazgu-label-mobile {
        display: inline;
    }
    
    .yazgu-label-desktop {
        display: none;
    }
}

/* PWA Safe Area */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    #yazgu-footer {
        padding-bottom: calc(8px + env(safe-area-inset-bottom)) !important;
    }
}
/* Footer icon alignment */
#menu-1-footer-mesajlar i,
#menu-1-footer-mesajlar svg,
#menu-1-footer-guruplar i,
#menu-1-footer-guruplar svg,
#menu-1-footer-formlar i,
#menu-1-footer-formlar svg,
#menu-1-footer-profil i,
#menu-1-footer-profil svg {
    position: relative;
    top: 3px;
}

/* Hide item header on specific page */
body.page-id-0 .item-header {
    display: none !important;
}

/* Submenus open upward */
.elementskit-submenu-panel {
    top: auto !important;
    bottom: 100% !important;
}

footer {
    position: relative !important;
    width: 100% !important;
    margin: 0 auto !important;
    z-index: 9999;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .yazgu-footer-content {
        padding: 0 5px !important;
        gap: 4px !important;
    }

    .yazgu-footer-menu {
        margin: 0 4px !important;
    }

    .yazgu-menu-btn {
        padding: 10px 12px !important;
    }
}

/* Dropdown - upward open behavior */
#yazgu-footer .yazgu-dropdown {
    position: absolute !important;
    top: auto !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: none;
    background: #fff;
    width: 400px;
    padding: 12px 0;
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(0,0,0,0.12);
    z-index: 999999 !important;
}

/* Tablet adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    #yazgu-footer .yazgu-dropdown {
        width: 70vw !important;
        max-width: 70vw !important;
        bottom: 105% !important;
    }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #yazgu-footer .yazgu-dropdown {
        width: 200px !important;
        max-width: 200px !important;
        min-width: 300px;
        bottom: 30px !important;
        background: #f1f1f1;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        padding: 12px 0;
        z-index: 1000;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        margin-bottom: 30px;
    }
}

/* Prevent footer overflow in Elementor */
footer,
.elementor-location-footer,
.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget-container {
    overflow: visible !important;
}

/* Dropdown links */
.yazgu-dropdown a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 12px 20px !important;
    text-decoration: none !important;
    color: #0b0622;
    font-size: 15px;
}

.yazgu-dropdown a:hover {
    background: #f9e4f7;
}

/* Dropdown visible state */
.yazgu-dropdown.show {
    display: block !important;
}

/* Fixed footer (bottom bar) */
#yazgu-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background-color: #f9e4f7;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.yazgu-footer-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    height: 100%;
}

/* Badge */
.yazgu-badge {
    background: #c1303f;
    padding: 2px 6px;
    border-radius: 6px;
    color: #fff;
    font-size: 13px;
}

@media (max-width: 768px) {
    .yazgu-badge { font-size: 10px; }
    .yazgu-footer-menu { font-size: 10px; margin: 0; }
}

/* Footer button */
.yazgu-menu-btn {
    cursor: pointer;
    color: #282828;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    flex-direction: column;
    position: relative;
    margin-top: 10px;
}

/* Icon */
.yazgu-menu-icon {
    font-size: 20px !important;
}

/* Badge position */
.yazgu-msg-badge {
    position: absolute;
    top: 20px;
    right: 10px;
    font-size: 10px !important;
}

/* Prevent footer overlap */
body {
    padding-bottom: 60px;
}

/* YAZGU HEADER – tam ekran sabit başlık */
#yazgu-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  max-width: 100vw;
  margin: 0;
  padding: 0;
  z-index: 9999;
  background: #f9e4f7;
  height: 60px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: transform 0.35s ease;
}

/* HEADER container – ortalanmış, optimum genişlik */
header.site-header .site-header-container {
  width: 70%;
  max-width: 80%;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}
