/* Nav menu positioning for full-width mega menus */
.nav-menu {
    position: relative;
}

/* Nav item positioning for mega menu */
.nav-item {
    position: relative;
}

/* Mega menu container */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 600px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1001;
    padding: 0;
    overflow: visible;
    pointer-events: none;
}

/* Show mega menu on hover */
.nav-item:hover .mega-menu,
.nav-item.active .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* Mega menu grid layout */
.mega-menu-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    /* Items flow from top to bottom, then to next column */
    grid-auto-flow: column;
    /* Default 3 rows for 6 items (most menus have 6 items) */
    grid-template-rows: repeat(3, auto);
    border: 1px solid #e4e8f0;
    border-top: none;
    /* Sol üst köşe 0 - başlıkla bütünleşmesi için */
    border-radius: 0 12px 12px 12px;
    padding: 0;
    gap: 0;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(12, 38, 97, 0.12);
    position: relative;
    z-index: 1002;
    /* Ensure seamless connection with nav item */
    margin-top: 0;
}

.mega-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    min-height: 40px;
    color: #15345a;
    text-decoration: none;
    background: #ffffff;
    border-radius: 0;
    border-right: 1px solid #e4e8f0;
    border-bottom: 1px solid #e4e8f0;
    transition: color 0.2s ease;
    position: relative;
}

/* Default: Remove right border on second column (items 4+) */
.mega-menu-item:nth-child(n+4) {
    border-right: none;
}

/* Default: Remove bottom border on row ends (every 3rd item) */
.mega-menu-item:nth-child(3n) {
    border-bottom: none;
}

/* Alan Adi menu - 4 items, 2 columns x 2 rows */
.mega-menu.domain-mega {
    min-width: 520px;
    max-width: 620px;
}

.mega-menu.domain-mega .mega-menu-content {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.mega-menu.hosting-mega {
    min-width: 560px;
    max-width: 680px;
}

.mega-menu.hosting-mega .mega-menu-content {
    grid-template-columns: repeat(2, minmax(230px, 1fr));
}

.mega-menu.domain-mega .mega-menu-content {
    grid-template-rows: repeat(2, auto);
}

.mega-menu.domain-mega .mega-menu-item:nth-child(3) {
    border-right: none;
    border-bottom: 1px solid #e4e8f0;
}

.mega-menu.domain-mega .mega-menu-item:nth-child(4) {
    border-right: none;
    border-bottom: none;
}

.mega-menu.domain-mega .mega-menu-item:nth-child(2) {
    border-bottom: none;
}

/* SSL Hosting menu - 3 items, 1 column (3 items stacked vertically) */
.mega-menu.ssl-mega .mega-menu-content {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, auto);
    max-width: 300px;
}

/* All SSL items - no right border (single column) */
.mega-menu.ssl-mega .mega-menu-item {
    border-right: none;
}

/* First and second items have bottom border */
.mega-menu.ssl-mega .mega-menu-item:nth-child(1),
.mega-menu.ssl-mega .mega-menu-item:nth-child(2) {
    border-bottom: 1px solid #e4e8f0;
}

/* Last item has no bottom border */
.mega-menu.ssl-mega .mega-menu-item:nth-child(3) {
    border-bottom: none;
}

/* SMS menu - 4 items, 2 columns x 2 rows */
.mega-menu.sms-mega .mega-menu-content {
    grid-template-rows: repeat(2, 1fr);
}

.mega-menu.sms-mega .mega-menu-content,
.mega-menu.software-mega .mega-menu-content {
    /* Remove rounding so the slider edges sit flush with the nav */
    border-radius: 0;
}

.mega-menu.sms-mega .mega-menu-content,
.mega-menu.software-mega .mega-menu-content {
    min-width: 520px;
    max-width: 560px;
    grid-template-columns: repeat(2, minmax(205px, 1fr));
}

.mega-menu.sms-mega .mega-menu-item:nth-child(n+3) {
    border-right: none;
}

/* Only bottom row items (2nd and 4th) have no bottom border */
.mega-menu.sms-mega .mega-menu-item:nth-child(2),
.mega-menu.sms-mega .mega-menu-item:nth-child(4) {
    border-bottom: none;
}

