/**
 * Custom Overrides - KM Digital Solutions
 * Additional styles beyond the main theme stylesheet.
 */

/* ── WordPress Core Alignment ── */
.alignwide { max-width: var(--container-wide); margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(-50vw + 50%); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.wp-block-image img { max-width: 100%; height: auto; border-radius: 0.75rem; }
.wp-block-quote { border-left: 3px solid var(--primary); padding-left: 1.5rem; margin: 2rem 0; font-style: italic; color: var(--text); }
.wp-block-code { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 0.5rem; padding: 1.5rem; overflow-x: auto; font-size: 0.875rem; }
.wp-block-table table { width: 100%; border-collapse: collapse; }
.wp-block-table td, .wp-block-table th { padding: 0.75rem 1rem; border: 1px solid var(--border); text-align: left; }
.wp-block-table th { background: var(--bg-subtle); font-family: var(--font-heading); font-weight: 600; }

/* ── Pagination ── */
.pagination, .blog-pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination .page-numbers, .blog-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 2.5rem; height: 2.5rem; border-radius: 0.375rem; font-family: var(--font-heading); font-size: 0.875rem; font-weight: 500; color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border); transition: all 0.3s var(--ease); }
.pagination .page-numbers:hover, .pagination .page-numbers.current, .blog-pagination .page-numbers:hover, .blog-pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }

.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ============================================================
   Service Card Links (Homepage)
   ============================================================ */
.service-card--link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.service-card--link:hover {
    color: inherit;
}

.service-card__arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-top: 1rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: all 0.3s var(--ease);
}

.service-card--link:hover .service-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

.service-card--active {
    border-color: var(--primary) !important;
    box-shadow: 0 0 30px rgba(108, 60, 225, 0.2);
}

.service-card--active .service-card__arrow {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================================
   Service Detail Panel (inline expand)
   ============================================================ */
.service-detail {
    margin-top: 2rem;
    animation: detailSlideIn 0.35s var(--ease) both;
}

@keyframes detailSlideIn {
    from { opacity: 0; transform: translateY(-1rem); }
    to   { opacity: 1; transform: translateY(0); }
}

.service-detail__close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--text-muted);
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}

.service-detail__close:hover {
    border-color: var(--primary);
    color: var(--text);
}

.service-detail__inner {
    position: relative;
    padding: 2.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
}

.service-detail__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-detail__header h3 {
    font-size: 1.5rem;
    margin: 0;
}

.service-detail__meta {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.service-detail__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.service-detail__meta-item svg {
    color: var(--accent);
    flex-shrink: 0;
}

.service-detail__meta-item strong {
    color: var(--text);
}

.service-detail__desc {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 48rem;
}

.service-detail__desc ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

@media (max-width: 640px) {
    .service-detail__desc ul { grid-template-columns: 1fr; }
}

.service-detail__desc li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.service-detail__desc li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
}

