/* Examinations page: the site's own navy, royal blue, orange and light blue. */

.exams {
    background: var(--white);
}

.exams__head {
    max-width: 48rem;
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.exams__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    padding: 0;
    list-style: none;
    counter-reset: none;
}

.exam-rule {
    position: relative;
    overflow: hidden;
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--indigo-700);
    border-radius: 1rem;
    background: var(--cream);
}

.exam-rule--strict {
    border-left-color: var(--orange-500);
    background: #fffaf5;
    border-color: #fbe3cc;
    border-left-color: var(--orange-500);
}

.exam-rule__no {
    position: absolute;
    top: 0.75rem;
    right: 1.25rem;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
    color: rgba(31, 79, 216, 0.1);
}

.exam-rule--strict .exam-rule__no {
    color: rgba(249, 115, 22, 0.16);
}

.exam-rule__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: var(--indigo-100);
    color: var(--indigo-700);
}

.exam-rule--strict .exam-rule__icon {
    background: #ffe9d6;
    color: var(--orange-600);
}

.exam-rule h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
    color: var(--navy-900);
}

.exam-rule p {
    font-size: 1rem;
    line-height: 1.7;
    color: #44516b;
}

@media (max-width: 760px) {
    .exams__list {
        grid-template-columns: minmax(0, 1fr);
    }

    .exam-rule {
        padding: 1.5rem 1.25rem;
    }
}

/* Three columns on desktop (six rules = two rows), two on tablet, one on phone. */
.exams__list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1000px) {
    .exams__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .exams__list { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Examination rules, redesigned: soft blue panels, round icon, faint numeral, corner triangle ---- */
.exam-rule,
.exam-rule--strict {
    padding: clamp(1.5rem, 3vw, 2rem);
    border: 0;
    border-radius: 1.5rem;
    background: linear-gradient(160deg, #f3f8ff 0%, #e4eeff 100%);
    transition: transform 0.35s var(--ease), box-shadow 0.3s var(--ease);
}

.exam-rule:hover { transform: translateY(-6px); box-shadow: 0 18px 30px -22px rgba(11, 31, 77, 0.45); }

/* Blue triangle in the lower-right corner. */
.exam-rule::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 3.25rem;
    height: 3.25rem;
    background: var(--indigo-600);
    opacity: 0.55;
    clip-path: polygon(100% 0, 100% 100%, 0 100%);
    border-bottom-right-radius: 1.5rem;
    transition: width 0.3s var(--ease), height 0.3s var(--ease);
}

.exam-rule:hover::after { width: 4.5rem; height: 4.5rem; }

.exam-rule__no,
.exam-rule--strict .exam-rule__no {
    top: 0.5rem;
    right: 1.25rem;
    font-size: clamp(3.25rem, 2.5rem + 2.4vw, 4.5rem);
    font-weight: 800;
    color: rgba(31, 79, 216, 0.14);
}

.exam-rule__icon,
.exam-rule--strict .exam-rule__icon {
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    background: var(--indigo-700);
    color: var(--white);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.exam-rule:hover .exam-rule__icon { transform: rotate(-8deg) scale(1.08); }

/* A short rule above the title. */
.exam-rule h3 {
    margin-bottom: 0.75rem;
    padding-top: 1rem;
    border-top: 2px solid var(--indigo-600);
    width: fit-content;
    min-width: 3rem;
    font-size: 1.375rem;
    font-weight: 800;
}

.exam-rule__body { position: relative; z-index: 1; }
.exam-rule p { font-size: 1.0625rem; color: #44516b; }

@media (prefers-reduced-motion: reduce) {
    .exam-rule,
    .exam-rule::after,
    .exam-rule__icon { transition: none; }
    .exam-rule:hover,
    .exam-rule:hover .exam-rule__icon { transform: none; }
}

.exam-rule h3 { padding-top: 0; border-top: 0; width: auto; }
.exam-rule h3::before { content: ""; display: block; width: 2.5rem; height: 2px; margin-bottom: 0.875rem; background: var(--indigo-600); }

/* Second colour: every other card is orange, from the site's palette. */
.exam-rule--strict { background: linear-gradient(160deg, #fff8f1 0%, #ffe9d6 100%); }
.exam-rule--strict::after { background: var(--orange-500); }
.exam-rule--strict .exam-rule__no { color: rgba(249, 115, 22, 0.16); }
.exam-rule--strict .exam-rule__icon { background: var(--orange-500); color: var(--white); }
.exam-rule--strict h3::before { background: var(--orange-500); }
