/* =============================
   CSS RESET & BASE NORMALIZATION
   ============================= */
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, 
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;
}
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1.5;
  background: #202934;
  color: #F6F6F8;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  min-height: 100vh;
  font-size: 16px;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
  border: 0;
}
a {
  color: #DBB65A;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover, a:focus {
  color: #fff2c4;
  text-decoration: underline;
}
ul, ol {
  list-style: none;
}
button {
  font: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

/* ===============================================
   CUSTOM VARIABLE FALLBACKS (NOT CSS CUSTOM PROPS)
   =============================================== */
:root {
  /* NumiFreiburg brand colors and metallic accents */
  --primary: #224267;
  --secondary: #DBB65A;
  --accent: #F6F6F8;
  --dark-bg: #202934;
  --medium-bg: #232d3a;
  --card-bg: #232D3A;
  --card-bg-alt: #283243;
  --border: #353a41;
  --metall-dark: #C1A24F;
  --text-light: #F6F6F8;
  --text-dark: #22272F;
  --focus-shadow: 0 0 0 2px #DBB65A55;
  --shadow: 0 2px 16px 0 rgba(34,66,103,0.15);
}

/* ====================
   TYPOGRAPHY
   ==================== */
h1,h2,h3,h4,h5,h6 {
  font-family: 'Merriweather', 'Georgia', serif;
  color: #DBB65A;
  font-weight: 700;
  letter-spacing: 0.5px;
}
h1 { font-size: 2.5rem; line-height: 1.1; margin-bottom: 16px; }
h2 { font-size: 2rem; line-height: 1.2; margin-bottom: 14px; }
h3 { font-size: 1.35rem; line-height: 1.3; margin-bottom: 10px; }
h4, h5, h6 { font-size: 1rem; }
p, li, a, span, b {
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
}
p, ul li, ol li {
  font-size: 1rem;
  color: #F6F6F8;
  margin-bottom: 10px;
}

b, strong { font-weight: 700; color: #fff; }

hr {
  border-top: 1px solid #353a41;
  margin: 36px 0;
}

/* =========================
   SPACING & CONTAINER RULES
   ========================= */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.section {
  margin-bottom: 60px;
  padding: 40px 20px;
}
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: var(--card-bg-alt);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: box-shadow 0.2s, background 0.2s;
}
.card:hover {
  box-shadow: 0 4px 32px 0 rgba(219,182,90,0.13);
  background: #262F40;
}
.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;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: #F6F6F8;
  color: #22272F;
  border-radius: 12px;
  box-shadow: 0 2px 16px 0 rgba(34,66,103,0.07);
  margin-bottom: 20px;
  min-width: 260px;
  max-width: 540px;
  font-family: 'Merriweather', 'Georgia', serif;
  flex: 1 1 46%;
  border-left: 6px solid #DBB65A;
  transition: box-shadow 0.19s;
}
.testimonial-card:hover {
  box-shadow: 0 6px 24px 0 rgba(180,164,90,0.11);
}
.testimonial-card p {
  color: #22272F;
  font-size: 1.05rem;
  margin-bottom: 6px;
}
.testimonial-card span {
  color: #888;
  font-size: 0.95rem;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
}

.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  padding: 0;
}

/* =====================
   HEADER & NAVIGATION
   ===================== */
header {
  background: #181e25;
  border-bottom: 1px solid #353a41;
  box-shadow: 0 2px 16px 0 rgba(34,66,103,0.09);
  z-index: 1000;
}
header .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 32px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.main-nav {
  display: flex;
  gap: 28px;
  margin-left: 32px;
}
.main-nav a {
  color: #F6F6F8;
  font-size: 1rem;
  letter-spacing: 0.04em;
  font-weight: 500;
  padding-bottom: 2px;
  position: relative;
  transition: color 0.16s;
}
.main-nav a:hover, .main-nav a:focus {
  color: #DBB65A;
}
.header img, .container img {
  vertical-align: middle;
  height: 44px;
  width: auto;
}
.cta-btn {
  color: #22272F;
  background: #DBB65A;
  border-radius: 6px;
  padding: 11px 26px;
  border: none;
  font-weight: bold;
  font-size: 1.05rem;
  font-family: 'Merriweather', serif;
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px 0 rgba(219,182,90,0.12);
  margin-left: auto;
  margin-right: 14px;
  transition: background 0.17s, box-shadow 0.18s, color 0.16s;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cta-btn:hover, .cta-btn:focus {
  background: #cfa94b;
  color: #181e25;
  box-shadow: 0 4px 24px 0 rgba(219,182,90,0.19);
  outline: none;
}

/* Hide .cta-btn in .mobile-menu */
.mobile-menu .cta-btn { display: none; }
/* Burger button */
.mobile-menu-toggle {
  display: none;
  background: #232d3a;
  color: #DBB65A;
  border-radius: 50%;
  border: 2px solid #353a41;
  width: 44px;
  height: 44px;
  font-size: 1.7rem;
  align-items: center;
  justify-content: center;
  z-index: 2002;
  transition: background 0.15s, box-shadow 0.18s;
}
.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
  background: #303b4a;
  outline: none;
  box-shadow: var(--focus-shadow);
}