/* Top row items (1st and 3rd) have bottom border */
.mega-menu.sms-mega .mega-menu-item:nth-child(1),
.mega-menu.sms-mega .mega-menu-item:nth-child(3) {
    border-bottom: 1px solid #e4e8f0;
}

.mega-menu-item:hover {
    text-decoration: none;
}

.mega-menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: transparent;
    color: #0f3f8c;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: none;
    transition: transform 0.2s ease, color 0.2s ease;
}

.mega-menu-item:hover .mega-menu-icon {
    transform: translateY(-3px);
    color: #e94f43;
    box-shadow: none;
}

.mega-menu-icon i {
    color: inherit;
    transition: color 0.2s ease;
}

.mega-menu-item:hover .mega-menu-icon i {
    color: #e94f43;
}

.mega-menu-item:hover .mega-menu-title {
    color: #e94f43;
}

.mega-menu-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-menu-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mega-menu-title {
    font-size: 15px;
    font-weight: 700;
    color: #0f3f8c;
    line-height: 1.25;
    margin: 0;
}

.mega-menu-desc {
    font-size: 12px;
    color: #6d7b8c;
    line-height: 1.4;
    margin: 0;
}

.mega-menu-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    background: linear-gradient(135deg, #00c4b3 0%, #00d6c2 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    box-shadow: 0 6px 14px rgba(0, 198, 179, 0.22);
    letter-spacing: 0.08px;
}

/* Mega menu info strip (blue band with sliding text) */
.mega-menu.has-strip .mega-menu-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
}

.mega-menu.has-strip:not(.ssl-mega) .mega-menu-card {
    width: 100%;
}

.mega-menu.ssl-mega.has-strip .mega-menu-card {
    width: 300px;
}

.mega-menu.has-strip .mega-menu-content {
    border: 1px solid #e4e8f0;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
    border-radius: 0 12px 0 0;
    margin-top: 0;
    width: 100%;
}

.mega-menu.has-strip:not(.server-mega-redesigned) .mega-menu-card {
    border: none;
    border-radius: 0 12px 12px 12px;
    box-shadow: 0 8px 24px rgba(12, 38, 97, 0.12);
}

.mega-menu.server-mega-redesigned.has-strip .mega-menu-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 16px 34px rgba(8, 32, 94, 0.18);
}

