:root{
    --gap: 12px;
    --bg: #fafafa;
    --card: #fff;
    --muted: #888;
    --accent: #0095f6; /* change to #0095f6 for blue */
}

/* -webkit-tap-highlight-color: Android Chrome's own default gray flash on any tap — turned
   off site-wide regardless, since it's a reasonable touch-UX polish even though the
   specific "gray circle" report that prompted it turned out to be the phone's own "Show
   taps" developer-option overlay (not a page bug at all).
   outline: none !important: removes the browser's default focus ring. !important because
   on the company page (a sibling file, style.css), Bootstrap 3's own `a:focus { outline:
   5px auto -webkit-focus-ring-color; }` beat a plain `*` selector on specificity alone —
   kept here too for consistency/safety against any future competing rule. */
* {
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
}

html,body{
    height:100%;
    margin:0;
    background:var(--bg);
    font-family: Arial, Helvetica, sans-serif;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    color:#111;
}

/* global safety */
* { box-sizing: border-box; }
html,body { max-width:100%; }

/* Prevent page-level horizontal overflow (keeps page inside viewport).
   .btns will still be horizontally scrollable because it has overflow-x:auto. */
body { overflow-x: hidden; }

/* Header / profile */
.profile-header {
    display: flex;
    align-items: normal;
    gap: 24px;
    padding: 20px;
    background: var(--card);
    border-bottom: 1px solid #ddd;
}

.profile-pic img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.profile-pic {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;

    /* outer light grey ring */
    box-shadow: 0 0 0 6px #e5e5e5;
}

/* inner thin pink ring */
.profile-pic::after {
    content: "";
    position: absolute;
    inset: 0px;                     /* space from outer ring */
    border-radius: 50%;
    border: 2px solid #f765c7;         /* thin red ring */
    pointer-events: none;
}

.profile-info { flex: 1; min-width: 0;max-width: -webkit-fill-available; }

.profile-info h2{ margin:0 0 6px 0; font-size:22px; line-height:1; }

.stats {
    display: flex;
    gap: 28px;
    margin: 10px 0;
    align-items: center;
    flex-wrap: wrap;
}

.stats div { font-size: 16px; color: #111; min-width: 60px; }
.stats b { display:block; font-size:15px; }

/* grouped, centered .btns block (like highlights) */
.btns {
    display: flex;
    flex-wrap: wrap;               /* wrap on wide screens */
    justify-content: center;       /* center the group on page */
    align-items: flex-start;       /* align to same top baseline */
    gap: 10px;
    padding: 12px 15px;
    background: var(--card);
    border-bottom: 1px solid #ddd;
    box-sizing: border-box;
    max-width: 960px;              /* keep visual max on very wide viewports */
    width: 100%;                   /* <-- allow .btns to shrink to its parent */
    margin: 0 auto 8px;
    overflow: visible;
}

/* hide native radios but keep them accessible */
.btn-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* label styled as pill button (default neutral look) */
.btn-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    user-select: none;
    font-weight: 700;
    font-size: 13px;
    background: #f3f6fb;
    color: #111;
    box-shadow: 0 2px 8px rgba(10,40,80,0.04);
    transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease;

    /* allow labels to wrap and break long words on desktop so .btns can't force overflow */
    white-space: normal;           /* <-- changed from nowrap */
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* selected (radio checked) visual */
.btn-input:checked + .btn-label {
    background: var(--accent);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.btn-label:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,149,246,0.12);
    border-radius: 12px;
}
.btn-label:active { transform: scale(0.98); }

/* Highlights */
.highlights {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 18px;
    padding: 14px 15px;
    background: var(--card);
    border-bottom: 1px solid #ddd;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    max-width: 960px;
    margin: 0 auto;
}

/* consolidated highlight item styles */
.highlight-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    flex: 0 0 auto;
    width: 72px;
    max-width: 80px;
    gap: 6px;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    padding-top: 4px;
    transition: transform .12s ease, box-shadow .12s ease;
}

.highlight-item > span {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.05;
    max-width: 100%;
}

