/* =========================
   Pegma Invest - style.css
   Corporate Blue/Gray Palette, Playfair Display + Montserrat
   Only Flexbox layouts
   ========================= */

/* --- CSS RESET & BASE --- */
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;
}
html {
  box-sizing: border-box;
}
*, *:before, *:after {
  box-sizing: inherit;
}
body {
  min-height: 100vh;
  background: #F6F4EF;
  font-family: 'Montserrat', Arial, Helvetica, sans-serif;
  color: #253348;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
:root {
  --primary: #253348;
  --secondary: #B4975A;
  --accent: #F6F4EF;
  --dark-gray: #19212C;
  --mid-gray: #667085;
  --light-gray: #E5E8EC;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Montserrat', Arial, Helvetica, sans-serif;
}
a {
  color: var(--primary);
  text-decoration: none;
  transition: color .2s;
}
a:hover, a:focus {
  color: var(--secondary);
  text-decoration: underline;
}
img {
  max-width: 100%;
  display: block;
  height: auto;
}
ul, ol {
  margin-left: 1.5em;
  margin-bottom: 1em;
}
b, strong {
  font-weight: 600;
}

/* Typography Scale */
h1 {
  font-family: var(--font-display);
  font-size: 2.5em; /* 40px */
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--primary);
  letter-spacing: 0.01em;
}
h2 {
  font-family: var(--font-display);
  font-size: 2em; /* 32px */
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--primary);
}
h3 {
  font-family: var(--font-display);
  font-size: 1.375em; /* 22px */
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--primary);
}
h4, h5, h6 {
  font-family: var(--font-body);
  font-weight: 700;
  margin-bottom: 10px;
}
p, li {
  font-family: var(--font-body);
  font-size: 1em; /* 16px */
  color: var(--dark-gray);
  margin-bottom: 0.7em;
}
small {
  font-size: 0.92em;
  color: var(--mid-gray);
}

.section {
  margin-bottom: 60px;
  padding: 40px 20px;
  background: none;
}
.container {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 16px;
}
.content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Flex Patterns */
.card-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 16px 0 rgba(37,51,72,0.08);
  margin-bottom: 20px;
  position: relative;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 270px;
}
.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: 20px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 8px 0 rgba(37,51,72,0.07);
  border-radius: 12px;
  margin-bottom: 20px;
  border-left: 5px solid var(--secondary);
  max-width: 600px;
}
.feature-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

/* --- HEADER --- */
header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(37,51,72,0.05);
  position: sticky;
  top: 0;
  z-index: 900;
}
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
header nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
header nav a {
  font-family: var(--font-body);
  font-size: 1em;
  font-weight: 500;
  color: var(--primary);
  padding: 8px 0;
  opacity: 0.82;
  transition: color .18s, opacity .18s;
  position: relative;
}
header nav a.active, header nav a:hover, header nav a:focus {
  color: var(--secondary);
  opacity: 1;
}
.cta-btn {
  display: inline-block;
  background: var(--secondary);
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 1em;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  box-shadow: 0 2px 8px 0 rgba(180,151,90,0.10);
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, color .18s, box-shadow .18s;
}
.cta-btn:hover, .cta-btn:focus {
  background: #9b824b;
  color: #fff !important;
  box-shadow: 0 6px 22px 0 rgba(37,51,72,0.12);
  text-decoration: none;
}

/* --- MOBILE NAVIGATION --- */
.mobile-menu-toggle {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  z-index: 999;
  margin-left: 10px;
  transition: color 0.2s;
}
.mobile-menu-toggle:hover {
  color: var(--secondary);
}
.mobile-menu {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #253348;
  box-shadow: 0 8px 30px rgba(37,51,72,0.25);
  z-index: 1200;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(.25,.8,.25,1);
  opacity: 0;
  pointer-events: none;
}
.mobile-menu.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
.mobile-menu-close {
  align-self: flex-end;
  font-size: 2.6em;
  margin: 24px 28px 8px 0;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}
.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 30px;
  align-items: flex-start;
  margin: 32px 0 0 32px;
}
.mobile-nav a {
  color: #fff;
  font-size: 1.22em;
  font-family: var(--font-body);
  font-weight: 500;
  opacity: 0.92;
  padding: 6px 0;
  transition: color .2s, opacity .2s;
}
.mobile-nav a:hover, .mobile-nav a:focus {
  color: var(--secondary);
  opacity: 1;
}