.mega-menu-strip {
    --strip-scroll-duration: 18s;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(90deg, #0b2f7c 0%, #0b3b8f 55%, #0f49a8 100%);
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
    width: 100%;
}

.mega-menu-strip__icon {
    display: none;
}

.mega-menu-strip__slider {
    overflow: hidden;
    flex: 1;
    min-width: 0;
    min-height: 40px;
    position: relative;
    display: flex;
    align-items: center;
}

.mega-menu-strip__track {
    display: inline-flex;
    align-items: center;
    gap: 28px;
    white-space: nowrap;
    -webkit-animation: mega-strip-scroll var(--strip-scroll-duration) linear infinite;
    animation: mega-strip-scroll var(--strip-scroll-duration) linear infinite;
    will-change: transform;
}

.mega-menu-strip__item {
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: 0.1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.mega-menu-strip:hover .mega-menu-strip__track {
    -webkit-animation-play-state: paused;
    animation-play-state: paused;
}

@-webkit-keyframes mega-strip-scroll {
    from {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }

    to {
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
    }
}

@keyframes mega-strip-scroll {
    from {
        -webkit-transform: translateX(0);
        transform: translateX(0);
    }

    to {
        -webkit-transform: translateX(-50%);
        transform: translateX(-50%);
    }
}

/* Active and hover states for nav items */
.nav-item.active>a,
.nav-item:hover>a {
    color: #0f3f8c;
}

/* Wide mega menu layout for Sunucular (like corporate) - Requirements: 3.14, 3.15 */
.mega-menu.server-mega {
    /* Same positioning as corporate - centered relative to viewport */
    left: calc(-47vw + 100%);
    right: auto;
    transform: none;
    width: 80vw;
    min-width: 80vw;
}

.mega-menu.server-mega .mega-menu-content,
.mega-menu.server-mega .mega-menu-content.server-grid {
    display: grid !important;
    /* 4 equal width columns for server sections */
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    grid-template-rows: auto !important;
    grid-auto-flow: row !important;
    gap: 0;
    border-radius: 14px;
    border: 1px solid #e4e8f0;
    box-shadow: 0 16px 34px rgba(8, 32, 94, 0.18);
    overflow: hidden;
    align-items: stretch;
}

/* Redesigned servers mega menu - 5 column layout */
.mega-menu.server-mega-redesigned {
    left: calc(-35vw + 100%);
    right: auto;
    transform: none;
    width: 65vw;
    min-width: 65vw;
    max-width: 1400px;
}

.mega-menu.server-mega-redesigned .mega-menu-content,
.mega-menu.server-mega-redesigned .mega-menu-content.server-grid-5col {
    display: grid !important;
    /* 5 columns: 4 wider content columns + 1 advertising column - expanded for "paylaşımlı sunucular" */
    grid-template-columns: repeat(4, minmax(180px, 1fr)) 280px !important;
    grid-template-rows: auto !important;
    gap: 0;
    border-radius: 12px;
    border: 1px solid #e4e8f0;
    box-shadow: 0 16px 34px rgba(8, 32, 94, 0.18);
    overflow: hidden;
    align-items: stretch;
}

/* SMS mega menu - shifted left */
.mega-menu.sms-mega {
    left: calc(-280px);
    right: auto;
    transform: none;
}

/* Narrow SMS and Yazılım menus */
.mega-menu.sms-mega,
.mega-menu.software-mega {
    width: auto;
    min-width: 520px;
    max-width: 560px;
}

/* Yazılım (Software) mega menu - shifted left */
.mega-menu.software-mega {
    left: calc(-350px);
    right: auto;
    transform: none;
}

/* Corporate mega menu layout */
.corporate-mega {
    left: calc(-48vw + 100%);
    right: auto;
    transform: none;
    width: 60vw;
    min-width: 920px;
    max-width: 950px;
}

.corporate-mega .mega-menu-content,
.corporate-mega .mega-menu-content.corporate-grid {
    display: grid !important;
    /* 4 sütun: 3 sabit içerik sütunu + 1 daha geniş iletişim sütunu */
    grid-template-columns: repeat(3, 225px) minmax(245px, 1fr) !important;
    grid-template-rows: auto !important;
    grid-auto-flow: row !important;
    gap: 0;
    border-radius: 12px;
    border: none;
    box-shadow: 0 16px 34px rgba(8, 32, 94, 0.18);
    overflow: hidden;
    align-items: stretch;
}

.corporate-col {
    padding: 8px 10px;
    background: #fff;
    border-right: 1px solid #e8edf5;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

.corporate-col:last-of-type {
    border-right: none;
}

/* Server column styling for redesigned 5-column layout - Header-specific selectors */
.header .mega-menu .server-col {
    padding: 15px 12px;
    background: #fff;
    border-right: 1px solid #e8edf5;
    height: 220px;
    /* Reduced height for all columns */
    max-height: 220px;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow: hidden;
    /* Prevent content overflow */
}

.header .mega-menu .server-col:last-of-type {
    border-right: none;
}

.server-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #0a3f92;
    margin-bottom: 8px;
    position: relative;
}

.server-heading i {
    color: inherit;
}

.server-heading .heading-underline {
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 56px;
    height: 3px;
    background: #e94f43;
    border-radius: 4px;
}

.server-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
}

.server-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 0;
    color: #143d7b;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid #e9eef5;
    transition: color 0.2s ease;
}

.server-link:last-child {
    border-bottom: none;
}

.server-link i {
    font-size: 12px;
    color: inherit;
    transition: transform 0.2s ease, color 0.2s ease;
}

.server-link:hover {
    color: #e94f43;
    text-decoration: none;
}

.server-link:hover i {
    transform: translateX(3px);
    color: #e94f43;
}

/* Advertising column specific styling */
.feature-col {
    background: transparent;
    padding: 0;
    /* Remove padding so slider reaches column edges */
    height: 220px !important;
    /* Same height as other columns */
    max-height: 220px !important;
    display: flex;
    flex-direction: column;
    border-right: none !important;
    position: relative;
    overflow: hidden;
}

