/* myDigiCard - Templates 1..10 final parity/alignment layer
   Goal: same sections, same typography, card-safe media/logo, premium footer,
   and a reliable fixed + horizontally scrollable bottom navigator. */
:root {
    --dvc-card-max: 520px;
    --dvc-edge: 12px;
    --dvc-nav-height: 76px;
    --dvc-safe-bottom: 96px;
    --dvc-font: "Montserrat", "Segoe UI", Arial, Helvetica, sans-serif;
}

html { scroll-behavior: smooth; max-width:100%; overflow-x:hidden; }
body.dvc-public-card {
    max-width:100%;
    overflow-x:hidden !important;
    padding-bottom:var(--dvc-safe-bottom) !important;
    font-family:var(--dvc-font) !important;
    line-height:1.45;
}
body.dvc-public-card *, body.dvc-public-card *::before, body.dvc-public-card *::after { box-sizing:border-box; }
body.dvc-public-card button, body.dvc-public-card input, body.dvc-public-card select,
body.dvc-public-card textarea, body.dvc-public-card a { font-family:var(--dvc-font) !important; }
body.dvc-public-card h1, body.dvc-public-card h2, body.dvc-public-card h3,
body.dvc-public-card h4, body.dvc-public-card h5, body.dvc-public-card h6 {
    font-family:var(--dvc-font) !important;
    line-height:1.2;
}

/* Eliminate template-specific artificial page heights / blank areas. */
body.dvc-public-card .card-wrapper,
body.dvc-public-card .template-wrapper,
body.dvc-public-card .wrapper,
body.dvc-public-card .main-wrapper,
body.dvc-public-card .main_container,
body.dvc-public-card .main-container {
    min-height:0 !important;
    height:auto !important;
    padding-bottom:18px !important;
}

/* A common visual rail for every card section. */
body.dvc-public-card #home,
body.dvc-public-card .card2,
body.dvc-public-card .share-section,
body.dvc-public-card .qr-section,
body.dvc-public-card #feedback,
body.dvc-public-card #enquiry,
body.dvc-public-card .dvc-advanced-wrap,
body.dvc-public-card .dvc-brand-footer {
    width:min(calc(100% - (var(--dvc-edge) * 2)), var(--dvc-card-max)) !important;
    max-width:var(--dvc-card-max) !important;
    margin-left:auto !important;
    margin-right:auto !important;
}
body.dvc-public-card .card2,
body.dvc-public-card .share-section,
body.dvc-public-card .qr-section,
body.dvc-public-card .dvc-advanced-card {
    min-width:0 !important;
    overflow:hidden;
}
body.dvc-public-card .card2,
body.dvc-public-card .share-section,
body.dvc-public-card .qr-section,
body.dvc-public-card #feedback,
body.dvc-public-card #enquiry {
    margin-top:18px !important;
    margin-bottom:0 !important;
}
body.dvc-public-card section[id], body.dvc-public-card div[id] { scroll-margin-top:14px; }

/* Rich text / long addresses / URLs never break layout. */
body.dvc-public-card p, body.dvc-public-card li, body.dvc-public-card td,
body.dvc-public-card th, body.dvc-public-card a, body.dvc-public-card h1,
body.dvc-public-card h2, body.dvc-public-card h3, body.dvc-public-card h4,
body.dvc-public-card .contact_d, body.dvc-public-card .hero-contact {
    overflow-wrap:anywhere;
    word-break:normal;
    min-width:0;
}
body.dvc-public-card .contact_d p,
body.dvc-public-card .hero-contact span {
    white-space:normal !important;
    overflow:visible !important;
    text-overflow:clip !important;
}

/* BUSINESS / SERVICE PROVIDER: logo is a brand mark, never a cropped portrait. */
body.dvc-public-card .dvc-business-logo {
    display:block !important;
    position:relative !important;
    inset:auto !important;
    transform:none !important;
    float:none !important;
    width:min(88%, 360px) !important;
    max-width:360px !important;
    height:118px !important;
    max-height:118px !important;
    margin:10px auto 14px !important;
    padding:8px 12px !important;
    object-fit:contain !important;
    object-position:center !important;
    border-radius:14px !important;
    clip-path:none !important;
    background:#fff !important;
    border:1px solid rgba(148,163,184,.35) !important;
}
body.dvc-public-card.dvc-category-businessman #home .logo-wrapper,
body.dvc-public-card.dvc-category-serviceprovider #home .logo-wrapper,
body.dvc-public-card.dvc-category-businessman #home .hero-profile,
body.dvc-public-card.dvc-category-serviceprovider #home .hero-profile {
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    overflow:visible !important;
    border-radius:0 !important;
    clip-path:none !important;
}

