/* ==========================================================================
   Generali Central – Landing page styles

   Naming: BEM in kebab-case
     .block            standalone component      e.g. .plan-card
     .block__element   part of a component       e.g. .plan-card__label
     .block--modifier  variant of a component    e.g. .btn--primary

   Breakpoints (max-width): 991px tablet, 767px mobile

   Contents
     1. Fonts
     2. Base
     3. Layout
     4. Utilities
     5. Components (card, button, icon)
     6. Site header
     7. Challenge banner
     8. Insurance overview
     9. Insurance plans
    10. Contact
    11. Site footer
   ========================================================================== */

/* ==========================================================================
   1. Fonts
   ========================================================================== */

/* Icon font used for the contact and arrow icons */
@font-face {
  font-family: "icomoon";
  src: url("../fonts/icomoon.woff") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* The accessibility widget sizes its UI in rem, so the root size is pinned. */
html {
  font-size: 16px !important;
}

body {
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: #20252b;
  background-color: #fff;
}

img {
  display: block;
  max-width: 100%;
  border: 0;
}

ul {
  list-style: none;
}

/* Links never underline; hover feedback is colour-only */
a,
a:hover,
a:focus {
  color: #c52218;
  text-decoration: none;
}

h1,
h2,
h3 {
  font-weight: 400;
}

h2 {
  font-size: 48px;
  line-height: 60px;
}

h3 {
  font-size: 32px;
  line-height: 38px;
}

@media (max-width: 991px) {
  h2 {
    font-size: 40px;
    line-height: 52px;
  }

  h3 {
    font-size: 28px;
    line-height: 32px;
  }
}

@media (max-width: 767px) {
  h2 {
    font-size: 28px;
    line-height: 36px;
  }

  h3 {
    font-size: 22px;
    line-height: 140%;
  }
}

/* ==========================================================================
   3. Layout
   ========================================================================== */

/* Centred page wrapper.
   --page-gutter is the minimum space on each side. Above that, max-width
   still controls the layout, so a 1440px screen is unchanged. Around
   1280px the gutter keeps the content off the screen edges. */
.container {
  --page-gutter: 64px;
  width: 100%;
  max-width: min(1182px, calc(100% - (var(--page-gutter) * 2)));
  margin: 0 auto;
  padding: 0 15px;
}

/* Two-column row; sections stack the columns on smaller screens */
.grid {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -12px;
}

.grid__col {
  width: 50%;
  padding: 0 12px;
}

/* Tablets keep a smaller side gap than laptops */
@media (max-width: 991px) {
  .container {
    --page-gutter: 32px;
  }
}

@media (max-width: 767px) {
  .container {
    --page-gutter: 0px;
    padding: 0 16px;
  }
}

/* ==========================================================================
   4. Utilities
   ========================================================================== */

.text-light {
  font-weight: 300;
}

/* Brand red highlight inside headings */
.text-accent {
  color: #c21b17;
}

/* ==========================================================================
   5. Components
   ========================================================================== */

/* ---------- Card: white panel with soft shadow ---------- */
.card {
  background-color: #fff;
  border-radius: 5px;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.1);
}

/* ---------- Button ---------- */
.btn {
  position: relative;
  padding: 12px 20px;
  border: 0;
  border-radius: 4px;
  font-size: 14px;
  line-height: 110%;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn--primary {
  background-color: #c21b17;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}

.btn--primary:hover,
.btn--primary:focus {
  background-color: #9e1512;
  color: #fff;
}

/* ---------- Icon (icomoon glyphs) ---------- */
.icon {
  font-family: "icomoon" !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  line-height: 1;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon--email::before {
  content: "\e900";
}

.icon--call::before {
  content: "\e904";
}

.icon--whatsapp::before {
  content: "\e916";
}

.icon--chevron-right::before {
  content: "\e933";
}

/* ==========================================================================
   6. Site header – two brand logos separated by a divider
   ========================================================================== */

.site-header__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 17px 0;
  background-color: #fff;
}

/* Divider is absolutely positioned so it takes no width and both logo
   blocks stay equal */
.site-header__logo-item {
  position: relative;
  padding: 0 50px;
}

.site-header__logo-item:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background-color: rgba(194, 27, 23, 0.3);
}

.site-header__logo-link {
  display: block;
}

.site-header__logo {
  width: 92px;
  height: 51px;
}

/* Narrower gap so both logos fit on small phones */
@media (max-width: 767px) {
  .site-header__logo-item {
    padding: 0 24px;
  }
}

/* ==========================================================================
   7. Challenge banner – MSME Insurance Innovation Challenge hero
   ========================================================================== */

.challenge-banner {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 500px;
  overflow: hidden;
  background-color: #141414;
}

/* Wider than the rest of the page, but still inset by --page-gutter
   once the screen is near 1280px. */
.challenge-banner__container {
  max-width: min(1310px, calc(100% - (var(--page-gutter) * 2)));
}

/* Background photo; the photo already fades to dark on the left, so the
   overlay only darkens the text side very slightly. */
.challenge-banner__media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.08) 0%,
      rgba(0, 0, 0, 0) 50%
    ),
    url("../images/banners/hero-banner.jpg") right center / cover no-repeat;
}

