/**
 * IKLAN STAKEHOLDER - FRONTEND STYLES
 * Banner Carousel untuk Etalase Karya Lampung
 * Version: 1.0.0
 */

/* ============================================
   CONTAINER
   ============================================ */
.iklan-stakeholder-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 20px;
    overflow: hidden;
}

.iklan-stakeholder-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    background: #fff;
}

.iklan-stakeholder-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* ============================================
   SLIDES
   ============================================ */
.iklan-stakeholder-slide {
    min-width: 100%;
    position: relative;
    overflow: hidden;
}

.iklan-stakeholder-slide a {
    display: block;
    width: 100%;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.iklan-stakeholder-slide:hover a {
    transform: scale(1.02);
}

.iklan-banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 250px;
    transition: transform 0.4s ease;
}

.iklan-stakeholder-slide:hover .iklan-banner-image {
    transform: scale(1.05);
    filter: brightness(0.85);
}

/* ============================================
   HOVER OVERLAY - CLIENT INFO TOOLTIP
   ============================================ */
.iklan-client-tooltip {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.75), transparent);
    color: white;
    padding: 40px 30px 20px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
    pointer-events: none;
}

.iklan-stakeholder-slide:hover .iklan-client-tooltip {
    transform: translateY(0);
}

.iklan-client-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
    color: #fff;
}

.iklan-client-link {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.8);
}

/* Placeholder for banners without image */
.iklan-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    padding: 20px;
}

/* ============================================
   NAVIGATION CONTROLS
   ============================================ */
.iklan-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    line-height: 1;
}

.iklan-nav:hover {
    background: #ffcc00;
    color: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.iklan-prev {
    left: -25px;
}

.iklan-next {
    right: -25px;
}

.iklan-nav:active {
    transform: translateY(-50%) scale(0.95);
}

/* ============================================
   DOTS INDICATOR
   ============================================ */
.iklan-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.iklan-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.iklan-dot:hover {
    background: #bbb;
    transform: scale(1.2);
}

.iklan-dot.active {
    background: #ffcc00;
    border-color: #ff9900;
    transform: scale(1.3);
}

/* ============================================
   JENIS IKLAN BADGES (Optional)
   ============================================ */
.iklan-stakeholder-slide::before {
    content: '';
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-size: 11px;
    font-weight: bold;
    border-radius: 20px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iklan-pemda::before {
    content: '🏛️ PEMDA';
    background: rgba(76, 175, 80, 0.9);
}

.iklan-swasta::before {
    content: '🏢 SWASTA';
    background: rgba(33, 150, 243, 0.9);
}

.iklan-partai::before {
    content: '🗳️ PARTAI';
    background: rgba(244, 67, 54, 0.9);
}

.iklan-umum::before {
    content: '📢 IKLAN';
    background: rgba(156, 39, 176, 0.9);
}

/* ============================================
   LOADING STATE
   ============================================ */
.iklan-stakeholder-container.loading .iklan-stakeholder-track {
    opacity: 0.5;
}

.iklan-stakeholder-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffcc00;
    border-radius: 50%;
    animation: iklan-spin 1s linear infinite;
}

@keyframes iklan-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .iklan-stakeholder-container {
        margin: 40px auto;
    }
    
    .iklan-banner-image {
        max-height: 200px;
    }
    
    .iklan-nav {
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .iklan-prev {
        left: -22px;
    }
    
    .iklan-next {
        right: -22px;
    }
}

@media (max-width: 768px) {
    .iklan-stakeholder-container {
        margin: 30px auto;
        padding: 0 15px;
    }
    
    .iklan-stakeholder-wrapper {
        border-radius: 10px;
    }
    
    .iklan-banner-image {
        max-height: 150px;
    }
    
    .iklan-nav {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .iklan-prev {
        left: 5px;
    }
    
    .iklan-next {
        right: 5px;
    }
    
    .iklan-dots {
        gap: 8px;
        margin-top: 15px;
    }
    
    .iklan-dot {
        width: 10px;
        height: 10px;
    }
    
    .iklan-placeholder {
        height: 150px;
        font-size: 18px;
    }
    
    /* Hide badge on mobile */
    .iklan-stakeholder-slide::before {
        display: none;
    }
}

@media (max-width: 480px) {
    .iklan-stakeholder-container {
        margin: 20px auto;
    }
    
    .iklan-banner-image {
        max-height: 120px;
    }
    
    .iklan-nav {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .iklan-placeholder {
        height: 120px;
        font-size: 16px;
        padding: 15px;
    }
}

/* ============================================
   ANIMATION EFFECTS
   ============================================ */
.iklan-stakeholder-slide {
    animation: iklan-fadeIn 0.6s ease-in-out;
}

@keyframes iklan-fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Smooth transitions */
.iklan-stakeholder-track {
    -webkit-backface-visibility: hidden;
    -webkit-transform-style: preserve-3d;
    backface-visibility: hidden;
    transform-style: preserve-3d;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.iklan-nav:focus {
    outline: 3px solid #ffcc00;
    outline-offset: 2px;
}

.iklan-stakeholder-slide a:focus {
    outline: 3px solid #ffcc00;
    outline-offset: 3px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .iklan-stakeholder-track {
        transition: none;
    }
    
    .iklan-nav:hover {
        transform: translateY(-50%);
    }
    
    .iklan-stakeholder-slide {
        animation: none;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .iklan-stakeholder-container {
        display: none;
    }
}