/* Hamburger visible on mobile */
@media (max-width: 1024px) {
  header nav, header .cta-btn {
    display: none !important;
  }
  .mobile-menu-toggle {
    display: block;
  }
  header .container {
    gap: 6px;
  }
}

@media (min-width: 1025px) {
  .mobile-menu {
    display: none !important;
  }
}

/* --- HERO --- */
.hero {
  background: linear-gradient(87deg, #f6f4ef 94%, #b4975a15 100%);
  margin-bottom: 48px;
  padding: 68px 0 54px 0;
  display: flex;
  align-items: center;
  min-height: 340px;
}
.hero .content-wrapper {
  align-items: flex-start;
  max-width: 620px;
  gap: 18px;
}
.hero h1 {
  color: var(--primary);
}
.hero p {
  color: var(--mid-gray);
  font-size: 1.13em;
  line-height: 1.7;
  margin-bottom: 1em;
}

/* --- FEATURES, ABOUT, SERVICES PREVIEW --- */
.features ul, .about-preview ul, .services-preview ul,
.property-overview ul, .unique-factors ul, .news-feed ul, .insights ul, .faq ul, .benefits ul,
.process ul, .security ul, .awards ul, .team ul,
.property-listings ul, .property-listings ul ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
  margin-top: 0;
}
.features ul li, .about-preview ul li, .services-preview ul li,
.property-overview ul li, .unique-factors ul li, .benefits ul li,
.security ul li, .property-listings ul li, .insights ul li, .news-feed ul li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1.08em;
  line-height: 1.5;
  background: #fff;
  border-radius: 10px;
  padding: 18px 18px 18px 22px;
  margin-bottom: 20px;
  box-shadow: 0 1px 6px rgba(37,51,72,0.04);
}
.features ul li img, .benefits ul li img, .security ul li img {
  width: 34px; height: 34px; margin-top: -2px;}
.awards .partners {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 10px;
}
.awards .partners img {
  height: 46px;
}
.property-listings ul ul {
  margin-left: 1.3em;
  margin-bottom: 0.3em;
}

/* --- CTA BANNER --- */
.cta-banner {
  background: var(--primary);
  color: #fff;
  border-radius: 18px;
  box-shadow: 0 6px 24px rgba(37,51,72,0.09);
  margin-bottom: 48px;
  padding: 56px 0 48px 0;
}
.cta-banner .content-wrapper {
  align-items: flex-start;
  gap: 14px;
}
.cta-banner h2, .cta-banner p {
  color: #fff;
}
.cta-banner .cta-btn {
  background: #fff;
  color: var(--primary) !important;
  margin-top: 12px;
}
.cta-banner .cta-btn:hover {
  background: var(--secondary);
  color: #fff !important;
}

/* --- TESTIMONIALS --- */
.testimonials {
  background: #f8fafd;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(37,51,72,0.06);
  margin-bottom: 46px;
  padding: 40px 0 34px 0;
}
.testimonials .content-wrapper {
  gap: 28px;
  align-items: flex-start;
}
.testimonial-card {
  color: var(--primary);
  background: #fff;
  box-shadow: 0 1px 6px 0 rgba(37,51,72,0.04);
  border-left: 5px solid var(--secondary);
  font-size: 1.06em;
}
.testimonial-card p {
  color: var(--primary);
  font-size: 1.05em;
}
.testimonial-card span {
  color: var(--mid-gray);
  font-size: 0.97em;
}

