/* Hire Developers – Public Styles */
@import url('https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.7.0/dist/tabler-icons.min.css');
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');

.hd-wrap {
    --hd-blue: #1a6fc4;
    --hd-blue-dark: #14588f;
    --hd-navy: #101c37;
    --hd-section-bg: #cfe7fb;
    --hd-card-border: #dcecfb;
    --hd-gray: #64748b;
    --hd-tag-bg: #f0f2f5;
}
.hd-wrap *, .hd-wrap *::before, .hd-wrap *::after { box-sizing: border-box; }

/* Force DM Sans everywhere — incl. the popup (rendered outside .hd-wrap) and form controls */
.hd-wrap, .hd-wrap *,
.hd-overlay, .hd-overlay *,
.hd-wrap input, .hd-wrap select, .hd-wrap textarea, .hd-wrap button,
.hd-overlay input, .hd-overlay select, .hd-overlay textarea, .hd-overlay button {
    font-family: 'DM Sans', sans-serif;
}
.hd-wrap .ti, .hd-overlay .ti,
.hd-wrap [class^="ti-"], .hd-wrap [class*=" ti-"],
.hd-overlay [class^="ti-"], .hd-overlay [class*=" ti-"] {
    font-family: 'tabler-icons' !important;
}

/* ── Grid ─────────────────────────────────────────────────────── */
.hd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media(max-width:1024px){ .hd-grid { grid-template-columns: repeat(2,1fr); } }
@media(max-width:640px) { .hd-grid { grid-template-columns: 1fr; }}

@media (max-width: 600px) {
    .hd-overlay { padding: 12px; }
    .hd-popup   { padding: 26px 20px; border-radius: 16px; }
}

/* ── Developer Card ───────────────────────────────────────────── */
.hd-card {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: relative;
    transition: box-shadow .2s, transform .2s;
    border: 2px solid #E5E7EB;
    box-shadow: 0 3px 20px 0 rgba(13, 114, 184, 0.12);
}
.hd-card:hover { box-shadow: 0 14px 32px rgba(16,28,55,.1); transform: translateY(-2px); }

