/**
 * DomainQ - Mega Menu CSS
 * Full-width dropdown mega menü stilleri
 */

/* ========================================
   MEGA MENU CONTAINER
   ======================================== */

.mega-menu-wrapper {
    position: static;
}

.mega-menu-trigger {
    position: relative;
    /* Simetrik dikey padding + negatif margin: hover çizgisi/mega menü köprüsünü
       korur, ancak öğeyi dikeyde ortalı tutar (align-items: center ile hizalı). */
    padding-top: 16px !important;
    padding-bottom: 16px !important;
    margin-top: -16px;
    margin-bottom: -16px;
}

.mega-menu-trigger::after {
    content: '';
    position: absolute;
    /* top: auto + opacity: 1 -> sayfaya özel global "button::after" ripple
       efektlerinin (top: 50%, opacity: 0) bu alt çizgiye sızmasını engeller. */
    top: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--color-primary, #4F46E5);
    border-radius: 3px 3px 0 0;
    opacity: 1;
    transition: width 0.2s ease;
}

.mega-menu-wrapper:hover .mega-menu-trigger::after {
    width: 80%;
}

/* Mega menü ile trigger arasındaki boşluğu köprülemek için */
.mega-menu::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    background: transparent;
}

.mega-menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    z-index: 1000;
    padding: 32px 0;
    margin-top: 20px;
    border-top: 3px solid var(--color-primary, #4F46E5);
}

.mega-menu.active,
.mega-menu-wrapper:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   MEGA MENU INNER CONTAINER
   ======================================== */

.mega-menu-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ========================================
   ARROW INDICATOR
   ======================================== */

.mega-menu-arrow {
    position: absolute;
    top: -12px;
    width: 24px;
    height: 12px;
    overflow: hidden;
}

.mega-menu-arrow::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-top: 3px solid var(--color-primary, #4F46E5);
    border-left: 3px solid var(--color-primary, #4F46E5);
    box-shadow: -2px -2px 4px rgba(0, 0, 0, 0.05);
}

/* Arrow positions - dynamically set via JS */
.mega-menu-arrow {
    display: none;
    /* Arrow'u kaldır, sadece border ile göster */
}

/* ========================================
   LAYOUT TYPES
   ======================================== */

/* TYPE A: 3 Kolonlu (WordPress, Email) */
.mega-menu--type-a .mega-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.2fr;
    gap: 40px;
}

/* TYPE B: Arama + Linkler (Domains) */
.mega-menu--type-b .mega-menu-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
}

/* TYPE C: 4 Kolonlu (Hosting, Websites, Pro Services) */
.mega-menu--type-c .mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

/* ========================================
   COLUMNS
   ======================================== */

.mega-col {
    padding: 0;
}

.mega-col-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.mega-col-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4F46E5;
    font-size: 20px;
}

.mega-col-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* ========================================
   MENU LINKS
   ======================================== */

.mega-link {
    display: block;
    padding: 14px 0;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.mega-link:hover {
    background: #f8fafc;
    padding-left: 16px;
    padding-right: 16px;
    margin-left: -16px;
    margin-right: -16px;
}

.mega-link-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.mega-link-title:hover {
    color: #4F46E5;
}

.mega-link-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

/* ========================================
   BADGES
   ======================================== */

.mega-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-badge-sale {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.mega-badge-new {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1d4ed8;
}

.mega-badge-free {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #047857;
}

.mega-badge-hot {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
}

/* ========================================
   FEATURES SECTION
   ======================================== */

.mega-features {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    height: 100%;
}

/* TYPE_C için dar kolon - tek sütun grid */
.mega-menu--type-c .mega-features {
    padding: 20px;
}

.mega-menu--type-c .mega-features-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.mega-menu--type-c .mega-feature-item {
    min-height: auto;
    padding: 12px 14px;
}

.mega-menu--type-c .mega-feature-item h5 {
    font-size: 12px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mega-menu--type-c .mega-feature-item h5 i {
    font-size: 12px;
}

.mega-menu--type-c .mega-feature-item p {
    font-size: 11px;
    line-height: 1.4;
}

.mega-features-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 8px;
}

.mega-features-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.mega-features-title i {
    color: #4F46E5;
}

.mega-features-link {
    font-size: 13px;
    font-weight: 600;
    color: #4F46E5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mega-features-link i {
    transition: transform 0.2s ease;
}

.mega-features-link:hover i {
    transform: translateX(4px);
}

.mega-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mega-feature-item {
    padding: 16px;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    min-height: 90px;
}

.mega-feature-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #4F46E5;
    transform: translateY(-2px);
}

.mega-feature-item h5 {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    line-height: 1.4;
}

.mega-feature-item h5 i {
    font-size: 14px;
    flex-shrink: 0;
}

.mega-feature-item h5 .mega-badge {
    font-size: 9px;
    padding: 2px 6px;
}

.mega-feature-item p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
    flex-grow: 1;
}

