/* ==========================================================================
   OG SIGNAL THEME — Extended Design System
   Utility classes and layout helpers beyond the base tokens
   ========================================================================== */

/* ---- Container Override ---- */
.tl-container {
    max-width: var(--tl-max-width);
    margin: 0 auto;
    padding: 0 var(--tl-space-xl);
}

.tl-container-narrow {
    max-width: var(--tl-max-width-narrow);
    margin: 0 auto;
    padding: 0 var(--tl-space-xl);
}

.tl-container-wide {
    max-width: var(--tl-max-width-wide);
    margin: 0 auto;
    padding: 0 var(--tl-space-xl);
}


/* ---- Section Variants ---- */
.tl-section-gradient {
    background: linear-gradient(135deg, var(--tl-primary) 0%, var(--tl-secondary) 100%);
    color: var(--tl-white);
    position: relative;
    overflow: hidden;
}

/* Subtle noise texture overlay for depth */
.tl-section-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(125, 1, 0, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(219, 190, 103, 0.06) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.tl-section-gradient > .et_pb_row {
    position: relative;
    z-index: 1;
}

.tl-section-gradient h1,
.tl-section-gradient h2,
.tl-section-gradient h3 {
    color: var(--tl-white);
}

.tl-section-gradient p {
    color: rgba(255, 255, 255, 0.85);
}

/* Dark section with subtle gradient overlay */
.et_pb_section.tl-section-dark {
    position: relative;
    overflow: hidden;
}

.et_pb_section.tl-section-dark::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(125, 1, 0, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

/* Light section subtle top border */
.et_pb_section.tl-section-light {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
}


/* ---- Overline / Eyebrow Label ---- */
.tl-overline {
    font-family: var(--tl-font-body);
    font-size: var(--tl-text-xs);
    font-weight: var(--tl-weight-semi);
    letter-spacing: var(--tl-tracking-wider);
    text-transform: uppercase;
    color: var(--tl-accent);
    margin-bottom: var(--tl-space-sm);
    display: block;
}


/* ---- Subtitle / Large Body ---- */
.tl-subtitle {
    font-family: var(--tl-font-body);
    font-size: var(--tl-text-xl);
    font-weight: var(--tl-weight-normal);
    line-height: var(--tl-leading-loose);
    color: var(--tl-text-muted);
    max-width: 640px;
}


/* ---- Divider Styles ---- */
.tl-divider {
    border: none;
    height: 1px;
    background: var(--tl-border);
    margin: var(--tl-space-2xl) 0;
}

.tl-divider-accent {
    border: none;
    height: 3px;
    width: 60px;
    background: var(--tl-accent);
    margin: var(--tl-space-lg) 0;
}


/* ---- Badge / Tag ---- */
.tl-badge {
    display: inline-block;
    font-family: var(--tl-font-body);
    font-size: var(--tl-text-xs);
    font-weight: var(--tl-weight-semi);
    letter-spacing: var(--tl-tracking-wide);
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: var(--tl-radius-full);
    background: var(--tl-light);
    color: var(--tl-text-muted);
}

.tl-badge-accent {
    background: var(--tl-accent);
    color: var(--tl-white);
}

.tl-badge-dark {
    background: var(--tl-dark);
    color: var(--tl-white);
}


/* ---- Card Base ---- */
.tl-card {
    background: var(--tl-white);
    border-radius: 0;
    overflow: hidden;
    border: 4px solid var(--tl-white);
    box-shadow: 6px 6px 20px rgba(0, 0, 0, 0.18);
    transition: all var(--tl-duration) var(--tl-ease);
}

.tl-card:hover {
    box-shadow: var(--tl-shadow-xl);
    transform: translateY(-4px);
}

.tl-card-body {
    padding: var(--tl-space-xl);
}

.tl-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    overflow: hidden;
}


/* ---- Stat Block ---- */
.tl-stat {
    text-align: center;
    padding: var(--tl-space-xl);
}

.tl-stat-number {
    font-family: var(--tl-font-heading);
    font-size: var(--tl-text-5xl);
    font-weight: var(--tl-weight-black);
    color: var(--tl-accent);
    line-height: 1;
    margin-bottom: var(--tl-space-xs);
}

.tl-stat-label {
    font-size: var(--tl-text-sm);
    font-weight: var(--tl-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--tl-tracking-wide);
    color: var(--tl-text-muted);
}


/* ---- Testimonial Card ---- */
.tl-testimonial {
    background: var(--tl-white);
    border-radius: var(--tl-radius-lg);
    padding: var(--tl-space-2xl);
    box-shadow: var(--tl-shadow-md);
    position: relative;
}

.tl-testimonial::before {
    content: '\201C';
    font-family: var(--tl-font-heading);
    font-size: 4rem;
    color: var(--tl-accent);
    opacity: 0.2;
    position: absolute;
    top: var(--tl-space-md);
    left: var(--tl-space-lg);
    line-height: 1;
}

.tl-testimonial-text {
    font-size: var(--tl-text-lg);
    font-style: italic;
    line-height: var(--tl-leading-loose);
    color: var(--tl-text);
    margin-bottom: var(--tl-space-lg);
}

.tl-testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--tl-space-md);
}

.tl-testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--tl-radius-full);
    object-fit: cover;
}

.tl-testimonial-name {
    font-weight: var(--tl-weight-semi);
    color: var(--tl-dark);
    font-size: var(--tl-text-base);
}

.tl-testimonial-role {
    font-size: var(--tl-text-sm);
    color: var(--tl-text-muted);
}


/* ---- Authority Logo Bar ---- */
.tl-authority-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--tl-space-2xl);
    padding: var(--tl-space-2xl) 0;
}

.tl-authority-bar img {
    height: 28px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: all var(--tl-duration) var(--tl-ease);
}

.tl-authority-bar img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.tl-authority-bar-label {
    width: 100%;
    text-align: center;
    font-size: var(--tl-text-xs);
    font-weight: var(--tl-weight-semi);
    letter-spacing: var(--tl-tracking-wider);
    text-transform: uppercase;
    color: var(--tl-text-muted);
    margin-bottom: var(--tl-space-md);
}


/* ---- Heading Highlight Underline (Clara-style) ---- */
.tl-title-highlight h1,
.tl-title-highlight h2 {
    display: inline;
    padding: 0 5px;
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 65%, rgba(219,190,103,0.3) 65%, rgba(219,190,103,0.3) 100%);
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

.tl-title-highlight-center .et_pb_text_inner {
    display: flex;
    justify-content: center;
}

/* On dark backgrounds, use gold at higher opacity */
.tl-section-dark .tl-title-highlight h1,
.tl-section-dark .tl-title-highlight h2,
.tl-section-gradient .tl-title-highlight h1,
.tl-section-gradient .tl-title-highlight h2 {
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0) 65%, rgba(219,190,103,0.35) 65%, rgba(219,190,103,0.35) 100%);
}


/* ---- Responsive Grid ---- */
.tl-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--tl-space-xl);
}

.tl-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--tl-space-xl);
}

.tl-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--tl-space-xl);
}

@media (max-width: 980px) {
    .tl-grid-3,
    .tl-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .tl-grid-2,
    .tl-grid-3,
    .tl-grid-4 {
        grid-template-columns: 1fr;
    }
}
