/* Cro Trust Badges Module
 * Block 15
 * ------------------------------------------------------------------------------------------------------------------ */

/* =================================================================== */
/* TRUST BADGES SECTION V2 - MOBILE-FIRST CRO (FIXED) */
/* =================================================================== */
.cro-trust-badges {
padding: 2.5rem 0;
background: var(--color-secondary-normal-bg);
position: relative;
overflow: hidden;
}

/* .section-header {
text-align: center;
margin-bottom: 2.5rem;
padding: 0 1rem;
} */

/* .section-tag {
display: inline-block;
background: var(--success-light);
color: var(--success);
padding: 0.5rem 1.25rem;
border-radius: 50px;
font-size: 0.85rem;
font-weight: 700;
margin-bottom: 1rem;
border: 2px solid var(--success);
} */

/* .section-title {
font-size: 2rem;
font-weight: 900;
color: #FFFFFF;
margin-bottom: 0.75rem;
line-height: 1.2;
}

.section-subtitle {
font-size: 1rem;
color: rgba(255, 255, 255, 0.85);
line-height: 1.6;
max-width: 600px;
margin: 0 auto;
} */

/* Badges Carousel */
.badges-carousel-wrapper {
position: relative;
overflow: hidden;
padding: 0;
}

.badges-carousel {
display: flex;
gap: 1rem;
overflow-x: auto;
scroll-snap-type: x mandatory;
scroll-behavior: smooth;
-webkit-overflow-scrolling: touch;
scrollbar-width: none;
padding: 0.5rem 1.5rem 1rem;
touch-action: pan-x;
cursor: grab;
}

/* Mobile: Extra padding to prevent left/right card clipping */
@media (max-width: 767px) {
    .badges-carousel {
        padding: 0.5rem calc(50vw - 160px) 1rem;
        scroll-padding: 0 calc(50vw - 160px);
    }
}

.badges-carousel:active {
cursor: grabbing;
}

.badges-carousel::-webkit-scrollbar {
display: none;
}

/* Badge Cards */
.badge-card-v2 {
min-width: 320px;
max-width: 320px;
scroll-snap-align: center;
flex-shrink: 0;
}

.badge-card-inner {
background: white;
padding: 2rem 1.5rem;
border-radius: 20px;
box-shadow: var(--shadow-lg);
border: 2px solid var(--gray-200);
position: relative;
min-height: 600px;
transition: all 0.3s;
}

.badge-card-v2:hover .badge-card-inner {
transform: translateY(-4px);
box-shadow: var(--shadow-xl);
border-color: var(--color-primary-normal-bg);
}

/* CTA Card Centered Content */
.cta-card-content {
background: linear-gradient(135deg, var(--color-secondary-normal-bg) 0%, var(--color-secondary-hover-bg) 100%);
border-color: var(--color-primary-normal-bg);
display: flex;
flex-direction: column;
justify-content: space-between;
}

.cta-card-content .badge-title {
color: white;
}

.cta-top-section {
text-align: center;
}

.cta-description {
color: rgba(255, 255, 255, 0.9);
font-size: 0.9rem;
line-height: 1.6;
margin-bottom: 1.5rem;
}

.cta-middle-section {
flex-grow: 1;
display: flex;
flex-direction: column;
gap: 1.5rem;
justify-content: center;
}

.cta-features {
display: flex;
flex-direction: column;
gap: 0.75rem;
}

.cta-feature {
color: rgba(255, 255, 255, 0.9);
font-size: 0.9rem;
font-weight: 600;
text-align: center;
padding: 0.5rem;
background: rgba(255, 255, 255, 0.1);
border-radius: 8px;
}

.cta-value-box {
text-align: center;
color: var(--warning);
font-size: 1rem;
font-weight: 800;
padding: 1rem;
background: rgba(245, 158, 11, 0.1);
border-radius: 10px;
border: 2px solid rgba(245, 158, 11, 0.3);
}

.cta-bottom-section {
display: flex;
flex-direction: column;
gap: 1rem;
}

.cta-final-button {
width: 100%;
}

.cta-trust-badges {
display: flex;
justify-content: center;
gap: 1.5rem;
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.8);
font-weight: 600;
}