.service-detail__plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.service-detail__plan {
    padding: 1.5rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.service-detail__plan:hover {
    border-color: var(--primary);
}

.service-detail__plan--featured {
    border-color: var(--primary);
    box-shadow: 0 0 24px rgba(108, 60, 225, 0.15);
}

.service-detail__plan--selected {
    border-color: var(--accent);
    box-shadow: 0 0 24px rgba(0, 229, 160, 0.25);
    transform: translateY(-4px);
}

.service-detail__plan-name {
    font-family: var(--font-heading);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.service-detail__plan-price {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.service-detail__plan-billing {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.service-detail__plan-features {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.service-detail__plan-features li {
    padding: 0.25rem 0;
}

.service-detail__plan-features li::before {
    content: '- ';
    color: var(--primary-light);
}

.service-detail__cta {
    text-align: center;
}

/* ============================================================
   Pricing Calculator - Additions
   ============================================================ */
.pricing-calc__includes {
    display: block;
    font-size: 0.6875rem;
    font-weight: 400;
    color: var(--accent);
    margin-top: 0.125rem;
}

.pricing-calc__included-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(0, 229, 160, 0.08);
    border: 1px solid rgba(0, 229, 160, 0.2);
    border-radius: 0.5rem;
    font-size: 0.8125rem;
    color: var(--accent);
}

.pricing-calc__radio--wide {
    flex: 2;
}

/* ============================================================
   Booking Calendar Widget
   ============================================================ */
.booking-widget {
    max-width: 28rem;
    margin: 0 auto;
    text-align: left;
}

.booking-cal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.booking-cal__month {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.booking-cal__nav {
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    color: var(--text-muted);
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.booking-cal__nav:hover {
    border-color: var(--primary);
    color: var(--text);
}

.booking-cal__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}

.booking-cal__days span {
    text-align: center;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    padding: 0.25rem;
}

.booking-cal__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.booking-cal__day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-subtle);
    border: 1px solid transparent;
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s;
}

.booking-cal__day:hover:not(.booking-cal__day--disabled):not(.booking-cal__day--empty) {
    border-color: var(--primary);
    background: rgba(108, 60, 225, 0.1);
}

.booking-cal__day--empty {
    background: transparent;
    cursor: default;
}

.booking-cal__day--disabled {
    color: var(--text-muted);
    opacity: 0.3;
    cursor: not-allowed;
}

.booking-cal__day--selected {
    background: var(--primary) !important;
    color: #fff !important;
    border-color: var(--primary) !important;
}

/* Time Slots */
.booking-widget__times {
    margin-top: 1.5rem;
}

.booking-widget__times h4 {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
}

.booking-times__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .booking-times__grid { grid-template-columns: repeat(3, 1fr); }
}

.booking-time__slot {
    padding: 0.5rem;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.booking-time__slot:hover {
    border-color: var(--primary);
    color: var(--text);
}

.booking-time__slot--selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* Booking Form */
.booking-widget__form {
    margin-top: 1.5rem;
}

.booking-widget__selected {
    text-align: center;
    padding: 0.75rem;
    background: rgba(108, 60, 225, 0.1);
    border: 1px solid rgba(108, 60, 225, 0.2);
    border-radius: 0.5rem;
    margin-bottom: 1.25rem;
    font-size: 0.875rem;
    color: var(--text);
}

.booking-widget__success {
    text-align: center;
    padding: 2rem;
}

.booking-widget__success h4 {
    font-size: 1.25rem;
    margin: 1rem 0 0.5rem;
    color: var(--accent);
}

.booking-widget__success p {
    margin: 0 auto;
}

/* Phone Numbers */
.cta-phone-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

/* ============================================================
   Service Page - Hero & Layout
   ============================================================ */
.service-hero {
    padding: 10rem 0 4rem;
    background: var(--bg);
    text-align: center;
}

.service-hero__inner {
    max-width: 44rem;
    margin: 0 auto;
}

.service-hero__desc {
    font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
    margin: 1.25rem auto 2rem;
    max-width: 38rem;
}

.service-hero__meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.service-hero__meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.service-hero__meta-item svg {
    color: var(--accent);
}

/* Approach section reuses .process-steps from homepage */
.service-approach {
    background: var(--bg-card);
    position: relative;
    z-index: 1;
}

/* Plans Grid */
.service-plans {
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .plans-grid { grid-template-columns: 1fr; max-width: 28rem; margin: 0 auto; }
}

.plan-card {
    text-align: center;
    position: relative;
    padding: 2.5rem 2rem;
    cursor: pointer;
    transition: all 0.3s var(--ease);
}

.plan-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(108, 60, 225, 0.15);
}

.plan-card:hover .btn--outline {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.plan-card--featured {
    border-color: var(--primary);
    box-shadow: 0 0 40px rgba(108, 60, 225, 0.2);
    transform: translateY(-8px);
}

.plan-card--featured:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 48px rgba(108, 60, 225, 0.3);
}

.plan-card__badge {
    position: absolute;
    top: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 1rem;
    background: var(--gradient);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 2rem;
    white-space: nowrap;
}

.plan-card__name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.plan-card__price {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.plan-card__features {
    list-style: none;
    text-align: left;
    margin-bottom: 2rem;
}

.plan-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(30, 30, 63, 0.3);
}

.plan-card__features li svg {
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.plan-card .btn {
    width: 100%;
    justify-content: center;
}

/* Extra Section (AI OS) */
.service-extra {
    background: var(--bg-card);
    position: relative;
    z-index: 1;
}

.service-extra__card {
    max-width: 44rem;
    margin: 0 auto;
    text-align: center;
    border-color: var(--primary) !important;
}

.service-extra__content h2 {
    margin-bottom: 1rem;
}

.service-extra__content p {
    margin: 0 auto 1rem;
}

.service-extra__note {
    font-size: 0.875rem !important;
    color: var(--accent) !important;
    font-weight: 500;
    margin-bottom: 1.5rem !important;
}

/* Results Grid */
.service-results {
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .results-grid { grid-template-columns: 1fr; }
}

.result-card {
    text-align: center;
}

.result-card__client {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary-light);
    margin-bottom: 0.75rem;
}

.result-card__metric {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
}

.result-card__label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0.75rem;
}

.result-card__detail {
    font-size: 0.875rem;
    max-width: 100%;
}

/* Service CTA */
.service-cta {
    background: var(--bg-card);
    text-align: center;
    position: relative;
    z-index: 1;
}

.service-cta__inner {
    max-width: 36rem;
    margin: 0 auto;
}

.service-cta__inner h2 {
    margin-bottom: 1rem;
}

.service-cta__inner p {
    margin: 0 auto 2rem;
}

.service-cta .hero__actions {
    justify-content: center;
}

/* ============================================================
   Enquiry Page
   ============================================================ */
.enquire-page {
    padding: 8rem 0 4rem;
    background: var(--bg);
}

.enquire-page__inner {
    max-width: 44rem;
    margin: 0 auto;
}

.enquire-page__header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.enquire-page__header h1 {
    margin-bottom: 1rem;
}

.enquire-page__header p {
    margin: 0 auto;
}

.enquire-form {
    padding: 2.5rem;
}

.enquire-form__submit {
    width: 100%;
    justify-content: center;
    margin-top: 0.5rem;
}

.required {
    color: var(--primary-light);
}

/* ============================================================
   Thank You Page
   ============================================================ */
.thank-you-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 8rem 0 4rem;
    background: var(--bg);
}

