/* ==========================================================================
   SERNEXA CORE & WHMCS COMPATIBILITY CSS
   ========================================================================== */

/* 1. GENEL SIFIRLAMA */
* { margin: 0; padding: 0; box-sizing: border-box; text-decoration: none; list-style: none; }

html, body {
    width: 100%;
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    font-family: 'Inter', sans-serif;
    background: #f8fafc;
    color: #333;
}

/* 2. GRID SİSTEMİ (WHMCS ÇAKIŞMA ÖNLEYİCİ) */
/* Sadece Sernexa'nın kendi ana sayfa bölümlerinde etkili olması için .container kullanımını kısıtladık */
.sernexa-modern-hero .container, 
.domain-checker-section .container, 
.sernexa-services .container,
.sernexa-testimonials .container,
.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* 3. TOP BAR & HEADER */
.top-bar { background: #fbfcfe; color: #444; padding: 10px 0; font-size: 13px; border-bottom: 1px solid #edf2f7; }
.top-flex { display: flex; justify-content: space-between; align-items: center; }
.top-left span { margin-right: 25px; font-weight: 500; }
.top-left i { color: #0062cc; margin-right: 6px; }
.top-right { display: flex; align-items: center; }
.top-right a { color: #444; margin-left: 20px; font-weight: 600; transition: 0.3s; }
.top-cart { margin-right: 15px; padding-right: 15px; border-right: 1px solid #edf2f7; color: #002347 !important; }
.top-cart span { background: #0062cc; color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 50px; font-weight: 700; }

/* STICKY HEADER */
.main-header {
    background: #fff !important;
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid #f0f0f0;
}
.header-flex { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.main-logo { height: 50px; width: auto; object-fit: contain; }

.nav-list { display: flex; gap: 20px; align-items: center; }
.nav-list > li > a { padding: 10px 0; color: #002347; font-weight: 600; font-size: 15px; transition: 0.3s; }
.nav-list > li > a:hover { color: #0062cc; }

.btn-login { background: #002347; color: #fff; padding: 10px 22px; border-radius: 6px; font-weight: 700; font-size: 14px; transition: 0.3s; }
.btn-login:hover { background: #0062cc; box-shadow: 0 4px 12px rgba(0,98,204,0.2); }

/* 4. MEGA MENÜ (DESKTOP) */
.has-mega { position: static !important; }
.mega-dropdown {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: 100%; max-width: 900px;
    background: #fff;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border-radius: 15px;
    border-top: 4px solid #0062cc;
    padding: 30px;
    display: none;
    z-index: 9999;
}
.has-mega:hover .mega-dropdown { display: block; animation: menuFadeIn 0.3s ease-out forwards; }

.mega-wrapper { display: flex; gap: 30px; }
.mega-links { flex: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.mega-item { 
    display: flex; align-items: center; gap: 15px; padding: 15px; 
    border-radius: 10px; transition: 0.2s; border: 1px solid transparent; 
}
.mega-item:hover { background: #f8fbff; border-color: #e2e8f0; transform: translateY(-2px); }
.mega-item i { 
    font-size: 22px; color: #0062cc; background: #f0f7ff; 
    width: 45px; height: 45px; display: flex; align-items: center; 
    justify-content: center; border-radius: 12px; 
}
.mega-item strong { display: block; font-size: 15px; color: #0f172a; margin-bottom: 2px; }
.mega-item span { font-size: 12px; color: #64748b; line-height: 1.4; }

.mega-side { flex: 0.8; background: #f8fafc; padding: 25px; border-radius: 15px; text-align: center; border: 1px solid #e2e8f0; }

@keyframes menuFadeIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* 5. MOBİL MENÜ & MEGA MENÜ HİZALAMA */
@media (max-width: 992px) {
    .mobile-menu-btn { display: block; font-size: 24px; cursor: pointer; }
    .nav-menu {
        position: fixed; top: 0; right: -100%;
        width: 300px; height: 100vh;
        background: #fff; z-index: 10000;
        transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        padding: 70px 20px 20px; overflow-y: auto;
    }
    .nav-menu.active { right: 0; }
    
    .nav-list { flex-direction: column; gap: 0; }
    .nav-list li a { padding: 15px 0; border-bottom: 1px solid #f1f5f9; width: 100%; display: flex; justify-content: space-between; }

    /* Mobil Mega Menü Hizalama Fix */
    .mega-dropdown {
        position: static !important; display: none; width: 100% !important;
        transform: none !important; box-shadow: none !important; padding: 0 !important;
        background: #f8fafc !important; border: none !important;
    }
    .has-mega.open .mega-dropdown { display: block !important; }
    .mega-wrapper { flex-direction: column !important; gap: 0; }
    .mega-links { display: block !important; }
    
    .mega-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 15px !important;
        gap: 15px !important;
        border-bottom: 1px solid #edf2f7 !important;
        border-radius: 0;
    }
    /* İkonları Mobilde Sabitle */
    .mega-item i {
        width: 42px !important; height: 42px !important;
        min-width: 42px !important; font-size: 18px !important;
        background: #fff !important; border: 1px solid #e2e8f0;
    }
    .mega-item div { text-align: left !important; }
    .mega-side { display: none !important; }
}

/* 6. WHMCS ÖZEL ONARIM (CRITICAL) */
/* WHMCS sayfalarında Sernexa'nın bozucu etkisini bu blokla nötrlüyoruz */
#main-body .container { display: flex; flex-wrap: wrap; }
#main-body .row { display: flex !important; flex-wrap: wrap !important; width: 100%; }

/* Sepet ve Kayıt Formları Fix */
.main-content .form-group, .main-content .col-md-6, .main-content .col-sm-6 {
    margin-bottom: 15px;
}
input.form-control, select.form-control {
    height: 45px !important;
    border-radius: 8px !important;
    border: 1px solid #ddd !important;
}

/* 7. FOOTER DESTEK ALANI */
.main-footer { background: #001226; color: #fff; }
.footer-support-wrapper {
    display: grid; grid-template-columns: repeat(4, 1fr);
    background: #001a35; padding: 30px; margin-bottom: 40px;
}
.f-support-box { display: flex; align-items: center; gap: 15px; text-decoration: none; border-right: 1px solid rgba(255,255,255,0.1); padding: 0 15px; }
.f-support-box:last-child { border: none; }
.fs-icon i { font-size: 24px; color: #0062cc; }
.fs-info strong { display: block; font-size: 14px; color: #fff; }

.footer-bottom { background: #000b1a; padding: 25px 0; text-align: center; font-size: 13px; color: #475569; }

/* 8. PARTNERLER (KAYAN LOGOLAR) */
.partners-marquee { overflow: hidden; width: 100%; background: #fff; padding: 40px 0; }
.partners-track { display: flex; width: calc(250px * 12); animation: scroll 40s linear infinite; }
.partner-item { width: 250px; display: flex; justify-content: center; }
.partner-item img { height: 35px; filter: grayscale(100%); opacity: 0.5; transition: 0.3s; }
.partner-item img:hover { filter: grayscale(0%); opacity: 1; }

@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-250px * 6)); } }

/* 9. ANNOUNCEMENT BAR */
.announcement-bar { background: #0f172a; color: #fff; padding: 10px 0; font-size: 13px; text-align: center; }
.announce-badge { background: #2563eb; padding: 2px 8px; border-radius: 4px; font-weight: 800; font-size: 10px; margin-right: 10px; }

/* Responsive Gridler */
@media (max-width: 992px) {
    .footer-support-wrapper { grid-template-columns: 1fr 1fr; gap: 20px; }
    .footer-grid { grid-template-columns: 1fr; }
}
/* ==========================================================================
   SERNEXA FOOTER REPAIR & LINKS ALIGNMENT
   ========================================================================== */

/* Footer Genel Düzenleme */
.main-footer {
    background: #001226;
    padding-top: 50px;
    color: #fff;
}

/* Footer Link Grupları (Grid Yapısı) */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr; /* Sütun genişlikleri dengelendi */
    gap: 50px;
    padding-bottom: 60px;
}

.footer-col h4 {
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

/* Başlık altındaki mavi çizgi */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: #0062cc;
}

/* Linklerin Dikey Hizalaması */
.footer-col ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px; /* Linkler arası boşluk artırıldı */
    display: block;
}

.footer-col ul li a {
    color: #94a3b8 !important; /* Kurumsal gri ton */
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Linklerin üzerine gelince sağa kayma ve beyazlama efekti */
.footer-col ul li a:hover {
    color: #fff !important;
    padding-left: 8px;
}

/* Link başına ikon eklemek istersen (isteğe bağlı) */
.footer-col ul li a::before {
    content: '\f105'; /* FontAwesome angle-right */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 12px;
    color: #0062cc;
}

/* Logo ve Hakkımızda Alanı */
.footer-col.about p {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.8;
    margin: 20px 0;
}

.footer-brand {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
}

/* Sosyal Medya İkonları */
.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 38px;
    height: 38px;
    background: #001a35;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: 0.3s;
}

.social-links a:hover {
    background: #0062cc;
    transform: translateY(-3px);
}

/* Alt Bant (Copyright) */
.footer-bottom {
    background: #000b1a;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 25px 0;
}

.fb-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fb-flex p {
    margin: 0;
    color: #475569;
    font-size: 13px;
}

/* MOBİL RESPONSIVE DÜZELTME */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr !important; /* Mobilde tek sütun */
        text-align: center;
        gap: 40px;
    }

    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-col ul li a {
        justify-content: center;
    }

    .footer-col ul li a:hover {
        padding-left: 0;
    }

    .social-links {
        justify-content: center;
    }

    .fb-flex {
        flex-direction: column;
        gap: 15px;
    }
}
/* 8. PARTNERLER (KAYAN LOGOLAR) - MODERN REPAIR */
.partners-section { 
    background: #fff; 
    padding: 60px 0; 
    border-top: 1px solid #f1f5f9; 
    border-bottom: 1px solid #f1f5f9;
}

.partner-title { 
    text-align: center; 
    font-weight: 800; 
    color: #002347; 
    margin-bottom: 40px; 
    font-size: 14px; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    opacity: 0.8;
}

.partners-marquee { 
    overflow: hidden; 
    width: 100%; 
    position: relative;
    padding: 10px 0;
}

/* Yanlardan hafif silinme efekti (Vinyet) */
.partners-marquee::before,
.partners-marquee::after {
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    pointer-events: none;
}
.partners-marquee::before {
    left: 0;
    top: 0;
    background: linear-gradient(to right, white 0%, rgba(255, 255, 255, 0) 100%);
}
.partners-marquee::after {
    right: 0;
    top: 0;
    background: linear-gradient(to left, white 0%, rgba(255, 255, 255, 0) 100%);
}

.partners-track { 
    display: flex; 
    width: calc(200px * 12); 
    animation: scroll 30s linear infinite; 
    align-items: center;
}

.partner-item { 
    width: 200px; 
    flex-shrink: 0;
    display: flex; 
    justify-content: center; 
    align-items: center;
    padding: 0 30px;
}

.partner-item img { 
    max-height: 40px; 
    max-width: 140px;
    width: auto;
    filter: grayscale(100%); 
    opacity: 0.4; 
    transition: all 0.4s ease; 
}

.partner-item img:hover { 
    filter: grayscale(0%); 
    opacity: 1; 
    transform: scale(1.1);
}

@keyframes scroll { 
    0% { transform: translateX(0); } 
    100% { transform: translateX(calc(-200px * 6)); } 
}

/* MOBİL AYARLAR */
@media (max-width: 992px) {
    .partners-section { padding: 40px 0; }
    .partner-item { width: 150px; padding: 0 20px; }
    .partners-track { width: calc(150px * 12); }
    @keyframes scroll { 
        0% { transform: translateX(0); } 
        100% { transform: translateX(calc(-150px * 6)); } 
    }
    .partners-marquee::before, .partners-marquee::after { width: 50px; }
}
