/* ==========================================================================
   Reviews Marquee Widget - CSS
   ========================================================================== */

/* CSS Variables */
:root {
    --rm-card-bg: #242424;
    --rm-text-primary: #ffffff;
    --rm-text-secondary: #d1d1d1;
    --rm-accent: #1DA1F2;
}

/* ==========================================================================
   Section
   ========================================================================== */
.rm-section {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
}

/* ==========================================================================
   Header
   ========================================================================== */
.rm-header {
    max-width: 700px;
    margin-bottom: 48px;
    padding: 0 20px;
}

.rm-decoration {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #17468A 0%, #1E5AAD 50%, #2A7BD8 100%);
    border-radius: 2px;
    margin-bottom: 20px;
}

.rm-header-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Tag Badge - Hero Eyebrow Style */
.rm-tag-wrapper {
    display: flex;
}

.rm-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #17468A;
    background: linear-gradient(135deg,
        rgba(23, 70, 138, 0.08) 0%,
        rgba(30, 90, 173, 0.08) 100%);
    border: 1px solid rgba(23, 70, 138, 0.2);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Shimmer effect */
.rm-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(23, 70, 138, 0.15),
        transparent);
    animation: rm-shimmer 3s infinite;
}

@keyframes rm-shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Title */
.rm-title {
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: #1a1a1a;
    letter-spacing: -0.02em;
    margin: 0;
}

/* Description */
.rm-description {
    font-size: 16px;
    line-height: 1.6;
    color: #666666;
    margin: 0;
}

/* Header Responsive */
@media (max-width: 768px) {
    .rm-header {
        margin-bottom: 32px;
    }

    .rm-title {
        font-size: 28px;
    }

    .rm-description {
        font-size: 15px;
    }

    .rm-tag {
        padding: 10px 18px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .rm-header {
        margin-bottom: 24px;
    }

    .rm-title {
        font-size: 24px;
    }
}

.rm-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ==========================================================================
   Row & Track
   ========================================================================== */
.rm-row {
    width: 100%;
    overflow: hidden;
    padding: 10px 0;
}

.rm-row.rm-fade-edges {
    --fade-width: 12.5%;
    mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgb(0, 0, 0) var(--fade-width),
        rgb(0, 0, 0) calc(100% - var(--fade-width)),
        rgba(0, 0, 0, 0) 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        rgba(0, 0, 0, 0) 0%,
        rgb(0, 0, 0) var(--fade-width),
        rgb(0, 0, 0) calc(100% - var(--fade-width)),
        rgba(0, 0, 0, 0) 100%
    );
}

.rm-track {
    display: flex;
    gap: 16px;
    width: fit-content;
    animation: marquee-left var(--animation-speed, 30s) linear infinite;
}

.rm-track[data-direction="right"] {
    animation-name: marquee-right;
}

/* Pause on hover */
.rm-section[data-pause-hover="true"] .rm-row:hover .rm-track {
    animation-play-state: paused;
}

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-100% / 3));
    }
}

@keyframes marquee-right {
    0% {
        transform: translateX(calc(-100% / 3));
    }
    100% {
        transform: translateX(0);
    }
}

/* ==========================================================================
   Card
   ========================================================================== */
.rm-card {
    width: 372px;
    min-width: 372px;
    height: 212px;
    background-color: var(--rm-card-bg);
    border-radius: 20px;
    padding: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.rm-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 8px 30px rgba(0, 0, 0, 0.3),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.rm-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* ==========================================================================
   Testimonial
   ========================================================================== */
.rm-testimonial-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rm-quote {
    color: var(--rm-text-secondary);
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    font-family: Georgia, serif;
    margin-bottom: -8px;
}

.rm-testimonial {
    color: var(--rm-text-primary);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   Author
   ========================================================================== */
.rm-author {
    margin-top: auto;
}

.rm-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rm-avatar {
    width: 42px;
    height: 42px;
    border-radius: 28px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 
        0 0.78px 0.39px rgba(0, 0, 0, 0.13),
        0 1.92px 0.96px rgba(0, 0, 0, 0.13),
        0 3.64px 1.82px rgba(0, 0, 0, 0.13),
        0 6.35px 3.18px rgba(0, 0, 0, 0.13),
        0 11.05px 5.53px rgba(0, 0, 0, 0.13),
        0 20.24px 10.12px rgba(0, 0, 0, 0.13),
        0 40px 20px rgba(0, 0, 0, 0.13);
}

.rm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rm-author-name {
    color: var(--rm-text-primary);
    font-size: 14px;
    font-weight: 500;
}

.rm-verified {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.rm-verified svg {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .rm-card {
        width: 320px;
        min-width: 320px;
        height: 200px;
        padding: 20px;
    }
    
    .rm-quote {
        font-size: 40px;
    }
    
    .rm-testimonial {
        font-size: 14px;
    }
    
    .rm-avatar {
        width: 36px;
        height: 36px;
    }
    
    .rm-author-name {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .rm-card {
        width: 280px;
        min-width: 280px;
        height: 180px;
        padding: 16px;
    }
    
    .rm-quote {
        font-size: 32px;
    }
    
    .rm-testimonial {
        font-size: 13px;
        -webkit-line-clamp: 3;
    }
    
    .rm-avatar {
        width: 32px;
        height: 32px;
    }
    
    .rm-author-name {
        font-size: 12px;
    }
    
    .rm-verified {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .rm-track {
        animation: none !important;
    }
    
    .rm-card {
        transition: none;
    }
}

/* ==========================================================================
   Elementor Editor
   ========================================================================== */
.elementor-editor-active .rm-track {
    animation-play-state: paused;
}

/* ==========================================================================
   Light Theme Variant
   ========================================================================== */
.rm-section[data-theme="light"] {
    --rm-card-bg: #f5f5f5;
    --rm-text-primary: #1a1a1a;
    --rm-text-secondary: #666666;
}

/* ==========================================================================
   Alternative Card Styles
   ========================================================================== */
/* Glassmorphism */
.rm-section[data-style="glass"] .rm-card {
    background: rgba(36, 36, 36, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gradient border */
.rm-section[data-style="gradient-border"] .rm-card {
    position: relative;
    background: linear-gradient(135deg, #242424, #1a1a1a);
}

.rm-section[data-style="gradient-border"] .rm-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #1DA1F2, #9945FF);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .rm-section {
        display: none;
    }
}