.feature-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: stretch;
    align-items: stretch;
    flex: 1;
    /* Take all available space */
    position: absolute;
    inset: 0;
}

.feature-placeholder {
    text-align: center;
    color: #64748b;
    padding: 20px;
    display: block !important;
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.placeholder-icon {
    font-size: 2.5rem;
    color: #e94f43;
    margin-bottom: 12px;
    display: block;
}

.feature-placeholder h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
    display: block;
}

.feature-placeholder p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 16px;
    display: block;
}

.feature-placeholder .btn {
    display: inline-block !important;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.feature-placeholder .btn-primary {
    background: #e94f43 !important;
    color: #fff !important;
    border: 1px solid #e94f43 !important;
}

.feature-placeholder .btn-primary:hover {
    background: #04a8b2 !important;
    border-color: #04a8b2 !important;
    transform: translateY(-1px);
}

/* Ensure advertising column is visible */
.feature-col {
    background: transparent !important;
    padding: 0 !important;
    min-height: 220px !important;
    display: flex !important;
    flex-direction: column !important;
    border-right: none !important;
    position: relative;
    overflow: hidden;
}

.feature-content {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: stretch !important;
    align-items: stretch !important;
    width: 100% !important;
    position: absolute;
    inset: 0;
}

.corporate-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: #0a3f92;
    margin-bottom: 10px;
    position: relative;
}

.corporate-heading i {
    color: inherit;
    /* İkonlar başlık rengiyle aynı olsun */
}

.corporate-heading .heading-underline {
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 56px;
    height: 3px;
    background: #e94f43;
    border-radius: 4px;
}

.corporate-list {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
}

.corporate-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 3px 0;
    color: #143d7b;
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    border-bottom: 1px solid #e9eef5;
    transition: color 0.2s ease;
}

.corporate-link:last-child {
    border-bottom: none;
}

.corporate-link i {
    font-size: 12px;
    color: inherit;
    /* İkonlar link rengiyle aynı olsun */
    transition: transform 0.2s ease, color 0.2s ease;
}

.corporate-link:hover {
    color: #e94f43;
    text-decoration: none;
}

.corporate-link:hover i {
    transform: translateX(3px);
    color: #e94f43;
}

.corporate-contact {
    background: linear-gradient(135deg, #0b2f6d 0%, #0a2a66 100%);
    color: #ffffff;
    padding: 12px 12px;
    display: grid;
    gap: 12px;
    min-height: 100%;
    align-content: center;
    border-radius: 0;
    margin: 0;
}

.corporate-contact .contact-row+.contact-row {
    margin-top: 6px;
}

.contact-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #e94f43;
    font-size: 18px;
}

.contact-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.contact-label {
    font-size: 13px;
    opacity: 0.82;
}

.contact-value {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}

/* Mega Menu Overlay - Requirements: 8.1, 8.2, 8.3, 8.4, 8.5 */
.mega-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 30, 80, 0.55);
    z-index: 1001;
    /* Updated for mobile menu compatibility */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

/* Show overlay when active class is added */
.mega-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

/* Header should NOT have z-index so children can escape stacking context */
.header {
    position: relative;
    z-index: auto;
}

.main-header {
    position: relative;
    z-index: auto;
}

.top-bar {
    position: relative;
    z-index: auto;
}

