/* ================================================================
   User Manuals  (/Home/UserGuides)
   ----------------------------------------------------------------
   EVERY selector starts with .ug-page, so nothing here can reach
   another screen.

   The cards come from Views/Home/_UserGuides.cshtml, which is shared
   with the public landing page. That page styles the same markup from
   its own <style> block, so the class names are fixed - .pub-section,
   .pub-grid, .guide-card, .video-thumb, .download-btn and so on. This
   sheet restyles those same classes, but only inside .ug-page, which
   the landing page does not have. One copy of the markup, two
   treatments, no interference.

   The visual language is the one used across the modernised screens:
   the same gradient hero, card, shadow and accent values.
   ================================================================ */

.ug-page {
    padding: 4px 2px 28px;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #22364e;
}

/* ---- hero ---- */
.ug-page .ug-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: #fff;
    border-radius: 14px;
    padding: 22px 26px;
    margin: 8px 0 22px;
    background: linear-gradient(120deg, #0a3564 0%, #1466a8 60%, #1f86cf 100%);
    box-shadow: 0 10px 26px rgba(11, 61, 110, .28);
}

.ug-page .ug-hero::after {
    content: '';
    position: absolute;
    right: -60px;
    top: -90px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(172, 192, 121, .22) 0%, transparent 68%);
}

.ug-page .ug-hero-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 62px;
    height: 62px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    background: rgba(255, 255, 255, .16);
    border: 2px solid rgba(255, 255, 255, .30);
}

.ug-page .ug-hero-text { position: relative; z-index: 1; min-width: 0; flex: 1 1 380px; }

.ug-page .ug-crumb {
    margin: 0 0 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: #cfe4f5;
}

.ug-page .ug-crumb .fa { margin: 0 6px; opacity: .7; }

.ug-page .ug-hero-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.4px;
    color: #fff;
}

.ug-page .ug-hero-sub {
    margin: 7px 0 0;
    font-size: 13.5px;
    line-height: 1.55;
    max-width: 640px;
    color: #eaf2fa;
}

.ug-page .ug-hero-facts {
    position: relative;
    z-index: 1;
    flex: 0 1 auto;
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, .20);
}