.highlight-circle {
    --circle-size: 70px;
    width: var(--circle-size);
    height: var(--circle-size);
    border-radius: 50%;
    background: #ffffff;               /* inner white */
    margin: 0 auto 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;

    /* outer light grey ring */
    box-shadow: 0 0 0 3px #e5e5e5;
}

/* inner thin red ring */
.highlight-circle::after {
    content: "";
    position: absolute;
    inset: 3px;                        /* distance from outer ring */
    border-radius: 50%;
    border: 2px solid #f765c7;         /* thin red ring */
    pointer-events: none;
}

/* logo/image */
.highlight-circle img {
    width: 82%;
    height: 82%;
    object-fit: contain;
    border-radius: 50%;
}

/* mobile size */
@media (max-width: 420px) {
    .highlight-circle {
        --circle-size: 62px;
    }
}

.highlight-circle .count {
    font-family: "Poppins", "Inter", "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 800;
    font-size: calc(var(--circle-size) * 0.48);
    line-height: 1;
    color: #081826;
    -webkit-font-smoothing: antialiased;
    display: inline-block;
    text-align: center;
    -webkit-text-stroke: 0.6px rgba(0,0,0,0.08);
    text-shadow: 0 2px 6px rgba(0,0,0,0.12), 0 1px 0 rgba(255,255,255,0.18);
    transform: translateY(-1%);
}

.highlight-item:focus-visible .highlight-circle {
    box-shadow: 0 0 0 4px rgba(0,149,246,0.14);
    transform: translateY(-2px);
}
.highlight-item:active .highlight-circle { transform: scale(0.96); }

/* SELECTED highlight focus (when radio is checked) */
.highlight-input:checked + .highlight-item .highlight-circle {
    background: #007bff; /* new background color */
    box-shadow: 
        0 0 0 6px rgba(0, 80, 180, 0.45),
        0 6px 22px rgba(0,0,0,0.22);
    transform: scale(1.07);
}

/* Grid / cards */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);;
    gap: 12px;
    padding: 12px;
}

.card {
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: block;
    border: 1px solid rgba(0,122,255,0.06);
    box-shadow: 0 6px 18px rgba(14,67,128,0.06);
    height: 160px;
}

.card-media {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    background: #f6f8fb;
}
.card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-label {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 6;
    background: transparent;
    color: #0b0b0b;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.05;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    text-shadow:
        0 1px 0 rgba(255,255,255,0.85),
        0 4px 10px rgba(0,0,0,0.26);
}

.card:hover{
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(14,67,128,0.10);
}

/* Tabs: centered, touch-friendly, clear active state */
.tabs {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--card);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 20;
    max-width: 960px;
    margin: 0 auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* individual tab */
.tabs span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: var(--muted);
    background: transparent;
    transition: background-color .12s ease, color .12s ease, transform .12s ease, box-shadow .12s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* active tab visual (use class="active" or aria-selected="true") */
.tabs span.active,
.tabs span[aria-selected="true"] {
    background: rgba(0,149,246,0.10); /* soft blue bubble */
    color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.06);
}

/* hover / pressed feedback */
.tabs span:hover { background: rgba(0,0,0,0.04); }
.tabs span:active { transform: translateY(0); }

/* keyboard focus */
.tabs span:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0,149,246,0.12);
    border-radius: 999px;
}

/* mobile: allow horizontal scroll when tabs overflow */
@media (max-width: 420px) {
    .tabs {
        overflow-x: auto;
        gap: 8px;
        padding: 6px 8px;
        scroll-snap-type: x mandatory;
    }
    .tabs span { flex: 0 0 auto; scroll-snap-align: center; padding: 7px 10px; font-size:14px; }
    .tabs::-webkit-scrollbar { display: none; }
    .tabs { -ms-overflow-style: none; scrollbar-width: none; }
}

