﻿/* CardTemplates.css
   Add to: CardToWeb/wwwroot/css/CardTemplates.css
   Link in App.razor: <link rel="stylesheet" href="css/CardTemplates.css" />
*/

/* ══════════════════════════════════════
   PHONE FRAME — CardPreviewPanel
══════════════════════════════════════ */
.cp-phone-frame {
    width: 100%;
    border-radius: 24px;
    border: 3px solid #1a1a2e;
    background: #fff;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 0 5px #f1f3f5;
}

.cp-notch {
    height: 16px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-notch-pill {
    width: 40px;
    height: 5px;
    background: #222;
    border-radius: 3px;
}

.cp-screen {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
    min-height: 0;
}

.cp-screen-full {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: none;
}

    .cp-screen-full::-webkit-scrollbar {
        display: none;
    }

    .cp-screen::-webkit-scrollbar {
        display: none;
    }

.cp-home {
    height: 12px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.cp-home-bar {
    width: 40px;
    height: 3px;
    background: #dee2e6;
    border-radius: 2px;
}

/* ══════════════════════════════════════
   SHARED — all templates
══════════════════════════════════════ */
.ct1-card, .ct2-card, .ct3-card, .ct4-card, .ct5-card {
    width: 100%;
    background: var(--ct-bg, #fff);
    font-family: var(--ct-font, 'DM Sans', sans-serif);
    overflow: hidden;
    color: var(--ct-text, #1a1a2e);
}

/* Social icons — STRICT fixed size, never inherit */
.ct1-si, .ct2-si, .ct3-si, .ct4-si, .ct5-si {
    width: 18px !important;
    height: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    color: #555;
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
    overflow: hidden;
}

    .ct1-si svg, .ct2-si svg, .ct3-si svg, .ct4-si svg, .ct5-si svg {
        width: 18px !important;
        height: 18px !important;
        min-width: 18px !important;
        max-width: 18px !important;
        flex-shrink: 0;
        display: block !important;
    }

/* Contact rows */
.ct1-ci, .ct2-ci, .ct3-ci, .ct4-ci, .ct5-ci {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #444;
}

    .ct1-ci svg, .ct2-ci svg, .ct3-ci svg, .ct4-ci svg, .ct5-ci svg {
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        flex-shrink: 0;
        color: #888;
        display: block !important;
    }

/* Service cards */
.ct1-svc, .ct2-svc, .ct3-svc, .ct4-svc, .ct5-svc {
    background: #f8f8f8;
    border-radius: 10px;
    padding: 10px;
}

.ct1-svc-name, .ct2-svc-name, .ct3-svc-name, .ct4-svc-name, .ct5-svc-name {
    font-size: 12px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.ct1-svc-desc, .ct2-svc-desc, .ct3-svc-desc, .ct4-svc-desc, .ct5-svc-desc {
    font-size: 10px;
    color: #888;
    line-height: 1.4;
}

/* ══════════════════════════════════════
   TEMPLATE 1 — Square avatar LEFT, name RIGHT
══════════════════════════════════════ */

.ct1-card {
    padding-bottom: 0;
}

.ct1-cover {
    width: 100%;
    height: 145px;
    background: #D9D9D9;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

/* FIX: renamed from ct1-cover-img (already correct in CSS) — this class is now used in the razor too */
.ct1-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.ct1-cover-ph {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    margin-top: 21px;
}

.ct1-main {
    display: flex;
    align-items: flex-start;
    padding: 0;
    margin-top: -96px;
    position: relative;
    z-index: 5;
}

.ct1-hero {
    display: flex;
    gap: 0;
    align-items: flex-start;
    margin-top: -10px;
}

.ct1-avatar-wrap {
    width: 90px;
    height: 95px;
    background: #fff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 3px;
    overflow: hidden; /* ensures image never bleeds outside the box */
}

.ct1-avatar {
    /* FIX: fill the wrapper completely with no gaps */
    width: 100%;
    height: 100%;
    object-fit: cover; /* crop-to-fit, no stretching */
    object-position: center;
    display: block;
}

.ct1-avatar-ph {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 3px solid #fff;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

    .ct1-avatar-ph svg {
        width: 28px !important;
        height: 28px !important;
    }

.ct1-info {
    flex: 1;
    background: #f0f0f0;
    margin-left: 4px;
    margin-right: 5px;
    max-width: 100%;
    margin-top: 28px;
    padding: 10px 12px;
    border-radius: 4px;
    min-width: 0;
}

.ct1-name {
    font-size: var(--ct-h-size, 16px);
    font-weight: 700;
    color: var(--ct-text, #1a1a2e);
    margin-bottom: 2px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ct1-desig {
    font-size: 11px;
    color: #777;
    margin-bottom: 6px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.ct1-bio {
    font-size: 10px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

.ct1-socials {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    justify-content: center;
}

.ct1-si {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    flex-shrink: 0;
    width: 20px;
    height: 28px;
}

.ct1-sec-hd {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    padding: 8px 12px 5px;
    display: flex;
    align-items: center;
}

    .ct1-sec-hd::before {
        content: '';
        display: inline-block;
        width: 3px;
        height: 14px;
        background: #1a1a2e;
        border-radius: 2px;
        margin-right: 8px;
    }

.ct1-main-contact {
    padding: 12px 5px 10px;
}

.ct1-contact-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.ct1-contact-header-line {
    width: 2px;
    height: 20px;
    background: var(--ct-primary, #1a1a2e);
    border-radius: 1px;
    flex-shrink: 0;
}

.ct1-contact-header-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--ct-text, #191919);
}

.ct1-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
}

.ct1-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct1-contact-icon {
    width: 26px;
    height: 26px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ct1-contact-icon svg {
        width: 13px;
        height: 13px;
        display: block;
    }

.ct1-contact-text {
    font-size: 10px;
    color: #191919;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct1-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 0 12px 10px;
}

.ct1-main-services {
    padding: 4px 5px 16px;
}

.ct1-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ct1-svc {
    background: #F5F5F5;
    border-radius: 8px;
    padding: 12px;
    height: 150px
}

.ct1-svc-img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 6px;
}

.ct1-svc-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--ct-text, #333);
    margin-bottom: 4px;
}

.ct1-svc-desc {
    font-size: 10px;
    color: #555;
    line-height: 1.4;
    margin-top: 10px;
}

.ct1-svcs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 12px 14px;
}

/* ══════════════════════════════════════
   TEMPLATE 2 — Large circle avatar BOTTOM-RIGHT
══════════════════════════════════════ */
.ct2-cover {
    width: 100%;
    height: 140px;
    background: #e0e0e0;
    position: relative;
    overflow: visible;
}

.ct2-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct2-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #d0d0d0;
}

.ct2-avatar-wrap {
    position: absolute;
    bottom: -45px;
    right: 14px;
    z-index: 2;
}

.ct2-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    display: block;
}

.ct2-avatar-ph {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ct2-avatar-ph svg {
        width: 32px !important;
        height: 32px !important;
    }

.ct2-info {
    padding: 16px 120px 4px 8px;
    margin-top: 3px;
}

.ct2-name {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
}

.ct2-desig {
    font-size: 11px;
    color: #888;
}

.ct2-bio {
    font-size: 11px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 3px !important;
    padding: 8px 8px 10px;
}

.ct2-socials {
    display: flex;
    gap: 12px;
    padding: 0 9px 12px;
}

.ct2-sec-hd {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    padding: 6px 14px 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .ct2-sec-hd::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #ddd;
    }

.ct2-contact {
    padding: 0 14px 10px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
}

.ct2-svcs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 14px 14px;
}


.ct2-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    padding: 0px 5px 10px;
}

.ct2-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct2-contact-icon {
    width: 26px;
    height: 26px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ct2-contact-icon svg {
        width: 13px;
        height: 13px;
        display: block;
    }

.ct2-contact-text {
    font-size: 10px;
    color: #191919;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Template 3 - Contact Header */
.ct2-contact-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
}

.ct2-contact-header-text {
    font-size: 14px;
    font-weight: 600;
    color: #424242;
}

.ct2-contact-header-line {
    flex: 1;
    height: 1px;
    max-width: 35px;
    background: #bdbdbd;
}

/* Template 3 - Services */
.ct2-services {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 8px;
}

.ct2-svc {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 12px;
    height: 150px;
}

.ct2-svc-name {
    font-size: 12px;
    font-weight: 600;
    color: #424242;
    margin-bottom: 4px;
}

.ct2-svc-desc {
    font-size: 10px;
    color: #555;
    line-height: 1.4;
    margin-top: 10px;
}

/* ══════════════════════════════════════
   TEMPLATE 3 — Large circle avatar BOTTOM-LEFT, name on cover
══════════════════════════════════════ */
.ct3-cover {
    width: 100%;
    height: 160px;
    background: #e0e0e0;
    position: relative;
    overflow: visible;
}

.ct3-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct3-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #d0d0d0;
}

.ct3-cover-ph-img {
    margin-top: -90px;
}

.ct3-avatar-wrap {
    position: absolute;
    bottom: -32px;
    left: 14px;
    z-index: 2;
}

.ct3-avatar {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    display: block;
}

.ct3-avatar-ph {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ct3-avatar-ph svg {
        width: 32px !important;
        height: 32px !important;
    }

.ct3-cover-info {
    position: absolute;
    bottom: -16px;
    left: 111px;
    right: 0;
    padding: 0 12px;
}

.ct3-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.ct3-desig {
    font-size: 11px;
    color: #555;
}

.ct3-bio {
    font-size: 11px;
    color: #555;
    line-height: 1.5;
    padding: 45px 14px 10px;
    text-align: center;
}

.ct3-socials {
    display: flex;
    justify-content: center;
    gap: 14px;
    padding: 0 14px 12px;
}

.ct3-sec-hd {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
    padding: 11px 14px 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .ct3-sec-hd::before, .ct4-sec-hd::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #ddd;
        max-width: 30px;
    }

.ct3-contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 0 14px 10px;
}

.ct3-svcs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 150px;
    padding: 0 14px 14px;
}

.ct3-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 6px;
    padding: 10px 5px 10px;
}

.ct3-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct3-contact-icon {
    width: 26px;
    height: 26px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ct3-contact-icon svg {
        width: 13px;
        height: 13px;
        display: block;
    }

.ct3-contact-text {
    font-size: 10px;
    color: #191919;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Template 3 - Contact Header */
.ct3-contact-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px;
}

.ct3-contact-header-text {
    font-size: 14px;
    font-weight: 600;
    color: #424242;
}

.ct3-contact-header-line {
    flex: 1;
    height: 1px;
    max-width: 35px;
    background: #bdbdbd;
}

/* ══════════════════════════════════════
   TEMPLATE 4 — Centered circle avatar, mountain hero
   ══════════════════════════════════════ */
/*.ct4-cover {
    width: 100%;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    height: 160px;
    position: relative;
    background: #ccc;
    overflow: visible;
}

.ct4-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct4-cover-ph {
    width: 100%;
    height: 100%;*/
/* background: linear-gradient(135deg,#c0392b,#f39c12);*/
/*}

.ct4-avatar-wrap {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.ct4-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    object-fit: cover;
    display: block;
}

.ct4-avatar-ph {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ct4-avatar-ph svg {
        width: 28px !important;
        height: 28px !important;
    }*/

.ct4-cover {
    width: 100%;
    height: 150px;
    position: relative;
    background: #e0e0e0;
    overflow: visible;
}

.ct4-cover-ph {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #d1d1d1 0%, #f5f5f5 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 30px;
}

.ct4-avatar-wrap {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.ct4-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: #fff;
    object-fit: cover;
}

.ct4-avatar-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
}

.ct4-body {
    padding: 46px 8px 20px;
    text-align: center;
}
/*.ct4-body {
    padding: 46px 8px 20px;
    text-align: center;
}*/

.ct4-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.ct4-desig {
    font-size: 13px;
    margin-bottom: 12px;
}

.ct4-bio {
    font-size: 12px;
    color: #555;
    line-height: 1.6;
    text-align: center;
    margin-bottom: 14px;
}

.ct4-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.ct4-sec {
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    margin: 14px 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .ct4-sec::before, .ct4-sec::after {
        content: '';
        flex: 1;
        height: 1px;
        background: currentColor;
        opacity: 0.25;
        max-width: 23px;
    }

.ct4-svcs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    height: 150px;
}

.ct4-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 6px;
    padding: 0px 1px 0px;
}

.ct4-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct4-contact-icon {
    width: 26px;
    height: 26px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ct4-contact-icon svg {
        width: 13px;
        height: 13px;
        display: block;
    }

.ct4-contact-text {
    font-size: 10px;
    color: #191919;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ══════════════════════════════════════
   TEMPLATE 5 — Square avatar LEFT + VERTICAL social icons RIGHT
══════════════════════════════════════ */
.ct5-cover {
    width: 100%;
    height: 140px;
    background: #e0e0e0;
    position: relative;
    overflow: visible;
}

.ct5-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ct5-cover-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #d0d0d0;
}

.ct5-avatar-wrap {
    position: absolute;
    left: 10px;
    z-index: 2;
}

.ct5-avatar {
    width: 72px;
    height: 72px;
    border: 3px solid #fff;
    display: block;
}

.ct5-avatar-ph {
    width: 90px;
    height: 95px;
    background: #fff;
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    margin-top: -1px;
}

    .ct5-avatar-ph svg {
        width: 24px !important;
        height: 24px !important;
    }

.ct5-body {
    display: flex;
    align-items: flex-start;
    padding: 16px 10px 8px 12px;
    gap: 8px;
}

.ct5-left {
    flex: 1;
    min-width: 0;
    text-align: end;
    padding-right: 10px;
}

.ct5-name {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
}

.ct5-desig {
    font-size: 11px;
    color: #888;
}

.ct5-socials-v {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-shrink: 0;
}

.ct5-bio {
    font-size: 11px;
    color: #555;
    line-height: 1.5;
    padding: 57px 0px 11px;
    margin-bottom: 0px;
    text-align: justify;
}

.ct5-sec-hd {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    text-align: center;
    padding: 6px 12px 2px;
}

    .ct5-sec-hd::after {
        content: '';
        display: block;
        width: 36px;
        height: 2px;
        background: #1a1a2e;
        margin: 3px auto 8px;
    }

.ct5-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 8px;
    padding: 0px 5px 10px;
}

.ct5-contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ct5-contact-icon {
    width: 26px;
    height: 26px;
    background: #F5F5F5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .ct5-contact-icon svg {
        width: 13px;
        height: 13px;
        display: block;
    }

.ct5-contact-text {
    font-size: 10px;
    color: #191919;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ct5-svc {
    height: 150px;
}

.ct5-svcs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 0 12px 14px;
}

/* ── Service YouTube embed ── */
.ct1-svc-video-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 ratio */
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 6px;
}

.ct1-svc-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 6px;
}
