/* =====================================================================
   Rev2IT — custom-additions.css
   Adds: Services & Products nav dropdowns, needs-based service cards,
   and generated background art for product cards.

   No external images are used anywhere in this file. Every background
   is a CSS gradient and/or an inline SVG data-URI, which keeps this
   fully compliant with the page's existing CSP
   (img-src 'self' data:; style-src 'self').
   ===================================================================== */

/* ---------------------------------------------------------------------
   Shared: anchor offset so in-page dropdown links don't hide under the
   fixed nav bar.
   --------------------------------------------------------------------- */
.anchor-target {
    scroll-margin-top: 96px;
}

/* ---------------------------------------------------------------------
   Nav dropdowns (Services / Products) — plain Bootstrap 5 markup
   (.dropdown / .dropdown-toggle / .dropdown-menu / .dropdown-item),
   restyled to match the site's dark theme.

   This block is written from scratch rather than relying on the full
   Bootstrap stylesheet, so nothing here can be silently missing from a
   compiled/purged CSS bundle, and it can't collide with the rest of
   the page's Tailwind classes. The Bootstrap dropdown is initialised
   with data-bs-display="static" in the HTML, so the JS never injects
   Popper's inline positioning styles — keeping this fully compliant
   with the page's style-src 'self' CSP.
   --------------------------------------------------------------------- */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

/* Caret drawn with plain borders, not an icon font or SVG — so its
   size can never depend on a utility class being present. */
.dropdown-toggle::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.4em;
    vertical-align: 0.12em;
    border-top: 0.32em solid currentColor;
    border-right: 0.32em solid transparent;
    border-bottom: 0;
    border-left: 0.32em solid transparent;
    opacity: 0.7;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 18rem;
    margin-top: 0.5rem;
    padding: 0.4rem 0;
    list-style: none;
    background-color: #1f2937;   /* gray-800, matches original dropdown */
    border: 1px solid #374151;   /* gray-700 */
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 0.55rem 1rem;
    clear: both;
    font-size: 0.9rem;
    font-weight: 400;
    color: #e5e7eb;              /* gray-200 */
    background-color: transparent;
    border: 0;
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #ffffff;
    background-color: #374151;   /* gray-700 */
    border-left-color: #0ea5e9;  /* primary */
}

/* =====================================================================
   SERVICES — needs-based cards
   ===================================================================== */
.need-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.need-eyebrow {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: #9ca3af;
    margin-bottom: 0.35rem;
}