/* ========================
   MOBILE MENU NAVIGATION
   ======================== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #232D3A;
  box-shadow: 0 4px 32px 0 rgba(34,66,103,0.27);
  z-index: 2200;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(.86,-0.04,0,1.01);
  display: flex;
  flex-direction: column;
  padding: 40px 24px 24px 24px;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  background: #202934;
  color: #DBB65A;
  font-size: 2.1rem;
  border-radius: 50%;
  width: 46px;
  height: 46px;
  border: 2px solid #353a41;
  align-self: flex-end;
  margin-bottom: 24px;
  z-index: 2202;
  transition: background 0.15s, color 0.15s;
}
.mobile-menu-close:hover, .mobile-menu-close:focus {
  background: #302e25;
  color: #fff2c4;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}
.mobile-nav a {
  color: #F6F6F8;
  font-size: 1.2rem;
  font-family: 'Merriweather', 'Georgia', serif;
  padding: 12px 0;
  border-bottom: 1px solid #283243;
  transition: color 0.15s, background 0.18s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: #DBB65A;
  outline: none;
  background: #293344;
  border-radius: 3px;
}

/* ================
   HERO/CTA SECTIONS
   ================ */
.hero {
  min-height: 340px;
  background: linear-gradient(140deg, #232d3a 60%, #224267 100%);
  display: flex;
  align-items: center;
  margin-bottom: 44px;
  box-shadow: 0 4px 22px 0 rgba(34,66,103,0.15);
  position: relative;
}
.hero .container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}
.hero h1, .hero h2 {
  color: #DBB65A;
  text-shadow: 0 2px 8px #232d3aee;
}
.hero p {
  font-size: 1.14rem;
  color: #F6F6F8;
  margin-bottom: 14px;
}
.cta {
  background: #232D3A;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 8px 40px 0 rgba(219,182,90,0.07);
  padding: 40px 0;
  margin-top: 38px;
  margin-bottom: 0;
}
.cta h2 {
  color: #DBB65A;
}

/* ========================
   FEATURES, SERVICES, CARDS
   ======================== */
