/* ========================================
   CasWeb — additions to default template
   Loaded after main.css
   ======================================== */

/* --- Client logos --- */
.clients.owl-carousel .client-block {
    opacity: 1;
    padding: 4px;
    margin-bottom: 0;
}
.clients .client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 78px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    box-sizing: border-box;
    transition: background 0.15s, border-color 0.15s;
}
.clients a.client-logo:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.24);
}
.clients.owl-carousel .owl-item img,
.clients .client-logo img {
    display: block;
    width: auto !important;
    max-width: 100%;
    height: auto !important;
    max-height: 48px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

/* --- Availability badge --- */
.availability-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 14px;
    color: #fff;
}
.availability-dot {
    width: 8px; height: 8px; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: pulse-avail 2s ease-out infinite;
}
@keyframes pulse-avail {
    0%   { box-shadow: 0 0 0 0    rgba(34, 197, 94, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);    }
    100% { box-shadow: 0 0 0 0    rgba(34, 197, 94, 0);    }
}
.availability-limited .availability-dot { animation-name: pulse-limited; }
@keyframes pulse-limited {
    0%   { box-shadow: 0 0 0 0    rgba(245, 158, 11, 0.55); }
    70%  { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);    }
}
.availability-booked .availability-dot { animation: none; }

/* --- Hero positioning line --- */
.hero-positioning {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 8px 0 16px;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* --- Portrait --- */
.portrait-img {
    width: 100%;
    max-width: 220px;
    border-radius: 50%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 15px;
}

/* --- Certificate verify link --- */
.verify-cert {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: rgba(34, 197, 94, 0.12);
    color: #86efac !important;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 4px;
    font-size: 11px;
    text-decoration: none !important;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.verify-cert:hover { background: rgba(34, 197, 94, 0.2); }

/* --- Portfolio context (Problem/Solution/Result) --- */
.portfolio-tech {
    margin-top: 6px;
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.portfolio-context {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 13px;
    line-height: 1.55;
    opacity: 0.85;
}
.portfolio-context .ctx-line { margin-bottom: 4px; }
.portfolio-context .ctx-line strong { color: rgba(255, 255, 255, 0.9); font-weight: 600; }
.portfolio-context .ctx-result { color: #86efac; }
.portfolio-context .ctx-result strong { color: #86efac; }
.portfolio-context .case-study-link {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: rgba(78, 161, 255, 0.12);
    color: #7fbcff !important;
    border: 1px solid rgba(78, 161, 255, 0.3);
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none !important;
    font-weight: 500;
}
.portfolio-context .case-study-link:hover { background: rgba(78, 161, 255, 0.22); }

/* --- Process steps --- */
.process-steps { margin-top: 20px; }
.process-step {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 22px 18px 18px;
    position: relative;
    margin-bottom: 16px;
    text-align: center;
    height: calc(100% - 16px);
}
.process-step-num {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.55);
    font-weight: 600;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.process-step i { font-size: 28px; color: rgba(255, 255, 255, 0.55); margin-bottom: 10px; display: block; margin-top: 4px; }
.process-step h4 { margin: 8px 0; font-size: 15px; color: #fff; }
.process-step p { font-size: 13px; opacity: 0.8; margin: 0; line-height: 1.5; }

/* --- FAQ --- */
.faq-list { max-width: 900px; margin: 0 auto; }
.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: background 0.15s;
}
.faq-item[open] { background: rgba(255, 255, 255, 0.05); }
.faq-item summary {
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 600;
    color: #fff;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 22px;
    color: #7fbcff;
    transition: transform 0.2s;
    line-height: 1;
}
.faq-item[open] summary::after { content: '−'; }
.faq-answer {
    padding: 0 18px 16px;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.85;
}
.faq-answer p { margin-bottom: 8px; }
.faq-answer strong { color: #fff; }

/* --- Contact form (pretty card) --- */
.contact-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 26px 24px 22px;
}
.contact-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
}
.contact-card-icon {
    flex: 0 0 44px;
    width: 44px; height: 44px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}
.contact-card-head h3 {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.25;
    color: #eee;
}
.contact-card-head h3 span { color: #eee; }
.contact-card-lead {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

.contact-pretty .hp-field {
    position: absolute !important;
    left: -9999px !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    pointer-events: none;
}

.cp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.cp-field {
    position: relative;
}
.cp-field-full { grid-column: 1 / -1; }
.cp-field > i {
    position: absolute;
    left: 14px;
    top: 18px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.38);
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}
.contact-pretty .cp-field input[type=text],
.contact-pretty .cp-field input[type=email],
.contact-pretty .cp-field input[type=tel],
.contact-pretty .cp-field input[type=number],
.contact-pretty .cp-field textarea,
.cp-field input,
.cp-field textarea {
    width: 100%;
    height: auto;
    min-height: 56px;
    box-sizing: border-box;
    background: rgba(12, 12, 22, 0.35) !important;
    background-color: rgba(12, 12, 22, 0.35) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #fff !important;
    border-radius: 12px !important;
    padding: 22px 14px 8px 40px !important;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.45;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none !important;
    display: block;
}
.cp-field textarea {
    min-height: 140px;
    resize: vertical;
    padding-top: 26px !important;
}
.cp-field label .req { color: rgba(255, 255, 255, 0.45); }
.cp-field label {
    position: absolute;
    left: 40px;
    top: 16px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    pointer-events: none;
    transition: 0.18s ease;
    transform-origin: left top;
    white-space: nowrap;
}
.cp-field input:focus,
.cp-field textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.28) !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}
.cp-field input:focus + label,
.cp-field textarea:focus + label,
.cp-field input:not(:placeholder-shown) + label,
.cp-field textarea:not(:placeholder-shown) + label {
    top: 6px;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
}
.cp-field:focus-within > i { color: rgba(255, 255, 255, 0.7); }

.cp-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.cp-captcha {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    padding: 6px 8px 6px 14px;
}
.cp-captcha-q {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.68);
    white-space: nowrap;
}
.cp-captcha-q strong { color: #fff; font-size: 14px; }
.cp-captcha input {
    width: 58px;
    height: 36px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
}
.cp-captcha input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.12);
}
.cp-captcha input::-webkit-outer-spin-button,
.cp-captcha input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp-captcha input[type=number] { -moz-appearance: textfield; }

.cp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 30px;
    padding: 12px 24px;
    min-width: 200px;
    background: transparent;
    color: #f5f5f5;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.cp-submit i { font-size: 16px; transition: transform 0.2s; }
.cp-submit:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.4); }
.cp-submit:hover i { transform: translateX(3px); }
.cp-submit:active { transform: none; }
.cp-submit:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}
.cp-submit.is-loading .cp-submit-label { opacity: 0.85; }
.cp-submit.is-loading i { animation: cp-spin 0.8s linear infinite; }

