/* =========================================================
   CAREERS (contact page) - after the zoho.com/careers layout:
     1. banner: big two-line title left, intro + red button right,
        a strip of photos running right -> left underneath
     2. "Let's work together": department pills + open-role cards
     3. "Life at Dynasty Max": centred heading on a navy band with a red glow,
        a row of square pastel team cards (photo bottom-right), outlined button
   Light theme by default; dark theme overrides at the end.
   Markup in contact.html, behaviour in careers.js.
========================================================= */

.cr-wrap {
    box-sizing: border-box;
    width: min(1200px, 90%);
    margin: 0 auto;
}

/* short red line under headings / names */
.cr-line::after {
    content: "";
    display: block;
    width: 38px;
    height: 2px;
    margin: 20px 0 28px;
    background: #e91d2b;
}

.cr-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 34px 18px 28px;
    border: 1px solid #e91d2b;
    border-radius: 2px;
    background: #e91d2b;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .05em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.cr-btn::after {
    content: "";
    width: 9px;
    height: 9px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg);
    transition: transform .4s ease;
}
.cr-btn:hover { background: #c8121f; border-color: #c8121f; box-shadow: 0 10px 24px rgba(233, 29, 43, .25); }
.cr-btn:hover::after { transform: translateX(5px) rotate(-45deg); }
.cr-btn:focus-visible { outline: 2px solid #102744; outline-offset: 3px; }

/* ---------- 1. banner ---------- */
.cr-banner {
    position: relative;
    overflow: hidden;
    padding: 90px 0 70px;
    background:
        linear-gradient(rgba(16, 39, 68, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 39, 68, .035) 1px, transparent 1px),
        #f8f9fb;
    background-size: 42px 42px, 42px 42px, auto;
    color: #102744;
}
.cr-banner-con {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 40px;
}
.cr-banner-lft { width: 56%; max-width: 700px; margin-top: 30px; }
.cr-banner-rht { width: 42%; max-width: 460px; }

.cr-title {
    margin: 0;
    font-size: clamp(40px, 5.4vw, 70px);
    font-weight: 600;
    line-height: 1.12;
    letter-spacing: -.03em;
    color: #102744;
}
.cr-title span {
    display: block;
    margin-bottom: 6px;
    font-size: clamp(24px, 3vw, 40px);
    font-weight: 400;
    letter-spacing: -.03em;
    color: #5b6b80;
}
.cr-banner-rht p {
    margin: 0 0 22px;
    font-size: clamp(16px, 1.5vw, 19px);
    line-height: 1.65;
    color: #3d4a5c;
}
.cr-banner-rht p:nth-of-type(2) { margin-bottom: 34px; }

/* running photo strip */
.cr-photos {
    position: relative;
    margin-top: 90px;
    overflow: hidden;
}
.cr-photos ul {
    display: flex;
    width: max-content;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: crRun 60s linear infinite;
}
.cr-photos:hover ul { animation-play-state: paused; }
.cr-photos li { flex: 0 0 auto; width: 280px; padding: 5px; }
.cr-photos img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 8px;
    background: #e8ecf2;
}
@keyframes crRun {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ---------- 2. open roles ---------- */
.cr-roles {
    padding: 20px 0 110px;
    background: #f8f9fb;
    color: #102744;
    scroll-margin-top: 140px;
}
.cr-roles-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px 30px;
    margin-bottom: 34px;
}
.cr-roles h2,
.cr-life h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 50px);
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -.03em;
}
.cr-roles h2.cr-line::after { margin-bottom: 0; }