.feature-grid, .service-list, .article-list, .faq-list, .detailed-service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
}
.feature-grid > li, .detailed-service-grid > div, .article-list > li, .faq-list > li {
  background: #232D3A;
  border: 1px solid #353a41;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px 22px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 1 1 300px;
  min-width: 225px;
  max-width: 375px;
  position: relative;
  margin-bottom: 20px;
  transition: box-shadow 0.17s, background 0.19s, border 0.18s;
}
.feature-grid > li:hover, .detailed-service-grid > div:hover {
  box-shadow: 0 6px 32px 0 rgba(219,182,90,0.13);
  border-color: #DBB65A;
  background: #283243;
}
.feature-grid img, .detailed-service-grid img {
  width: 46px;
  height: 46px;
  margin-bottom: 8px;
  filter: grayscale(50%) brightness(1.2);
}
.feature-grid h3, .detailed-service-grid h3 {
  color: #DBB65A;
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.feature-grid p, .detailed-service-grid p {
  color: #F6F6F8;
  font-size: 1rem;
}
.detailed-service-grid > div span, .feature-grid > li span {
  color: #DBB65A;
  font-size: 0.95rem;
  background: #181e25;
  padding: 5px 14px;
  border-radius: 8px;
  margin-top: 8px;
}

/* Articles, FAQ */
.article-list > li h3, .faq-list > li b {
  color: #DBB65A;
  font-family: 'Merriweather', serif;
  margin-bottom: 8px;
}
.topic-tags {
  display: inline-block;
  font-size: 0.96em;
  background: #224267;
  color: #DBB65A;
  padding: 4px 11px;
  border-radius: 20px;
  margin-top: 4px;
  letter-spacing: 0.03em;
}
.faq-list > li p { color: #F6F6F8; font-size: 1em; }

/* ====================
   TEXT SECTIONS
   ==================== */
.text-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 20px;
}
.text-section ul, .text-section ol {
  margin-left: 18px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.text-section li {
  position: relative;
  padding-left: 18px;
  color: #F6F6F8;
  font-size: 1rem;
}
.text-section li:before {
  content: '•';
  color: #DBB65A;
  font-size: 1.1em;
  position: absolute;
  left: 0;
  top: -1px;
}
.text-section h3 {
  color: #DBB65A;
  font-size: 1.08rem;
  margin-top: 10px;
}
.text-section p {
  margin-bottom: 8px;
}

/* ===============
   FOOTER STYLES
   =============== */
footer {
  background: #202934;
  border-top: 1px solid #353a41;
  box-shadow: 0 -2px 24px 0 rgba(34,66,103,0.09);
  margin-top: 60px;
  padding: 32px 0 20px 0;
}
footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
}
footer img {
  height: 38px;
  width: auto;
}
.footer-nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-nav a {
  color: #DBB65A;
  font-size: 1rem;
  font-family: 'Merriweather', serif;
  transition: color 0.14s;
}
.footer-nav a:hover, .footer-nav a:focus {
  color: #F6F6F8;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-right: 14px;
}
.contact-details span {
  color: #F6F6F8;
  font-size: 0.98rem;
  display: flex;
  gap: 6px;
  align-items: center;
}
.contact-details img {
  width: 18px;
  height: 18px;
  filter: brightness(1.1) grayscale(60%);
  margin-right: 2px;
}

/* ========================
   COOKIE CONSENT BANNER
   ======================== */
.cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #232D3A;
  color: #F6F6F8;
  box-shadow: 0 -4px 22px 0 rgba(34,66,103,0.13);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 10px 16px 10px;
  z-index: 3000;
  gap: 16px;
  transition: transform 0.34s ease, opacity 0.15s;
  opacity: 1;
  transform: translateY(0);
  font-size: 1rem;
}
.cookie-consent-banner.hide {
  opacity: 0;
  pointer-events: none;
  transform: translateY(120%);
}
.cookie-consent-buttons {
  display: flex;
  gap: 16px;
  margin-top: 9px;
}
.cookie-btn {
  background: #DBB65A;
  color: #22272F;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-weight: bold;
  font-size: 1rem;
  font-family: 'Roboto', Arial, Helvetica, sans-serif;
  box-shadow: 0 2px 8px 0 rgba(219,182,90,0.08);
  transition: background 0.13s, color 0.13s;
  margin: 0;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: #fff2c4;
  color: #224267;
}
.cookie-btn.settings {
  background: #232D3A;
  color: #DBB65A;
  border: 1px solid #DBB65A;
  margin-left: 8px;
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #353a41;
  color: #DBB65A;
}

