/* INTERACTIVE HIGHLIGHT */
/* Base Highlight Style */
.interactive-highlight {
    position: relative; /* Allows for positioning of extra elements (e.g., tooltip numbers) */
    background-color: rgba(255, 215, 0, 0.3); /* Light yellow highlight with 30% transparency */
    cursor: pointer; /* Changes cursor to indicate interactivity */
    padding: 2px 5px; /* Adds small space inside the highlight for better readability */
    border-radius: 5px; /* Rounds the corners slightly for a softer look */
    transition: background 0.3s ease; /* Smooth transition effect when background changes */
}

/* Show Number on Hover (Desktop) */
@media (hover: hover) {
    .interactive-highlight:hover::after {
        opacity: 1;
    }
}

/* Show Number on Tap (Mobile) */
.interactive-highlight:focus::after,
.interactive-highlight:active::after {
    opacity: 1;
}


/* Tooltip Styling for Highlighted Text */
.interactive-highlight::after {
    content: attr(data-card); /* See the explanation */
    position: absolute; /* Positions the tooltip relative to the highlighted text */
    top: -5px; /* Moves the tooltip slightly above the highlighted text */
    right: -15px; /* Moves the tooltip slightly to the right of the highlighted text */
    background: var(--accent-color);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 120px; /* Sets a fixed width for the tooltip */
    height: 30px; /* Sets a fixed height, making the tooltip a perfect circle */
    display: flex; /* Uses Flexbox to center the text inside the circle */
    align-items: center; /* Vertically centers the text inside the tooltip */
    justify-content: center; /* Horizontally centers the text inside the tooltip */
    border-radius: 10%; /* Creates rounded corners */
    opacity: 0; /* Initially hides the tooltip */
    transition: opacity 0.3s ease; /* Smoothly fades in the tooltip by changing the opacity */
}

/* Add this to your components.css or base.css */

.value-box {
    background: var(--background-color);
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin: 1rem 0;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.05);
    font-size: 1.1rem;
    color: var(--primary-color);
    transition: box-shadow 0.2s;
}

.value-box h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.02em;
}

.value-box:hover {
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.12);
    border-color: var(--accent-color);
}

.grid-container {
    display: grid; /* CSS Grid for Layout */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Responsive columns */
    gap: 10px; /* Space between grid items */
    margin: 2rem 0; /* Space around the grid */
}

/* Flip Cards - Client Needs Analysis */
/* Mobile-First Grid (Default: 1 Column) */
.flip-card-container {
    display: grid;
    grid-template-columns: 1fr; /* Mobile: Single column */
    gap: 20px;
    padding: 20px;
}

/* 3 columns on larger screens */
@media (min-width: 768px) {
    .flip-card-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/*Flip Card Base Styles */
.flip-card {
    width: 100%;
    height: 180px;
    perspective: 1000px; /* Adds depth to make the flip look 3D */
    cursor: pointer; /* Adds indication of interactivity */
    outline: none; /* Removes default focus outline */
    /* Improve touch response: no 300ms delay, no highlight */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Flip Card Inner - the rotating part of the card */
.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d; /* creates a 3D space */
    transition: transform 0.5s ease-in-out;
}

/* Programmatic toggle for devices without hover */
.flip-card.is-flipped .flip-card-inner {
    transform: rotateY(180deg);
}

/* Front & Back Common Styles */
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex; /* we are using flex inside our cards */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-radius: 10px;
    padding: 10px;
    font-size: 1rem;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

/* set the colour for the front */
.flip-card-front {
    background: var(--primary-color);
    color: white;
    /* Prevent text selection on the front face only */
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* set the colour for the back */
.flip-card-back {
    background: var(--secondary-color);
    color: white;
    transform: rotateY(180deg);
    /* Allow normal text selection on the back */
    user-select: text;
}

/* Flip Animation (Desktop Hover) */
@media (hover: hover) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

/* Keyboard focus flip only (enter/space can toggle via JS) */
/* Use :focus-visible so mouse clicks don't leave it flipped */
.flip-card:focus-visible .flip-card-inner {
    transform: rotateY(180deg);
}


/* INTERACTIVE HIGHLIGHTING - USER STORIES */
.interactive-highlight-stories {
    position: relative;
    background-color: rgba(255, 227, 150, 0.6);
    cursor: pointer;
    border-radius: 3px;
    padding: 0 2px;
}

/* User Stories: interview block + user name header */
.interview {
    background: color-mix(in srgb, var(--secondary-color) 8%, #fff);
    border-left: 4px solid var(--secondary-color);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.08);
    padding: 1rem 1.25rem;
}

.user-name {
    margin: 0 0 .75rem;
    color: var(--secondary-color);
    font-weight: 700;
    letter-spacing: .01em;
    font-size: clamp(1.1rem, 1rem + .5vw, 1.5rem);
}

/*Tooltip Styling for Highlighted User Stories Text*/
.interactive-highlight-stories::after {
    content: attr(data-userstory); /* get the correct information */
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10;
    white-space: normal;
    background: #3498db;
    color: #fff;
    font-size: 0.8rem;
    padding: 6px;
    border-radius: 5px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    width: 250px;
    max-width: 90vw;
}

.interactive-highlight-stories:hover::after,
.interactive-highlight-stories:focus::after {
    opacity: 1;
}

/* using an emoji for a bullet point (marker) */
.interview ul li::marker {
    content: "🥕";
    font-size: 1.5em;
    display: inline-block;
}
/* using a colour variable but changing the opacity/transparency */
.response {
    border-left: 2px solid var(--secondary-color);
    font-style: italic;
    background-color: color-mix(in srgb, var(--secondary-color) 10%, transparent); /* color variable transparency */
}

/* Skip link is visible when focused */
.skip-link {
    position: absolute;
    top: -1000px;
    left: 0;
    padding: .5rem .75rem;
    background: #fff;
    border: 2px solid;
    z-index: 1000;
}

.skip-link:focus {
    top: .5rem;
    left: .5rem;
}

/* Mobile menu */
.menu {
    display: none;
}

.menu.is-open {
    display: block;
}

/* Visible focus for common controls (WCAG 2.4.13) */
:where(a, button, [role="button"], input, select, textarea, summary):focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

:root {
    --nav-bg: #2b3b4b;
    /* dark blue/grey bar */
    --nav-fg: #f4f7fb;
    /* link text */
    --nav-hover: rgba(255, 255, 255, .12);
    --nav-active: rgba(255, 255, 255, .22);
}

.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--nav-bg);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
}