/* --- PROPERTY PAGE LISTINGS --- */
.property-listings ul > li {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 8px 0 rgba(37,51,72,0.06);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.property-listings ul h3 {
  margin-bottom: 6px;
}

/* --- LEGAL SECTIONS --- */
.legal {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 8px 0 rgba(37,51,72,0.06);
  padding: 42px 26px;
  margin-top: 38px;
  margin-bottom: 46px;
}
.legal h1 {
  margin-bottom: 18px;
}
.legal h2 {
  margin-top: 22px;
}

/* --- FOOTER --- */
footer {
  background: var(--primary);
  color: #fff;
  padding: 54px 0 28px 0;
  font-size: 1em;
  margin-top: 70px;
}
footer .container {
  display: flex;
  flex-direction: column;
  gap: 38px;
  flex-wrap: wrap;
}
.footer-links {
  display: flex;
  flex-direction: row;
  gap: 44px;
  flex-wrap: wrap;
}
.footer-links nav {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.footer-links a {
  color: #fff;
  font-family: var(--font-body);
  font-size: 1em;
  opacity: 0.87;
  transition: color .18s, opacity .22s;
}
.footer-links a:hover, .footer-links a:focus {
  color: var(--secondary);
  opacity: 1;
}
.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 4px;
}
.footer-contact p, .footer-contact a {
  color: #fff;
  font-size: 1em;
  opacity: 0.98;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.footer-contact img {
  height: 19px;
  margin-right: 4px;
}
.footer-social {
  display: flex;
  flex-direction: row;
  gap: 23px;
  margin: 10px 0 5px 0;
}
.footer-social a img {
  width: 28px; height: 28px; transition: filter .18s;
}
.footer-social a:hover img {
  filter: brightness(0.82) sepia(1) hue-rotate(16deg) saturate(1.5);
}
.footer-newsletter {
  margin-bottom: 14px;
}
.footer-newsletter h3 {
  font-size: 1.05em;
  margin-bottom: 6px;
  color: var(--secondary);
}
.footer-newsletter p {
  font-size: 0.98em;
  color: #e1dacb;
}
.footer-legal {
  margin-top: 14px;
}
.footer-legal small {
  color: #b9bac2;
}

/* --- FAQ --- */
.faq ul > li {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 8px 0 rgba(37,51,72,0.08);
  padding: 20px 24px;
  margin-bottom: 20px;
}
.faq ul > li strong {
  color: var(--primary);
}

/* --- TEAM, AWARDS, PARTNERS --- */
.team ul, .awards ul {
  margin-bottom: 0;
}
.team ul li, .awards ul li {
  background: none;
  color: var(--primary);
  margin-bottom: 5px;
  padding: 0;
}

/* --- THANK-YOU PAGE --- */
.thank-you {
  background: #fff;
  border-radius: 18px;
  padding: 64px 38px 54px;
  margin: 42px 0 58px 0;
  box-shadow: 0 4px 28px rgba(37,51,72,0.06);
  display: flex;
  align-items: center;
}
@media (max-width: 576px) {
  .thank-you {
    padding: 36px 10px 30px 10px;
  }
}

/* --- COMMON BUTTONS --- */
button, .btn {
  font-family: var(--font-body);
  font-size: 1em;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  transition: background .15s, color .15s, box-shadow .15s;
}
button:hover, .btn:hover, button:focus, .btn:focus {
  background: var(--secondary);
  color: #fff;
}

/* --- COOKIE CONSENT BANNER --- */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  width: 100vw;
  background: #253348;
  color: #fff;
  z-index: 3000;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 16px 20px 24px;
  box-shadow: 0 -2px 12px rgba(37,51,72,0.12);
  animation: cookie-slideUp .45s cubic-bezier(.4, .85, .5, 1);
}
@keyframes cookie-slideUp {
  from { transform: translateY(105%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.cookie-banner p {
  flex: 1;
  font-size: 1em;
  margin-bottom: 0;
  color: #fff;
  font-family: var(--font-body);
}
.cookie-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cookie-btn {
  background: var(--secondary);
  border: none;
  color: #fff;
  border-radius: 6px;
  font-size: 1em;
  padding: 10px 22px;
  transition: background .16s;
  cursor: pointer;
}
.cookie-btn.reject {
  background: #D9D9D9;
  color: var(--primary);
}
.cookie-btn.settings {
  background: transparent;
  border: 1.4px solid #fff;
  color: #fff;
}
.cookie-btn:hover, .cookie-btn:focus {
  background: #9b824b;
  color: #fff;
}
.cookie-btn.reject:hover, .cookie-btn.reject:focus {
  background: #bababa;
  color: var(--primary);
}
.cookie-btn.settings:hover, .cookie-btn.settings:focus {
  background: #fff;
  color: var(--secondary);
}

/* Cookie preferences modal */
.cookie-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(37,51,72,0.65);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  animation: fadein-modal .28s ease;
}
@keyframes fadein-modal { from { opacity: 0; } to { opacity: 1; } }
.cookie-modal {
  background: #fff;
  color: var(--primary);
  padding: 36px 28px 28px 28px;
  border-radius: 16px;
  width: 94vw;
  max-width: 410px;
  box-shadow: 0 10px 38px 0 rgba(37,51,72,0.19);
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
  z-index: 4200;
  animation: slidein-modal .36s cubic-bezier(.43,.88,.51,1.08);
}
@keyframes slidein-modal { from { transform: translateY(40px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.cookie-modal h3 {
  font-size: 1.14em;
  color: var(--primary);
  margin-bottom: 6px;
}
.cookie-category {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
}
.cookie-toggle {
  width: 32px; height: 18px;
  background: #E5E8EC;
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background .18s;
  flex-shrink: 0;
}
.cookie-toggle[data-enabled="true"] {
  background: var(--secondary);
}
.cookie-toggle-circle {
  position: absolute;
  top: 2px; left: 3px;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  transition: left .16s;
}
.cookie-toggle[data-enabled="true"] .cookie-toggle-circle {
  left: 15px;
}
.cookie-modal-actions {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  justify-content: flex-end;
}
.cookie-modal-close {
  position: absolute;
  top: 11px; right: 16px;
  background: none;
  border: none;
  color: #B4975A;
  font-size: 1.9em;
  cursor: pointer;
  transition: color 0.17s;
}
.cookie-modal-close:hover {
  color: #9b824b;
}

/* Cookie accessibility: prevent page content shift */
body.cookie-banner-open {
  padding-bottom: 72px !important;
}

/* --- MEDIA QUERIES - MOBILE FIRST --- */
@media (max-width: 1024px) {
  .footer-links {
    flex-direction: column;
    gap: 18px;
  }
}
@media (max-width: 900px) {
  .container {
    max-width: 99vw;
    padding-left: 9px;
    padding-right: 9px;
  }
  .hero, .cta-banner, .testimonials, .section {
    padding-left: 0;
    padding-right: 0;
  }
}
@media (max-width: 800px) {
  .section, .cta-banner, .legal {
    padding-left: 8px; padding-right: 8px;
  }
}
@media (max-width: 768px) {
  .content-grid, .card-container {
    flex-direction: column;
    gap: 18px;
  }
  .hero, .cta-banner {
    padding-top: 36px; padding-bottom: 28px;
  }
  .hero .content-wrapper, .cta-banner .content-wrapper {
    max-width: 100%;
    gap: 12px;
  }
  .testimonial-card {
    max-width: 97vw;
  }
}
@media (max-width: 650px) {
  h1 { font-size: 2em; }
  h2 { font-size: 1.43em; }
  h3 { font-size: 1.08em; }
  .thank-you {
    padding: 16px 0 13px 0;
  }
  footer {
    padding: 36px 0 14px 0;
  }
}
@media (max-width: 540px) {
  .hero, .cta-banner, .testimonials, .section {
    padding-top: 16px;
    padding-bottom: 13px;
  }
  .legal {
    padding: 20px 6px;
    margin-top: 13px;
    margin-bottom: 15px;
  }
  .testimonial-card {
    padding: 13px 9px;
  }
  .card {
    padding: 16px 9px;
  }
  .property-listings ul > li {
    padding: 13px 7px;
  }
  .footer-contact p, .footer-contact a { font-size: 0.97em; }
}

/* --- CUSTOM SCROLLBAR --- */
::-webkit-scrollbar {
  width: 9px; background: #E5E8EC;
}
::-webkit-scrollbar-thumb {
  background: #B4975A; border-radius: 8px;
}

/* --- Microinteractions --- */
.card, .testimonial-card, .features ul li, .property-listings ul > li, .faq ul > li, .section, .cta-banner, .legal {
  transition: box-shadow 0.22s, transform 0.14s;
}
.card:hover, .testimonial-card:hover, .section:hover, .cta-banner:hover, .property-listings ul>li:hover, .faq ul>li:hover {
  box-shadow: 0 8px 36px 0 rgba(37,51,72,0.10);
  transform: translateY(-2px) scale(1.01);
}
.features ul li:hover, .benefits ul li:hover, .unique-factors ul li:hover {
  background: #f6f4ef;
  box-shadow: 0 1px 14px 0 rgba(102,112,133,0.08);
}

/* --- ACCESSIBLE FOCUS STATES --- */
a:focus, .cta-btn:focus, button:focus, .btn:focus, .cookie-btn:focus, .cookie-modal-close:focus {
  outline: 2.5px solid #B4975A;
  outline-offset: 2px;
}

/* --- Form elements placeholder for future --- */
input, textarea, select {
  font-family: var(--font-body);
}
input:focus, textarea:focus, select:focus {
  outline: 1.5px solid var(--secondary);
}

/* --- Hide visually but keep for accessibility --- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
}

/* --- Additional spacing for critical rules --- */
.section, .card, .testimonial-card, .features ul li, .property-listings ul > li, .benefits ul li, .unique-factors ul li, .faq ul > li {
  margin-bottom: 20px;
}
.content-grid, .card-container, .text-image-section {
  gap: 20px;
}

/* --- END OF CSS --- */
