/* ========== Testimonials Web block — autoplay slider (dots) ========== */
body.template-block-builder .testimonials-web .ms-testimonials-fullbleed, body.template-page .testimonials-web .ms-testimonials-fullbleed,
.editor-styles-wrapper .testimonials-web .ms-testimonials-fullbleed {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

body.template-block-builder .testimonials-web .ms-testimonials-slider, body.template-page .testimonials-web .ms-testimonials-slider,
.editor-styles-wrapper .testimonials-web .ms-testimonials-slider {
	position: relative;
	width: 100%;
	max-width: none;
	margin: 28px 0 0;
	padding: 0 clamp(16px, 4vw, 56px) 34px;
	box-sizing: border-box;
}

body.template-block-builder .testimonials-web .ms-testimonials-viewport, body.template-page .testimonials-web .ms-testimonials-viewport,
.editor-styles-wrapper .testimonials-web .ms-testimonials-viewport {
	overflow: hidden;
	border-radius: 0;
	background: #fff;
	box-shadow: none;
	border-top: 1px solid rgba(40, 66, 39, 0.08);
	border-bottom: 1px solid rgba(40, 66, 39, 0.08);
}

body.template-block-builder .testimonials-web .ms-testimonials-track, body.template-page .testimonials-web .ms-testimonials-track,
.editor-styles-wrapper .testimonials-web .ms-testimonials-track {
	display: flex;
	width: 100%;
	transition: transform 420ms ease;
	will-change: transform;
}

body.template-block-builder .testimonials-web .ms-testimonials-slide, body.template-page .testimonials-web .ms-testimonials-slide,
.editor-styles-wrapper .testimonials-web .ms-testimonials-slide {
	min-width: 100%;
}

body.template-block-builder .testimonials-web .ms-testimonials-card, body.template-page .testimonials-web .ms-testimonials-card,
.editor-styles-wrapper .testimonials-web .ms-testimonials-card {
	position: relative;
	padding: clamp(36px, 5vw, 56px) clamp(24px, 6vw, 120px) clamp(40px, 5vw, 56px);
	max-width: 920px;
	margin: 0 auto;
	text-align: center;
}

body.template-block-builder .testimonials-web .ms-testimonials-text, body.template-page .testimonials-web .ms-testimonials-text,
.editor-styles-wrapper .testimonials-web .ms-testimonials-text {
	font-family: var(--font-body, 'Roboto', sans-serif);
	font-size: 1.1rem;
	line-height: 1.75;
	color: rgba(40, 66, 39, 0.85);
	margin: 0 0 0.5rem;
}

body.template-block-builder .testimonials-web .ms-testimonials-author-row, body.template-page .testimonials-web .ms-testimonials-author-row,
.editor-styles-wrapper .testimonials-web .ms-testimonials-author-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.25rem;
	margin-top: 1.75rem;
	flex-wrap: wrap;
	text-align: left;
}

body.template-block-builder .testimonials-web .ms-testimonials-avatar, body.template-page .testimonials-web .ms-testimonials-avatar,
.editor-styles-wrapper .testimonials-web .ms-testimonials-avatar {
	flex-shrink: 0;
}

body.template-block-builder .testimonials-web .ms-testimonials-avatar-img, body.template-page .testimonials-web .ms-testimonials-avatar-img,
.editor-styles-wrapper .testimonials-web .ms-testimonials-avatar-img {
	width: 72px;
	height: 72px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 3px solid rgba(160, 140, 91, 0.45);
	box-shadow: 0 6px 20px rgba(40, 66, 39, 0.12);
}

body.template-block-builder .testimonials-web .ms-testimonials-author-meta, body.template-page .testimonials-web .ms-testimonials-author-meta,
.editor-styles-wrapper .testimonials-web .ms-testimonials-author-meta {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	align-items: flex-start;
	min-width: 0;
}

body.template-block-builder .testimonials-web .ms-testimonials-author-name, body.template-page .testimonials-web .ms-testimonials-author-name,
.editor-styles-wrapper .testimonials-web .ms-testimonials-author-name {
	font-family: var(--font-heading, 'Lora', serif);
	font-size: 1.2rem;
	font-weight: 400;
	color: var(--ms-green, #284227);
}

body.template-block-builder .testimonials-web .ms-testimonials-author-location, body.template-page .testimonials-web .ms-testimonials-author-location,
.editor-styles-wrapper .testimonials-web .ms-testimonials-author-location {
	font-family: var(--font-body, 'Roboto', sans-serif);
	font-size: 0.9rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: rgba(40, 66, 39, 0.5);
}

body.template-block-builder .testimonials-web .ms-testimonials-dots, body.template-page .testimonials-web .ms-testimonials-dots,
.editor-styles-wrapper .testimonials-web .ms-testimonials-dots {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 16px;
}

body.template-block-builder .testimonials-web .ms-testimonials-dot, body.template-page .testimonials-web .ms-testimonials-dot,
.editor-styles-wrapper .testimonials-web .ms-testimonials-dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	border: 0;
	background: rgba(40, 66, 39, 0.22);
	cursor: pointer;
}

