/* ============================================
   MOBILE FOOTER - Professional Responsive Styles
   IMPORTANT: This file must load AFTER responsive.css
   ============================================ */

/* ============================================
   1. FOOTER BASE - MOBILE OPTIMIZATIONS
   ============================================ */
@media screen and (max-width: 1199px) {
    #footer {
        padding: 40px 0 30px !important;
    }
    
    #footer .container,
    #footer .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Footer sections */
    #footer .row {
        margin-left: -10px;
        margin-right: -10px;
    }
    
    #footer .row > [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
        margin-bottom: 25px;
    }
}

/* ============================================
   1.1. FOOTER MOBILE LAYOUT - 2 COLUMN (Kurumsal & Hızlı Linkler)
   CRITICAL: Bootstrap col-xs-12 override - MUST use float for compatibility
   ============================================ */
@media screen and (max-width: 767px) {
    #footer {
        padding: 30px 0 25px !important;
    }
    
    /* Logo ve İletişim - Full width üstte, merkezi - CRITICAL OVERRIDE */
    html body #footer .footer-area .row > .col-xs-12.col-sm-4.col-lg-3:first-child,
    #footer .footer-area .row > .col-xs-12.col-sm-4.col-lg-3:first-child {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        margin-bottom: 25px;
        text-align: center;
        padding-bottom: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Bootstrap col-xs-12 OVERRIDE - Tüm col-xs-12'leri önce sıfırla */
    html body #footer .footer-area .row > [class*="col-xs-12"],
    #footer .footer-area .row > [class*="col-xs-12"] {
        width: auto !important;
        max-width: none !important;
        float: none !important;
        clear: none !important;
    }
    
    /* Kurumsal - Sol kolon (50%) - FLOAT LEFT - CRITICAL OVERRIDE */
    /* Class-based selector FIRST for highest specificity */
    html body #footer .footer-area .row > .footer-kurumsal,
    html body #footer .footer-area .row > .col-xs-12.col-sm-2.col-lg-3.footer-kurumsal,
    html body #footer .footer-area .row > .col-xs-12.col-sm-2.col-lg-3,
    html body #footer .footer-area .row > div:nth-child(2).col-xs-12.col-sm-2.col-lg-3,
    html body #footer .footer-area .row > div:nth-child(2),
    #footer .footer-area .row > .footer-kurumsal,
    #footer .footer-area .row > .col-xs-12.col-sm-2.col-lg-3.footer-kurumsal,
    #footer .footer-area .row > .col-xs-12.col-sm-2.col-lg-3,
    #footer .footer-area .row > div:nth-child(2) {
        width: 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        float: left !important;
        clear: none !important;
        margin-bottom: 20px;
        padding-left: 8px !important;
        padding-right: 8px !important;
        text-align: left;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Hızlı Linkler - Sağ kolon (50%) - FLOAT LEFT - CRITICAL OVERRIDE */
    /* Class-based selector FIRST for highest specificity */
    html body #footer .footer-area .row > .footer-hizli-linkler,
    html body #footer .footer-area .row > .col-xs-12.col-sm-3.footer-hizli-linkler,
    html body #footer .footer-area .row > .col-xs-12.col-sm-2.col-lg-3 + .col-xs-12.col-sm-3,
    html body #footer .footer-area .row > div:nth-child(3).col-xs-12.col-sm-3,
    html body #footer .footer-area .row > .col-xs-12.col-sm-3:nth-of-type(1),
    html body #footer .footer-area .row > div:nth-child(3),
    #footer .footer-area .row > .footer-hizli-linkler,
    #footer .footer-area .row > .col-xs-12.col-sm-3.footer-hizli-linkler,
    #footer .footer-area .row > .col-xs-12.col-sm-2.col-lg-3 + .col-xs-12.col-sm-3,
    #footer .footer-area .row > div:nth-child(3).col-xs-12.col-sm-3,
    #footer .footer-area .row > div:nth-child(3),
    /* CRITICAL: Override col-xs-12 width - Hızlı Linkler için */
    #footer .footer-area .row > .col-xs-12.col-sm-3:not(:last-child) {
        width: 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        float: left !important;
        clear: none !important;
        margin-bottom: 20px;
        padding-left: 8px !important;
        padding-right: 8px !important;
        text-align: left;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Sosyal Medya - Full width altta, merkezi - CRITICAL OVERRIDE */
    html body #footer .footer-area .row > .col-xs-12.col-sm-3:last-child,
    html body #footer .footer-area .row > div:nth-child(4).col-xs-12.col-sm-3,
    html body #footer .footer-area .row > .col-xs-12.col-sm-3:nth-of-type(2),
    html body #footer .footer-area .row > div:nth-child(4),
    #footer .footer-area .row > .col-xs-12.col-sm-3:last-child,
    #footer .footer-area .row > div:nth-child(4) {
        width: 100% !important;
        max-width: 100% !important;
        float: none !important;
        clear: both !important;
        margin-top: 15px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        text-align: center;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Clearfix for floated elements - CRITICAL */
    #footer .footer-area .row::after {
        content: '';
        display: table;
        clear: both;
    }
    
    /* Butonlar row - Full width */
    #footer .footer-area .row:last-of-type {
        clear: both;
        margin-top: 20px;
        display: block !important;
    }
}