.challenge-banner__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 700px;
  padding: 49px 0 48px;
  color: #fff;
}

/* Label above the title */
.challenge-banner__tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 23px;
  padding: 5px 10px;
  border-radius: 4px;
  background-color: #fff;
  color: #00526e;
  font-size: 13px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.challenge-banner__title {
  max-width: 724px;
  margin-bottom: 14px;
  color: #fff;
  font-size: 60px;
  font-weight: 500;
  line-height: 72px;
}

.challenge-banner__lead {
  max-width: 680px;
  margin-bottom: 10px;
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  line-height: 28px;
}

/* Key dates and prizes list */
.challenge-banner__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 25px;
}

.challenge-banner__meta-item {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #fff;
  font-size: 20px;
  font-weight: 400;
  line-height: 26px;
}

.challenge-banner__meta-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

/* Line break used only in the mobile layout */
.challenge-banner__meta-break {
  display: none;
}

/* Call-to-action buttons */
.challenge-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.challenge-banner__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.challenge-banner__btn--primary {
  border: 1px solid #fff;
  background-color: #fff;
  color: #c21b17;
}

.challenge-banner__btn--primary:hover,
.challenge-banner__btn--primary:focus {
  border-color: #f2f2f2;
  background-color: #f2f2f2;
  color: #c21b17;
}

.challenge-banner__btn--ghost {
  border: 1.5px solid #fff;
  background-color: transparent;
  color: #fff;
}

.challenge-banner__btn--ghost:hover,
.challenge-banner__btn--ghost:focus {
  background-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

@media (max-width: 991px) {
  /* Vertical overlay because the text spans the full width on tablet */
  .challenge-banner__media {
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.72) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        rgba(0, 0, 0, 0.4) 100%
      ),
      url("../images/banners/hero-banner.jpg") 65% center / cover no-repeat;
  }

  .challenge-banner__inner {
    max-width: 100%;
    padding: 52px 0 56px;
  }

  .challenge-banner__title {
    font-size: 40px;
    line-height: 50px;
  }

  .challenge-banner__lead {
    font-size: 18px;
    line-height: 26px;
  }

  .challenge-banner__meta-item {
    font-size: 18px;
    line-height: 24px;
  }
}

/* The mobile banner image is a 360x700 design export that already shows the
   text, so every size below is in --u (1/360 of the screen width) to keep
   the live text exactly over the image's text on any phone width. */
@media (max-width: 767px) {
  .challenge-banner {
    --u: calc(100vw / 360);
    align-items: flex-start;
    height: calc(700 * var(--u));
    min-height: 0;
  }

  .challenge-banner__media {
    background: url("../images/banners/mobile_hero_banner.png") center top / 100% 100% no-repeat;
  }

  .challenge-banner__container {
    padding: 0 calc(24 * var(--u));
  }

  .challenge-banner__inner {
    padding: calc(40 * var(--u)) 0 0;
  }

  .challenge-banner__tag {
    max-width: 100%;
    margin-bottom: calc(12 * var(--u));
    padding: calc(6 * var(--u));
    border-radius: calc(4 * var(--u));
    font-size: calc(10 * var(--u));
    line-height: calc(16 * var(--u));
    letter-spacing: 0;
    white-space: normal;
  }

  .challenge-banner__title {
    margin-bottom: calc(7 * var(--u));
    padding-left: calc(2 * var(--u));
    font-size: calc(32 * var(--u));
    font-weight: 700;
    line-height: calc(40 * var(--u));
  }

  .challenge-banner__title br {
    display: none;
  }

  .challenge-banner__lead {
    margin-bottom: calc(11 * var(--u));
    font-size: calc(16 * var(--u));
    line-height: calc(70 * var(--u) / 3);
  }

  .challenge-banner__meta {
    gap: calc(10 * var(--u));
    margin-bottom: calc(23 * var(--u));
  }

  .challenge-banner__meta-item {
    align-items: flex-start;
    gap: calc(8 * var(--u));
    font-size: calc(15 * var(--u));
    font-weight: 500;
    line-height: calc(21.5 * var(--u));
  }

  .challenge-banner__meta-icon {
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    margin-top: calc(1 * var(--u));
    margin-left: calc(-4 * var(--u));
  }

  .challenge-banner__meta-item + .challenge-banner__meta-item .challenge-banner__meta-icon {
    margin-top: 0;
  }

  .challenge-banner__meta-break {
    display: inline;
  }

  .challenge-banner__actions {
    flex-wrap: nowrap;
    gap: calc(12 * var(--u));
  }

  .challenge-banner__btn {
    flex: 1 1 50%;
    min-width: 0;
    height: calc(44 * var(--u));
    padding: 0 calc(12 * var(--u));
    border-radius: calc(22 * var(--u));
    font-size: calc(14 * var(--u));
    font-weight: 700;
    letter-spacing: 0;
  }
}

