/* ==========================================================
   EVALUE — homepage styles
   1. Theme and base   2. Header   3. Sections   4. Footer
   5. Responsive layout   6. Accessibility
   ========================================================== */

/* 1. Theme and base */
:root {
  --color-blue: #0a3a7d;
  --color-accent: #bb133e;
  --color-burgundy: #7a0724;
  --color-text: #0d0d0d;
  --color-white: #fff;
  --color-border: #e3e8ef;
  --font-body: "Open Sans", Arial, sans-serif;
  --content-width: 1224px;
  --section-space: clamp(48px, 6vw, 88px);
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--color-text); background: var(--color-white); font-family: var(--font-body); font-size: 18px; line-height: 1.72; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 4px; }
button, summary { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin: 0 0 24px; }
h1, h2, h3 { line-height: 1.3; }
h1 { font-size: clamp(32px, 3.8vw, 48px); color: var(--color-blue); }
h2 { font-size: clamp(26px, 2.5vw, 32px); }
h3 { font-size: 24px; text-transform: uppercase; }
.container { width: min(var(--content-width), calc(100% - 48px)); margin-inline: auto; }

/* 2. Header and dropdowns */
.site-header { position: relative; z-index: 10; background: white; }
.header-inner { min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { flex-shrink: 0; }
.brand img { width: 110px; height: 88px; object-fit: contain; font-size: 16px; }
.nav-list, .dropdown-panel { padding: 0; margin: 0; list-style: none; }
.nav-list { display: flex; align-items: center; gap: 26px; font-size: 16px; }
.nav-list a { text-decoration: none; }
.nav-list a:hover, .nav-list a[aria-current="page"] { color: var(--color-accent); }
.dropdown { position: relative; }
.dropdown summary { cursor: pointer; padding-block: 12px; }
.dropdown-panel { position: absolute; right: 0; top: 100%; width: max-content; max-width: min(340px, 85vw); padding: 12px; background: white; color: var(--color-text); border: 1px solid var(--color-border); border-radius: 6px; box-shadow: 0 12px 30px #10243b1a; }
.dropdown-panel a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.flag { display: inline-block; width: 24px; height: 18px; vertical-align: middle; object-fit: cover; }
.menu-toggle { border: 1px solid var(--color-blue); border-radius: 4px; background: white; color: var(--color-blue); padding: 8px 16px; cursor: pointer; }
.menu-toggle[hidden] { display: none; }

/* 3. Page sections */
.section { padding-block: var(--section-space); }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(32px, 6vw, 82px); }
.section-copy { min-width: 0; }
.eyebrow { color: var(--color-accent); font-size: clamp(20px, 2.2vw, 28px); line-height: 1.4; font-weight: 700; }
.section-photo { width: 100%; max-width: 503px; height: auto; aspect-ratio: 503 / 506; object-fit: cover; justify-self: center; }
.hero-photo { border-radius: 50px; }
.section-photo--round { border-radius: 50%; object-position: 50% 47%; }
.section--blue { background: var(--color-blue); color: white; }
.section--burgundy { background: var(--color-burgundy); color: white; }
.section--blue .eyebrow, .section--burgundy .eyebrow { color: inherit; }
.section--burgundy .eyebrow { font-size: 24px; }
.button-group { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 36px; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 52px; padding: 12px 28px; border: 2px solid transparent; border-radius: 999px; background: var(--color-blue); color: white; text-decoration: none; text-align: center; font-size: 14px; font-weight: 700; line-height: 1.5; transition: background-color .2s; }
.button:hover { background: var(--color-accent); }
.button--accent { background: var(--color-accent); }
.button--accent:hover { background: var(--color-burgundy); }
.button--outline { background: transparent; border-color: white; }
.button--small { border-radius: 4px; font-size: 17px; min-height: 44px; padding: 8px 22px; }
.section-intro { max-width: 620px; margin: 0 auto 48px; }
.section-intro h2 { text-align: center; color: var(--color-accent); }
.round-logo { margin: 0 auto 24px; border-radius: 50%; object-fit: contain; }
.service-row { display: grid; grid-template-columns: minmax(0, 640px) 1fr; align-items: center; gap: 64px; padding: 48px 36px; }
.service-row + .service-row { border-top: 1px solid var(--color-border); }
.service-icon { width: 162px; height: 162px; justify-self: center; padding: 18px; }
.narrow { max-width: 850px; }
.business-description { font-size: 14px; line-height: 1.65; padding-block: 48px; }
.business-description p { margin: 0; }

/* 4. Footer */
.site-footer { background: var(--color-blue); color: white; padding-block: 48px; font-size: 16px; }
.footer-grid { display: grid; grid-template-columns: .8fr 1.1fr 1.15fr 1fr; gap: 36px; }
.site-footer h2 { font-size: 22px; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer a:hover { color: #e1eaff; }
.site-footer address { font-style: normal; overflow-wrap: anywhere; }
.footer-brand > img { object-fit: contain; }
.social-links { display: flex; gap: 16px; margin-top: 20px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 32px; }
.social-links svg { width: 20px; height: 20px; fill: currentColor; }
.social-links svg[fill="none"] { fill: none; }

/* 5. Responsive layout */
@media (max-width: 1100px) {
  .header-inner { flex-wrap: wrap; gap: 16px; padding-block: 16px; }
  .primary-nav { width: 100%; }
  .nav-list { flex-wrap: wrap; gap: 8px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 761px) {
  .menu-toggle { display: none; }
}

@media (max-width: 760px) {
  .container { width: calc(100% - 32px); }
  .header-inner { min-height: 100px; }
  .brand img { width: 66px; height: 52px; }
  .nav-list { align-items: stretch; flex-direction: column; gap: 0; }
  .nav-list > li > a { display: block; padding-block: 10px; }
  .primary-nav[data-collapsed="true"] { display: none; }
  .dropdown-panel { position: static; width: 100%; max-width: none; box-shadow: none; margin-bottom: 8px; }
  .split-layout { grid-template-columns: 1fr; gap: 32px; }
  .hero-photo { grid-row: 1; border-radius: 32px; }
  .section-photo { max-width: 420px; }
  .hero .section-copy { text-align: center; }
  .button-group { justify-content: center; }
  .service-row { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; }
  .service-icon { width: 108px; height: 108px; grid-row: 1; }
  .service-row h3 { font-size: 22px; }
  .section--burgundy h2 { font-size: 26px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .button-group { flex-direction: column; align-items: stretch; }
}

/* 6. Accessibility */
:focus-visible { outline: 3px solid #d99c20; outline-offset: 5px; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 20; background: white; color: var(--color-blue); padding: 12px 20px; }
.skip-link:focus { top: 10px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* Spanish navigation labels need room to wrap at intermediate widths. */
html[lang="es"] .primary-nav { min-width: 0; }
html[lang="es"] .nav-list { flex-wrap: wrap; }
