/* ==========================================================================
   Easy Mortgages by Haig - site styles
   Breakpoints: phone <= 767px, tablet 768-1024px, desktop >= 1025px.
   The header switches to the menu button at <= 921px.
   ========================================================================== */

:root {
  --text: #000f23;
  --accent: #e05414;
  --button: #e06126;
  --button-hover: #e04700;
  --hero-heading: #d7a993;
  --overlay: rgba(0, 15, 35, 0.65);
  --menu-bg: #f9f9f9;
  --menu-border: #dddddd;
  --cookie-bg: #cecece;
  --legal-bg: #eaeaea;
  --legal-link: #1e73be;
  --font-body: "Open Sans", sans-serif;
  --font-heading: "Montserrat", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.65em;
}

img { max-width: 100%; height: auto; border: 0; vertical-align: middle; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3, h4, h5, h6, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.visually-hidden,
.skip-link:not(:focus) {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}
.skip-link:focus {
  position: absolute; top: 10px; left: 10px; z-index: 100;
  padding: 10px 20px; background: #fff; color: var(--text);
  box-shadow: 0 0 4px rgba(0, 0, 0, .4);
}

/* Show/hide helpers for content that differs by screen size */
@media (min-width: 1025px) { .hide-desktop { display: none !important; } }
@media (min-width: 768px) and (max-width: 1024px) { .hide-tablet { display: none !important; } }
@media (max-width: 767px) { .hide-phone { display: none !important; } }

/* ---------- Cookie notice ---------- */

.cookie-notice {
  padding: 16px 32px;
  background: var(--cookie-bg);
  color: #000;
  font-size: 16px;
}
.cookie-notice[hidden] { display: none; }
.cookie-close {
  margin-left: 8px;
  padding: 4px 8px;
  border-radius: 5px;
  background: #f5f5f5;
  color: #000;
  font-weight: 700;
}

/* ---------- Header ---------- */

.site-header {
  padding: 1em 0;
  background: #fff;
}
.header-inner {
  display: flex;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-logo { display: block; flex-shrink: 0; line-height: 1; }
.site-logo img { display: block; width: 130px; height: 86px; }

.site-nav { margin-left: auto; }
.site-nav ul { display: flex; }
.site-nav a {
  display: block;
  padding: 0 15px;
  color: var(--text);
  line-height: 60px;
}
.site-nav a:hover,
.site-nav a:focus,
.site-nav a.current { color: var(--accent); }

.header-actions { display: flex; align-items: center; }

.btn-apply {
  display: block;
  margin: 0 15px;
  padding: 10px 30px;
  border-radius: 50px;
  background: var(--button);
  color: #fff;
  white-space: nowrap;
}
.btn-apply:hover,
.btn-apply:focus { background: var(--button-hover); color: #fff; }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 3em;
  height: 3.15em;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  cursor: pointer;
}
.menu-toggle svg { width: 1.5em; height: 1.5em; fill: currentColor; }
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] .icon-open { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 25px 25px 0;
  background: url("../images/hero-bg.jpg") center bottom / cover no-repeat;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--overlay);
}
.hero-inner {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
}
.hero-content {
  width: 60%;
  padding-top: 30px;
}

.hero-title {
  margin-bottom: 60px;
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  text-transform: capitalize;
}
.hero-title a { color: var(--hero-heading); }

/* Logo + name row */
.profile { display: flex; align-items: center; }
.profile-logo,
.profile-name { padding: 10px; }
.profile-logo { flex: none; width: 36.55%; min-width: 220px; }
.profile-name { flex: 1; min-width: 0; }
.profile-logo img { width: 200px; }

