/* =============================================================================
   AM Press Slider - Facebook-style Cards CSS
   Version: 1.0.0
   Author: Amine Bourhil
   ============================================================================= */

/* ---------- Variables & Reset ---------- */
:root {
    --amps-bg: #1a1a2e;
    --amps-card-bg: #242424;
    --amps-card-border: #3a3a3a;
    --amps-text: #e4e6eb;
    --amps-text-muted: #b0b3b8;
    --amps-link-bar: #1c1c1c;
    --amps-accent: #2d88ff;
    --amps-hover: #333333;
    --amps-action-text: #b0b3b8;
    --amps-radius: 10px;
    --amps-gap: 16px;
    --amps-card-shadow: 0 2px 12px rgba(0,0,0,0.3);
    --amps-transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Section Title & Description ---------- */
.amps-section {
    padding-top: 12px;
    padding-bottom: 0;
    max-width: 1200px;
    margin: 0 auto;
}

.amps-section .container {
    padding: 0 50px;
}

.amps-section-title {
    font-family: 'Jost', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
    line-height: 1.3;
}

.amps-section-desc {
    font-family: 'Jost', 'Segoe UI', Helvetica, Arial, sans-serif;
    font-size: 15px;
    color: var(--amps-text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
    max-width: 600px;
}

.amps-title-hr {
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    margin: 15px 0 0 0 !important;
    width: 80px;
    background: transparent !important;
}

/* ---------- Bottom Separator ---------- */
.amps-bottom-separator {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 0 50px;
}

.amps-separator-hr {
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 auto !important;
    width: 100%;
    background: transparent !important;
}

/* ---------- Wrapper ---------- */
.amps-slider-wrap {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 12px auto 40px;
    padding: 0 50px;
    font-family: 'Jost', 'Segoe UI', Helvetica, Arial, sans-serif;
    overflow: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* ---------- Container & Track ---------- */
.amps-slider-container {
    overflow: hidden;
    border-radius: var(--amps-radius);
}

.amps-slider-track {
    display: flex;
    gap: var(--amps-gap);
    transition: transform var(--amps-transition);
    will-change: transform;
}

.amps-slider-track.amps-dragging {
    transition: none !important;
    cursor: grabbing;
}

/* ---------- Card ---------- */
.amps-card {
    flex: 0 0 calc((100% - var(--amps-gap) * 2) / 3);
    min-width: 0;
}

.amps-card-inner {
    background: var(--amps-card-bg);
    border: 1px solid var(--amps-card-border);
    border-radius: var(--amps-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--amps-card-shadow);
}

.amps-card-inner:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.45);
}

/* ---------- Card Header ---------- */
.amps-card-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 10px;
}

.amps-card-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.amps-card-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.amps-card-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amps-accent), #6c5ce7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    text-transform: uppercase;
}

.amps-card-meta {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.amps-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--amps-text);
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.amps-verified {
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
}

.amps-card-time {
    font-size: 12px;
    color: var(--amps-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.amps-globe {
    opacity: 0.7;
    flex-shrink: 0;
}

.amps-card-more {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--amps-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.amps-card-more:hover {
    background: var(--amps-hover);
}

/* ---------- Description ---------- */
.amps-card-description {
    padding: 0 16px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--amps-text);
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
    position: relative;
    z-index: 1;
}

/* ---------- Card Link (Image + Info bar) ---------- */
.amps-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

.amps-card-link:hover {
    opacity: 0.92;
}

.amps-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #1a1a1a;
}

.amps-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.amps-card-link:hover .amps-card-image img {
    transform: scale(1.03);
}

/* Info icon on image (bottom right) */
.amps-card-info-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.85);
    opacity: 0.7;
    transition: opacity 0.25s ease;
    cursor: pointer;
}

.amps-card-link:hover .amps-card-info-icon {
    opacity: 1;
}

.amps-card-link-info {
    background: var(--amps-link-bar);
    padding: 10px 16px;
    border-top: 1px solid var(--amps-card-border);
}

.amps-card-link-site {
    font-size: 11px;
    color: var(--amps-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.amps-card-link-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--amps-text);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Navigation Arrows ---------- */
.amps-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
    padding: 0;
    outline: none;
}

.amps-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

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

.amps-nav.amps-nav-disabled {
    opacity: 0.3;
    pointer-events: none;
}

.amps-nav-prev {
    left: 4px;
}

.amps-nav-next {
    right: 4px;
}

/* ---------- Dots ---------- */
.amps-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding-bottom: 8px;
}

.amps-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.amps-dot:hover {
    background: rgba(255,255,255,0.4);
}

.amps-dot.active {
    background: var(--amps-accent);
    transform: scale(1.3);
    box-shadow: 0 0 8px rgba(45,136,255,0.5);
}

/* ---------- Autoplay Progress ---------- */
.amps-slider-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50px;
    right: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--amps-accent), #6c5ce7);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform linear;
    opacity: 0;
    pointer-events: none;
}

.amps-slider-wrap.amps-autoplaying::after {
    opacity: 1;
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
    .amps-card {
        flex: 0 0 calc((100% - var(--amps-gap)) / 2);
    }
    .amps-slider-wrap {
        padding: 0 40px;
    }
}

@media (max-width: 600px) {
    .amps-card {
        flex: 0 0 100%;
    }
    .amps-slider-wrap {
        padding: 0 35px;
        margin: 20px auto;
    }
    .amps-nav {
        width: 32px;
        height: 32px;
    }
    .amps-nav svg {
        width: 18px;
        height: 18px;
    }
    .amps-card-description {
        font-size: 13px;
    }
    .amps-card-name {
        font-size: 13px;
    }
    .amps-section .container {
        padding: 0 35px;
    }
    .amps-section-title {
        font-size: 22px;
    }
    .amps-section-desc {
        font-size: 14px;
    }
    .amps-bottom-separator {
        padding: 0 35px;
    }
}

/* ---------- Animation: Cards entrance ---------- */
@keyframes amps-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.amps-card-inner {
    animation: amps-fadeInUp 0.5s ease forwards;
}

.amps-card:nth-child(1) .amps-card-inner { animation-delay: 0s; }
.amps-card:nth-child(2) .amps-card-inner { animation-delay: 0.1s; }
.amps-card:nth-child(3) .amps-card-inner { animation-delay: 0.2s; }
.amps-card:nth-child(4) .amps-card-inner { animation-delay: 0.3s; }
.amps-card:nth-child(5) .amps-card-inner { animation-delay: 0.4s; }