/* Desktop responsive styles for redesigned servers menu (>1024px) */
@media (min-width: 1025px) {
    .mega-menu.server-mega-redesigned {
        width: 65vw;
        min-width: 65vw;
        max-width: 1100px;
        left: calc(-35vw + 100%);
        right: auto;
        transform: none;
    }

    .mega-menu.server-mega-redesigned .mega-menu-content.server-grid-5col {
        grid-template-columns: repeat(4, minmax(180px, 1fr)) 280px !important;
        grid-template-rows: auto !important;
        gap: 0;
        align-items: stretch;
    }

    .header .mega-menu.server-mega-redesigned .server-col {
        padding: 15px 12px;
        height: 220px;
        /* Reduced height */
        max-height: 220px;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .mega-menu.server-mega-redesigned .feature-col {
        padding: 15px 12px;
        /* Same as other columns */
        min-width: 280px;
        height: 220px !important;
        max-height: 220px !important;
    }
}

/* Tablet responsive styles for redesigned servers menu (768px-1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .mega-menu.server-mega-redesigned {
        width: 75vw;
        left: calc(-45vw + 100%);
        max-width: 950px;
    }

    .mega-menu.server-mega-redesigned .mega-menu-content.server-grid-5col {
        grid-template-columns: repeat(4, minmax(160px, 1fr)) 240px !important;
    }

    .header .mega-menu.server-mega-redesigned .server-col {
        padding: 12px 10px;
        height: 200px;
        /* Reduced for tablet */
        max-height: 200px;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }

    .mega-menu.server-mega-redesigned .feature-col {
        padding: 12px 10px;
        /* Same as other columns */
        min-width: 240px;
        height: 200px !important;
        max-height: 200px !important;
    }
}

/* Mobile responsive styles for redesigned servers menu (<768px) */
@media (max-width: 768px) {
    .mega-menu.server-mega-redesigned {
        width: 90vw;
        left: calc(-70vw + 100%);
    }

    .mega-menu.server-mega-redesigned .mega-menu-content.server-grid-5col {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-template-rows: auto auto auto !important;
    }

    .header .mega-menu.server-mega-redesigned .server-col {
        height: 180px !important;
        /* Smaller for mobile */
        max-height: 180px !important;
    }

    .mega-menu.server-mega-redesigned .feature-col {
        grid-column: 1 / -1;
        grid-row: 3;
        padding: 12px;
        height: 180px !important;
        max-height: 180px !important;
        border-right: none !important;
    }
}

/* Responsive adjustments */
@media (max-width: 1320px) {
    .mega-menu {
        min-width: 100%;
        left: 0;
        right: 0;
    }
}

@media (max-width: 1320px) {
    .mega-menu {
        display: none;
    }

    .mega-menu-content {
        grid-template-columns: 1fr;
    }

    .mega-menu-item {
        border-right: none;
        border-bottom: 1px solid #e3ebf7;
    }

    .mega-menu-item:last-child {
        border-bottom: none;
    }
}

/* Force corporate menu column width - Override any conflicting rules */
.mega-menu.corporate-mega .mega-menu-content.corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

.corporate-mega .corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

/* Additional specificity for corporate columns */
.nav-item .mega-menu.corporate-mega .mega-menu-content {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

/* Ultra specific override for corporate menu */
body .mega-menu.corporate-mega .mega-menu-content.corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

/* Even more specific */
html body .nav-item .mega-menu.corporate-mega .mega-menu-content.corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

/* Target the exact structure from header.tpl - Simple grid only */
.mega-menu.corporate-mega .mega-menu-content.corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
    display: grid !important;
}

/* ULTRA SPECIFIC CORPORATE MENU OVERRIDE - FORCE 225PX */
html body div.mega-menu.corporate-mega div.mega-menu-content.corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
    display: grid !important;
}

/* EVEN MORE SPECIFIC */
html body * .mega-menu.corporate-mega * .mega-menu-content.corporate-grid {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

/* NUCLEAR OPTION - INLINE STYLE LEVEL SPECIFICITY */
.mega-menu.corporate-mega .mega-menu-content.corporate-grid[style] {
    grid-template-columns: repeat(3, 225px) minmax(270px, 1fr) !important;
}

/* Advertisement Rotation System - Responsive Image Handling and CSS Integration */
/* Requirements: 3.1, 3.2, 3.3, 3.4, 3.5, 4.1, 4.2, 4.3, 4.4, 4.5 */

/* Advertisement rotation wrapper container - Requirement 3.3 */
.feature-rotation-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    flex: 1;
    /* Take available space in parent */
}

/* Advertisement image container - Requirement 3.4 */
.feature-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    /* Take available space */
    overflow: hidden;
    /* Prevent image overflow */
}

/* Base advertisement image styling - Requirements 3.1, 3.4, 3.5 */
.feature-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Fit image within container without cropping */
    object-position: center;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 300ms ease-in-out;
    pointer-events: none;
    /* Image quality optimization */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    /* Hardware acceleration for smooth transitions */
    max-height: 100%;
    max-width: 100%;
}