/* Professional/person photos remain portrait-like. */
body.dvc-public-card:not(.dvc-category-businessman):not(.dvc-category-serviceprovider) #home img {
    object-position:center !important;
}

/* Media parity. */
body.dvc-public-card #products img, body.dvc-public-card #projects img,
body.dvc-public-card #achievements img, body.dvc-public-card #campaigns img,
body.dvc-public-card #gallery img, body.dvc-public-card #news img,
body.dvc-public-card #news-media img, body.dvc-public-card .dvc-advanced-card img {
    max-width:100% !important;
}
body.dvc-public-card #gallery img { object-fit:cover; object-position:center; }
body.dvc-public-card #news img, body.dvc-public-card #news-media img {
    display:block !important;
    width:100% !important;
    height:auto !important;
    max-height:270px !important;
    aspect-ratio:16/9;
    object-fit:cover !important;
    object-position:center !important;
    border-radius:12px !important;
}
body.dvc-public-card #news p, body.dvc-public-card #news-media p {
    display:-webkit-box;
    -webkit-line-clamp:4;
    -webkit-box-orient:vertical;
    overflow:hidden;
}
body.dvc-public-card #video-gallery video, body.dvc-public-card #videogallery video,
body.dvc-public-card #videos video, body.dvc-public-card #video-gallery iframe,
body.dvc-public-card #videogallery iframe, body.dvc-public-card #videos iframe,
body.dvc-public-card .video-container video, body.dvc-public-card .video-container iframe,
body.dvc-public-card .youtube-container iframe {
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    height:auto !important;
    aspect-ratio:16/9 !important;
    object-fit:contain !important;
    border:0 !important;
    border-radius:12px !important;
    background:#000 !important;
}
body.dvc-public-card #payment img, body.dvc-public-card .payment_qr_section img,
body.dvc-public-card .qr-img { max-width:100% !important; height:auto !important; object-fit:contain !important; }

/* Form parity including rating/feedback. */
body.dvc-public-card #feedback input, body.dvc-public-card #feedback select,
body.dvc-public-card #feedback textarea, body.dvc-public-card #enquiry input,
body.dvc-public-card #enquiry select, body.dvc-public-card #enquiry textarea,
body.dvc-public-card .dvc-appointment-form input,
body.dvc-public-card .dvc-appointment-form select,
body.dvc-public-card .dvc-appointment-form textarea {
    width:100% !important;
    max-width:100% !important;
}
body.dvc-public-card #feedback .star,
body.dvc-public-card #feedback .star-rating,
body.dvc-public-card #feedback .filled { color:#f59e0b !important; }

/* Advanced sections use the same card width and one-column flow. */
body.dvc-public-card .dvc-advanced-wrap,
body.dvc-public-card .dvc-public-status {
    width:min(calc(100% - (var(--dvc-edge) * 2)), var(--dvc-card-max)) !important;
    max-width:var(--dvc-card-max) !important;
}
body.dvc-public-card .dvc-advanced-wrap { margin:18px auto 0 !important; }
body.dvc-public-card .dvc-advanced-grid { grid-template-columns:1fr !important; }
body.dvc-public-card .dvc-map { width:100% !important; min-height:260px; }

/* Old per-template copyright / legacy shared footer are replaced by one footer. */
body.dvc-public-card .copyright,
body.dvc-public-card .dvc-public-footer { display:none !important; }

