/**
 * GlobalStudyLab - Trust & Social Proof Bar Styles
 * Responsive, accessible, and performance-optimized
 * Version: 1.0 | Date: November 1, 2025
 *
 * @package    local_gsl_core
 * @copyright  2025 GlobalStudyLab
 */

/* ============================================
   SECTION CONTAINER
   ============================================ */
.gsl-trust-bar {
    position: relative;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 60px 0;
    overflow: hidden;
    z-index: 1;
}

/* Subtle gradient overlay */
.gsl-trust-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
        rgba(14, 165, 233, 0.02) 0%,
        rgba(255, 255, 255, 0) 50%
    );
    pointer-events: none;
}

.gsl-trust-container {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    z-index: 2;
}

/* ============================================
   HEADER SECTION
   ============================================ */
.gsl-trust-header {
    text-align: center;
    margin-bottom: 48px;
    animation: fadeInUp 0.8s ease-out both;
}

.gsl-trust-headline {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    color: #1f2937;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #0EA5E9 0%, #06B6D4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gsl-trust-subheadline {
    font-size: clamp(14px, 2.5vw, 18px);
    color: #6b7280;
    font-weight: 500;
    line-height: 1.5;
}

/* ============================================
   LOGO CAROUSEL
   ============================================ */
.gsl-logo-carousel {
    position: relative;
    width: 100%;
    margin-bottom: 56px;
    overflow: hidden;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 10%,
        black 90%,
        transparent 100%
    );
}

.gsl-logo-track {
    display: flex;
    align-items: center;
    gap: 60px;
    animation: scroll 30s linear infinite;
    width: fit-content;
    will-change: transform;
}

/* Pause animation on hover */
.gsl-logo-carousel:hover .gsl-logo-track {
    animation-play-state: paused;
}