.cr-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cr-filters button {
    padding: 8px 16px;
    border: 1px solid #e3e8ef;
    border-radius: 26px;
    background: #fff;
    color: #3d4a5c;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .03);
    transition: border-color .3s ease, background-color .3s ease, color .3s ease;
}
.cr-filters button:hover { border-color: #a7b4c6; }
.cr-filters button[aria-pressed="true"] { border-color: #e91d2b; background: #fff5f5; color: #e91d2b; }
.cr-filters button:focus-visible { outline: 2px solid #e91d2b; outline-offset: 2px; }

.cr-role-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.cr-role {
    display: flex;
    flex-direction: column;
    padding: 30px 30px 26px;
    border: 1px solid #e7e8f0;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 0 rgba(0, 0, 0, .03);
    transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease;
}
.cr-role:hover { transform: translateY(-4px); border-color: rgba(233, 29, 43, .35); box-shadow: 0 16px 34px rgba(16, 39, 68, .10); }
.cr-role[hidden] { display: none; }
.cr-role-tag {
    align-self: flex-start;
    margin-bottom: 14px;
    padding: 4px 10px;
    border-radius: 20px;
    background: #fff1f2;
    color: #e91d2b;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.cr-role h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: -.02em;
    color: #102744;
}
.cr-role-meta { margin: 0 0 14px; font-size: 14px; color: #7a8799; }
.cr-role p.cr-role-desc { flex: 1 1 auto; margin: 0 0 22px; font-size: 15.5px; line-height: 1.65; color: #3d4a5c; }
.cr-role a {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #e91d2b;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
}
.cr-role a::after {
    content: "";
    width: 7px;
    height: 7px;
    border: solid currentColor;
    border-width: 0 1.5px 1.5px 0;
    transform: rotate(-45deg);
    transition: transform .3s ease;
}
.cr-role a:hover::after { transform: translateX(4px) rotate(-45deg); }

/* ---------- 3. life at Dynasty Max ---------- */
.cr-life {
    padding: 100px 0 90px;
    overflow: hidden;
    background: radial-gradient(closest-side at 50% 265%, #e91d2b 0, #102744 75%) #102744;
    color: #fff;
    text-align: center;
}
.cr-life h2 { color: #fff; }
.cr-life h3 {
    margin: 12px 0 0;
    font-size: clamp(18px, 1.8vw, 22px);
    font-weight: 500;
    letter-spacing: -.01em;
    color: rgba(255, 255, 255, .92);
}
.cr-life h3.cr-line::after { margin: 20px auto 24px; background: #ff6b75; }
.cr-life > .cr-wrap > p {
    max-width: 680px;
    margin: 0 auto;
    font-size: 17.5px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .85);
}

.cr-team-row { position: relative; margin: 60px 0 50px; }
.cr-team {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 4px 4px 16px;
    list-style: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 4px;
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.cr-team::-webkit-scrollbar { display: none; }
.cr-team li {
    position: relative;
    flex: 0 0 300px;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    scroll-snap-align: start;
    box-shadow: 0 12px 0 rgba(0, 0, 0, .12);
    text-align: left;
}
.cr-team li:nth-child(4n+1) { background: linear-gradient(58deg, #ffe1db 0, #defcf7 100%); }
.cr-team li:nth-child(4n+2) { background: linear-gradient(58deg, #d9ffff 0, #ffddd9 100%); }
.cr-team li:nth-child(4n+3) { background: linear-gradient(58deg, #ead7fa 0, #fcfcd7 100%); }
.cr-team li:nth-child(4n+4) { background: linear-gradient(58deg, #d4e1ff 0, #ffecd9 100%); }
.cr-team-txt { position: absolute; top: 30px; left: 28px; z-index: 1; max-width: 200px; color: #102744; }
.cr-team-txt strong { display: block; font-size: 22px; font-weight: 600; line-height: 1.3; letter-spacing: -.02em; }
.cr-team-txt strong::after { content: ""; display: block; width: 25px; height: 2px; margin: 10px 0 12px; background: #e91d2b; }
.cr-team-txt span { display: block; font-size: 14.5px; line-height: 1.5; color: #3d4a5c; }
.cr-team img {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 62%;
    height: 54%;
    object-fit: cover;
    border-radius: 10px 0 10px 0;
    transform-origin: bottom right;
    transition: transform .8s ease;
}
.cr-team li:hover img { transform: scale(1.1); }

.cr-team-nav {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-top: -29px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    background: rgba(16, 39, 68, .55);
    color: #fff;
    cursor: pointer;
    -webkit-backdrop-filter: blur(6px);
            backdrop-filter: blur(6px);
    transition: background-color .3s ease, opacity .3s ease;
}
.cr-team-nav:hover { background: #e91d2b; }
.cr-team-nav[disabled] { opacity: 0; pointer-events: none; }
.cr-team-nav.is-prev { left: -21px; }
.cr-team-nav.is-next { right: -21px; }
.cr-team-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }

.cr-btn.is-outline { background: transparent; border-color: rgba(255, 255, 255, .6); }
.cr-btn.is-outline:hover { background: #fff; border-color: #fff; color: #102744; box-shadow: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 1024px) {
    .cr-banner-con { flex-direction: column; align-items: center; text-align: center; }
    .cr-banner-lft, .cr-banner-rht { width: 100%; max-width: 720px; margin-top: 0; }
    .cr-banner-lft .cr-line::after { margin-inline: auto; }
    .cr-photos { margin-top: 60px; }
}
@media (max-width: 640px) {
    .cr-banner { padding: 60px 0 50px; }
    .cr-photos li { width: 200px; }
    .cr-roles { padding-bottom: 80px; }
    .cr-role-list { grid-template-columns: 1fr; }
    .cr-role { padding: 24px 22px 22px; }
    .cr-life { padding: 70px 0 70px; }
    .cr-team li { flex-basis: 260px; }
    .cr-team-nav { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .cr-photos ul { animation: none; }
    .cr-photos { overflow-x: auto; }
    .cr-team { scroll-behavior: auto; }
    .cr-team li:hover img { transform: none; }
}

/* ---------- dark theme ---------- */
html[data-theme="dark"] .cr-banner {
    background:
        linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px),
        transparent;
    background-size: 42px 42px, 42px 42px, auto;
    color: #fff;
}
html[data-theme="dark"] .cr-title { color: #fff; }
html[data-theme="dark"] .cr-title span { color: #aab2d8; }
html[data-theme="dark"] .cr-banner-rht p { color: #aab2d8; }
html[data-theme="dark"] .cr-photos img { background: rgba(255, 255, 255, .06); }

html[data-theme="dark"] .cr-roles { background: transparent; color: #fff; }
html[data-theme="dark"] .cr-roles h2 { color: #fff; }
html[data-theme="dark"] .cr-filters button {
    border-color: rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .04);
    color: #c9cee8;
}
html[data-theme="dark"] .cr-filters button:hover { border-color: rgba(255, 255, 255, .35); }
html[data-theme="dark"] .cr-filters button[aria-pressed="true"] { border-color: #0bcefc; background: rgba(11, 206, 252, .1); color: #0bcefc; }
html[data-theme="dark"] .cr-role {
    border-color: rgba(255, 255, 255, .11);
    background: rgba(255, 255, 255, .043);
    box-shadow: none;
    -webkit-backdrop-filter: blur(4px);
            backdrop-filter: blur(4px);
}
html[data-theme="dark"] .cr-role:hover { border-color: rgba(167, 139, 250, .45); box-shadow: 0 16px 34px rgba(0, 0, 0, .3); }
html[data-theme="dark"] .cr-role h3 { color: #fff; }
html[data-theme="dark"] .cr-role-meta { color: #8f98c0; }
html[data-theme="dark"] .cr-role p.cr-role-desc { color: #aeb5d8; }
html[data-theme="dark"] .cr-role-tag { background: rgba(167, 139, 250, .14); color: #c4b5fd; }
html[data-theme="dark"] .cr-role a { color: #0bcefc; }

html[data-theme="dark"] .cr-life {
    background: radial-gradient(closest-side at 50% 265%, #7c5cff 0, #131a3f 75%) #131a3f;
    border-block: 1px solid rgba(255, 255, 255, .08);
}
html[data-theme="dark"] .cr-life h3.cr-line::after { background: #0bcefc; }
html[data-theme="dark"] .cr-team-nav:hover { background: #7c5cff; }