/* Premium common footer. */
body.dvc-public-card .dvc-brand-footer {
    position:relative !important;
    inset:auto !important;
    float:none !important;
    clear:both !important;
    margin-top:20px !important;
    margin-bottom:12px !important;
    padding:0 !important;
    border-radius:18px !important;
    overflow:hidden !important;
    background:linear-gradient(145deg,#0f172a 0%,#172554 100%) !important;
    color:#e2e8f0 !important;
    box-shadow:0 14px 38px rgba(2,6,23,.22) !important;
    border:1px solid rgba(255,255,255,.10) !important;
    font-family:var(--dvc-font) !important;
}
body.dvc-public-card .dvc-brand-footer__accent {
    height:5px; background:linear-gradient(90deg,var(--dvc-primary,#0b7fc2),var(--dvc-secondary,#ff6a00));
}
body.dvc-public-card .dvc-brand-footer__body { padding:18px 18px 16px; }
body.dvc-public-card .dvc-brand-footer__powered {
    display:flex; align-items:center; justify-content:center; gap:10px; text-align:left;
}
body.dvc-public-card .dvc-brand-footer__mark {
    width:42px; height:42px; border-radius:12px; display:inline-flex;
    align-items:center; justify-content:center; flex:0 0 auto;
    background:linear-gradient(135deg,var(--dvc-primary,#0b7fc2),var(--dvc-secondary,#ff6a00));
    color:#fff; font-size:18px; box-shadow:0 8px 18px rgba(0,0,0,.20);
}
body.dvc-public-card .dvc-brand-footer__powered small,
body.dvc-public-card .dvc-brand-footer__powered strong { display:block; }
body.dvc-public-card .dvc-brand-footer__powered small { color:#a8b4c8; font-size:11px; letter-spacing:.02em; }
body.dvc-public-card .dvc-brand-footer__powered strong { color:#fff; font-size:18px; margin-top:1px; }
body.dvc-public-card .dvc-brand-footer__legal {
    display:flex; justify-content:center; flex-wrap:wrap; gap:8px; margin-top:14px;
}
body.dvc-public-card .dvc-brand-footer__legal a {
    display:inline-flex; align-items:center; gap:7px; padding:8px 11px;
    border-radius:999px; border:1px solid rgba(255,255,255,.14);
    background:rgba(255,255,255,.07); color:#f8fafc !important;
    text-decoration:none !important; font-size:12px; font-weight:700;
}
body.dvc-public-card .dvc-brand-footer__legal a:hover { background:rgba(255,255,255,.14); }
body.dvc-public-card .dvc-brand-footer__divider {
    height:1px; margin:15px 0 11px;
    background:linear-gradient(90deg,transparent,rgba(255,255,255,.22),transparent);
}
body.dvc-public-card .dvc-brand-footer__copyright { text-align:center; color:#a8b4c8; font-size:11px; line-height:1.5; }

/* FINAL bottom navigation reset for ALL template implementations. */
body.dvc-public-card .footer-menu,
body.dvc-public-card .menu_bottom {
    position:fixed !important;
    left:0 !important;
    right:0 !important;
    bottom:0 !important;
    top:auto !important;
    width:100vw !important;
    max-width:100vw !important;
    height:var(--dvc-nav-height) !important;
    min-height:var(--dvc-nav-height) !important;
    max-height:var(--dvc-nav-height) !important;
    margin:0 !important;
    padding:0 !important;
    z-index:99999 !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    scrollbar-width:none !important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-x:contain;
    background-color:inherit;
}
body.dvc-public-card .footer-menu::-webkit-scrollbar,
body.dvc-public-card .menu_bottom::-webkit-scrollbar { display:none; }

body.dvc-public-card .footer-menu-inner,
body.dvc-public-card .menu_container,
body.dvc-public-card .dvc-menu-track {
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    align-items:stretch !important;
    justify-content:flex-start !important;
    gap:0 !important;
    width:max-content !important;
    min-width:100% !important;
    height:100% !important;
    margin:0 !important;
    padding:0 !important;
}
body.dvc-public-card .dvc-menu-track.dvc-menu-fit { width:100% !important; justify-content:space-evenly !important; }
body.dvc-public-card .dvc-generated-menu-item {
    flex:0 0 82px !important;
    width:82px !important;
    min-width:82px !important;
    max-width:82px !important;
    height:100% !important;
    min-height:0 !important;
    margin:0 !important;
    padding:9px 4px 7px !important;
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    gap:3px !important;
    cursor:pointer;
    text-align:center !important;
    white-space:normal !important;
    overflow:hidden !important;
    scroll-snap-align:center;
}
body.dvc-public-card .dvc-generated-menu-item i {
    display:block !important; margin:0 !important; font-size:20px !important; line-height:1 !important;
}
body.dvc-public-card .dvc-generated-menu-item span {
    display:block !important;
    width:100% !important;
    white-space:nowrap !important;
    overflow:visible !important;
    text-overflow:clip !important;
    font-size:10.5px !important;
    line-height:1.1 !important;
    font-weight:700 !important;
    letter-spacing:0 !important;
}
body.dvc-public-card .dvc-menu-track.dvc-menu-fit .dvc-generated-menu-item {
    flex:1 1 82px !important;
    max-width:110px !important;
}

@media (max-width: 600px) {
    :root { --dvc-edge:8px; --dvc-nav-height:72px; --dvc-safe-bottom:88px; }
    body.dvc-public-card #news img, body.dvc-public-card #news-media img { max-height:220px !important; aspect-ratio:4/3; }
    body.dvc-public-card .dvc-business-logo { width:min(92%,330px) !important; height:104px !important; }
    body.dvc-public-card .dvc-brand-footer__body { padding:16px 13px 14px; }
    body.dvc-public-card .dvc-brand-footer__powered { justify-content:flex-start; }
    body.dvc-public-card .dvc-generated-menu-item {
        flex-basis:76px !important; width:76px !important; min-width:76px !important; max-width:76px !important;
        padding-left:3px !important; padding-right:3px !important;
    }
    body.dvc-public-card .dvc-generated-menu-item span { font-size:10px !important; }
}


/* =========================================================
   TEMPLATE THEME SYSTEM — each template keeps a distinct premium identity.
   The navigation is shared structurally, but its palette follows the template.
   ========================================================= */
body.dvc-template-1 { --dvc-nav-bg:linear-gradient(135deg,#0067ad,#1494d4); --dvc-nav-active:rgba(255,255,255,.18); }
body.dvc-template-2 { --dvc-nav-bg:linear-gradient(135deg,#c94c00,#ff7a1a); --dvc-nav-active:rgba(255,255,255,.18); }
body.dvc-template-3 { --dvc-nav-bg:linear-gradient(135deg,#211f34,#393653); --dvc-nav-active:rgba(255,255,255,.16); }
body.dvc-template-4 { --dvc-nav-bg:linear-gradient(135deg,#438d20,#68b93a); --dvc-nav-active:rgba(255,255,255,.18); }
body.dvc-template-5 { --dvc-nav-bg:linear-gradient(135deg,#28444d,#52727b); --dvc-nav-active:rgba(100,175,53,.28); }
body.dvc-template-6 { --dvc-nav-bg:linear-gradient(135deg,#4d3ccd,#806cff); --dvc-nav-active:rgba(255,255,255,.18); }
body.dvc-template-7 { --dvc-nav-bg:linear-gradient(135deg,#111,#d52f34); --dvc-nav-active:rgba(255,255,255,.16); }
body.dvc-template-8 { --dvc-nav-bg:linear-gradient(135deg,#f4511e,#ff9b13); --dvc-nav-active:rgba(255,255,255,.20); }
body.dvc-template-9 { --dvc-nav-bg:linear-gradient(135deg,#0077b6,#00a3d7); --dvc-nav-active:rgba(255,255,255,.18); }
body.dvc-template-10 { --dvc-nav-bg:linear-gradient(135deg,#e98900,#ffb23e); --dvc-nav-active:rgba(255,255,255,.22); }

body.dvc-public-card .footer-menu,
body.dvc-public-card .menu_bottom {
    background:var(--dvc-nav-bg,#111827) !important;
    color:#fff !important;
    border-top:1px solid rgba(255,255,255,.18) !important;
    box-shadow:0 -5px 18px rgba(0,0,0,.20) !important;
}
body.dvc-public-card .dvc-generated-menu-item,
body.dvc-public-card .dvc-generated-menu-item i,
body.dvc-public-card .dvc-generated-menu-item span {
    color:#fff !important;
}
body.dvc-public-card .dvc-generated-menu-item.active,
body.dvc-public-card .dvc-generated-menu-item:hover {
    background:var(--dvc-nav-active,rgba(255,255,255,.16)) !important;
}

/* Shared quality layer: clean spacing, consistent headings, card-safe media. */
body.dvc-public-card .card2 > h3,
body.dvc-public-card .share-section > h3,
body.dvc-public-card .qr-section .qr-header,
body.dvc-public-card .dvc-advanced-card > h3 {
    letter-spacing:-.01em;
    font-weight:750 !important;
}
body.dvc-public-card .card2,
body.dvc-public-card .share-section,
body.dvc-public-card .qr-section,
body.dvc-public-card .dvc-advanced-card,
body.dvc-public-card .dvc-review-section {
    box-shadow:0 10px 28px rgba(15,23,42,.11) !important;
}
body.dvc-public-card img {
    image-rendering:auto;
}

@media (max-width:600px) {
    body.dvc-public-card .footer-menu,
    body.dvc-public-card .menu_bottom {
        scroll-snap-type:x proximity;
    }
}
