/* ===================================
   TESTIMONIALS BLOCK STYLES
   =================================== */

/* Main block container - ISOLATED to prevent conflicts */
.wp-block-acf-atax-testimonials .testimonials-section {
    width: 100%;
    max-width: 100vw;
    margin: 0 auto;
    padding: 48px 20px 72px 20px; /* Main container controls all side spacing */
    display: flex;
    flex-direction: column;
    gap: 60px;
    overflow-x: hidden;
    box-sizing: border-box;
    background: white; /* White background */
    position: relative;
}

/* Main container - 1280px max-width as per design */
.testimonials-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 0; /* No side padding - main container controls it */
    gap: 48px;
}

/* Header section with title and subtitle */
.testimonials-header {
    text-align: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0; /* No side padding - main container controls it */
}

.testimonials-main-title {
    font-size: 48px; /* Large title as per design */
    font-weight: 700; /* Bold */
    line-height: 1.2;
    color: #10A1DC; /* Accent color as per user request */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    hyphens: auto;
    padding: 0; /* No side padding - main container controls it */
}

.testimonials-subtitle {
    font-size: 16px; /* Updated to 16px as per user request */
    font-weight: 700; /* Bold as per user request */
    line-height: 1.4;
    color: var(--primary-color, #354477); /* Primary color as per user request */
    margin: 0; /* No margin - gap handles spacing */
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* Content area - MeetSoci testimonials widget */
.testimonials-carousel {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column; /* stack content + dots */
    align-items: center;
    gap: 16px;
    font-family: 'Montserrat', sans-serif;
}
.carousel-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 16px; /* controls arrows-to-content spacing */
}
.carousel-viewport {
    overflow: hidden;
    width: 100%;
}
.carousel-track {
    display: flex;
    transition: opacity 300ms ease;
    list-style: none;
    padding: 0;
    margin: 0;
}
.carousel-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.carousel-stars {
    color: #FFC845;
    display: flex;
    gap: 4px;
    justify-content: center;
}
.carousel-quote {
    font-size: 16px;
    line-height: 1.6;
    color: #354477;
    text-align: center;
    max-width: 800px;
    font-weight: 700;
}
.carousel-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: center;
}
.carousel-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}
.carousel-name {
    font-weight: 700;
    color: #354477;
}
.carousel-position {
    color: #666;
    font-size: 16px;
}
.carousel-divider {
    display: inline-block;
    width: 1px;
    height: 40px;
    background: #354477;
    margin: 0 24px;
}
.carousel-logo {
    height: 40px;
}

.carousel-arrow {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #354477;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.carousel-arrow:hover {
    background: #FFC845;
    border-color: #FFC845;
}
.carousel-arrow:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
/* Arrow images - converted from background images to img elements for proper alt text support */
.arrow {
    display: inline-block;
    width: 14px;
    height: 14px;
    object-fit: contain; /* Ensures image scales properly within dimensions */
}
/* Removed background-image styles - now using img elements in HTML */

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}
.carousel-dots button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #C9CFDD;
    border: none;
    padding: 0;
}
.carousel-dots button[aria-selected="true"] {
    background: #354477;
}

/* MeetSoci widget container */
.testimonials-widget-container {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* MeetSoci widget placeholder - will be replaced by the widget */
.review-widget-placeholder {
    width: 100%;
    min-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Ensure MeetSoci widget styles don't conflict with theme */
.testimonials-widget-container * {
    box-sizing: border-box;
}

/* Responsive adjustments for MeetSoci widget */
.testimonials-widget-container iframe,
.testimonials-widget-container .meetsoci-widget {
    max-width: 100% !important;
    width: 100% !important;
}

/* Hide MeetSoci widget headline - we have our own title */
.widget.layout-carousel.theme-default .headline {
    display: none !important;
}

/* ===================================
   RESPONSIVE DESIGN - GLOBAL FRAMEWORK
   =================================== */

/* Laptop (1151px-1600px) - Same layout, reduced gaps only */
@media (max-width: 1600px) {
    .wp-block-acf-atax-testimonials .testimonials-section {
        padding: 40px 20px 72px 20px; /* Reduced top/bottom padding */
        gap: 50px; /* Reduced gap */
    }
    .carousel-row { gap: 12px; }
    .carousel-quote { max-width: 760px; }
    /* NO font size changes - same fonts as desktop */
}

/* Tablet (768px-1150px) - Layout optimization */
@media (max-width: 1150px) {
    .wp-block-acf-atax-testimonials .testimonials-section {
        padding: 40px 20px 72px 20px;
        gap: 45px;
    }
    .testimonials-container {
        max-width: 100%;
        padding: 0; /* No side padding - main container controls it */
    }
    .carousel-row { gap: 12px; }
    .carousel-meta { gap: 12px; }
    .carousel-divider { height: 32px; margin: 0 16px; }
    /* NO font size changes - same fonts as desktop */
}

/* Mobile (0px-767px) - Stacked layout, mobile optimization */
@media (max-width: 767px) {
    .wp-block-acf-atax-testimonials .testimonials-section {
        padding: 40px 16px 96px 16px; /* Proper mobile padding with bottom */
        gap: 40px;
    }
    .testimonials-container {
        gap: 32px;
        padding: 0; /* No side padding - main container controls it */
    }
    .testimonials-main-title {
        font-size: 36px; /* 48px → 36px for mobile readability (framework exception) */
    }
    .carousel-row { 
        gap: 8px; 
    }
    .carousel-quote { 
        font-size: 15px; line-height: 1.55; padding: 0 4px; 
    }
    .carousel-meta { 
        flex-direction: column; gap: 8px; 
    }
    .carousel-divider { 
        display: none; 
    }
    .carousel-dots { 
        margin-top: 8px; gap: 6px; 
    }
    .testimonials-widget-container {
        padding: 0 10px; /* Small padding for mobile */
    }
    .review-widget-placeholder {
        min-height: 180px; /* Reduced height for mobile */
    }
    .carousel-name {
        text-align: center;
    }
    .carousel-position {
        text-align: center;
    }
}

/* ===================================
   ALIGNMENT SUPPORT
   =================================== */

/* Wide alignment support */
.wp-block-acf-atax-testimonials .testimonials-section.alignwide {
    max-width: var(--wide-width, 1280px);
}

/* Full width alignment support */
.wp-block-acf-atax-testimonials .testimonials-section.alignfull {
    max-width: 100%;
}

/* ===================================
   OVERFLOW PROTECTION & TEXT HANDLING
   =================================== */

/* Prevent text overflow on all screen sizes */
.wp-block-acf-atax-testimonials .testimonials-main-title,
.wp-block-acf-atax-testimonials .testimonials-subtitle,
.wp-block-acf-atax-testimonials .placeholder-text {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Ensure containers don't cause horizontal scroll */
.wp-block-acf-atax-testimonials .testimonials-section {
    max-width: 100%;
    overflow: hidden;
}

/* Ensure grid containers don't overflow */
.wp-block-acf-atax-testimonials .testimonials-container {
    min-width: 0;
    overflow-x: hidden;
}
