/*
Theme Name:   DinaKala Child
Theme URI:    https://shofaj.com
Description:  Child theme for DinaKala — heating & cooling business build (شوفاژ دات کام).
              All customisations live here so the DinaKala parent theme can be updated freely.
Author:       shofaj.com
Template:     dinakala
Version:      1.0.0
Requires PHP: 8.1
Text Domain:  dina-kala-child
*/

/* ===========================================================================
   Design tokens
   ---------------------------------------------------------------------------
   Values below are a neutral, professional starting palette so the design
   system has a single source of truth. They are NOT confirmed brand colours.
   NEEDS BUSINESS INPUT: final brand palette (primary / secondary / accent).
   Change the variables here and the whole child theme follows.
   =========================================================================== */
:root {
    /* Brand — replace with the real brand colours when confirmed. */
    --sk-primary: #1f5f8b;          /* heating + cooling neutral blue        */
    --sk-primary-dark: #164a6d;
    --sk-primary-light: #e8f1f7;
    --sk-accent: #d94711;           /* warm accent for heating / CTAs        */
    --sk-accent-dark: #b13509;

    /* Neutrals */
    --sk-ink: #17222b;
    --sk-body: #3d4d5a;
    --sk-muted: #6b7c8a;
    --sk-line: #e3e8ec;
    --sk-surface: #ffffff;
    --sk-surface-alt: #f6f8fa;

    /* Status */
    --sk-success: #1b7f4b;
    --sk-warning: #b26a00;
    --sk-danger: #b3261e;

    /* Spacing scale (8px based) */
    --sk-space-1: 4px;
    --sk-space-2: 8px;
    --sk-space-3: 12px;
    --sk-space-4: 16px;
    --sk-space-5: 24px;
    --sk-space-6: 32px;
    --sk-space-7: 48px;
    --sk-space-8: 64px;

    /* Radius + shadow */
    --sk-radius-sm: 6px;
    --sk-radius: 10px;
    --sk-radius-lg: 16px;
    --sk-shadow-sm: 0 1px 2px rgba(23, 34, 43, .06);
    --sk-shadow: 0 4px 16px rgba(23, 34, 43, .08);
    --sk-shadow-lg: 0 12px 32px rgba(23, 34, 43, .12);

    /* Layout */
    --sk-container: 1240px;
}

/* ===========================================================================
   Persian / RTL refinements
   Additive only — the parent theme's look is preserved.
   =========================================================================== */

/* Persian is not an italic script: faux-italics make text hard to read. */
[dir="rtl"] em,
[dir="rtl"] i,
.rtl em,
.rtl i {
    font-style: normal;
}

/* Persian needs slightly more line-height than Latin at the same size. */
[dir="rtl"] body,
.rtl body {
    line-height: 1.9;
}

/* Keep Persian digits from breaking inside tables, prices and specs. */
[dir="rtl"] table,
[dir="rtl"] .price,
.rtl .price {
    font-variant-numeric: tabular-nums;
}

/* ===========================================================================
   Accessibility
   =========================================================================== */

/* A visible, high-contrast focus ring for keyboard users. The parent theme
   removes outlines in places, which fails WCAG 2.4.7. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--sk-primary);
    outline-offset: 2px;
    border-radius: var(--sk-radius-sm);
}

/* ===========================================================================
   Services — archive grid + single layout
   Used by archive-service.php and single-service.php in this child theme.
   =========================================================================== */

.sk-service-archive,
.sk-service-single {
    padding-block: var(--sk-space-6);
}

.sk-archive-head {
    margin-bottom: var(--sk-space-6);
}

.sk-archive-title {
    margin: 0 0 var(--sk-space-2);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--sk-ink);
}

.sk-archive-intro {
    margin: 0;
    max-width: 62ch;
    color: var(--sk-body);
}

/* Group filter chips */
.sk-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sk-space-2);
    margin-bottom: var(--sk-space-6);
}

