/* ═══════════════════════════════════════════════
   Attia Google Reviews v2.4 – Attia Digital CI/CD
   Fonts: Archivo (Headings), Hanken Grotesk (Body)
   Primary: #2965C7 | Dark: #000229 | Stars: #fb8e28
   ═══════════════════════════════════════════════ */

.agr-reviews-wrapper {
    max-width: 1200px;
    margin: 2.5rem auto;
    font-family: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #3A3A3A;
    font-size: 17px;
    line-height: 1.76;
}

/* ── Summary ── */
.agr-summary {
    text-align: center;
    margin-bottom: 2.5rem;
    padding: 2rem 1.5rem;
    background: #F7F9FE;
    border-radius: 20px;
}

.agr-summary-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.agr-summary-number {
    font-family: 'Archivo', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #000229;
    line-height: 1;
}

.agr-summary-stars {
    margin: 0.25rem 0;
}

.agr-summary-count {
    font-size: 0.95rem;
    color: #606060;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.agr-google-icon {
    vertical-align: middle;
}

/* ── Stars ── */
.agr-stars {
    display: inline-flex;
    gap: 2px;
}

.agr-star {
    font-size: 1.2rem;
    line-height: 1;
}

.agr-star-full {
    color: #fb8e28;
}

.agr-star-half {
    color: #fb8e28;
    opacity: 0.6;
}

.agr-star-empty {
    color: #dadce0;
}

/* ── Grid Layout ── */
.agr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

/* Grid zentrieren bei wenigen Reviews – Flexbox statt Grid, !important gegen Elementor-Overrides */
.agr-reviews-wrapper.agr-grid-center .agr-reviews.agr-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 20px !important;
    grid-template-columns: none !important;
    width: 100% !important;
}

.agr-reviews-wrapper.agr-grid-center .agr-reviews.agr-grid .agr-review-card {
    flex: 0 1 380px !important;
    max-width: 420px !important;
    width: auto !important;
}

/* ── List Layout ── */
.agr-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.agr-list .agr-review-card {
    max-width: 100%;
}

/* ── Slider Layout (Multi-Card) ── */
.agr-slider {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.agr-slider .agr-review-card {
    display: none;
    flex: 1 1 0%;
    min-width: 0;
    max-width: none;
    margin: 0;
    animation: agr-fade-in 0.3s ease;
}

.agr-slider-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.agr-slider-nav button {
    background: #fff;
    border: 1px solid #e8eaed;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #000229;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agr-slider-nav button:hover {
    background: #2965C7;
    color: #fff;
    border-color: #2965C7;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(41, 101, 199, 0.3);
}

.agr-slider-dots {
    display: flex;
    gap: 8px;
}

.agr-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #dadce0;
    cursor: pointer;
    transition: all 0.25s ease;
}

.agr-dot-active {
    background: #2965C7;
    transform: scale(1.2);
}

/* ── Review Card ── */
.agr-review-card {
    background: #ffffff;
    border: 1px solid #e8eaed;
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.3s ease;
}

.agr-review-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.agr-review-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 0.85rem;
}

.agr-author-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.agr-author-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2965C7, #418ACC);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.agr-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.agr-author-name {
    font-family: 'Archivo', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #000229;
}

a.agr-author-link {
    color: #000229;
    text-decoration: none;
    transition: color 0.2s ease;
}

a.agr-author-link:hover {
    color: #2965C7;
    text-decoration: underline;
}

.agr-review-date {
    font-size: 0.8rem;
    color: #606060;
}

.agr-review-stars {
    margin-bottom: 0.85rem;
}

/* ── Review Text + Read More ── */
.agr-review-text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #3A3A3A;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.agr-review-text.agr-text-expanded {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}

.agr-read-more {
    background: none;
    border: none;
    color: #2965C7;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.35rem 0 0;
    font-family: inherit;
    transition: color 0.2s ease;
}

.agr-read-more:hover {
    color: #000229;
    text-decoration: underline;
}

.agr-read-more:focus-visible {
    outline: 2px solid #2965C7;
    outline-offset: 2px;
}

.agr-no-reviews {
    text-align: center;
    color: #606060;
    padding: 2rem;
}

/* ── Focus Styles (Accessibility) ── */
.agr-slider-nav button:focus-visible,
.agr-dot:focus-visible {
    outline: 2px solid #2965C7;
    outline-offset: 2px;
}

/* ── Slide Transition ── */
@keyframes agr-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive: Tablet ── */
@media (max-width: 1024px) {
    .agr-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* ── Responsive: Mobile ── */
@media (max-width: 768px) {
    .agr-grid {
        grid-template-columns: 1fr;
    }

    .agr-summary-number {
        font-size: 2.5rem;
    }

    .agr-review-card {
        padding: 1.25rem;
        border-radius: 16px;
    }

    .agr-reviews-wrapper {
        margin: 1.5rem auto;
    }

    .agr-slider .agr-review-card {
        max-width: 100%;
    }
}

/* ── Responsive: Small Mobile ── */
@media (max-width: 480px) {
    .agr-summary-number {
        font-size: 2rem;
    }

    .agr-reviews-wrapper {
        font-size: 15px;
        margin: 1rem auto;
    }

    .agr-review-card {
        padding: 1rem;
        border-radius: 12px;
    }

    .agr-author-img,
    .agr-author-placeholder {
        width: 36px;
        height: 36px;
    }

    .agr-summary {
        padding: 1.25rem 1rem;
        border-radius: 14px;
    }
}

/* ── Prefers Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    .agr-review-card,
    .agr-slider-nav button,
    .agr-dot {
        transition: none;
    }

    .agr-slider .agr-review-card {
        animation: none;
    }

    .agr-review-card:hover {
        transform: none;
    }

    .agr-slider-nav button:hover {
        transform: none;
    }
}
