/* ==========================================================================
   Components — reusable UI blocks shared across every page
   ========================================================================== */

/* Buttons
   ========================================================================== */
.btn {
    padding: 14px 32px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: 16px;
    font-family: var(--font-ar);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn--gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: var(--crimson-dd);
}

.btn--gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(201, 162, 75, .4);
}

.btn--outline {
    background: transparent;
    border: 1.6px solid var(--gold);
    color: var(--gold-l);
}

.btn--outline:hover {
    background: rgba(201, 162, 75, .12);
}

.btn-group {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* Section heading
   ========================================================================== */
.section-head {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 56px;
}

.section-head h2 {
    font-size: clamp(30px, 4vw, 46px);
    color: #fff;
    margin-top: 10px;
}

.section-head h2 .en {
    display: block;
    font-size: 18px;
    color: var(--gold-soft);
    letter-spacing: .3em;
    margin-top: 6px;
    font-weight: 600;
}

.section-head p {
    color: var(--muted);
    margin-top: 16px;
    font-size: 17px;
}

/* Service card
   ========================================================================== */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    background: linear-gradient(160deg, rgba(155, 34, 49, .55), rgba(94, 14, 24, .6));
    border: 1px solid rgba(201, 162, 75, .18);
    border-radius: var(--radius-lg);
    padding: 30px 26px;
    transition: .35s;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-l));
    transition: .4s;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(201, 162, 75, .5);
    box-shadow: 0 20px 44px rgba(0, 0, 0, .4);
}

.card:hover::before {
    width: 100%;
}

.card__icon {
    width: 58px;
    height: 58px;
    border-radius: var(--radius-md);
    background: rgba(201, 162, 75, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border: 1px solid rgba(201, 162, 75, .3);
}

.card__icon svg {
    width: 30px;
    height: 30px;
    color: var(--gold-l);
}

.card h3 {
    font-size: 20px;
    color: var(--gold-l);
    margin-bottom: 10px;
}

.card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
}

/* Portfolio tile
   ========================================================================== */
.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.work {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow-md);
}

.work img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .6s;
}

.work figcaption {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient(to top, rgba(67, 10, 17, .92), rgba(67, 10, 17, .1) 55%, transparent);
    transition: .4s;
}

.work h4 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 4px;
}

.work figcaption span {
    color: var(--gold-l);
    font-size: 14px;
    transform: translateY(8px);
    opacity: 0;
    transition: .4s;
}

.work:hover img {
    transform: scale(1.08);
}

.work:hover figcaption span {
    transform: translateY(0);
    opacity: 1;
}

/* Feature tile ("why choose us")
   ========================================================================== */
.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 10px;
}

.feature {
    background: rgba(67, 10, 17, .5);
    border: 1px solid rgba(201, 162, 75, .2);
    border-radius: var(--radius-md);
    padding: 20px;
}

.feature svg {
    width: 26px;
    height: 26px;
    color: var(--gold);
    margin-bottom: 10px;
}

.feature b {
    display: block;
    color: var(--gold-l);
    margin-bottom: 4px;
    font-size: 16px;
}

.feature span {
    color: var(--muted);
    font-size: 14px;
}

/* Contact info tile
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
    margin-bottom: 50px;
}

.contact-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: rgba(155, 34, 49, .3);
    padding: 22px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(201, 162, 75, .16);
}

.contact-item svg {
    width: 26px;
    height: 26px;
    color: var(--gold);
    flex: 0 0 auto;
}

.contact-item b {
    display: block;
    color: var(--gold-l);
    margin-bottom: 4px;
}

.contact-item span,
.contact-item a {
    color: var(--muted);
    font-size: 15px;
    word-break: break-word;
}

/* Form card
   ========================================================================== */
.form-card {
    background: rgba(67, 10, 17, .72);
    border: 1px solid rgba(201, 162, 75, .3);
    border-radius: var(--radius-xl);
    padding: 34px;
    box-shadow: var(--shadow-lg);
}

.form-card h3 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 6px;
}

.form-card__sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 22px;
}

.form-card .btn--gold {
    width: 100%;
    justify-content: center;
    margin-top: 6px;
}