/* Responsive: mobile */
@media (max-width: 600px) {
    .profile-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
        padding: 14px;
    }
    .profile-pic { width: 96px; height: 96px; border-width: 2px; }
    .profile-info h2 { font-size:18px; }
    .stats { justify-content: center; gap: 18px; margin: 8px 0; }
    .stats div { font-size:14px; }

    /* .btns becomes a single horizontal scroll row */
    .btns {
        display: block;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        white-space: nowrap;
        margin: 0 0 8px;     /* removed negative left/right margin */
        padding: 10px 12px;
    }
    .btns::-webkit-scrollbar{ display: none; }
    .btns { -ms-overflow-style: none; scrollbar-width: none; }

    .btn-label {
        flex: 0 0 auto;
        white-space: nowrap;         /* restore nowrap on mobile for single-row swipe */
        scroll-snap-align: center;
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 999px;
        max-width: none;             /* allow full pill width when scrolling */
    }

    .card-label { font-size: 12px; left: 8px; right: 8px; bottom: 8px; -webkit-line-clamp: 2; }
    .grid { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; }
    .card-media{ height: 110px; }
}

/* Extra small screens */
@media (max-width: 420px) {
    .highlight-item { width: 64px; max-width: 68px; gap:4px; }
    .highlight-item > span { font-size: 12px; -webkit-line-clamp:2; }
    .highlight-circle { --circle-size: 62px; width: var(--circle-size); height: var(--circle-size); }
    .card-media{ height: 100px; }
    .grid { gap:6px; padding:6px; }
}

/* Large screens */
@media (min-width: 900px) {
    body { background: #f5f7f8; }
    .profile-header, .highlights, .tabs { max-width: 960px; margin: 0 auto; border-radius: 4px;}
    .grid { max-width: 960px; margin: 12px auto; border-radius:4px; overflow:hidden; }
}

/* keep radios hidden but accessible */
.highlight-input{
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* base label style (unchanged from .highlight-item) */
.highlight-item {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    flex: 0 0 auto;
    width: 72px;
    max-width: 80px;
    gap: 6px;
    cursor: pointer;
    outline: none;
    box-sizing: border-box;
    padding-top: 4px;
    transition: transform .12s ease, box-shadow .12s ease;
}

/* visual selected state (applies when the radio is checked)
   — no translateY so the item does NOT shift up; use glow instead */
.highlight-input:checked + .highlight-item {
    transform: none; /* disable upward shift */
    border-radius: 8px;
}

/* highlight the circle (subtle scale + ring) without moving the item */
.highlight-input:checked + .highlight-item .highlight-circle {
    box-shadow: 0 0 0 6px rgba(0,149,246,0.08), 0 6px 18px rgba(0,0,0,0.08);
    transform: scale(1.03);
}

/* ensure keyboard focus and checked visual are consistent */
.highlight-item:focus-visible,
.highlight-input:checked + .highlight-item:focus-visible {
    outline: none;
    box-shadow: 0 0 0 6px rgba(0,149,246,0.14);
}

/* ==================================================
   SLIDER & SLIDE (Overlap Fix Applied Here)
================================================== */
.slider {
    width: 100%;
    height: 230px;
    overflow: hidden;
    position: relative;
    border-radius: 10px;
}

.slides {
    display: flex;
    animation: slideShow 12s infinite;
}

.slide {
    min-width: 100%;
    text-align: center;
    background: #fff;
    position: relative;
    /* Updated to flex column to keep the wrapper and text neatly stacked */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.slide-link {
    display: block;
    text-decoration: none;
    color: inherit;
    width: 100%; /* Ensures the link covers the width */
}

/* NEW: Wrapper to hold the absolute-positioned views tag inside the image bounds */
.img-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.slide img {
    height: 180px;
    width: auto;
    margin-top: 10px;
    object-fit: contain;
}

.caption {
    position: absolute;
    bottom: 12px; /* Distance from the bottom of the slider */
    left: 50%;
    transform: translateX(-50%); /* Centers the caption perfectly */
    
    background: rgba(0, 0, 0, 0.65); /* Translucent dark background */
    color: #ffffff; /* White text for contrast */
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 10px; /* Gives it a clean pill shape */
    z-index: 10; /* Ensures it sits above the image */
    
    /* Safety properties to keep long company names from breaking */
    white-space: nowrap;
    max-width: 90%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.views {
    position: absolute;
    top: 8px;   /* Moves to the top */
    right: 4px; /* Moves to the right */
    background: rgba(0, 0, 0, 0.05); /* Removes the dark background box */
    color: #fff;
    font-size: 12px;
    font-weight: 600; /* Makes the text slightly bolder for readability */
    padding: 3px 6px;
    border-radius: 12px;
    z-index: 10;
    /* Adds a drop shadow so the white text is readable over light images */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8), 0 0 2px rgba(0, 0, 0, 0.5); 
}

@keyframes slideShow {
    0% { transform: translateX(0%); }
    25% { transform: translateX(0%); }
    33% { transform: translateX(-100%); }
    58% { transform: translateX(-100%); }
    66% { transform: translateX(-200%); }
    91% { transform: translateX(-200%); }
    100% { transform: translateX(0%); }
}

@media (max-width: 600px) {
    .highlights {
        justify-content: flex-start !important;
        padding-left: 8px; /* optional small padding */
    }
    .slide img {
        height: 180px;
        width: 120px;
        margin-top: 10px;
        object-fit: contain;
    }
}

.info-text {
    margin: 6px 0 0 0;
    color: var(--muted);
}

.search-box {
    width: 95%;
    padding: 6px 10px;
    margin-top: 4px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    outline: none;
}

.search-box:focus {
    border-color: #888;
}

/* ==================================================
   BASE RESET
================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    height: 100%;
    background: var(--bg);
    font-family: Arial, Helvetica, sans-serif;
    color: #111;
}

/* ==================================================
   COMPANY CONTAINER
================================================== */
#sn-company-container {
    display: none; /* shown on category click */
    max-width: 960px;
    margin: 20px auto 60px;
    padding: 0 12px;
    animation: snFadeIn 0.3s ease;
}

/* ==================================================
   COMPANY LIST (Desktop Grid: 3–4 per row)
================================================== */
#sn-company-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--gap);
    padding: var(--gap);
    width: 100%;
}

/* ==================================================
   SECTION TITLE
================================================== */
.sn-section-title-wrap {
    max-width: 960px;
    margin: 20px auto 16px;
    padding: 0 12px;
    display: flex;
    justify-content: center;
}

.sn-section-title {
    background: var(--accent);
    color: #fff;
    padding: 10px 28px;
    border-radius: 999px; /* fully rounded */
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 149, 246, 0.35);
}