/* ==========================================================================
   8. Insurance overview – red band with General / Life insurance cards
   ========================================================================== */

/* The cards sit fully inside the red band */
.overview {
  position: relative;
  padding: 58px 0;
  background-color: #c21b17;
}

/* Darker curved shape on the right. The top ~27% of the image is transparent
   apart from a thin line, so the image starts above the section to bring the
   shape's crest just below the top edge. */
.overview::before {
  content: "";
  position: absolute;
  top: -97px;
  right: 0;
  width: 500px;
  height: 392px;
  background: url("../images/banners/overview-shape.png") no-repeat right bottom / contain;
  pointer-events: none;
}

/* Keeps the title and cards above the shape */
.overview__container {
  position: relative;
  z-index: 1;
}

.overview__title {
  margin-bottom: 34px;
  color: #fff;
  text-align: center;
}

/* ---------- Overview card ---------- */
.overview-card {
  height: 100%;
  padding: 32px 36px 33px;
}

.overview-card__inner {
  display: flex;
  flex-wrap: wrap;
  height: 100%;
}

.overview-card__media {
  width: 128px;
}

.overview-card__image {
  width: 100%;
}

/* Bottom padding leaves room for the absolutely positioned button */
.overview-card__body {
  position: relative;
  width: calc(100% - 128px);
  padding-left: 20px;
  padding-bottom: 64px;
}

.overview-card__title {
  margin-bottom: 12px;
  font-weight: 300;
}

.overview-card__text {
  color: #20252b;
  font-size: 16px;
  font-weight: 300;
  line-height: 140%;
}

/* The design uses an em dash on desktop and a spaced hyphen on mobile */
.overview-card__dash--mobile {
  display: none;
}

.overview-card__action {
  position: absolute;
  bottom: 0;
  left: 20px;
  padding-top: 24px;
}

.overview-card__btn {
  display: flex;
  justify-content: center;
  min-width: 172px;
}

