/* =======================================================================
   Scandinavian Clean Style for Polys Numisma
   Author: Senior CSS Developer & UI Designer
   ======================================================================= */

/* CSS RESET & BASELINE NORMALIZE */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup,
main, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: #F5F2EB;
  color: #2C3A47;
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  font-size: 16px;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: #2C3A47;
  text-decoration: none;
  transition: color 0.2s;
}
a:focus, a:hover {
  color: #C9B174;
  outline: none;
}

/* ==== Scandinavian-inspired Variables w/ fallback ==== */
:root {
  --brand-primary: #2C3A47;
  --brand-secondary: #C9B174;
  --brand-accent: #F5F2EB;
  --brand-white: #fff;
  --brand-shadow: 0 2px 16px rgba(44, 58, 71,0.08);
  --radius-lg: 18px;
  --radius: 8px;
  --spacing-8: 8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --shadow-card: 0 4px 12px rgba(44,58,71,0.06);
  --shadow-active: 0 2px 8px rgba(44,58,71,0.12);
}

/* ==== Typography - Scandinavian Clean, Hierarchy ==== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', 'Times New Roman', serif;
  font-weight: 600;
  color: #2C3A47;
  letter-spacing: 0.01em;
}
h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
  line-height: 1.15;
}
h2 {
  font-size: 2rem;
  margin-bottom: 14px;
  line-height: 1.2;
}
h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-weight: 500;
}
h4, h5, h6 {
  font-size: 1.1rem;
  margin-bottom: 6px;
  font-weight: 400;
}
p, ul, ol {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  margin-bottom: 1.15em;
  color: #2C3A47;
}
.lead, .text-lead {
  font-size: 1.18rem;
  color: #524A36;
  font-weight: 400;
  margin-bottom: 24px;
}
strong {
  color: #2C3A47;
  font-weight: bold;
}

/* =================== Layout Containers =================== */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.text-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 700px;
}

/* ==== CRITICAL SPACING & SECTION ===== */
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: transparent;
}
.feature-grid, .team-bios, .blog-snippets, .education-snippets, .benefits-list, .education-list, .faq-list, .value-list, .feature-list {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card, .bio-card, .blog-post {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 20px 20px 20px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: box-shadow 0.2s, transform 0.18s;
}
.card:focus-within, .card:hover, .bio-card:focus-within, .bio-card:hover, .blog-post:focus-within, .blog-post:hover {
  box-shadow: var(--shadow-active);
  transform: translateY(-3px) scale(1.01);
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.content-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}
.text-image-section {
  display: flex;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
}

.testimonial-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  background: #fff;
  color: #2C3A47;
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  font-size: 1rem;
  transition: box-shadow 0.2s, transform 0.16s;
}
.testimonial-card:hover {
  box-shadow: var(--shadow-active);
  transform: translateY(-2px) scale(1.01);
}
.testimonial-card p {
  color: #2C3A47;
  font-size: 1.08rem;
  font-style: italic;
}
.testimonial-card span {
  color: #8C856D;
  font-size: 0.97rem;
  font-family: 'Roboto', Arial, sans-serif;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px 18px 18px 18px;
  flex: 1 1 220px;
  min-width: 200px;
  transition: box-shadow 0.2s, transform 0.18s;
}
.feature-item img {
  width: 40px;
  height: 40px;
  margin-bottom: 7px;
  border-radius: 8px;
  background: #F5F2EB;
}
.feature-item h3 {
  font-size: 1.18rem;
  margin-bottom: 6px;
}
.feature-item:hover {
  box-shadow: var(--shadow-active);
  transform: translateY(-3px) scale(1.016);
}

.team-bios {
  gap: 24px;
}
.bio-card {
  min-width: 200px;
  max-width: 300px;
  flex: 1 1 220px;
}

.map-placeholder {
  margin-top: 18px;
  border-radius: var(--radius);
  background: #EAE4D7;
  padding: 18px;
  color: #2C3A47;
  font-size: 1.01rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
  font-size: 1rem;
}
.contact-details img {
  display: inline-block;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: middle;
}