/* ============================================
   2. FOOTER TITLES - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer h3,
    #footer h4,
    #footer h5,
    #footer .f-heading {
        font-size: 15px !important;
        margin-bottom: 12px !important;
        text-align: left;
        font-weight: 600;
    }
    
    /* Logo bölümü başlığı merkezi */
    #footer .col-xs-12.col-sm-4.col-lg-3:first-child h3,
    #footer .col-xs-12.col-sm-4.col-lg-3:first-child .f-heading {
        text-align: center;
    }
    
    /* Sosyal Medya başlığı merkezi */
    #footer .col-xs-12.col-sm-3:last-of-type h3,
    #footer .col-xs-12.col-sm-3:last-of-type .f-heading {
        text-align: center;
    }
}

/* ============================================
   3. FOOTER TEXT - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer p,
    #footer .footer-text {
        font-size: 13px !important;
        line-height: 1.6 !important;
        margin-bottom: 12px;
    }
    
    /* Logo bölümü metni merkezi */
    #footer .col-xs-12.col-sm-4.col-lg-3:first-child p,
    #footer .col-xs-12.col-sm-4.col-lg-3:first-child .footer-text {
        text-align: center;
    }
}

/* ============================================
   4. FOOTER LINKS - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer a {
        font-size: 13px !important;
        padding: 6px 0;
        display: inline-block;
        min-height: 36px;
        line-height: 1.5;
    }
    
    #footer ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    #footer ul li {
        margin-bottom: 8px;
        text-align: left;
    }
    
    #footer ul li a {
        display: inline-block;
        padding: 6px 0;
        min-width: auto;
        text-align: left;
        font-size: 12px !important;
    }
    
    /* Kurumsal ve Hızlı Linkler için özel düzen */
    #footer .col-xs-12.col-sm-2.col-lg-3 ul li,
    #footer .col-xs-12.col-sm-3 ul li {
        margin-bottom: 6px;
    }
    
    #footer .col-xs-12.col-sm-2.col-lg-3 ul li a,
    #footer .col-xs-12.col-sm-3 ul li a {
        font-size: 12px !important;
        padding: 5px 0;
        min-height: 32px;
    }
    
    /* Logo bölümü linkleri merkezi */
    #footer .col-xs-12.col-sm-4.col-lg-3:first-child ul li,
    #footer .col-xs-12.col-sm-4.col-lg-3:first-child ul li a {
        text-align: center;
    }
}