.need-statement {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.9rem;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Rotate the accent colour across the three theme hues already defined
   on this site (primary / secondary / accent) so the grid reads as a
   deliberate set rather than one flat repeated card. */
.need-card-primary .need-statement { color: #38bdf8; }
.need-card-secondary .need-statement { color: #22d3ee; }
.need-card-accent .need-statement { color: #a78bfa; }

.need-card-primary { border-top: 3px solid #0ea5e9; }
.need-card-secondary { border-top: 3px solid #06b6d4; }
.need-card-accent { border-top: 3px solid #8b5cf6; }

/* =====================================================================
   PRODUCTS — generated background art
   ===================================================================== */
.product-card {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.product-card-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-repeat: repeat;
    background-position: center;
    pointer-events: none;
}

.product-card::after {
    /* dark fade so the pattern never fights with the text */
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.35) 0%, rgba(17, 24, 39, 0.92) 55%);
    pointer-events: none;
}

/* --- Security family (hexagon / shield lattice) --------------------- */
.product-bg-shield-violet::before {
    background-image:
        linear-gradient(150deg, rgba(139, 92, 246, 0.30), rgba(139, 92, 246, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 0 L56 16.3 L56 49 L28 65.3 L0 49 L0 16.3 Z' fill='none' stroke='%238b5cf6' stroke-width='1' opacity='0.55'/%3E%3C/svg%3E");
    background-size: auto, 56px 98px;
}
.product-bg-shield-blue::before {
    background-image:
        linear-gradient(150deg, rgba(14, 165, 233, 0.30), rgba(14, 165, 233, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 0 L56 16.3 L56 49 L28 65.3 L0 49 L0 16.3 Z' fill='none' stroke='%230ea5e9' stroke-width='1' opacity='0.55'/%3E%3C/svg%3E");
    background-size: auto, 56px 98px;
}
.product-bg-shield-purple::before {
    background-image:
        linear-gradient(150deg, rgba(168, 85, 247, 0.30), rgba(168, 85, 247, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='98' viewBox='0 0 56 98'%3E%3Cpath d='M28 0 L56 16.3 L56 49 L28 65.3 L0 49 L0 16.3 Z' fill='none' stroke='%23a855f7' stroke-width='1' opacity='0.55'/%3E%3C/svg%3E");
    background-size: auto, 56px 98px;
}

/* --- Mail / communication family (dotted signal field) -------------- */
.product-bg-mail-cyan::before {
    background-image:
        linear-gradient(150deg, rgba(6, 182, 212, 0.30), rgba(6, 182, 212, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='%2306b6d4' opacity='0.55'%3E%3Ccircle cx='10' cy='10' r='1.6'/%3E%3Ccircle cx='42' cy='26' r='1.6'/%3E%3Ccircle cx='74' cy='10' r='1.6'/%3E%3Ccircle cx='26' cy='58' r='1.6'/%3E%3Ccircle cx='62' cy='52' r='1.6'/%3E%3Ccircle cx='10' cy='76' r='1.6'/%3E%3Ccircle cx='74' cy='76' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: auto, 84px 84px;
}
.product-bg-mail-teal::before {
    background-image:
        linear-gradient(150deg, rgba(20, 184, 166, 0.30), rgba(20, 184, 166, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='%2314b8a6' opacity='0.55'%3E%3Ccircle cx='10' cy='10' r='1.6'/%3E%3Ccircle cx='42' cy='26' r='1.6'/%3E%3Ccircle cx='74' cy='10' r='1.6'/%3E%3Ccircle cx='26' cy='58' r='1.6'/%3E%3Ccircle cx='62' cy='52' r='1.6'/%3E%3Ccircle cx='10' cy='76' r='1.6'/%3E%3Ccircle cx='74' cy='76' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: auto, 84px 84px;
}
.product-bg-mail-sky::before {
    background-image:
        linear-gradient(150deg, rgba(56, 189, 248, 0.30), rgba(56, 189, 248, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='%2338bdf8' opacity='0.55'%3E%3Ccircle cx='10' cy='10' r='1.6'/%3E%3Ccircle cx='42' cy='26' r='1.6'/%3E%3Ccircle cx='74' cy='10' r='1.6'/%3E%3Ccircle cx='26' cy='58' r='1.6'/%3E%3Ccircle cx='62' cy='52' r='1.6'/%3E%3Ccircle cx='10' cy='76' r='1.6'/%3E%3Ccircle cx='74' cy='76' r='1.6'/%3E%3C/g%3E%3C/svg%3E");
    background-size: auto, 84px 84px;
}

/* --- Tools / management family (dashboard grid) ---------------------- */
.product-bg-grid-indigo::before {
    background-image:
        linear-gradient(150deg, rgba(99, 102, 241, 0.30), rgba(99, 102, 241, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M0 0H64M0 21H64M0 43H64M0 0V64M21 0V64M43 0V64' stroke='%236366f1' stroke-width='0.75' opacity='0.4'/%3E%3C/svg%3E");
    background-size: auto, 64px 64px;
}
.product-bg-grid-emerald::before {
    background-image:
        linear-gradient(150deg, rgba(16, 185, 129, 0.30), rgba(16, 185, 129, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M0 0H64M0 21H64M0 43H64M0 0V64M21 0V64M43 0V64' stroke='%2310b981' stroke-width='0.75' opacity='0.4'/%3E%3C/svg%3E");
    background-size: auto, 64px 64px;
}
.product-bg-grid-blue::before {
    background-image:
        linear-gradient(150deg, rgba(59, 130, 246, 0.30), rgba(59, 130, 246, 0) 55%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cpath d='M0 0H64M0 21H64M0 43H64M0 0V64M21 0V64M43 0V64' stroke='%233b82f6' stroke-width='0.75' opacity='0.4'/%3E%3C/svg%3E");
    background-size: auto, 64px 64px;
}

/* Slightly brighter border + lift on hover so the background art reads
   as part of an interactive card, not decoration bolted on. */
.product-card:hover::after {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.25) 0%, rgba(17, 24, 39, 0.88) 55%);
}