@keyframes cp-spin {
    to { transform: rotate(360deg); }
}

.cp-feedback { margin-top: 14px; }
.cp-feedback .msg-success,
.cp-feedback .msg-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.45;
}
.cp-feedback .msg-success {
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #86efac;
}
.cp-feedback .msg-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #fca5a5;
}

.contact-success {
    text-align: center;
    padding: 18px 8px 6px;
}
.contact-success-check {
    width: 64px; height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(34, 197, 94, 0.16);
    color: #86efac;
    font-size: 28px;
    animation: cp-pop 0.4s ease;
}
.contact-success h4 { color: #fff; margin: 0 0 6px; font-size: 20px; }
.contact-success p { margin: 0; color: rgba(255,255,255,0.65); font-size: 14px; }

@keyframes cp-pop {
    0% { transform: scale(0.6); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@media (max-width: 767px) {
    .contact-card { padding: 22px 16px 18px; border-radius: 14px; }
    .cp-grid { grid-template-columns: 1fr; }
    .cp-footer { flex-direction: column; align-items: stretch; }
    .cp-submit { width: 100%; }
    .cp-captcha { justify-content: space-between; }
}

/* --- Availability info block --- */
.availability-info h4 { color: #fff; }

/* --- Theme toggle button --- */
.theme-toggle-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: inherit;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.15s;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.08); }

/* --- Light theme (applies to blog/case-study/legal via public-layout.php) --- */
html[data-theme="light"] body,
body.theme-light {
    background: #f7f8fa !important;
    color: #1a1a1a !important;
}
html[data-theme="light"] .public-nav,
body.theme-light .public-nav {
    background: rgba(255,255,255,0.95) !important;
    border-bottom-color: rgba(0,0,0,0.08) !important;
}
html[data-theme="light"] .public-nav a,
body.theme-light .public-nav a { color: #1a1a1a !important; }
html[data-theme="light"] .public-container h1,
html[data-theme="light"] .public-container h2,
body.theme-light .public-container h1,
body.theme-light .public-container h2 { color: #171717 !important; }
html[data-theme="light"] .public-container p,
html[data-theme="light"] .public-container li,
body.theme-light .public-container p,
body.theme-light .public-container li { color: #333 !important; }
html[data-theme="light"] .post-card,
body.theme-light .post-card {
    background: #fff !important;
    border-color: rgba(0,0,0,0.08) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}
html[data-theme="light"] .post-card h2,
body.theme-light .post-card h2 { color: #171717 !important; }
html[data-theme="light"] .post-card .excerpt,
body.theme-light .post-card .excerpt { color: #555 !important; }
html[data-theme="light"] .public-container pre,
html[data-theme="light"] .public-container code,
body.theme-light .public-container pre,
body.theme-light .public-container code { background: rgba(0,0,0,0.05) !important; color: #333 !important; }
html[data-theme="light"] .legal-container,
body.theme-light .legal-container {
    background: #fff !important;
    color: #333 !important;
    border-color: rgba(0,0,0,0.08) !important;
}
html[data-theme="light"] .legal-container h1,
html[data-theme="light"] .legal-container h2,
html[data-theme="light"] .legal-container h3,
body.theme-light .legal-container h1,
body.theme-light .legal-container h2,
body.theme-light .legal-container h3 { color: #171717 !important; }
html[data-theme="light"] .legal-container p,
html[data-theme="light"] .legal-container li,
body.theme-light .legal-container p,
body.theme-light .legal-container li { color: #444 !important; }

/* --- Newsletter --- */
.newsletter-form {
    display: flex; gap: 8px; max-width: 500px; margin: 0 auto;
}
.newsletter-form input[type=email] {
    flex: 1; padding: 10px 14px; border-radius: 6px;
    background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}
.newsletter-form button {
    padding: 10px 20px; border-radius: 6px; border: none;
    background: #4ea1ff; color: #fff; font-weight: 600; cursor: pointer;
}