/* Active advertisement image - Requirement 4.1 */
.feature-image.active {
    opacity: 1;
    pointer-events: auto;
}

/* Fade in animation class - Requirements 4.2, 4.3 */
.feature-image.fade-in {
    opacity: 1;
    transition: opacity 300ms ease-in-out;
}

/* Fade out animation class - Requirements 4.2, 4.3 */
.feature-image.fade-out {
    opacity: 0;
    transition: opacity 300ms ease-in-out;
}

/* Hover state for advertisement images - Requirements 5.2, 5.3 */
.feature-image:hover,
.feature-image.hovered {
    transform: scale(1.02);
    transition: transform 200ms ease-in-out;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Ensure hover effects don't interfere with transitions */
.feature-image.transitioning:hover,
.feature-image.transitioning.hovered {
    transform: none;
    box-shadow: none;
}

/* Static advertisement wrapper for reduced motion users - Requirement 5.4 */
.feature-static-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Static advertisement image - Requirement 5.4 */
.feature-image.static {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    opacity: 1;
    transition: none;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Advertisement fallback container - Requirement 2.4 */
.feature-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    text-align: center;
    min-height: 200px;
}

/* Show fallback when system fails */
.feature-fallback-active .feature-fallback {
    display: flex !important;
}

.feature-fallback-active .feature-image-container {
    display: none !important;
}

/* Enhanced responsive image scaling - Requirements 3.1, 3.2, 3.5 */
/* Desktop - Large screens (>1200px) */
@media (min-width: 1201px) {
    .feature-image-container {
        min-height: 220px;
    }

    .feature-image,
    .feature-image.static {
        object-fit: cover;
        /* Fill container while maintaining aspect ratio */
    }
}

/* Desktop - Medium screens (1025px-1200px) */
@media (max-width: 1200px) and (min-width: 1025px) {
    .feature-image-container {
        min-height: 200px;
    }

    .feature-image,
    .feature-image.static {
        object-fit: cover;
    }
}

/* Tablet - Large (769px-1024px) - Requirement 3.2 */
@media (max-width: 1024px) and (min-width: 769px) {
    .feature-image-container {
        min-height: 180px;
    }

    .feature-image,
    .feature-image.static {
        object-fit: contain;
        /* Show full image within container */
    }

    .feature-rotation-wrapper {
        border-radius: 6px;
    }
}

/* Tablet - Small and Mobile (≤768px) - Requirement 3.2 */
@media (max-width: 768px) {
    .feature-image-container {
        min-height: 160px;
    }

    .feature-image,
    .feature-image.static {
        object-fit: contain;
        padding: 8px;
        /* Add padding for better mobile display */
    }

    .feature-rotation-wrapper {
        border-radius: 4px;
        margin: 8px 0;
    }
}

/* Image normalization for different dimensions - Requirement 3.4 */
.feature-image[data-aspect="wide"] {
    object-fit: cover;
    object-position: center;
}

.feature-image[data-aspect="tall"] {
    object-fit: contain;
    object-position: center;
}

.feature-image[data-aspect="square"] {
    object-fit: cover;
    object-position: center;
}

/* Visual Indicators System - Requirements 5.1, 5.4, 6.5 */

/* Advertisement indicators container */
.feature-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

/* Individual indicator dots */
.feature-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 200ms ease-in-out;
    padding: 0;
    margin: 0;
    outline: none;
    position: relative;
}

/* Active indicator styling */
.feature-indicator.active {
    background: #ffffff;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

/* Hover state for indicators */
.feature-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* Focus state for accessibility */
.feature-indicator:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.8);
}

/* Active indicator hover state */
.feature-indicator.active:hover {
    background: #ffffff;
    transform: scale(1.3);
}

/* Responsive adjustments for indicators */
@media (max-width: 768px) {
    .feature-indicators {
        bottom: 8px;
        gap: 6px;
        padding: 6px 10px;
    }

    .feature-indicator {
        width: 6px;
        height: 6px;
    }
}

/* Hide indicators when only one image */
.feature-rotation-wrapper:has(.feature-image:only-child) .feature-indicators {
    display: none;
}

