/**
 * Modern Affiliate Feed Component - CSS
 * Location: /public_html/wp-content/themes/kadence/affiliate-feed/affiliate-feed.css
 * 
 * Beautiful, modern styling matching RV Explorer homepage design
 */

/* ========================================================================== */
/* FEED CONTAINER & LAYOUT */
/* ========================================================================== */

.affiliate-feed-container {
    width: 100%;
    max-width: 1400px;
    margin: 80px auto;
    padding: 0 20px;
    animation: fadeInUp 0.8s ease-out;
}

.feed-header {
    text-align: center;
    margin-bottom: 60px;
}

.feed-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.feed-subtitle {
    font-size: 1.3rem;
    color: #718096;
    margin: 0;
    font-weight: 300;
}

/* ========================================================================== */
/* ADVERTISER TABS */
/* ========================================================================== */

.feed-tabs {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    padding-bottom: 20px;
}

.feed-tab {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.feed-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.feed-tab:hover::before {
    left: 100%;
}

.feed-tab:hover {
    border-color: #cbd5e0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.feed-tab.active {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    border-color: #2d3748;
    box-shadow: 0 15px 40px rgba(45, 55, 72, 0.2);
}

.tab-icon {
    font-size: 1.3rem;
}

.tab-name {
    font-weight: 700;
}

.tab-rating {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-left: 5px;
}

.feed-tab.active .tab-rating {
    color: #ffd700;
}

/* ========================================================================== */
/* PROMOTIONS GRID */
/* ========================================================================== */

.feed-content {
    margin-bottom: 50px;
}

.promotions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .promotions-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .promotions-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ========================================================================== */
/* PROMOTION CARD */
/* ========================================================================== */

.promo-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.promo-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.15);
}

.promo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #ed8936, #c05621);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.promo-card:hover::before {
    opacity: 1;
}

/* ========================================================================== */
/* PROMO IMAGE & BADGES */
/* ========================================================================== */

.promo-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
}

.promo-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-card:hover .promo-image img {
    transform: scale(1.08);
}

/* Advertiser Badge */
.promo-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: white;
    border-radius: 50px;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 0.9rem;
    color: #2d3748;
    z-index: 2;
    animation: slideInDown 0.5s ease-out;
}

.badge-icon {
    font-size: 1.2rem;
}

/* Discount Badge */
.promo-discount {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: linear-gradient(135deg, #ed8936 0%, #c05621 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 10px 25px rgba(237, 137, 54, 0.3);
    animation: slideInUp 0.5s ease-out 0.1s both;
}

/* ========================================================================== */
/* PROMO BODY */
/* ========================================================================== */

.promo-body {
    flex: 1;
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.promo-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.promo-description {
    font-size: 0.95rem;
    color: #718096;
    margin: 0 0 15px 0;
    line-height: 1.5;
    flex: 1;
}

/* ========================================================================== */
/* PROMO META & FOOTER */
/* ========================================================================== */

.promo-meta {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border-left: 4px solid #ed8936;
}

.meta-item {
    font-size: 0.9rem;
    color: #4a5568;
    display: block;
}

.meta-item strong {
    color: #2d3748;
}

.promo-footer {
    padding: 20px 25px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.btn-book-now {
    flex: 1;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.btn-book-now:hover {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    transform: translateX(3px);
    box-shadow: 0 10px 25px rgba(45, 55, 72, 0.3);
    color: white;
    text-decoration: none;
}

.btn-arrow {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.btn-book-now:hover .btn-arrow {
    transform: translateX(3px);
}

/* ========================================================================== */
/* LOADING SKELETON */
/* ========================================================================== */

.loading-skeleton {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
}

.promo-card-skeleton {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    animation: pulse-skeleton 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.promo-card-skeleton::before {
    content: '';
    display: block;
    width: 100%;
    height: 380px;
    background: linear-gradient(
        90deg,
        #e2e8f0 0%,
        #f1f5f9 50%,
        #e2e8f0 100%
    );
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes pulse-skeleton {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@media (max-width: 1024px) {
    .loading-skeleton {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }
}

@media (max-width: 768px) {
    .loading-skeleton {
        grid-template-columns: 1fr;
    }
}

/* ========================================================================== */
/* FEED FOOTER & BUTTONS */
/* ========================================================================== */

.feed-footer {
    display: flex;
    justify-content: center;
    padding: 30px 0;
    border-top: 1px solid #e2e8f0;
}

.btn-load-more {
    background: linear-gradient(135deg, #ed8936 0%, #c05621 100%);
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(237, 137, 54, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(237, 137, 54, 0.4);
}

.btn-load-more:active {
    transform: translateY(-1px);
}

/* ========================================================================== */
/* ANIMATIONS */
/* ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================== */
/* ACCESSIBILITY */
/* ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    .promo-card,
    .promo-image img,
    .feed-tab,
    .btn-book-now,
    .btn-load-more {
        transition: none;
        animation: none;
    }
}

/* ========================================================================== */
/* DARK MODE (Optional) */
/* ========================================================================== */

@media (prefers-color-scheme: dark) {
    .affiliate-feed-container {
        color: #e2e8f0;
    }
    
    .feed-title {
        color: #f1f5f9;
    }
    
    .feed-subtitle {
        color: #cbd5e0;
    }
    
    .promo-card {
        background: #2d3748;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    }
    
    .promo-title {
        color: #f1f5f9;
    }
    
    .promo-description {
        color: #cbd5e0;
    }
    
    .feed-tab {
        background: #1a202c;
        border-color: #4a5568;
        color: #cbd5e0;
    }
    
    .feed-tab.active {
        background: linear-gradient(135deg, #ed8936 0%, #c05621 100%);
        color: white;
    }
}