@media (max-width: 991px) {
  .overview {
    padding: 40px 0;
  }

  .overview::before {
    top: -82px;
    width: 420px;
    height: 330px;
  }

  .overview__grid {
    display: block;
    margin: 0;
  }

  .overview__col {
    width: 100%;
    margin-top: 12px;
    padding: 0;
  }

  .overview__col:first-child {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .overview {
    padding: 42px 0 40px;
  }

  /* The design squashes the shape vertically on mobile */
  .overview::before {
    top: 0px;
    width: 130px;
    height: 90px;
    background-size: 100% 100%;
  }

  .overview__container {
    padding: 0 20px;
  }

  /* Breaks the title after "protection," as in the design */
  .overview__title {
    max-width: 280px;
    margin: 0 auto 22px;
  }

  .overview-card__text {
    font-size: 14px;
    line-height: 20px;
  }

  .overview-card {
    padding: 27px 16px 24px 24px;
  }

  /* Button moves below the image and text */
  .overview-card__inner {
    position: relative;
    padding-bottom: 63px;
  }

  .overview-card__media {
    width: 72px;
    margin-top: -2px;
  }

  .overview-card__body {
    position: static;
    width: calc(100% - 72px);
    padding-bottom: 0;
  }

  /* "General Insurance" is ~2px wider than the text column, as in the design */
  .overview-card__title {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 100%;
    white-space: nowrap;
  }

  .overview-card__dash {
    display: none;
  }

  .overview-card__dash--mobile {
    display: inline;
  }

  .overview-card__action {
    left: 0;
  }

  .overview-card__btn {
    min-width: 158px;
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

/* ==========================================================================
   9. Insurance plans – two lists of plan links
   ========================================================================== */

.plans {
  padding: 60px 0 50px;
  background-color: #fff;
}

.plans__grid {
  margin: 0;
}

/* Divider between the two plan columns; a shadow so it takes no width and
   both columns stay equal */
.plans__col {
  position: relative;
  padding: 0 0 0 36px;
}

.plans__col:first-child {
  padding: 0 36px 0 0;
}

.plans__col:first-child::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background-color: rgba(194, 27, 23, 0.3);
}

.plans__title {
  margin-bottom: 26px;
  text-align: center;
}

.plan-list__item + .plan-list__item {
  margin-top: 15px;
}

/* ---------- Plan card (whole card is a link) ---------- */
.plan-card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 81px;
  padding: 10px 55px 10px 30px;
}

.plan-card:hover .plan-card__label,
.plan-card:focus .plan-card__label {
  color: #c21b17;
}

.plan-card:hover .plan-card__arrow,
.plan-card:focus .plan-card__arrow {
  background-color: #c21b17;
  color: #fff;
}

.plan-card__icon {
  min-width: 62px;
  max-width: 62px;
  margin-right: 22px;
}

.plan-card__label {
  color: #20252b;
  font-size: 20px;
  line-height: 120%;
}

/* Round arrow badge on the right */
.plan-card__arrow {
  position: absolute;
  top: 50%;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: #ffeded;
  color: #c21b17;
  font-size: 10px;
  line-height: 8px;
  transform: translateY(-50%);
  transition: all 0.3s;
}

.plan-card__arrow .icon {
  line-height: 8px;
}

@media (max-width: 991px) {
  .plans {
    padding: 50px 0;
  }

  .plans__grid {
    display: block;
    margin: 0;
  }

  .plans__col,
  .plans__col:first-child {
    width: 100%;
    margin-top: 40px;
    padding: 0;
  }

  .plans__col:first-child::after {
    content: none;
  }

  .plans__col:first-child {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .plans {
    padding: 40px 0;
  }

  .plans__title {
    margin-bottom: 20px;
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -0.02em;
  }

  .plan-list__item + .plan-list__item {
    margin-top: 12px;
  }

  .plan-card {
    min-height: 60px;
    padding-right: 50px;
    padding-left: 22px;
  }

  .plan-card__icon {
    min-width: 40px;
    max-width: 40px;
    margin-right: 12px;
  }

  .plan-card__label {
    font-size: 16px;
  }

  .plan-card__arrow {
    right: 22px;
  }
}

/* ==========================================================================
   10. Contact – support details for each company
   ========================================================================== */

.contact {
  padding: 53px 0 59px;
  background-color: #f3f9ff;
}

.contact__title {
  margin-bottom: 24px;
  text-align: center;
}

/* ---------- Contact card ---------- */
.contact-card {
  height: 100%;
  padding: 24px 40px;
}

/* Underline only as wide as the heading text */
.contact-card__title {
  width: fit-content;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(194, 27, 23, 0.3);
}

.contact-list__item + .contact-list__item {
  margin-top: 32px;
}

.contact-list__link {
  display: inline-flex;
  align-items: center;
  vertical-align: top;
  color: #20252b;
  font-size: 20px;
  line-height: 120%;
}

.contact-list__link:hover,
.contact-list__link:focus {
  color: #c21b17;
}

.contact-list__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  max-width: 24px;
  height: 24px;
  margin-right: 14px;
  color: #c21b17;
  font-size: 20px;
}

/* The font draws these glyphs smaller than the call glyph; scaled to match
   the design's icon sizes. Overflow stays centred in the 24px box. */
.contact-list__icon::before {
  line-height: 24px;
}

.contact-list__icon.icon--email::before {
  font-size: 1.2em;
}

.contact-list__icon.icon--whatsapp::before {
  font-size: 1.08em;
}

@media (max-width: 991px) {
  .contact__grid {
    display: block;
    margin: 0;
  }

  .contact__col {
    width: 100%;
    margin-top: 16px;
    padding: 0;
  }

  .contact__col:first-child {
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  .contact {
    padding: 40px 0;
  }

  .contact__title .text-accent {
    display: block;
  }

  .contact-card {
    padding: 20px 24px 24px;
  }

  .contact-card__title {
    margin-bottom: 20px;
    padding-bottom: 8px;
  }

  .contact-list__item + .contact-list__item {
    margin-top: 24px;
  }

  .contact-list__link {
    font-size: 18px;
  }

  .contact-list__icon {
    margin-right: 12px;
  }
}

/* ==========================================================================
   11. Site footer – legal and registration details
   ========================================================================== */

.site-footer {
  padding: 40px 0;
  background-color: #454f58;
}

.site-footer__text {
  color: #ccc;
  font-size: 14px;
  font-weight: 300;
  line-height: 24px;
}

.site-footer__text + .site-footer__text {
  margin-top: 24px;
}

/* Boxed fraud warning */
.site-footer__text + .site-footer__notice {
  margin-top: 16px;
}

.site-footer__notice {
  padding: 12px 20px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Note below the warning box */
.site-footer__text + .site-footer__disclaimer {
  margin-top: 8px;
}

@media (min-width: 1200px) {
  .site-footer__container {
    max-width: min(1152px, calc(100% - (var(--page-gutter) * 2)));
  }
}

@media (max-width: 767px) {
  .site-footer {
    padding: 32px 0;
  }

  .site-footer__container {
    padding: 0 24px;
  }
}