.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 14px;
    color: var(--gold-l);
    margin-bottom: 6px;
    font-weight: 500;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(201, 162, 75, .3);
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-family: var(--font-ar);
    font-size: 15px;
    outline: none;
    transition: .25s;
}

.field input::placeholder,
.field textarea::placeholder {
    color: #bda9a0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--gold);
    background: rgba(255, 255, 255, .1);
}

.field select option {
    color: #000;
}

.field__error {
    display: block;
    color: #ffb4b4;
    font-size: 13px;
    margin-top: 6px;
}

.field--invalid input,
.field--invalid select,
.field--invalid textarea {
    border-color: #e57373;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.field-checkbox,
.field-radio {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.field-checkbox label,
.field-radio label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    margin: 0;
}

.field-checkbox input,
.field-radio input {
    width: auto;
    accent-color: var(--gold);
}

.field__hint {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 4px;
}

.form-note {
    font-size: 12px;
    color: var(--muted);
    margin-top: 12px;
    text-align: center;
}

/* Success state shown after a submission */
.form-success {
    text-align: center;
    padding: 30px 10px;
}

.form-success__icon {
    font-size: 48px;
}

.form-success h3 {
    margin: 12px 0 8px;
}

.form-success p {
    color: var(--muted);
}

.alert {
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}

.alert--error {
    background: rgba(229, 115, 115, .14);
    border: 1px solid rgba(229, 115, 115, .5);
    color: #ffd4d4;
}

.alert--success {
    background: rgba(201, 162, 75, .14);
    border: 1px solid rgba(201, 162, 75, .5);
    color: var(--gold-l);
}

/* Rich text — output of the dashboard editors
   ========================================================================== */
.prose {
    color: var(--muted);
    font-size: 17px;
    max-width: 860px;
}

.prose h2,
.prose h3,
.prose h4 {
    color: #fff;
    margin: 32px 0 14px;
}

.prose h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.prose h3 {
    font-size: 22px;
    color: var(--gold-l);
}

.prose p {
    margin-bottom: 16px;
}

.prose a {
    color: var(--gold-l);
    text-decoration: underline;
}

.prose ul,
.prose ol {
    margin: 0 22px 18px 0;
    padding-right: 6px;
}

.prose li {
    margin-bottom: 8px;
}

.prose strong,
.prose b {
    color: var(--cream);
}

.prose img {
    border-radius: var(--radius-md);
    margin: 20px 0;
}

.prose blockquote {
    border-right: 3px solid var(--gold);
    padding: 6px 18px;
    margin: 20px 0;
    color: var(--cream);
    background: rgba(201, 162, 75, .08);
    border-radius: var(--radius-sm);
}

/* Rich text from the editor can contain wide blocks — let those scroll on
   their own instead of widening the page. */
.prose table {
    display: block;
    width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.prose pre {
    overflow-x: auto;
}

/* Responsive
   ========================================================================== */
@media (max-width: 900px) {

    .card-grid,
    .works-grid,
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .section-head {
        margin-bottom: 40px;
    }
}

@media (max-width: 640px) {

    .card-grid,
    .works-grid,
    .contact-grid,
    .feature-grid,
    .field-row {
        grid-template-columns: 1fr;
    }

    .section-head {
        margin-bottom: 32px;
    }

    .section-head p,
    .prose {
        font-size: 16px;
    }

    .card {
        padding: 24px 20px;
    }

    .form-card {
        padding: 24px 18px;
    }

    .form-card h3 {
        font-size: 21px;
    }

    /* iOS zooms the whole page when a focused input is under 16px */
    .field input,
    .field select,
    .field textarea {
        font-size: 16px;
        padding: 13px 14px;
    }

    .field label {
        font-size: 15px;
    }

    /* Choice lists get real rows so they are easy to hit with a thumb */
    .field-checkbox,
    .field-radio {
        gap: 10px 18px;
    }

    .field-checkbox label,
    .field-radio label {
        font-size: 15px;
        min-height: 32px;
    }

    .btn {
        padding: 13px 26px;
    }

    /* Full width call to action buttons read better on a narrow screen */
    .btn-group {
        gap: 12px;
    }

    .btn-group .btn {
        flex: 1 1 100%;
        justify-content: center;
    }

    /* Phone and email links need a tappable height of their own */
    .contact-item a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