.sk-chip {
    display: inline-block;
    padding: 6px 14px;
    border: 1px solid var(--sk-line);
    border-radius: 999px;
    background: var(--sk-surface);
    color: var(--sk-body);
    font-size: .9rem;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.sk-chip:hover,
.sk-chip:focus-visible {
    border-color: var(--sk-primary);
    color: var(--sk-primary);
}

.sk-chip.is-active {
    background: var(--sk-primary);
    border-color: var(--sk-primary);
    color: #fff;
}

/* Cards */
.sk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--sk-space-5);
}

.sk-service-card {
    display: flex;
    flex-direction: column;
    gap: var(--sk-space-3);
    padding: var(--sk-space-5);
    border-radius: var(--sk-radius);
}

.sk-card-title {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.6;
}

.sk-card-title a {
    color: var(--sk-ink);
    text-decoration: none;
}

.sk-card-title a:hover {
    color: var(--sk-primary);
}

.sk-card-excerpt {
    margin: 0;
    color: var(--sk-body);
    font-size: .95rem;
}

.sk-badges {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sk-space-2);
    margin: 0;
    padding: 0;
    list-style: none;
}

.sk-badge {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--sk-primary-light);
    color: var(--sk-primary-dark);
    font-size: .78rem;
}

.sk-badge a {
    color: inherit;
    text-decoration: none;
}

.sk-card-cta,
.sk-link {
    margin-top: auto;
    color: var(--sk-primary);
    font-weight: 600;
    text-decoration: none;
}

.sk-card-cta:hover,
.sk-link:hover {
    text-decoration: underline;
}

/* Single service */
.sk-single-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sk-space-5);
}

@media (min-width: 992px) {
    .sk-single-grid {
        grid-template-columns: minmax(0, 2.2fr) minmax(260px, 1fr);
        align-items: start;
    }
}

.sk-service-body {
    padding: var(--sk-space-6);
    border-radius: var(--sk-radius);
}

.sk-single-title {
    margin: var(--sk-space-3) 0 0;
    font-size: clamp(1.4rem, 2.6vw, 1.9rem);
    color: var(--sk-ink);
}

.sk-single-thumb {
    margin: var(--sk-space-5) 0;
}

.sk-single-thumb img {
    width: 100%;
    height: auto;
    border-radius: var(--sk-radius);
}

.sk-prose {
    color: var(--sk-body);
}

.sk-placeholder {
    padding: var(--sk-space-4);
    border-inline-start: 3px solid var(--sk-warning);
    border-radius: var(--sk-radius-sm);
    background: var(--sk-surface-alt);
    color: var(--sk-muted);
}

.sk-related {
    margin-top: var(--sk-space-6);
    padding-top: var(--sk-space-5);
    border-top: 1px solid var(--sk-line);
}

.sk-related-title,
.sk-cta-title {
    margin: 0 0 var(--sk-space-3);
    font-size: 1.05rem;
    color: var(--sk-ink);
}

.sk-related-list {
    margin: 0 0 var(--sk-space-3);
    padding: 0;
    list-style: none;
}

.sk-related-list li {
    padding-block: 4px;
    border-bottom: 1px dashed var(--sk-line);
}

.sk-related-list li:last-child {
    border-bottom: 0;
}

.sk-related-list a {
    color: var(--sk-body);
    text-decoration: none;
}

.sk-related-list a:hover {
    color: var(--sk-primary);
}

/* Sidebar CTA */
.sk-cta-box {
    padding: var(--sk-space-5);
    margin-bottom: var(--sk-space-5);
    border-radius: var(--sk-radius);
}

.sk-cta-text {
    margin: 0 0 var(--sk-space-4);
    color: var(--sk-body);
    font-size: .95rem;
}

.sk-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--sk-radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
}

.sk-btn-primary {
    background: var(--sk-primary);
    color: #fff;
}

.sk-btn-primary:hover {
    background: var(--sk-primary-dark);
    color: #fff;
}

.sk-empty {
    padding: var(--sk-space-6);
    border-radius: var(--sk-radius);
    background: var(--sk-surface-alt);
    color: var(--sk-muted);
    text-align: center;
}

/* Screen-reader-only text (used for accessible link labels). */
.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

/* Respect users who ask for less motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