.thank-you-page__inner {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}

.thank-you-page__icon {
    margin-bottom: 1.5rem;
}

.thank-you-page h1 {
    margin-bottom: 0.5rem;
}

.thank-you-page__subtitle {
    font-size: 1.25rem !important;
    color: var(--accent) !important;
    margin-bottom: 1.5rem !important;
}

.thank-you-page__links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.thank-you-page__contact {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.thank-you-page__contact .cta-phone-numbers {
    margin-top: 0.5rem;
}

.thank-you-page__contact .cta-phone-numbers a {
    font-weight: 500;
}

.thank-you-page__divider {
    color: var(--text-muted);
}

/* ============================================================
   Blog Placeholder
   ============================================================ */
.blog-archive {
    background: var(--bg);
    position: relative;
    z-index: 1;
}

.blog-empty {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 3rem;
}

.blog-empty__icon {
    margin-bottom: 1rem;
}

.blog-empty h2 {
    margin-bottom: 0.75rem;
}

.blog-empty p {
    margin: 0 auto 2rem;
}

.blog-placeholder-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: none;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .blog-placeholder-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .blog-placeholder-grid { grid-template-columns: 1fr; }
}

.blog-card--placeholder {
    opacity: 0.5;
    cursor: default;
}

.blog-card--placeholder:hover {
    transform: none;
    border-color: var(--glass-border);
    box-shadow: none;
}

.blog-card__image--placeholder {
    aspect-ratio: 16/9;
    background: var(--bg-subtle);
    border-radius: 0.5rem 0.5rem 0 0;
}

.blog-card__excerpt--placeholder {
    font-style: italic;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
}

/* ============================================================
   Google Review Sticky Button (Bottom Left)
   ============================================================ */
.google-review-btn {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 2rem;
    color: #fff;
    font-family: var(--font-body, 'Plus Jakarta Sans', sans-serif);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.google-review-btn:hover {
    background: rgba(108, 60, 225, 0.25);
    border-color: var(--primary, #6C3CE1);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(108, 60, 225, 0.3);
    color: #fff;
}

.google-review-btn svg {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .google-review-btn span {
        display: none;
    }
    .google-review-btn {
        padding: 0.75rem;
        border-radius: 50%;
    }
}