/* ============================================
   5. FOOTER COPYRIGHT - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer .copyright {
        text-align: center !important;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #footer .copyright p {
        font-size: 11px !important;
        margin: 0;
        padding: 10px 0;
    }
}

/* ============================================
   6. FOOTER LANGUAGE SELECTOR - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer .language-selector,
    #footer .footer-language-selector {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px !important;
        margin: 20px 0 !important;
        padding: 15px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    #footer .language-selector a,
    #footer .footer-language-selector a {
        margin: 0 !important;
    }
}

/* ============================================
   7. FOOTER SOCIAL ICONS - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer .social-network,
    #footer .social-icons,
    #footer .social-links {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 12px;
        margin: 15px 0 0 0;
    }
    
    #footer .social-network li,
    #footer .social-icons li,
    #footer .social-links li {
        margin: 0 !important;
        display: inline-block;
        list-style: none;
    }
    
    #footer .social-network a,
    #footer .social-icons a,
    #footer .social-links a {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.1);
        transition: all 0.3s ease;
        font-size: 18px;
        color: #fff;
    }
    
    #footer .social-network a:hover,
    #footer .social-icons a:hover,
    #footer .social-links a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: scale(1.1);
    }
}

/* ============================================
   8. FOOTER CONTACT INFO - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer .contact-list,
    #footer .contact-info,
    #footer .footer-contact {
        text-align: center;
    }
    
    #footer .contact-list li,
    #footer .contact-info p,
    #footer .footer-contact p {
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }
    
    #footer .contact-list i,
    #footer .contact-info i,
    #footer .footer-contact i {
        font-size: 16px;
        width: 20px;
        text-align: center;
    }
}

/* ============================================
   9. FOOTER BACK TO TOP BUTTON - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #back-top {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
        background-color: rgba(50, 48, 49, 0.9);
        color: #ffffff;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
        cursor: pointer;
        z-index: 999;
        transition: all 0.3s ease;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    #back-top:hover {
        background-color: rgba(50, 48, 49, 1);
        transform: translateY(-3px);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    }
    
    #back-top:active {
        transform: translateY(-1px);
    }
}

/* ============================================
   10. FOOTER BUTTONS - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer .btn-holder {
        text-align: center;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        clear: both;
    }
    
    #footer .btn-holder .btn {
        display: inline-block;
        margin: 5px;
        min-width: 140px;
        font-size: 13px !important;
        padding: 12px 20px;
    }
}

/* ============================================
   11. FOOTER HOLDER (Copyright & Language) - MOBILE
   ============================================ */
@media screen and (max-width: 767px) {
    #footer .footer-holder {
        padding: 20px 0 !important;
    }
    
    #footer .footer-holder .row {
        display: flex;
        flex-wrap: wrap;
        text-align: center;
    }
    
    #footer .footer-holder .col-xs-12 {
        width: 100% !important;
        float: none !important;
        margin-bottom: 15px;
    }
    
    #footer .footer-holder .col-xs-12:last-child {
        margin-bottom: 0;
    }
    
    /* Copyright merkezi */
    #footer .footer-holder .col-xs-12.col-sm-6 {
        text-align: center !important;
    }
    
    /* Language selector merkezi */
    #footer .footer-holder .col-xs-12.col-sm-3.text-center {
        text-align: center !important;
    }
    
    /* Back to top merkezi */
    #footer .footer-holder .col-xs-12.col-sm-3.text-right {
        text-align: center !important;
    }
}

/* ============================================
   12. FOOTER VISIBILITY - ENSURE IT'S VISIBLE
   ============================================ */
@media screen and (max-width: 1199px) {
    #footer {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: relative;
        width: 100%;
    }
}

/* ============================================
   13. FOOTER TOUCH OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    #footer a {
        min-height: 44px;
        padding: 12px 15px;
    }
    
    #footer button {
        min-width: 44px;
        min-height: 44px;
    }
}

/* ============================================
   14. FOOTER PRINT STYLES
   ============================================ */
@media print {
    #footer {
        page-break-inside: avoid;
    }
    
    #footer .language-selector,
    #footer .social-icons,
    #back-top {
        display: none !important;
    }
}