/* Live Status */
.live-status {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 1rem;
font-size: 0.75rem;
color: var(--gray-600);
font-weight: 600;
}

.status-dot {
width: 8px;
height: 8px;
background: var(--success);
border-radius: 50%;
animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
0%, 100% { opacity: 1; transform: scale(1); }
50% { opacity: 0.6; transform: scale(0.9); }
}

/* Badge Visual with Tagline */
.badge-visual {
text-align: center;
margin-bottom: 1.5rem;
}

.badge-icon-large {
font-size: 4rem;
margin-bottom: 0.75rem;
animation: float 3s ease-in-out infinite;
}

/* Professional SVG Icon Styling */
.badge-icon-large.badge-svg-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-svg-icon svg {
    width: 100%;
    height: 100%;
    color: var(--color-primary-normal-bg);
    transition: all 0.3s ease;
}

/* Badge-specific icon colors */
[data-badge="wsib"] .badge-svg-icon svg {
    color: #10B981; /* Green for compliance */
}

[data-badge="insurance"] .badge-svg-icon svg {
    color: #3B82F6; /* Blue for financial protection */
}

[data-badge="ohsa"] .badge-svg-icon svg {
    color: #F59E0B; /* Amber for safety */
}

[data-badge="leed"] .badge-svg-icon svg {
    color: #22C55E; /* Green for environmental */
}

/* Hover effect on card */
.badge-card-v2:hover .badge-svg-icon svg {
    transform: scale(1.1);
}

@keyframes float {
0%, 100% { transform: translateY(0px); }
50% { transform: translateY(-8px); }
}

.badge-tagline {
font-size: 0.85rem;
color: var(--color-primary-normal-bg);
font-weight: 700;
font-style: italic;
}

.badge-title {
text-align: center;
font-size: 1.5rem;
font-weight: 800;
color: var(--color-secondary-normal-bg);
margin-bottom: 1rem;
}

/* Risk/Reward Toggle */
.risk-reward-container {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.5rem;
margin-bottom: 1rem;
}

.toggle-view {
padding: 0.625rem;
background: var(--gray-100);
border: 2px solid var(--gray-300);
border-radius: 8px;
font-weight: 700;
font-size: 0.85rem;
color: var(--gray-600);
cursor: pointer;
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
min-height: 44px;
touch-action: none; /* Prevent touch scroll on buttons */
position: relative;
overflow: hidden;
transform: translateY(0);
}

/* Subtle shine effect on hover */
.toggle-view::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.6s ease;
}

.toggle-view:hover::before {
left: 100%;
}

.toggle-view:hover {
background: var(--gray-200);
border-color: var(--color-secondary-normal-bg);
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 31, 63, 0.15);
}

.toggle-view:active {
transform: translateY(0);
box-shadow: 0 2px 6px rgba(0, 31, 63, 0.1);
}

/* Hint animation for inactive toggle - subtle pulse */
.toggle-view:not(.active) {
animation: cro-trust-badges-toggle-hint 3s ease-in-out infinite;
}

@keyframes cro-trust-badges-toggle-hint {
0%, 100% {
box-shadow: 0 0 0 0 rgba(196, 30, 58, 0);
}
50% {
box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-normal-bg) 80%, transparent);
}
}

.toggle-view.active {
background: var(--success);
color: white;
border-color: var(--success);
box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
animation: none; /* Stop hint animation when active */
}

.toggle-view.active:hover {
background: #059669; /* Darker green on hover */
box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
transform: translateY(-2px);
}

.toggle-view[data-view="risk"].active {
background: var(--color-primary-normal-bg);
border-color: var(--color-primary-normal-bg);
box-shadow: 0 4px 12px color-mix(in srgb, var(--color-primary-normal-bg) 70%, transparent);
}

.toggle-view[data-view="risk"].active:hover {
background: var(--color-primary-hover-bg);
box-shadow: 0 6px 16px color-mix(in srgb, var(--color-primary-normal-bg) 60%, transparent);
}

/* Badge Content */
.badge-content {
display: none;
margin-bottom: 1.5rem;
}