/* Cookie modal overlay */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  z-index: 3100;
  left: 0; right: 0; top: 0; bottom: 0;
  width: 100vw; height: 100vh;
  background: rgba(32,41,52,0.88);
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.19s ease;
}
.cookie-modal-overlay.active {
  display: flex;
}
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
.cookie-modal {
  background: #232D3A;
  color: #F6F6F8;
  border-radius: 10px;
  padding: 32px 26px 24px 26px;
  min-width: 310px;
  max-width: 380px;
  box-shadow: 0 6px 30px 0 rgba(26,27,31,0.21);
  display: flex;
  flex-direction: column;
  gap: 22px;
  font-size: 1rem;
  animation: slideUpModal 0.32s cubic-bezier(.8,0,.44,1.15);
  position: relative;
}
@keyframes slideUpModal {
  from { transform: translateY(80px) scale(.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.cookie-modal h2 {
  color: #DBB65A;
  font-size: 1.18rem;
  margin-bottom: 7px;
}
.cookie-modal .cookie-category {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 10px;
}
.cookie-modal .cookie-category label {
  font-weight: bold;
  color: #fff;
}
.cookie-modal .cookie-category input[type=checkbox] {
  accent-color: #DBB65A;
  width: 18px; height: 18px;
}
.cookie-modal .cookie-category input[disabled] {
  opacity: 0.7;
}
.cookie-modal-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  margin-top: 12px;
}
.cookie-modal .close-modal {
  position: absolute;
  top: 16px;
  right: 17px;
  background: none;
  color: #DBB65A;
  font-size: 1.5rem;
  border: none;
  border-radius: 50%;
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s;
}
.cookie-modal .close-modal:hover, .cookie-modal .close-modal:focus {
  background: #22272F;
}

/* =======================
   ANIMATION UTILITIES
   ======================= */
.fade-in {
  animation: fadeIn 0.22s ease-in-out;
}
.slide-in-left {
  animation: slideInLeft 0.32s cubic-bezier(.86,-0.04,0,1.01);
}
@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

/* =============================
   RESPONSIVE DESIGN: MOBILE FIRST
   ============================= */
@media (max-width: 1270px) {
  .container { max-width: 97vw; }
}
@media (max-width: 960px) {
  .container {
    max-width: 99vw;
    padding: 0 9px;
  }
  .main-nav { gap: 16px; }
  .footer-nav { gap: 8px; }
  .card-container, .content-grid { gap: 16px; }
}
@media (max-width: 840px) {
  .content-grid, .feature-grid, .service-list, .detailed-service-grid {
    flex-direction: column;
    gap: 24px;
    align-items: stretch;
  }
  .card, .feature-grid > li, .detailed-service-grid > div {
    max-width: none;
    min-width: 0;
  }
  .testimonial-card {
    min-width: 0;
    max-width: none;
  }
}
@media (max-width: 768px) {
  /* Header nav: show burger, hide nav */
  .main-nav { display: none !important; }
  .mobile-menu-toggle {
    display: flex;
    margin-left: auto;
  }
  header .cta-btn { display: none; }
  .container {
    padding: 0 6px;
    max-width: 100vw;
  }
  .hero {
    min-height: 200px;
    padding: 24px 0;
    margin-bottom: 25px;
  }
  .hero h1, .hero h2 {
    font-size: 2.05rem;
  }
  .section, section {
    margin-bottom: 32px;
    padding: 24px 0;
  }
  .content-wrapper { gap: 18px; }
  .footer-nav { gap: 8px; }
}
@media (max-width: 600px) {
  footer .container {
    flex-direction: column;
    gap: 18px;
    align-items: flex-start;
  }
  .testimonial-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
  }
  .feature-grid, .service-list, .detailed-service-grid, .card-container, .article-list, .faq-list {
    gap: 14px;
  }
}
@media (max-width: 500px) {
  h1 { font-size: 1.62rem; }
  h2 { font-size: 1.28rem; }
  h3 { font-size: 1.02rem; }
  .content-wrapper, .text-section { gap: 10px; }
  .cta-btn { font-size: .96rem; padding: 8px 13px; }
  .cookie-modal { padding: 24px 6px; min-width: 90vw; }
}

/* Flex-direction column for text-image */
@media (max-width: 768px) {
  .text-image-section {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
}

/* ========================
   VISUAL HIERARCHY & SHADOWS
   ======================== */
.card, .feature-grid > li, .detailed-service-grid > div {
  box-shadow: 0 2px 16px 0 rgba(34,66,103,0.14);
}
.cta,
.hero {
  box-shadow: 0 4px 32px 0 rgba(34,66,103,0.12);
}

/* ========================
   BUTTONS & MICRO-INTERACTIONS
   ======================== */
button:focus, .cta-btn:focus {
  outline: 2px solid #DBB65A;
  box-shadow: var(--focus-shadow);
}
.cta-btn::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 5px solid #22272F;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  margin-left: 8px;
  opacity: 0;
  transition: opacity 0.18s, transform 0.18s;
}
.cta-btn:hover::after,
.cta-btn:focus::after {
  opacity: 1;
  transform: translateX(3px);
}

/* ========================
   SLIDER TESTIMONIALS (stacked)
   ======================== */
.testimonial-slider {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
/* For some pages testimonial-slider may be a flex row, that's fine */
@media (max-width: 600px) {
  .testimonial-slider {
    flex-direction: column;
    gap: 14px;
  }
}

/* ========================
   MISC & UTILITIES
   ======================== */
::-webkit-scrollbar {
  width: 13px;
  background: #232d3a;
}
::-webkit-scrollbar-thumb {
  background: #353a41;
  border-radius: 6px;
}
::-webkit-selection {
  background: #DBB65A;
  color: #22272F;
}

/* Metallic accent utility */
.metall {
  color: #C1A24F;
  background: #232D3A;
  border-radius: 3px;
  padding: 2px 10px;
  font-size: 0.93em;
}

/* Ensure adequate margin between cards and flex children */
.card, .testimonial-card, .feature-grid>li, .detailed-service-grid>div, .article-list>li, .faq-list>li {
  margin-bottom: 20px;
}

/* ========================
   ADJUSTMENTS FOR BRAND PERSONALITY
   ======================== */
/* Industrial font feel (Merriweather) and technical lines */
h3, .main-nav a, .mobile-nav a, .footer-nav a {
  letter-spacing: 0.04em;
  text-transform: none;
}
.section, section {
  border-radius: 12px;
}

/* ========================
   ACCESSIBILITY CONTRAST
   ======================== */
.testimonial-card, .testimonial-card p, .testimonial-card span {
  color: #22272F;
}

/* ========================
   PRINT-FRIENDLY (OPTIONAL)
   ======================== */
@media print {
  header, footer, .mobile-menu, .cookie-consent-banner {
    display: none !important;
  }
  body { background: #fff !important; color: #222 !important; }
  * { box-shadow: none !important; }
}