/* DESKTOP/LARGE default — horizontal tabs */
.navbar .menu {
    display: flex;
    align-items: center;
    gap: .25rem;
    list-style: none;
    margin: 0;
    padding: 0 .75rem;
}

.navbar .menu>li>a {
    display: block;
    padding: .75rem 1rem;
    color: var(--nav-fg);
    text-decoration: none;
    border-radius: .375rem;
    font-weight: 500;
}

.navbar .menu>li>a:hover,
.navbar .menu>li>a:focus-visible {
    background: var(--nav-hover);
    outline: none;
}

.navbar .menu>li>a[aria-current="page"] {
    background: var(--nav-active);
    font-weight: 600;
}

/* Hamburger button */
.menu-toggle {
    display: none;
    /* hidden on desktop */
    appearance: none;
    background: transparent;
    border: 0;
    color: var(--nav-fg);
    font-size: 1.25rem;
    padding: .75rem 1rem;
}

/* MOBILE layout */
@media (max-width: 720px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
    }

    .navbar .menu {
        display: none;
        /* collapsed by default on mobile */
        flex-direction: column;
        padding: .5rem;
    }

    .navbar .menu.is-open {
        display: flex;
    }

    .navbar .menu>li {
        width: 100%;
    }

    .navbar .menu>li>a {
        width: 100%;
        border-radius: .25rem;
    }
}

/* Optional: centered page title like your screenshot */
.page-header h1 {
    text-align: center;
    font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
    color: #2b3b4b;
}

/* Note: Do not force the menu open globally.
   Desktop layout is already handled above with
   `.navbar .menu { display: flex; }`.
   Keeping an `!important` here prevents mobile collapse. */

/* ------------------------------------------------------
   Accessibility Assessment helpers (cards + summary grid)
   ------------------------------------------------------ */
/* (removed view toggle styles) */
/* Card list for findings */
.a11y-findings {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 1rem;
}

/* Individual finding card */
.a11y-card {
    border: 1px solid var(--border, #ddd);
    border-radius: .75rem;
    padding: 1rem;
    background: var(--card, #cfefaf);
}

/* Responsive summary grid */
.issue-grid {
    display: grid;
    gap: .5rem;
}

/* ------------------------------------------------------
   Recommendations: caret-style bullets
   ------------------------------------------------------ */
/* Scope to the Recommendations section only */
section[aria-labelledby="sec-recs"] ol {
    list-style: none;           /* hide default numbers visually */
    padding-left: 1.25rem;      /* space for custom marker */
    margin: 0;
}

section[aria-labelledby="sec-recs"] ol > li {
    position: relative;
    margin: .4rem 0;
}

section[aria-labelledby="sec-recs"] ol > li::before {
    content: ">";               /* caret/chevron bullet */
    position: absolute;
    left: -1rem;
    color: var(--secondary-color);
    font-weight: 700;
}

.issue-head,
.issue-grid [role="row"] {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1fr;
    gap: .75rem;
    align-items: start;
}

.issue-head {
    font-weight: 700;
}

@media (max-width: 600px) {
    .issue-head,
    .issue-grid [role="row"] {
        grid-template-columns: 1fr;
    }
}