.faq-list {
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
}
.value-list {
  flex-direction: column;
  gap: 16px;
  margin-bottom: 18px;
}
.value-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0 12px 0;
  font-size: 1.01rem;
  border-bottom: 1px solid #E9E3C7;
}
.value-list li img {
  width: 26px;
  height: 26px;
}

.benefits-list, .education-list, .feature-list {
  flex-direction: column;
  gap: 12px;
}

.featured-categories {
  margin-top: 16px;
  font-size: 0.97rem;
  color: #867C60;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  align-items: center;
}
.featured-categories a {
  color: #2C3A47;
  background: #EAE4D7;
  border-radius: 6px;
  padding: 2px 8px;
  margin-right: 5px;
  transition: background 0.15s;
}
.featured-categories a:hover {
  background: #C9B174;
  color: #fff;
}

.commitment-statement {
  font-style: italic;
  color: #866E3D;
  font-size: 1.1rem;
  margin-top: 16px;
}

/* =================== HEADER ================ */
header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(44, 58, 71, 0.03);
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  gap: 16px;
}
.logo img {
  height: 48px;
}
.main-nav {
  display: flex;
  gap: 24px;
}
.main-nav a {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.08rem;
  padding: 8px 2px;
  border-radius: 3px;
  color: #2C3A47;
  transition: color 0.18s, background 0.2s;
  position: relative;
}
.main-nav a:after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: #C9B174;
  transition: width .25s ease;
  position: absolute;
  bottom: 0; left: 0;
}
.main-nav a:hover:after, .main-nav a:focus:after {
  width: 100%;
}
.main-nav a:hover, .main-nav a:focus {
  color: #C9B174;
  background: #F5F2EB;
}

.btn-primary, .btn-secondary {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1.08rem;
  font-weight: 500;
  padding: 12px 26px;
  border-radius: 18px;
  border: none;
  outline: none;
  cursor: pointer;
  margin-left: 24px;
  text-align: center;
  transition: background 0.15s, color 0.16s, box-shadow 0.15s, transform 0.16s;
  box-shadow: 0 2px 8px rgba(44, 58, 71, 0.07);
  display: inline-block;
}
.btn-primary {
  background: #2C3A47;
  color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
  background: #C9B174;
  color: #2C3A47;
  transform: translateY(-2px) scale(1.03);
}
.btn-secondary {
  background: #fff;
  border: 1.5px solid #C9B174;
  color: #2C3A47;
}
.btn-secondary:hover, .btn-secondary:focus {
  background: #C9B174;
  color: #fff;
}

header .btn-primary {
  margin-left: 24px;
  margin-right: 0;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: #2C3A47;
  cursor: pointer;
  margin-left: 16px;
  line-height: 1;
  z-index: 105;
  transition: color 0.18s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  color: #C9B174;
}

/* =================== MOBILE MENU ================ */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(44,58,71,0.90);
  z-index: 120;
  transition: transform 0.28s cubic-bezier(0.62,0,0.34,1), opacity 0.18s;
  opacity: 0;
  transform: translateX(100%);
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
}
.mobile-menu.open {
  display: flex;
  opacity: 1;
  transform: translateX(0);
}
.mobile-menu-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 2.1rem;
  margin: 20px 0 16px 18px;
  align-self: flex-start;
  cursor: pointer;
  z-index: 123;
  transition: color 0.2s;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin-left: 32px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.3rem;
  font-family: 'Roboto', Arial, sans-serif;
  text-decoration: none;
  padding: 12px 0 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  transition: color 0.18s, background 0.15s;
  min-width: 220px;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: #C9B174;
  background: rgba(255,255,255,0.05);
}