body.template-block-builder .testimonials-web .ms-testimonials-dot.active, body.template-page .testimonials-web .ms-testimonials-dot.active,
.editor-styles-wrapper .testimonials-web .ms-testimonials-dot.active {
	background: var(--ms-green, #284227);
}

@media (max-width: 768px) {
	body.template-block-builder .testimonials-web .ms-testimonials-slider, body.template-page .testimonials-web .ms-testimonials-slider,
	.editor-styles-wrapper .testimonials-web .ms-testimonials-slider {
		padding: 0 12px 24px;
	}
	body.template-block-builder .testimonials-web .ms-testimonials-card, body.template-page .testimonials-web .ms-testimonials-card,
	.editor-styles-wrapper .testimonials-web .ms-testimonials-card {
		padding: 28px 20px 32px;
	}
	body.template-block-builder .testimonials-web .ms-testimonials-avatar-img, body.template-page .testimonials-web .ms-testimonials-avatar-img,
	.editor-styles-wrapper .testimonials-web .ms-testimonials-avatar-img {
		width: 56px;
		height: 56px;
	}
}

/* Testimonials Section */
body.template-block-builder .testimonials-section, .editor-styles-wrapper .testimonials-section {
    padding: 8rem 0;
    background: linear-gradient(180deg, #3d807124 0%, #fff 7.5rem);
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
    overflow: hidden;
}

body.template-block-builder .testimonials-section::before, .editor-styles-wrapper .testimonials-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: -2px;
    width: 0%;
    height: 2px;
    background: #2c5a4f;
    transition: width 1.5s ease-out;
    z-index: 1;
}

body.template-block-builder .testimonials-section.animate::before, .editor-styles-wrapper .testimonials-section.animate::before {
    width: 100%;
}

body.template-block-builder .testimonials-section::after, .editor-styles-wrapper .testimonials-section::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 0px;
    background: #2c5a4f;
    transition: height 1s ease-out 0.5s;
    z-index: 1;
}

body.template-block-builder .testimonials-section.animate::after, .editor-styles-wrapper .testimonials-section.animate::after {
    height: 60px;
}

/* Floating background elements */
body.template-block-builder .testimonials-section .floating-element, .editor-styles-wrapper .testimonials-section .floating-element {
    position: absolute;
    background: rgba(220, 185, 111, 0.1);
    border-radius: 50%;
    animation: floatBackground 20s ease-in-out infinite;
    pointer-events: none;
}

body.template-block-builder .testimonials-section .floating-element:nth-child(1), .editor-styles-wrapper .testimonials-section .floating-element:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

body.template-block-builder .testimonials-section .floating-element:nth-child(2), .editor-styles-wrapper .testimonials-section .floating-element:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 8%;
    animation-delay: 7s;
}

body.template-block-builder .testimonials-section .floating-element:nth-child(3), .editor-styles-wrapper .testimonials-section .floating-element:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 30%;
    right: 15%;
    animation-delay: 14s;
}

@keyframes floatBackground {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.1;
    }
    50% {
        transform: translateY(-30px) rotate(180deg);
        opacity: 0.2;
    }
}

body.template-block-builder .testimonials-section::before, .editor-styles-wrapper .testimonials-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: -2px;
    width: 0%;
    height: 2px;
    background: #2c5a4f;
    transition: width 1.5s ease-out;
    z-index: 1;
}

body.template-block-builder .testimonials-section.animate::before, .editor-styles-wrapper .testimonials-section.animate::before {
    width: 100%;
}

body.template-block-builder .testimonials-section::after, .editor-styles-wrapper .testimonials-section::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 2px;
    height: 0px;
    background: #2c5a4f;
    transition: height 1s ease-out 0.5s;
    z-index: 1;
}

body.template-block-builder .testimonials-section.animate::after, .editor-styles-wrapper .testimonials-section.animate::after {
    height: 60px;
}

body.template-block-builder .testimonials-header, .editor-styles-wrapper .testimonials-header {
    text-align: center;
    margin-bottom: 6rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

body.template-block-builder .testimonials-header.animate, .editor-styles-wrapper .testimonials-header.animate {
    opacity: 1;
    transform: translateY(0);
}

body.template-block-builder .testimonials-eyebrow, .editor-styles-wrapper .testimonials-eyebrow {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #2c5a4f;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.2s;
}

body.template-block-builder .testimonials-header.animate .testimonials-eyebrow, .editor-styles-wrapper .testimonials-header.animate .testimonials-eyebrow {
    opacity: 1;
    transform: translateY(0);
}

body.template-block-builder .testimonials-title, .editor-styles-wrapper .testimonials-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 300;
    line-height: 1.2;
    color: #000;
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out 0.4s;
}

body.template-block-builder .testimonials-header.animate .testimonials-title, .editor-styles-wrapper .testimonials-header.animate .testimonials-title {
    opacity: 1;
    transform: translateY(0);
}

body.template-block-builder .testimonials-description, .editor-styles-wrapper .testimonials-description {
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    color: #666;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out 0.6s;
}