/* Featured badge */
.hd-featured-badge { position: absolute; top: -1px; left: 50%; transform: translateX(-50%); background: #f59e0b; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 14px; border-radius: 0 0 10px 10px; white-space: nowrap; letter-spacing: .03em; }

/* Card header */
.hd-card-header { display: flex; align-items: center; gap: 14px; }
.hd-card-icon { width: 60px; height: 60px; flex-shrink: 0; border-radius: 14px; background: #dbeafe; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hd-card-icon img { width: 60px; height: 60px; object-fit: contain; }
.hd-card-icon .ti { font-size: 24px; color: #2563eb; }
.hd-card-title h3 {
    font-size: 20px;
    font-weight: 700;
    color: #080B40;
    margin: 0 0 5px;
}
.hd-card-title p {
    font-size: 14px;
    color: #4A5565;
    margin: 0;
    font-weight: 500;
}

/* Icon color cycle — matches the pastel palette in the reference design */
/* Description */
.hd-card-desc {
    font-size: 14px;
    color: #4A5565;
    margin: 0;
    flex: 1;
    font-weight: 500;
}

/* Tags */
.hd-tags { display: flex; flex-wrap: wrap; gap: 6px; }

.hd-tag {
    display: inline-block;
    padding: 5px 12px;
    background: #F3F4F6;
    border: none;
    border-radius: 7px;
    font-size: 12px;
    color: #364153;
    font-weight: 600;
    white-space: nowrap;
}

/* Hire button */
.hd-hire-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 13px;
    background: #0D72B8;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .15s;
    margin-top: auto;
}
.hd-hire-btn:hover { background: var(--hd-blue-dark); transform: translateY(-1px); }
.hd-hire-btn .ti { font-size: 16px; }

/* ── CTA Card ─────────────────────────────────────────────────── */
.hd-cta-card { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 30%, #16294d 0%, #0a1428 70%); border-radius: 20px; padding: 40px 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; min-height: 100%; }
.hd-cta-card::before { content: ""; position: absolute; inset: 0; background: url(../images/custom-role-cta.svg) center center / cover no-repeat; pointer-events: none; }
.hd-cta-card > * { position: relative; z-index: 1; }
.hd-cta-card h3 { font-size: 32px; font-weight: 600; color: #fff; margin: 0; line-height: 1.35; }
.hd-cta-card h3 .hd-cta-accent { display: block; color: #0D72B8; }
.hd-cta-card p {
    font-size: 16px;
    color: #DBE5F2;
    margin: 0;
    line-height: 1.6;
    max-width: 300px;
}
.hd-cta-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; background: var(--hd-blue); color: #fff; border-radius: 50px; font-family: 'DM Sans', sans-serif; font-size: 16px; font-weight: 700; text-decoration: none; transition: background .2s, transform .15s; margin-top: 6px; }
.hd-cta-btn:hover { background: var(--hd-blue-dark); transform: translateY(-1px); }
.hd-cta-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: var(--hd-blue); flex-shrink: 0; }
.hd-cta-btn-icon .ti { font-size: 12px; }

/* ── Popup overlay ────────────────────────────────────────────── */
.hd-overlay { position: fixed; inset: 0; background: rgba(10,20,40,.6); z-index: 99999; display: flex; align-items: flex-start; justify-content: center;  overflow-y: auto;                  /* overlay scrolls now */
    -webkit-overflow-scrolling: touch; padding: 20px; opacity: 0; pointer-events: none; transition: opacity .25s; }
.hd-overlay.active { opacity: 1; pointer-events: all; }

/* ── Popup ────────────────────────────────────────────────────── */
.hd-popup { background: #fff; margin: auto;  border-radius: 20px; padding: 36px 32px; width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto; position: relative; transform: translateY(20px); transition: transform .25s; }
.hd-overlay.active .hd-popup { transform: translateY(0); }
.hd-popup-close { position: absolute; top: 16px; right: 20px; background: #f1f5f9; border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 18px; cursor: pointer; color: #6b7280; display: flex; align-items: center; justify-content: center; line-height: 1; transition: background .15s; }
.hd-popup-close:hover { background: #e2e8f0; color: #1e293b; }
.hd-popup-title { font-size: 22px; font-weight: 800; color: #080B40; margin: 0 0 6px; }
#hd-popup-dev-name{
    font-size: 22px; font-weight: 800; color: #080B40; margin: 0 0 6px;font-family: "Rethink Sans", Sans-serif;
}
.hd-popup-sub { font-size: 14px; color: var(--hd-gray); margin: 0 0 24px; }

/* Form */
.hd-form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.hd-form-row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media(max-width:480px){ .hd-form-row--2 { grid-template-columns:1fr; } }
.hd-form-group label { font-size: 13px; font-weight: 600; color: #374151; }
.hd-req { color: #e53e3e; }
.hd-form-group input,
.hd-form-group select,
.hd-form-group textarea { padding: 10px 14px; border: 1.5px solid #e5e7eb; border-radius: 10px; font-family: 'DM Sans', sans-serif; font-size: 14px; color: #1e293b; background: #fafafa; transition: border-color .2s, box-shadow .2s; width: 100%; box-sizing: border-box; }
.hd-form-group input:focus,
.hd-form-group select:focus,
.hd-form-group textarea:focus { border-color: var(--hd-blue); box-shadow: 0 0 0 3px rgba(26,111,196,.12); outline: none; background: #fff; }
.hd-readonly { background: #f1f5f9 !important; color: #6b7280 !important; cursor: not-allowed; }

/* Inline field-level validation */
.hd-field-error { font-size: 12px; font-weight: 500; color: #dc2626; line-height: 1.4; display: none; }
.hd-field-error:not(:empty) { display: block; margin-top: 2px; }
.hd-form-group.hd-invalid > label { color: #dc2626; }
.hd-form-group.hd-invalid input,
.hd-form-group.hd-invalid select,
.hd-form-group.hd-invalid textarea { border-color: #ef4444; background: #fef2f2; }
.hd-form-group.hd-invalid input:focus,
.hd-form-group.hd-invalid select:focus,
.hd-form-group.hd-invalid textarea:focus { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,.14); background: #fff; }

.hd-form-error { background: #fff2f2; border: 1px solid #fca5a5; color: #b91c1c; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; }
.hd-submit-btn { width: 100%; padding: 14px; background: #0D72B8; color: #fff; border: none; border-radius: 50px; font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s; margin-top: 8px; }
.hd-submit-btn:hover { background: #0D72B8; }
.hd-submit-btn:disabled { background: #9ca3af; cursor: not-allowed; }

/* Success message */
.hd-form-success { text-align: center; padding: 40px 20px; }
.hd-form-success .ti { font-size: 52px; color: #059669; display: block; margin-bottom: 12px; }
.hd-form-success h4 { font-size: 20px; font-weight: 700; color: var(--hd-navy); margin: 0 0 8px; }
.hd-form-success p { font-size: 14px; color: var(--hd-gray); margin: 0; }