.profile-name h2 {
  margin-bottom: 20px;
  font-family: var(--font-heading);
  font-size: 1.3334em;
  font-weight: 800;
  line-height: 1;
  text-transform: capitalize;
}
.profile-name h2 a { color: #fff; }
.profile-name p {
  margin-bottom: 16px;
  font-size: 10px;
}
.profile-name p a { color: #fff; }

.divider { display: flex; padding: 25px 0; margin-bottom: 20px; }
.divider span { width: 50px; border-top: 5px solid var(--accent); }

.tagline {
  color: #fff;
  font-size: 25px;
  line-height: 1.5em;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 20px;
  background: #fff;
  border-top: 1px solid rgba(93, 114, 128, 0.15);
  text-align: center;
  line-height: 1.85714em;
}
.social {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 15px;
  padding-bottom: 9px;
}
.social a { display: block; color: var(--text); line-height: 0; }
.social svg { fill: currentColor; }

.legal-links {
  background: var(--legal-bg);
  text-align: center;
}
.legal-links a {
  color: var(--legal-link);
  font-family: Arial, sans-serif;
  font-size: 16px;
}
.legal-links a:hover,
.legal-links a:focus { color: var(--accent); text-decoration: underline; }
.legal-links .sep {
  margin: 0 15px;
  color: var(--legal-bg);
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

/* ---------- Inner pages: content container and page banner ---------- */

.container {
  max-width: 1140px;
  margin: 0 auto;
}

/* ---------- Page banner ---------- */

.page-banner { background: #622e2c; }
.page-banner .container { display: flex; align-items: center; }
.page-banner-title {
  width: 84.887%;
  padding: 10px;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 25px;
  font-weight: 800;
  line-height: 1;
  text-transform: capitalize;
}
.page-banner-logo { width: 15%; padding: 10px; text-align: right; }
.page-banner-logo img { width: 100%; }


@media (max-width: 1024px) {
  .container { max-width: 1024px; }
  .page-banner-title { width: 80%; }
  .page-banner-logo { width: 20%; }
}
@media (max-width: 767px) {
  .page-banner-title { width: 60%; font-size: 20px; }
  .page-banner-logo { width: 40%; }
}

/* ==========================================================================
   Desktop only (>= 1025px)
   ========================================================================== */

@media (min-width: 1025px) {
  .hero { background-attachment: fixed; }
}

/* ==========================================================================
   Tablet and below (<= 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
  .hero { padding: 25px 50px 0; }
  .hero-content { width: 65%; padding: 0 0 5px; }
  .hero-title { font-size: 1.3334em; }
  .profile-logo { width: 52%; }
  .tagline { font-size: 15px; }
}

/* Narrow desktops: tighten the menu so it stays on one line */
@media (min-width: 922px) and (max-width: 1100px) {
  .site-nav a { padding: 0 10px; white-space: nowrap; }
  .btn-apply { margin: 0 0 0 10px; padding: 10px 24px; }
}

/* ==========================================================================
   Mobile header (<= 921px)
   ========================================================================== */

@media (max-width: 921px) {
  .header-inner { flex-wrap: wrap; padding: 0; }
  /* the logo shrinks on very narrow phones so the header stays on one row */
  .site-logo { flex: 1 1 0; min-width: 0; max-width: 130px; margin: 0 10px 0 20px; }
  .site-logo img { width: 100%; height: auto; }
  .header-actions { flex: none; margin-left: auto; margin-right: 20px; gap: 1em; }
  .btn-apply { margin: 0; }
  .menu-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    order: 3;
    width: 100%;
    margin: 0;
    background: var(--menu-bg);
    border-top: 1px solid var(--menu-border);
  }
  .site-nav ul { display: block; }
  .site-nav a {
    padding: 0 20px;
    border-bottom: 1px solid var(--menu-border);
    line-height: 3em;
  }
  .site-header.menu-open { padding-bottom: 0; }
  .site-header.menu-open .site-nav { display: block; }
}

/* ==========================================================================
   Phone (<= 767px)
   ========================================================================== */

@media (max-width: 767px) {
  .hero { padding: 20px 25px 0; }
  .hero-content { width: 100%; padding: 0; text-align: center; }

  .hero-title { margin-bottom: 20px; }
  .hero-title span { display: block; }
  .hero-title span + span + span { margin-top: 20px; }
  .hero-title .hero-title-sep { display: none; }

  .profile { display: block; }
  .profile-logo { width: 100%; min-width: 0; }

  .divider { justify-content: center; padding: 15px 0; }
  .tagline { font-size: 14px; }

  .site-footer { padding: 27.4px 20px 28px; }
  .social { margin-top: 1em; padding-bottom: 7px; }
}

/* Small phones: slightly smaller base text, as on the original site */
@media (max-width: 544px) {
  body { font-size: 13.68px; }
}