/* Ensure indicators are visible above images */
.feature-indicators {
    pointer-events: auto;
}

.feature-indicator {
    pointer-events: auto;
}

/* Reduced motion support - disable transitions - Requirement 5.4 */
@media (prefers-reduced-motion: reduce) {

    .feature-image,
    .feature-image.fade-in,
    .feature-image.fade-out {
        transition: none !important;
    }

    .feature-rotation-wrapper {
        animation: none !important;
    }

    .feature-indicator {
        transition: none !important;
    }

    /* Show static display for reduced motion users */
    .feature-rotation-wrapper .feature-image:first-child {
        opacity: 1 !important;
        position: relative !important;
    }

    .feature-rotation-wrapper .feature-image:not(:first-child) {
        display: none !important;
    }
}

/* Ensure smooth transitions don't interfere with layout - Requirement 4.4 */
.feature-image:not(.active) {
    pointer-events: none;
    user-select: none;
}

/* Prevent transition overlap by managing z-index during transitions - Requirement 4.4 */
.feature-image.transitioning {
    z-index: 2;
}

.feature-image.active:not(.transitioning) {
    z-index: 1;
}

/* Loading state styling */
.feature-image.loading {
    opacity: 0;
    filter: blur(2px);
    transition: opacity 300ms ease-in-out, filter 300ms ease-in-out;
}

.feature-image.loaded {
    filter: blur(0);
}

/* High DPI display optimization - Requirement 3.5 */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .feature-image,
    .feature-image.static {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: optimize-contrast;
    }
}

/* Sunucular mega menu slider should fill the column - Comprehensive Fix */
.header .mega-menu.server-mega-redesigned .server-col.feature-col {
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
    position: relative !important;
    min-height: 220px !important;
    overflow: hidden !important;
}

/* Force absolute positioning to cover the entire column */
.header .mega-menu.server-mega-redesigned .server-col.feature-col .feature-content {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    inset: 0 !important;
    z-index: 10;
}

/* Ensure all wrappers and images are full size with no rounding */
.mega-menu.server-mega-redesigned .feature-rotation-wrapper,
.mega-menu.server-mega-redesigned .feature-static-wrapper,
.mega-menu.server-mega-redesigned .feature-image-container,
.mega-menu.server-mega-redesigned .feature-image,
.mega-menu.server-mega-redesigned .feature-image.static {
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center !important;
}

.mega-menu.server-mega-redesigned .feature-rotation-wrapper:focus,
.mega-menu.server-mega-redesigned .feature-image:focus {
    border-radius: 0 !important;
}

/* Accessibility Enhancements - Requirements: 5.3, 5.4 */

/* Screen reader only content */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus indicators for keyboard navigation */
.feature-rotation-wrapper:focus,
.feature-image:focus {
    outline: 3px solid #e94f43;
    outline-offset: 2px;
    border-radius: 8px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .feature-rotation-wrapper {
        border: 2px solid;
    }

    .feature-image {
        border: 1px solid;
    }
}

/* Keyboard navigation indicators */
.feature-rotation-wrapper[tabindex="0"]:focus {
    box-shadow: 0 0 0 3px rgba(5, 192, 198, 0.3);
}

/* Enhanced focus styles for reduced motion users */
@media (prefers-reduced-motion: reduce) {

    .feature-rotation-wrapper:focus,
    .feature-image:focus {
        outline: 3px solid #e94f43;
        outline-offset: 2px;
        transition: none;
    }
}

/* Ensure proper contrast for text overlays */
.feature-fallback {
    color: #1a202c;
    background: rgba(255, 255, 255, 0.95);
}

/* CSS TEST MARKER */
.css-test-marker {
    background: red !important;
    color: white !important;
    padding: 10px !important;
    border: 3px solid blue !important;
}

.mega-menu.server-mega-redesigned.has-strip .mega-menu-content,
.mega-menu.server-mega-redesigned.has-strip .mega-menu-content.server-grid-5col {
    border: 1px solid #e4e8f0;
    border-top: none;
    border-bottom: none;
    box-shadow: none;
    border-radius: 12px 12px 0 0;
}