/* ============================================================
   Yare Electrical — Trust & Conversion Sidebar
   Straight edge · Red #cf2e2e
   ============================================================ */

.sts-sidebar {
    --red:        #cf2e2e;
    --red-dark:   #a82424;
    --red-deeper: #8c1c1c;
    --red-light:  #fdf2f2;
    --text:       #1a1a1a;
    --muted:      #5a5a5a;
    --border:     #e2e2e2;
    --row-alt:    #f9f9f9;
    --white:      #ffffff;

    width: 100%;
    background: var(--white);
    border-top: 5px solid var(--red);
    box-shadow: 0 8px 36px rgba(0, 0, 0, 0.13), 0 2px 8px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: inherit;
    border-radius: 0 !important;
}

.sts-sidebar-sticky {
    position: sticky;
    top: 24px;
    z-index: 100;
}

/* ---- Header ---- */
.sts-header {
    background: var(--red);
    padding: 16px 20px 14px;
    text-align: center;
    position: relative;
}

.sts-header::after {
    content: '';
    display: block;
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 7px solid var(--red);
    z-index: 1;
}

.sts-header-title {
    display: block;
    color: var(--white);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.sts-header-sub {
    display: block;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.06em;
}

/* ---- Sections ---- */
.sts-section {
    padding: 20px 20px 18px;
    border-bottom: 1px solid var(--border);
}

.sts-section-label {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 14px;
}

/* ---- Trust Badges ---- */
.sts-badges {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.sts-badge {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.sts-badge:first-child { padding-top: 0; }
.sts-badge:last-child  { border-bottom: none; padding-bottom: 0; }

/* Red tick square — shows by default unless image overrides */
.sts-badge::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    width: 22px;
    height: 22px;
    background: var(--red);
    color: var(--white);
    font-size: 0.72rem;
    font-weight: 900;
    flex-shrink: 0;
}

.sts-badge-icon {
    display: none;
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

/* If an image is present, hide the CSS tick and show the image */
.sts-badge:has(.sts-badge-icon[src]:not([src=""]))::before {
    display: none;
}

.sts-badge:has(.sts-badge-icon[src]:not([src=""])) .sts-badge-icon {
    display: block;
}

.sts-badge-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
}

/* ---- Comparison Table ---- */
.sts-comparison-table {
    width: 100%;
    border-collapse: collapse;
}

.sts-comparison-table thead tr {
    background: var(--red);
}

.sts-comparison-table thead th {
    padding: 9px 10px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white) !important;
    text-align: left;
    border: none;
}

.sts-comparison-table thead th:last-child {
    color: rgba(255, 255, 255, 0.65) !important;
}

.sts-comparison-table tbody tr:nth-child(even) {
    background: var(--row-alt);
}

.sts-comparison-table tbody tr:hover {
    background: var(--red-light);
}

.sts-comparison-table tbody td {
    padding: 9px 10px;
    font-size: 0.85rem;
    border: none;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    line-height: 1.3;
}

.sts-comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Our column */
.sts-comparison-table tbody td:first-child {
    color: var(--red);
    font-weight: 700;
}

.sts-comparison-table tbody td:first-child::before {
    content: '\2713  ';
    font-weight: 900;
}

/* Competitor column */
.sts-comparison-table tbody td:last-child {
    color: var(--muted);
    font-weight: 400;
}

.sts-comparison-table tbody td:last-child::before {
    content: '\2715  ';
    color: #b0b0b0;
}

/* ---- Expert / CTA Copy Box ---- */
.sts-expert {
    background: var(--red);
    padding: 20px;
}

.sts-expert-inner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.sts-expert-img {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
    border-radius: 0;
}

.sts-expert-bio {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.55;
}

.sts-expert-bio strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 5px;
}

/* ---- CTA Button ---- */
.sts-cta {
    display: block;
    background: var(--red-dark);
    color: var(--white);
    text-align: center;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 15px 20px;
    text-decoration: none;
    border-top: 2px solid rgba(0, 0, 0, 0.18);
    transition: background 0.15s ease;
    cursor: pointer;
}

.sts-cta::after {
    content: '  \2192';
    font-weight: 400;
}

.sts-cta:hover,
.sts-cta:focus {
    background: var(--red-deeper);
    color: var(--white);
    text-decoration: none;
}

/* ---- Phone Strip ---- */
.sts-phone-strip {
    background: var(--text);
    text-align: center;
    padding: 13px 20px;
}

.sts-phone-strip a {
    color: var(--white);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: color 0.15s ease;
}

.sts-phone-strip a:hover,
.sts-phone-strip a:focus {
    color: #f5c842;
    text-decoration: none;
}

/* ---- Urgency Strip ---- */
.sts-urgency-strip {
    background: #1a1a1a;
    padding: 9px 20px;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f5c842;
    border-bottom: 2px solid #000;
}

/* ---- Reviews Bar ---- */
.sts-reviews-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px;
    background: #fdf2f2;
    border-bottom: 1px solid var(--border);
}

.sts-stars {
    color: #f5c842;
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    flex-shrink: 0;
    line-height: 1;
    text-shadow: 0 0 6px rgba(245, 200, 66, 0.5);
}

.sts-reviews-text {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

/* ---- CTA Reassurance ---- */
.sts-cta-reassurance {
    background: #f0f0f0;
    padding: 9px 20px;
    text-align: center;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--muted);
    border-top: 1px solid var(--border);
}

/* ---- Phone pulse animation ---- */
@keyframes sts-phone-pulse {
    0%, 100% { background: #1a1a1a; }
    50%       { background: #2d2d2d; }
}

.sts-phone-strip {
    animation: sts-phone-pulse 2.8s ease-in-out infinite;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .sts-sidebar-sticky {
        position: relative;
        top: auto;
    }
}

@media (max-width: 480px) {
    .sts-expert-inner {
        flex-direction: column;
    }
    .sts-expert-img {
        width: 48px;
        height: 48px;
    }
}
