/* Sidebar Ads */
.traffic-exchange-features-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
    width: 200px;
}

.traffic-exchange-features-sidebar-ad {
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, #222831 0%, #393E46 100%);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(34, 40, 49, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.traffic-exchange-features-sidebar-ad:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(34, 40, 49, 0.2);
}

.traffic-exchange-features-sidebar-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


@media (max-width: 1200px) {
    .traffic-exchange-features-sidebar {
        width: 150px;
    }
    
    .traffic-exchange-features-sidebar-ad {
               width: 100%;
        height: auto;
    }
}

@media (max-width: 992px) {
    .traffic-exchange-features-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
    }
    
    .traffic-exchange-features-sidebar-ad {
               width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .traffic-exchange-features-sidebar-ad {
               width: 100%;
        height: auto;
    }
}

@media (max-width: 480px) {
    .traffic-exchange-features-sidebar-ad {
        width: 100%;
        height: auto;
    }
}


/* Top Ad Section */
.traffic-exchange-features-top-ads {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.traffic-exchange-features-top-ad {
    width: 100%;
    height: 99%;
    background: linear-gradient(135deg, #948979 0%, #DFD0B8 100%);
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(148, 137, 121, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.traffic-exchange-features-top-ad:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(148, 137, 121, 0.25);
}

.traffic-exchange-features-top-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive adjustments for top ads */
@media (max-width: 768px) {
    .traffic-exchange-features-top-ads {
        grid-template-columns: 1fr;
    }
}



/* Bottom Ads */
.traffic-exchange-features-bottom-ads {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.traffic-exchange-features-bottom-ad {
    width: 100%;
    height: auto;
    background: linear-gradient(135deg, #393E46 0%, #222831 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(34, 40, 49, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.traffic-exchange-features-bottom-ad:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 25px rgba(34, 40, 49, 0.2);
}

.traffic-exchange-features-bottom-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Horizontal Ad (336x280) */
.traffic-exchange-features-horizontal-ad {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, #948979 0%, #DFD0B8 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(148, 137, 121, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.traffic-exchange-features-horizontal-ad:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(148, 137, 121, 0.25);
}

.traffic-exchange-features-horizontal-ad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* Text Ads */
.traffic-exchange-features-text-ads {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.traffic-exchange-features-text-ad {
    color: #252b33;
    padding: 5px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
}

/*.traffic-exchange-features-text-ad:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 40, 49, 0.2);
}*/

/* Responsive adjustments for text ads */
@media (max-width: 768px) {
    .traffic-exchange-features-text-ads {
        grid-template-columns: 1fr;
    }
}


/*new css*/
@media (max-width: 768px) {
  .traffic-exchange-logo {
    order: -1 !important;
    margin-right: auto !important;
    margin-left: 0 !important;
    float: left !important;
  }
}

@media only screen and (max-width: 768px) {
    
    /* Fix horizontal scroll issue */
    html, body {
        overflow-x: hidden !important;
        width: 100% !important;
    }
    
    .traffic-exchange-affiliates-container {
        width: 100% !important;
        padding: 15px !important;
        overflow-x: hidden !important;
    }
    
    /* Stack all columns vertically */
    .traffic-exchange-affiliates-main-layout {
        display: block !important;
        width: 100% !important;
    }
    
    /* Sidebar ads - make them horizontal scroll */
    .traffic-exchange-features-sidebar {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: 15px !important;
        padding: 10px 0 !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 20px !important;
    }
    
    .traffic-exchange-features-sidebar-ad {
        flex: 0 0 200px !important;
        max-width: 200px !important;
    }
    
    .traffic-exchange-features-sidebar-ad img {
        width: 100% !important;
        height: auto !important;
    }
    
    /* Center content */
    .traffic-exchange-affiliates-center-content {
        width: 100% !important;
    }
    
    /* Top ads - stack vertically */
    .traffic-exchange-features-top-ads {
        display: block !important;
        width: 100% !important;
    }
    
    .traffic-exchange-features-top-ad {
        width: 100% !important;
        margin-bottom: 15px !important;
        text-align: center !important;
    }
    
    .traffic-exchange-features-top-ad img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Hide top slider on mobile */
    .top-ad-slider {
        display: none !important;
    }
    
    /* Text ads - stack vertically */
    .traffic-exchange-features-text-ads {
        display: block !important;
        width: 100% !important;
    }
    
    /*.traffic-exchange-dashboard-text-ads {*/
    /*    width: 100% !important;*/
    /*    margin-bottom: 10px !important;*/
    /*    text-align: center !important;*/
    /*}*/
    
    /* Marquee sections */
    .traffic-exchange-features-marquee-section {
        width: 100% !important;
        overflow: hidden !important;
        margin-bottom: 20px !important;
    }
    
    /* Main tabs - make them vertical */
    .traffic-exchange-affiliates-tab-header {
        display: block !important;
        width: 100% !important;
    }
    
    .traffic-exchange-affiliates-tab-btn {
        width: 100% !important;
        margin-bottom: 5px !important;
        text-align: left !important;
        padding: 15px !important;
        border-radius: 8px !important;
    }
    
    .traffic-exchange-affiliates-tab-content {
        padding: 15px !important;
        overflow-x: hidden !important;
    }
    
    /* Referral section */
    .traffic-exchange-affiliates-referral-section,
    .traffic-exchange-affiliates-tracking {
        padding: 15px !important;
    }
    
    .traffic-exchange-affiliates-url {
        word-break: break-all !important;
        font-size: 14px !important;
    }
    
    /* Stats */
    .traffic-exchange-affiliates-stats {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .traffic-exchange-affiliates-stat {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* Banner items */
    .traffic-exchange-affiliates-banner-item,
    .traffic-exchange-affiliates-email-item,
    .traffic-exchange-affiliates-forum-item {
        padding: 15px !important;
    }
    
    .traffic-exchange-affiliates-banner-preview img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .traffic-exchange-affiliates-banner-url {
        word-break: break-all !important;
        font-size: 13px !important;
    }
    
    .traffic-exchange-affiliates-textarea {
        width: 100% !important;
        min-height: 80px !important;
        font-size: 13px !important;
    }
    
    /* Buttons */
    .traffic-exchange-affiliates-btn,
    .traffic-exchange-affiliates-btn-copy,
    .traffic-exchange-affiliates-btn-twitter,
    .traffic-exchange-affiliates-btn-try {
        width: 100% !important;
        margin: 5px 0 !important;
        padding: 12px !important;
    }
    
    /* Custom tabs */
    .custom-tabs-buttons {
        display: block !important;
        width: 100% !important;
    }
    
    .custom-tab-btn {
        width: 100% !important;
        margin-bottom: 5px !important;
        padding: 12px !important;
    }
    
    /* Tables */
    .traffic-exchange-affiliates-table-container,
    .widefat,
    .wp-list-table {
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        display: block !important;
    }
    
    
    
    /* Bottom ads */
    .traffic-exchange-features-bottom-ads {
        width: 100% !important;
    }
    
    .traffic-exchange-features-bottom-ad {
        width: 100% !important;
       
        text-align: center !important;
    }
    
    .traffic-exchange-features-bottom-ad img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    /* Typography */
    .traffic-exchange-affiliates-section-title {
        font-size: 28px !important;
        margin: 10px 0 !important;
    }
    
    .traffic-exchange-affiliates-subtitle {
        font-size: 20px !important;
    }
    
    /* Back button */
    /*a[href*="member-dashboard"] {*/
    /*    width: 100% !important;*/
    /*    text-align: center !important;*/
    /*    margin: 10px 0 !important;*/
    /*    display: block !important;*/
    /*}*/
    
    /* Navigation fixes */
    .traffic-exchange-container {
        padding: 0 15px !important;
    }
    
    .traffic-exchange-menu {
        position: fixed !important;
        top: 70px !important;
        right: -100% !important;
        width: 280px !important;
        height: calc(100vh - 70px) !important;
        background: rgba(34, 40, 49, 0.98) !important;
        transition: right 0.3s ease !important;
        z-index: 9999 !important;
        overflow-y: auto !important;
        padding: 20px !important;
    }
    
    .traffic-exchange-menu.active {
        right: 0 !important;
    }
    
    .traffic-exchange-credits-section {
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
        margin-top: 20px !important;
    }
    
    .traffic-exchange-credit-item {
        width: 100% !important;
        justify-content: center !important;
    }
    
    .traffic-exchange-hamburger {
        display: flex !important;
    }
}

/* Extra small devices (480px and below) */
@media only screen and (max-width: 480px) {
    
    .traffic-exchange-affiliates-container {
        padding: 10px !important;
    }
    
    /*.traffic-exchange-features-sidebar-ad {*/
    /*    flex: 0 0 160px !important;*/
    /*    max-width: 160px !important;*/
    /*}*/
    
    .traffic-exchange-affiliates-tab-content {
        padding: 10px !important;
    }
    
    .traffic-exchange-affiliates-referral-section,
    .traffic-exchange-affiliates-tracking,
    .traffic-exchange-affiliates-banner-item {
        padding: 10px !important;
    }
    
    .traffic-exchange-affiliates-section-title {
        font-size: 24px !important;
    }
    
    .traffic-exchange-affiliates-subtitle {
        font-size: 18px !important;
    }
}