/* ========================================
   DESCRIPTION BOX
   ======================================== */

.mega-description {
    padding: 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
}

.mega-description-title {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 14px 0;
}

.mega-description-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.8;
    margin: 0;
}

/* ========================================
   DOMAIN SEARCH (TYPE B)
   ======================================== */

.mega-domain-search {
    margin-bottom: 24px;
}

.mega-domain-search-title {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 18px;
}

.mega-domain-input-wrapper {
    display: flex;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s ease;
    background: #ffffff;
}

.mega-domain-input-wrapper:focus-within {
    border-color: #4F46E5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.mega-domain-input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    outline: none;
    font-size: 15px;
    color: #1e293b;
}

.mega-domain-input::placeholder {
    color: #94a3b8;
}

.mega-domain-btn {
    padding: 16px 24px;
    background: #4F46E5;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 16px;
}

.mega-domain-btn:hover {
    background: #4338ca;
}

/* dark-hero.css'in genel "nav button:hover -> background: transparent" kuralı
   bu düğmeyi de yakalayıp beyaz ikonu beyaz zeminde görünmez yapıyordu.
   Yüksek özgüllüklü istisna: arama düğmesinin zemini her durumda indigo kalır. */
body .header-main .mega-menu .mega-domain-btn,
body #main-header .mega-menu .mega-domain-btn {
    background: #4F46E5 !important;
    background-color: #4F46E5 !important;
}

body .header-main .mega-menu .mega-domain-btn:hover,
body #main-header .mega-menu .mega-domain-btn:hover {
    background: #4338ca !important;
    background-color: #4338ca !important;
}

.mega-domain-extensions {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.mega-domain-ext {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    transition: color 0.2s ease;
    cursor: pointer;
}

.mega-domain-ext:hover {
    color: #4F46E5;
}

.mega-domain-ext-link {
    font-size: 13px;
    color: #4F46E5;
    text-decoration: none;
    font-weight: 600;
}

/* ========================================
   PROMO CARD (TYPE B)
   ======================================== */

.mega-promo {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 16px;
    padding: 24px;
}

.mega-promo-badge {
    display: inline-block;
    background: #f97316;
    color: #ffffff;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.mega-promo-price {
    font-size: 28px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.mega-promo-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 18px;
}

.mega-promo-link {
    font-size: 14px;
    font-weight: 600;
    color: #4F46E5;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Compact Promo Cards */
.mega-promo-compact {
    padding: 16px;
    border-radius: 12px;
}

.mega-promo-compact .mega-promo-badge {
    margin-bottom: 8px;
    padding: 3px 10px;
    font-size: 9px;
}

.mega-promo-compact .mega-promo-price {
    margin-bottom: 6px;
}

/* ========================================
   INFO CARDS (TYPE B)
   ======================================== */

.mega-info-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    margin: 0 -14px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.mega-info-card:last-of-type {
    border-bottom: none;
}

.mega-info-card:hover {
    background: #f8fafc;
    transform: translateX(4px);
}

.mega-info-card:hover .mega-info-content h5 {
    color: #4F46E5;
}

.mega-info-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #e0e7ff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4F46E5;
    flex-shrink: 0;
}

.mega-info-content h5 {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mega-info-content p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* ========================================
   LINK LIST
   ======================================== */

.mega-link-list {
    margin-top: 20px;
}

.mega-link-list-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 14px;
}

.mega-link-list a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 14px;
    color: #475569;
    text-decoration: none;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s ease;
}

.mega-link-list a:hover {
    color: #4F46E5;
    padding-left: 8px;
}

.mega-link-list a i {
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mega-link-list a:hover i {
    opacity: 1;
}

/* ========================================
   BOTTOM LINK
   ======================================== */

.mega-bottom-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    color: #4F46E5;
    text-decoration: none;
}

.mega-bottom-link:hover {
    text-decoration: underline;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1200px) {
    .mega-menu-inner {
        padding: 0 24px;
    }

    .mega-menu--type-a .mega-menu-grid,
    .mega-menu--type-b .mega-menu-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mega-menu--type-c .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mega-menu {
        display: none !important;
    }
}