/* =================== FOOTER ================ */
footer {
  background: #fff;
  border-top: 1px solid #EAE4D7;
  padding: 48px 0 0 0;
  margin-top: 48px;
}
.footer-content {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 8vw;
  flex-wrap: wrap;
  padding-bottom: 32px;
  font-size: 0.95rem;
}
.footer-content > div, .footer-content nav {
  min-width: 180px;
  margin-bottom: 20px;
}
.footer-content nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.footer-content nav a {
  color: #2C3A47;
  padding: 2px 0;
  border-radius: 3px;
  transition: color 0.18s;
  font-size: 1rem;
}
.footer-content nav a:focus, .footer-content nav a:hover {
  color: #C9B174;
}
.footer-content img {
  width: 36px;
  margin-bottom: 7px;
}
.footer-content p {
  color: #857842;
  font-size: 0.99rem;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========== COOKIE CONSENT BANNER & MODAL =========== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff8ef;
  box-shadow: 0 -2px 14px rgba(44,58,71,0.08);
  padding: 24px 22px 22px 22px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  z-index: 9999;
  font-size: 1rem;
  transition: transform 0.33s cubic-bezier(0.72,0.11,0.29,1), opacity 0.22s;
}
.cookie-banner.hide {
  transform: translateY(120%);
  opacity: 0;
  pointer-events: none;
}
.cookie-banner .cookie-text {
  flex: 1 1 auto;
  color: #2C3A47;
}
.cookie-banner .cookie-actions {
  display: flex;
  flex-direction: row;
  gap: 14px;
}
.cookie-banner button {
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 1rem;
  border: none;
  border-radius: 16px;
  padding: 9px 19px;
  cursor: pointer;
  transition: background 0.16s, color 0.13s;
  box-shadow: 0 1px 4px rgba(44, 58, 71, 0.07);
}
.cookie-banner .cookie-accept {
  background: #C9B174;
  color: #fff;
}
.cookie-banner .cookie-accept:hover, .cookie-banner .cookie-accept:focus {
  background: #2C3A47;
}
.cookie-banner .cookie-reject {
  background: #EAE4D7;
  color: #2C3A47;
}
.cookie-banner .cookie-reject:hover, .cookie-banner .cookie-reject:focus {
  background: #C9B174;
  color: #fff;
}
.cookie-banner .cookie-settings {
  background: #fff;
  color: #2C3A47;
  border: 1px solid #C9B174;
}
.cookie-banner .cookie-settings:hover, .cookie-banner .cookie-settings:focus {
  background: #C9B174;
  color: #fff;
}