.badge-content.active {
display: block;
animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}

.badge-description {
font-size: 0.9rem;
line-height: 1.6;
color: var(--gray-700);
margin-bottom: 1rem;
}

.risk-text {
color: var(--color-primary-hover-bg);
font-weight: 600;
}

.badge-label-v2 {
display: inline-block;
background: var(--success-light);
color: var(--success);
padding: 0.5rem 1rem;
border-radius: 50px;
font-size: 0.8rem;
font-weight: 700;
border: 2px solid var(--success);
}

.consequence-stat {
display: inline-block;
background: rgba(196, 30, 58, 0.1);
color: var(--color-primary-normal-bg);
padding: 0.5rem 1rem;
border-radius: 8px;
font-size: 0.8rem;
font-weight: 700;
border: 2px solid color-mix(in srgb, var(--color-primary-normal-bg) 70%, transparent);
}

/* Competitor Gap Chart */
.competitor-gap {
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--gray-50);
border-radius: 12px;
}

.gap-label {
font-size: 0.8rem;
font-weight: 700;
color: var(--gray-700);
margin-bottom: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.gap-bar {
display: grid;
grid-template-columns: 50px 1fr 55px;
align-items: center;
gap: 0.75rem;
margin-bottom: 0.75rem;
}

.gap-bar-label {
font-size: 0.8rem;
font-weight: 700;
color: var(--gray-700);
}

.gap-bar-bg {
height: 28px;
background: var(--gray-200);
border-radius: 6px;
overflow: hidden;
position: relative;
}

.gap-bar-fill {
height: 100%;
border-radius: 6px;
transition: width 1.5s ease-out;
width: 0%;
}

.cbcs-bar {
background: var(--success);
}

.typical-bar {
background: var(--warning);
}

.cheap-bar {
background: var(--color-primary-normal-bg);
}

.gap-bar-percent {
font-size: 0.85rem;
font-weight: 800;
color: var(--gray-900);
text-align: right;
}

/* Certification Timeline */
.cert-timeline {
margin-bottom: 1.5rem;
padding: 1rem;
background: var(--gray-50);
border-radius: 12px;
}

.timeline-label {
font-size: 0.8rem;
font-weight: 700;
color: var(--gray-700);
margin-bottom: 1rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.timeline-track {
position: relative;
height: 4px;
background: var(--gray-300);
border-radius: 2px;
margin-bottom: 2.5rem;
}

.timeline-marker {
position: absolute;
top: -8px;
width: 20px;
height: 20px;
background: white;
border: 3px solid var(--gray-400);
border-radius: 50%;
font-size: 0;
}

.timeline-marker::after {
content: attr(data-year);
position: absolute;
top: 28px;
left: 50%;
transform: translateX(-50%);
font-size: 0.75rem;
font-weight: 700;
color: var(--gray-700);
white-space: nowrap;
}

.timeline-marker:nth-child(1) {
left: 5%;
}

.timeline-marker:nth-child(2) {
left: 35%;
}

.timeline-marker:nth-child(3) {
left: 65%;
}

.timeline-marker:nth-child(4) {
left: 95%;
}

.timeline-marker.active {
border-color: var(--color-primary-normal-bg);
background: var(--color-primary-normal-bg);
width: 24px;
height: 24px;
top: -10px;
box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary-normal-bg) 80%, transparent);
}

.timeline-text {
font-size: 0.75rem;
color: var(--gray-600);
text-align: center;
font-weight: 600;
margin-top: 0.5rem;
}

/* Client Proof Rotation */
.client-proof-rotate {
margin-bottom: 1.5rem;
min-height: 50px;
position: relative;
}

.client-proof-item {
display: flex;
align-items: center;
gap: 0.75rem;
position: absolute;
opacity: 0;
transition: opacity 0.5s;
}

.client-proof-item.active {
opacity: 1;
position: relative;
}

.client-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
background: linear-gradient(135deg, var(--color-secondary-normal-bg) 0%, var(--color-secondary-hover-bg) 100%);
color: white;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
font-size: 0.8rem;
flex-shrink: 0;
box-shadow: var(--shadow-md);
}