.ug-page .ug-fact { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #eaf2fa; white-space: nowrap; }
.ug-page .ug-fact .fa { color: #acc079; font-size: 14px; width: 16px; text-align: center; }

/* ---- section heading (from the shared partial) ---- */
.ug-page .pub-section { margin: 0 0 14px; }

.ug-page .pub-section h2 {
    font-size: 17px;
    font-weight: 800;
    color: #0b1d3a;
    margin: 0;
    letter-spacing: -.2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ug-page .pub-section h2 .fa {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1d6094, #4f747e);
    color: #fff;
}

.ug-page .pub-section p { margin: 6px 0 0; color: #6d7885; font-size: 12.5px; }

/* A quiet divider between the templates and the walkthroughs. */
.ug-page .ug-rule { border: 0; border-top: 1px solid #e6ebf2; margin: 26px 0 22px; }

/* ---- card grid ---- */
.ug-page .pub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 4px;
}

/* ---- template cards ----
   Same shell as a guide card, but the body is a list of files rather than a
   video, so it keeps the underlined heading that separates it from the list. */
.ug-page .template-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(16, 34, 56, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ug-page .template-card:hover {
    transform: translateY(-3px);
    border-color: #cfe0f3;
    box-shadow: 0 14px 30px rgba(16, 34, 56, .13);
}

.ug-page .template-card .card-title {
    padding-bottom: 9px;
    margin-bottom: 11px;
    border-bottom: 2px solid #acc079;
}

.ug-page .download-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 11px;
    margin-bottom: 7px;
    border-radius: 9px;
    background: #f7f9fc;
    border: 1px solid #eef2f7;
    text-decoration: none;
    color: #22364e;
    font-size: 12.5px;
    line-height: 1.4;
    transition: background .18s ease, border-color .18s ease, transform .18s ease;
}

.ug-page .download-link:last-child { margin-bottom: 0; }

.ug-page .download-link:hover {
    background: #eef5fb;
    border-color: #c9dcf0;
    color: #1466a8;
    text-decoration: none;
    transform: translateX(3px);
}

.ug-page .download-link .fa { font-size: 17px; flex: 0 0 auto; width: 18px; text-align: center; }
.ug-page .download-link .dl-arrow { margin-left: auto; color: #b9c4d0; font-size: 12px; }
.ug-page .download-link:hover .dl-arrow { color: #1466a8; }

/* File-type colours. The landing page sets these unscoped in its own style
   block, so they do not reach this page - they are restated here. */
.ug-page .download-link .fa-file-excel-o { color: #1d6f42; }
.ug-page .download-link .fa-file-word-o { color: #2b579a; }
.ug-page .download-link .fa-file-pdf-o { color: #c0392b; }

.ug-page .guide-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 14px;
    padding: 16px 16px 18px;
    box-shadow: 0 1px 2px rgba(16, 34, 56, .05);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ug-page .guide-card:hover {
    transform: translateY(-3px);
    border-color: #cfe0f3;
    box-shadow: 0 14px 30px rgba(16, 34, 56, .13);
}

/* A thin accent rail that fills in on hover, rather than a heavy border. */
.ug-page .guide-card::before {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    top: 0;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: linear-gradient(90deg, #1466a8, #acc079);
    opacity: 0;
    transition: opacity .18s ease;
}

.ug-page .guide-card:hover::before { opacity: 1; }

.ug-page .card-title {
    font-weight: 800;
    font-size: 14px;
    color: #0b1d3a;
    letter-spacing: -.1px;
    margin: 0 0 7px;
    padding: 0;
    border: 0;
}

.ug-page .guide-text {
    font-size: 12.5px;
    color: #7a8899;
    line-height: 1.5;
    margin: 0 0 13px;
    min-height: 38px;
}

/* ---- click-to-play video ----
   The poster frame stands in for the embed until someone asks for it, so the
   page does not pull six YouTube players on first paint. */
.ug-page .video-thumb {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 11px;
    overflow: hidden;
    cursor: pointer;
    background: #0b1d3a center/cover no-repeat;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(11, 29, 58, .18);
}

.ug-page .video-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 29, 58, .05) 0%, rgba(11, 29, 58, .48) 100%);
    transition: background .2s ease;
}

.ug-page .video-thumb:hover::after { background: rgba(11, 29, 58, .18); }

.ug-page .video-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    z-index: 2;
    background: rgba(255, 255, 255, .95);
    color: #c0392b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    padding-left: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
    transition: transform .2s ease, background .2s ease;
}

.ug-page .video-thumb:hover .video-play { transform: translate(-50%, -50%) scale(1.09); background: #fff; }

/* min-height is the fallback for browsers without aspect-ratio, so a played
   video can never collapse to zero height. */
.ug-page .video-frame {
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 195px;
    border: none;
    border-radius: 11px;
    margin-bottom: 14px;
    display: block;
}

/* ---- download ---- */
.ug-page .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    align-self: stretch;
    justify-content: center;
    background: linear-gradient(135deg, #1c5eaa, #0e73a0);
    color: #fff;
    padding: 10px 16px;
    border-radius: 9px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .2px;
    text-decoration: none;
    box-shadow: none;
    transition: filter .18s ease, box-shadow .18s ease;
}

.ug-page .download-btn:hover {
    filter: brightness(1.08);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(20, 102, 168, .28);
}

/* The icon inherits the button's white; the global .fa-file-pdf-o is red. */
.ug-page .download-btn .fa-file-pdf-o { color: #fff; font-size: 14px; }

/* ---- responsive ---- */
@media (max-width: 900px) {
    .ug-page .ug-hero-facts { border-left: 0; padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 14px; }
}

@media (max-width: 767px) {
    .ug-page .ug-hero { padding: 17px 18px; gap: 15px; }
    .ug-page .ug-hero-icon { width: 52px; height: 52px; font-size: 22px; }
    .ug-page .ug-hero-title { font-size: 20px; }
    .ug-page .guide-text { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ug-page .guide-card,
    .ug-page .guide-card:hover,
    .ug-page .video-thumb:hover .video-play { transform: none; transition: none; }
}

@media print {
    .ug-page .ug-hero { box-shadow: none; }
    .ug-page .video-thumb, .ug-page .video-frame { display: none; }
}