.cookie-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(44,58,71,0.46);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.26s;
}
.cookie-modal.active {
  opacity: 1;
  pointer-events: auto;
}
.cookie-modal-dialog {
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 8px 40px rgba(44, 58, 71, 0.18);
  padding: 36px 28px 24px 28px;
  width: 95vw;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  animation: fadeInUp 0.38s cubic-bezier(.31, 0, .24, 1);
}
.cookie-modal-dialog h3 {
  margin-bottom: 8px;
  font-size: 1.18rem;
}
.cookie-modal .close-modal {
  position: absolute;
  top: 16px;
  right: 22px;
  background: none;
  border: none;
  color: #2C3A47;
  font-size: 1.6rem;
  cursor: pointer;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #EEE9DF;
  font-size: 1rem;
}
.cookie-modal .cookie-category label {
  font-size: 1.02rem;
}
.cookie-modal .cookie-switch {
  appearance: none;
  width: 40px;
  height: 22px;
  background: #EAE4D7;
  border-radius: 16px;
  position: relative;
  outline: none;
  transition: background 0.17s;
  cursor: pointer;
}
.cookie-modal .cookie-switch:checked {
  background: #C9B174;
}
.cookie-modal .cookie-switch:before {
  content: '';
  display: block;
  position: absolute;
  top: 3px;
  left: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(44,58,71,0.09);
  transition: left 0.17s;
}
.cookie-modal .cookie-switch:checked:before {
  left: 20px;
}
.cookie-modal .cookie-category .category-desc {
  color: #9a9273;
  font-size: 0.97rem;
  font-style: italic;
  margin-left: 7px;
}
.cookie-modal .cookie-category.disabled {
  color: #b9b7ab;
}
.cookie-modal .cookie-category.disabled .cookie-switch {
  cursor: not-allowed;
  opacity: 0.6;
}
.cookie-modal .cookie-actions {
  display: flex;
  justify-content: flex-end;
  gap: 13px;
  margin-top: 14px;
}
.cookie-modal .cookie-actions button {
  font-family: 'Roboto', Arial, sans-serif;
  border-radius: 15px;
  font-size: 1rem;
  padding: 9px 19px;
  border: none;
  cursor: pointer;
}
.cookie-modal .cookie-accept {
  background: #C9B174;
  color: #fff;
}
.cookie-modal .cookie-accept:hover, .cookie-modal .cookie-accept:focus {
  background: #2C3A47;
}
.cookie-modal .cookie-reject {
  background: #EAE4D7;
  color: #2C3A47;
}
.cookie-modal .cookie-reject:hover, .cookie-modal .cookie-reject:focus {
  background: #C9B174;
  color: #fff;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* =================== RESPONSIVE DESIGN ================ */
@media (max-width: 1100px) {
  .container {
    max-width: 95vw;
  }
}
@media (max-width: 920px) {
  .footer-content {
    gap: 32px;
  }
  .main-nav {
    gap: 16px;
  }
  .card, .bio-card, .feature-item {
    min-width: 180px;
  }
}
@media (max-width: 820px) {
  .footer-content {
    flex-direction: column;
    gap: 30px;
  }
  .footer-content > div, .footer-content nav {
    margin-bottom: 10px;
  }
}
@media (max-width: 768px) {
  /* Stack everything as columns */
  .container {
    padding-left: 10px;
    padding-right: 10px;
  }
  .main-nav, header .btn-primary {
    display: none;
  }
  .mobile-menu-toggle {
    display: block;
  }
  .content-wrapper, .text-section, .card-container, .content-grid, .feature-grid, .team-bios, .blog-snippets, .education-snippets {
    flex-direction: column;
    gap: 18px;
    align-items: stretch;
  }
  .section {
    padding: 26px 8px;
    margin-bottom: 40px;
  }
  .testimonial-card {
    padding: 17px;
  }
  .footer-content {
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    padding-bottom: 25px;
  }
  .feature-item, .bio-card, .card {
    min-width: 100%;
    max-width: 100%;
  }
  .map-placeholder {
    padding: 14px;
    font-size: 0.97rem;
  }
  .mobile-menu {
    align-items: flex-start;
    padding-top: 0;
  }
}
@media (max-width: 520px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.3rem; }
  .btn-primary, .btn-secondary { font-size: 1rem; padding: 10px 16px; border-radius: 12px; }
  .cookie-banner { flex-direction: column; gap: 7px; padding: 14px 10px 12px 12px; font-size: 0.97rem; }
  .cookie-banner .cookie-actions { flex-direction: column; gap: 8px; }
  .cookie-modal-dialog { padding: 15px 7px 12px 10px; }
}

/* ============= Utility Classes ============= */
.hidden { display: none !important; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }
.mt-16 { margin-top: 16px; }
.text-center { text-align: center; }

/* ================ Miscellaneous ================ */
ul, ol {
  padding-left: 26px;
}
ul li, ol li {
  margin-bottom: 0.7em;
}

hr {
  border: 0;
  border-top: 1px solid #ccc;
  margin: 24px 0;
}

/* ============== Accessibility Focus ============== */
a, button, [tabindex] {
  outline: none;
}
a:focus-visible, button:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid #C9B174;
  outline-offset: 3px;
}

/* =============== Transitions & Microinteractions =============== */
button, .btn-primary, .btn-secondary, a {
  transition: all 0.15s cubic-bezier(.37,0,.63,1);
}

/* ============== Blog ==============*/
.blog-snippets {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 8px;
}
.blog-post {
  flex: 1 1 260px;
  min-width: 210px;
}
.blog-post h3 {
  font-size: 1.18rem;
  margin-bottom: 6px;
}
.blog-post p a {
  color: #C9B174;
  text-decoration: underline;
  font-weight: 500;
  transition: color 0.16s;
}
.blog-post p a:hover {
  color: #2C3A47;
}

/**************** Shadow, Border, and White Space for Cards ****************/
.card, .bio-card, .feature-item, .testimonial-card, .blog-post {
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card);
}

/***************** Z-Index for Menus & Modals ******************/
header { z-index: 50; }
.mobile-menu { z-index: 120; }
.cookie-banner { z-index: 9999; }
.cookie-modal { z-index: 10000; }

/****** End Of Scandinavian Clean CSS for Polys Numisma ******/