.client-quote {
font-size: 0.85rem;
color: var(--gray-700);
font-style: italic;
line-height: 1.5;
}

/* Peer Showcase */
.peer-showcase {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.75rem 1rem;
background: var(--info-light);
border-radius: 10px;
margin-bottom: 1.5rem;
}

.peer-icon {
font-size: 1.25rem;
}

.peer-text {
font-size: 0.85rem;
color: var(--gray-700);
font-weight: 600;
}

/* Badge Actions */
.badge-actions {
display: flex;
flex-direction: column;
gap: 0.75rem;
margin-bottom: 1rem;
}

.badge-cta {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.875rem 1.25rem;
border-radius: 10px;
font-weight: 700;
font-size: 0.9rem;
cursor: pointer;
transition: all 0.3s;
text-decoration: none;
border: none;
min-height: 48px;
touch-action: none; /* Prevent touch scroll on buttons */
}

.badge-cta.primary {
/* background: linear-gradient(135deg, var(--color-primary-normal-bg) 0%, var(--color-primary-hover-bg) 100%); */
background: var(--color-primary-normal-bg);
color: white;
box-shadow: var(--shadow-primary);
}

.badge-cta.primary:active {
transform: scale(0.98);
}

.badge-cta.secondary {
background: white;
color: var(--color-secondary-normal-bg);
border: 2px solid var(--color-secondary-normal-bg);
}

.external-icon {
font-size: 1.25rem;
}

/* Expand Why This Matters */
.expand-why {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.875rem 1rem;
background: var(--gray-100);
border: 2px solid var(--gray-300);
border-radius: 10px;
font-weight: 700;
font-size: 0.85rem;
color: var(--gray-700);
cursor: pointer;
transition: all 0.3s;
min-height: 48px;
touch-action: none; /* Prevent touch scroll on buttons */
}

.expand-why:hover {
background: var(--gray-200);
border-color: var(--color-primary-normal-bg);
}

.expand-icon {
font-size: 1.5rem;
color: var(--color-primary-normal-bg);
transition: transform 0.3s;
}

.expand-why.active .expand-icon {
transform: rotate(45deg);
}

.why-content {
max-height: 0;
overflow: hidden;
transition: max-height 0.4s ease;
margin-top: 0;
}

.why-content.active {
margin-top: 1rem;
}

.why-inner {
padding: 1.25rem;
background: rgba(196, 30, 58, 0.05);
border-radius: 12px;
border-left: 4px solid var(--color-primary-normal-bg);
}

.why-inner h4 {
color: var(--color-primary-normal-bg);
font-size: 1rem;
margin-bottom: 0.75rem;
font-weight: 800;
}

.why-inner p {
font-size: 0.875rem;
line-height: 1.6;
color: var(--gray-700);
margin-bottom: 0.75rem;
}

.why-inner p:last-child {
margin-bottom: 0;
}

/* CTA Card Final - Mobile Only - SIMPLIFIED & CENTERED */
.mobile-only-card {
display: block;
}

.cta-final-icon {
font-size: 3.5rem;
margin-bottom: 1rem;
}

.cta-final-title {
color: white;
font-size: 1.5rem;
font-weight: 800;
margin-bottom: 0.75rem;
line-height: 1.3;
}

.cta-final-text {
color: rgba(255, 255, 255, 0.9);
font-size: 0.95rem;
margin-bottom: 1.5rem;
line-height: 1.6;
}

.cta-final-button {
display: inline-flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.75rem;
background: var(--color-primary-normal-bg);
color: white;
border-radius: 12px;
text-decoration: none;
font-weight: 700;
font-size: 1rem;
box-shadow: var(--shadow-primary);
transition: all 0.3s;
margin-bottom: 1rem;
min-height: 52px;
gap: 0.5rem;
}

.cta-final-button:active {
transform: scale(0.98);
}

.cta-final-value {
color: var(--warning);
font-size: 1rem;
font-weight: 800;
margin-bottom: 1rem;
}

.cta-final-trust {
display: flex;
flex-direction: column;
gap: 0.5rem;
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.85);
font-weight: 600;
}