/* ==================================================
   COMPANY CARD
================================================== */
.sn-company-item {
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 120px;
    padding: 14px;
    background: var(--card);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sn-company-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.14);
}

/* ==================================================
   LOGO (LEFT)
================================================== */
.sn-logo-section {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f4f6f9;
    border-radius: 12px;
}

.sn-company-icon {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

/* ==================================================
   DETAILS (CENTER)
================================================== */
.sn-details-section {
    flex: 1;
    min-width: 0;
}

.sn-details-section h4 {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sn-details-section p {
    margin: 3px 0;
    font-size: 13px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sn-details-section a {
    color: var(--accent);
    text-decoration: none;
}

/* ==================================================
   RIGHT IMAGE
================================================== */
.sn-right-image {
    width: 84px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sn-right-image img {
    width: 100%;
    height: 64px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: 8px;
    padding: 6px;
}

/* ==================================================
   BUTTON
================================================== */
.sn-custom-btn {
    margin-top: 6px;
    padding: 6px 14px;
    border-radius: 18px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.sn-custom-btn:hover {
    background: #007ad6;
}

.sn-custom-btn:active {
    transform: scale(0.97);
}

/* ==================================================
   MOBILE (Stack cards vertically)
================================================== */
@media (max-width: 600px) {
    #sn-company-list {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        overflow-x: visible;
        padding: 10px;
    }

    .sn-company-item {
        padding: 12px;
        gap: 10px;
    }

    .sn-logo-section {
        width: 56px;
        height: 56px;
    }

    .sn-right-image {
        width: 72px;
    }
}

/* ==================================================
   ANIMATION
================================================== */
@keyframes snFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}