body.template-block-builder .testimonials-header.animate .testimonials-description, .editor-styles-wrapper .testimonials-header.animate .testimonials-description {
    opacity: 1;
    transform: translateY(0);
}

body.template-block-builder .testimonials-content, .editor-styles-wrapper .testimonials-content {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s ease-out;
}

body.template-block-builder .testimonials-header.animate + .testimonials-content, .editor-styles-wrapper .testimonials-header.animate + .testimonials-content {
    opacity: 1;
    transform: translateY(0);
}

body.template-block-builder .testimonial-web, .editor-styles-wrapper .testimonial-web {
    position: relative;
    width: 100%;
    height: 900px;
    max-width: 1400px;
    margin: 0 auto;
}

body.template-block-builder .testimonial-item, .editor-styles-wrapper .testimonial-item {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transition: all 0.4s ease;
    position: absolute;
    overflow: hidden;
    animation: float 8s ease-in-out infinite;
    width: 320px;
    z-index: 10;
}

body.template-block-builder .web-item-1, .editor-styles-wrapper .web-item-1 {
    top: 80px;
    left: 80px;
    animation-delay: 0s;
}

body.template-block-builder .web-item-2, .editor-styles-wrapper .web-item-2 {
    top: 120px;
    left: 500px;
    animation-delay: 1.5s;
}

body.template-block-builder .web-item-3, .editor-styles-wrapper .web-item-3 {
    top: 80px;
    right: 80px;
    animation-delay: 3s;
}

body.template-block-builder .web-item-4, .editor-styles-wrapper .web-item-4 {
    top: 580px;
    left: 120px;
    animation-delay: 4.5s;
}

body.template-block-builder .web-item-5, .editor-styles-wrapper .web-item-5 {
    top: 530px;
    left: 550px;
    animation-delay: 6s;
}

body.template-block-builder .web-item-6, .editor-styles-wrapper .web-item-6 {
    top: 580px;
    right: 120px;
    animation-delay: 7.5s;
}

body.template-block-builder .connection-lines, .editor-styles-wrapper .connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

body.template-block-builder .connection-lines line, .editor-styles-wrapper .connection-lines line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawLine 2s ease-in-out forwards;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.connection-lines line:nth-child(2) { animation-delay: 0.3s; }
.connection-lines line:nth-child(3) { animation-delay: 0.6s; }
.connection-lines line:nth-child(4) { animation-delay: 0.9s; }
.connection-lines line:nth-child(5) { animation-delay: 1.2s; }

@keyframes drawLine {
    to {
        stroke-dashoffset: 0;
    }
}

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

body.template-block-builder .testimonial-item:nth-child(1), .editor-styles-wrapper .testimonial-item:nth-child(1) {
    animation: float 6s ease-in-out infinite 0s;
}

body.template-block-builder .testimonial-item:nth-child(2), .editor-styles-wrapper .testimonial-item:nth-child(2) {
    animation: float 6s ease-in-out infinite 2s;
}

body.template-block-builder .testimonial-item:nth-child(3), .editor-styles-wrapper .testimonial-item:nth-child(3) {
    animation: float 6s ease-in-out infinite 4s;
}

body.template-block-builder .testimonial-item::before, .editor-styles-wrapper .testimonial-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #2c5a4f, #DCB96F);
}

body.template-block-builder .testimonial-item:hover, .editor-styles-wrapper .testimonial-item:hover {
    transform: translateY(-20px) scale(1.02);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.15);
    animation-play-state: paused;
}

body.template-block-builder .testimonial-quote, .editor-styles-wrapper .testimonial-quote {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    line-height: 1.6;
    color: #333;
    margin-bottom: 2rem;
    font-style: italic;
    position: relative;
}

body.template-block-builder .testimonial-quote::before, .editor-styles-wrapper .testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: #DCB96F;
    position: absolute;
    top: -3rem;
    left: -2rem;
    font-family: var(--font-heading);
    opacity: 0.3;
}

body.template-block-builder .testimonial-author, .editor-styles-wrapper .testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

body.template-block-builder .author-avatar, .editor-styles-wrapper .author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #DCB96F;
    box-shadow: 0 4px 15px rgba(220, 185, 111, 0.3);
}

body.template-block-builder .author-info, .editor-styles-wrapper .author-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

body.template-block-builder .author-name, .editor-styles-wrapper .author-name {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    color: #2c5a4f;
}

body.template-block-builder .author-location, .editor-styles-wrapper .author-location {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #666;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    body.template-block-builder .testimonial-web, .editor-styles-wrapper .testimonial-web {
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }
    
    body.template-block-builder .testimonial-item, .editor-styles-wrapper .testimonial-item {
        position: static !important;
        width: 100% !important;
        animation: none;
        transform: none !important;
    }
    
    body.template-block-builder .testimonial-item:hover, .editor-styles-wrapper .testimonial-item:hover {
        transform: translateY(-10px) scale(1.01) !important;
    }
    
    body.template-block-builder .connection-lines, .editor-styles-wrapper .connection-lines {
        display: none;
    }
    
    body.template-block-builder .floating-element, .editor-styles-wrapper .floating-element {
        display: none;
    }
}