.gsl-logo-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.gsl-partner-logo {
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.gsl-logo-item:hover .gsl-partner-logo {
    opacity: 1;
    filter: grayscale(0%);
    transform: scale(1.08);
}

/* Scroll Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ============================================
   STATISTICS COUNTERS
   ============================================ */
.gsl-stats-counter {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 40px;
    align-items: center;
    justify-content: center;
    margin-bottom: 48px;
    padding: 32px 48px;
    background: linear-gradient(135deg,
        rgba(14, 165, 233, 0.05) 0%,
        rgba(6, 182, 212, 0.05) 100%
    );
    border-radius: 20px;
    border: 1px solid rgba(14, 165, 233, 0.1);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.gsl-stat-item {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.gsl-stat-icon {
    font-size: 40px;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.gsl-stat-content {
    display: flex;
    flex-direction: column;
}

.gsl-stat-number {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 800;
    line-height: 1;
    color: #0EA5E9;
    margin-bottom: 4px;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
}

.gsl-stat-label {
    font-size: clamp(13px, 1.5vw, 16px);
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
}

.gsl-stat-sublabel {
    font-size: clamp(11px, 1.2vw, 13px);
    color: #6b7280;
    margin-top: 2px;
}

.gsl-stat-divider {
    width: 1px;
    height: 60px;
    background: linear-gradient(
        180deg,
        rgba(14, 165, 233, 0) 0%,
        rgba(14, 165, 233, 0.3) 50%,
        rgba(14, 165, 233, 0) 100%
    );
}

/* ============================================
   TRUST BADGES
   ============================================ */
.gsl-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding-top: 24px;
    border-top: 1px solid rgba(14, 165, 233, 0.1);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.gsl-badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(14, 165, 233, 0.05);
    border-radius: 50px;
    border: 1px solid rgba(14, 165, 233, 0.15);
    color: #0EA5E9;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: default;
}

.gsl-badge-item:hover {
    background: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

.gsl-badge-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Number counter animation */
.gsl-stat-number.counting {
    animation: countUp 0.5s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN - TABLET
   ============================================ */
@media (max-width: 1024px) {
    .gsl-trust-bar {
        padding: 50px 0;
    }

    .gsl-trust-header {
        margin-bottom: 40px;
    }

    .gsl-logo-track {
        gap: 48px;
    }

    .gsl-stats-counter {
        padding: 24px 32px;
        gap: 32px;
    }

    .gsl-stat-icon {
        font-size: 36px;
    }

    .gsl-stat-divider {
        height: 50px;
    }

    .gsl-trust-badges {
        gap: 24px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - MOBILE
   ============================================ */
@media (max-width: 768px) {
    .gsl-trust-bar {
        padding: 40px 0;
    }

    .gsl-trust-header {
        margin-bottom: 32px;
    }

    .gsl-logo-carousel {
        margin-bottom: 40px;
    }

    .gsl-logo-track {
        gap: 40px;
    }

    .gsl-partner-logo {
        width: 100px;
        height: 50px;
    }

    /* Stack stats vertically */
    .gsl-stats-counter {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .gsl-stat-item {
        justify-content: center;
        text-align: center;
        flex-direction: column;
    }

    .gsl-stat-divider {
        width: 100%;
        height: 1px;
        background: linear-gradient(
            90deg,
            rgba(14, 165, 233, 0) 0%,
            rgba(14, 165, 233, 0.3) 50%,
            rgba(14, 165, 233, 0) 100%
        );
    }

    .gsl-stat-icon {
        font-size: 32px;
    }

    .gsl-trust-badges {
        gap: 16px;
        padding-top: 20px;
    }

    .gsl-badge-item {
        padding: 8px 14px;
        font-size: 12px;
    }

    .gsl-badge-item svg {
        width: 18px;
        height: 18px;
    }
}

/* ============================================
   RESPONSIVE DESIGN - SMALL MOBILE
   ============================================ */
@media (max-width: 480px) {
    .gsl-trust-bar {
        padding: 30px 0;
    }

    .gsl-trust-container {
        padding: 0 16px;
    }

    .gsl-trust-header {
        margin-bottom: 28px;
    }

    .gsl-logo-carousel {
        margin-bottom: 32px;
    }

    .gsl-logo-track {
        gap: 32px;
    }

    .gsl-partner-logo {
        width: 90px;
        height: 45px;
    }

    .gsl-stats-counter {
        padding: 20px 16px;
        gap: 20px;
        border-radius: 16px;
    }

    .gsl-stat-item {
        gap: 12px;
    }

    .gsl-stat-icon {
        font-size: 28px;
    }

    .gsl-trust-badges {
        gap: 12px;
    }

    .gsl-badge-item {
        padding: 6px 12px;
        font-size: 11px;
    }

    .gsl-badge-item svg {
        width: 16px;
        height: 16px;
    }

    /* Show only icon on smallest screens */
    .gsl-badge-item span {
        display: none;
    }

    .gsl-badge-item {
        padding: 8px;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        justify-content: center;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .gsl-trust-bar {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .gsl-logo-carousel {
        mask-image: none;
        -webkit-mask-image: none;
    }

    .gsl-logo-track {
        animation: none;
    }

    .gsl-partner-logo {
        opacity: 1;
        filter: grayscale(100%);
    }

    .gsl-stat-icon,
    .gsl-badge-item svg {
        display: none;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .gsl-logo-track {
        animation: none;
    }

    .gsl-stat-icon {
        animation: none;
    }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
    .gsl-trust-bar {
        border: 2px solid currentColor;
    }

    .gsl-trust-headline {
        -webkit-text-fill-color: currentColor;
        background: none;
        color: #000;
    }

    .gsl-stats-counter {
        border: 2px solid currentColor;
    }

    .gsl-badge-item {
        border: 2px solid currentColor;
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */
@media (prefers-color-scheme: dark) {
    .gsl-trust-bar {
        background: #1f2937;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .gsl-trust-headline {
        color: #f3f4f6;
    }

    .gsl-trust-subheadline {
        color: #9ca3af;
    }

    .gsl-stats-counter {
        background: linear-gradient(135deg,
            rgba(14, 165, 233, 0.15) 0%,
            rgba(6, 182, 212, 0.15) 100%
        );
        border-color: rgba(14, 165, 233, 0.3);
    }

    .gsl-stat-label {
        color: #f3f4f6;
    }

    .gsl-stat-sublabel {
        color: #9ca3af;
    }

    .gsl-trust-badges {
        border-color: rgba(14, 165, 233, 0.3);
    }

    .gsl-badge-item {
        background: rgba(14, 165, 233, 0.15);
        border-color: rgba(14, 165, 233, 0.3);
        color: #06B6D4;
    }

    .gsl-badge-item:hover {
        background: rgba(14, 165, 233, 0.25);
    }
}