/* Carousel Dots - IMPROVED MOBILE */
.carousel-dots {
display: flex;
justify-content: center;
gap: 0.5rem;
margin-top: 0.75rem;
padding: 0 1rem;
}

.dot {
width: 10px;
height: 10px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.3);
transition: all 0.3s;
cursor: pointer;
border: 2px solid rgba(255, 255, 255, 0.2);
}

.dot:active {
transform: scale(0.9);
}

.dot.active {
width: 28px;
border-radius: 5px;
background: var(--color-primary-normal-bg);
}

/* Pulse animation for active dot during autoplay */
.dot.active.autopulse {
animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
0%, 100% {
opacity: 1;
box-shadow: 0 0 0 0 color-mix(in srgb, var(--color-primary-normal-bg) 60%, transparent);
}
50% {
opacity: 0.8;
box-shadow: 0 0 0 4px rgba(196, 30, 58, 0);
}
}

/* Certificate Modal */
.certificate-modal {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 9999;
display: none;
align-items: center;
justify-content: center;
padding: 1rem;
}

.certificate-modal.active {
display: flex;
}

.modal-overlay {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.7);
backdrop-filter: blur(4px);
}

.modal-content {
position: relative;
background: white;
border-radius: 20px;
max-width: 500px;
width: 100%;
box-shadow: var(--shadow-xl);
animation: slideUp 0.3s ease;
}

@keyframes slideUp {
from { transform: translateY(50px); opacity: 0; }
to { transform: translateY(0); opacity: 1; }
}

.modal-close {
position: absolute;
top: 1rem;
right: 1rem;
background: none;
border: none;
font-size: 2rem;
color: var(--gray-600);
cursor: pointer;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.3s;
}

.modal-close:hover {
background: var(--gray-100);
}

.modal-header {
padding: 2rem 2rem 1rem;
border-bottom: 2px solid var(--gray-200);
}

.modal-header h3 {
font-size: 1.5rem;
font-weight: 800;
color: var(--color-secondary-normal-bg);
}

.modal-body {
padding: 2rem;
}

.certificate-preview {
text-align: center;
margin-bottom: 1.5rem;
}

.cert-icon {
font-size: 4rem;
margin-bottom: 1rem;
}

.certificate-preview p {
color: var(--gray-700);
font-size: 0.95rem;
}

.certificate-form {
display: flex;
flex-direction: column;
gap: 1rem;
}

.modal-input {
padding: 1rem;
border: 2px solid var(--gray-300);
border-radius: 10px;
font-size: 1rem;
transition: all 0.3s;
min-height: 48px;
}

.modal-input:focus {
outline: none;
border-color: var(--color-primary-normal-bg);
box-shadow: 0 0 0 3px rgba(196, 30, 58, 0.1);
}

.modal-submit {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
background: var(--color-primary-normal-bg);
color: white;
border: none;
border-radius: 10px;
font-weight: 700;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s;
box-shadow: var(--shadow-primary);
min-height: 52px;
}

.modal-submit:active {
transform: scale(0.98);
}

.modal-trust {
display: flex;
justify-content: center;
gap: 1rem;
flex-wrap: wrap;
font-size: 0.75rem;
color: var(--gray-600);
font-weight: 600;
margin-top: 1rem;
}

/* Desktop Responsive */
@media (min-width: 768px) {
.cro-trust-badges {
padding: 4rem 0;
}

/* .section-title {
font-size: 2.5rem;
}

.section-subtitle {
font-size: 1.125rem;
} */

.badge-card-v2 {
min-width: 360px;
max-width: 360px;
}

.badge-card-inner {
padding: 2.5rem 2rem;
}

.badge-title {
font-size: 1.75rem;
}

.badge-actions {
flex-direction: row;
}

.gap-bar {
grid-template-columns: 60px 1fr 60px;
}
}

@media (min-width: 1024px) {
.badges-carousel {
justify-content: center;
flex-wrap: wrap;
overflow-x: visible;
}

.badge-card-v2 {
min-width: 320px;
max-width: 320px;
}

.carousel-dots {
display: none;
}
}

/* ------------------------------------------------------------------------------------------------------------------ *
