:root {
  --primary: #7b5b2e;
  --primary-light: #a1783a;
  --primary-dark: #4f3818;
  --primary-accent: #916a35;
  --amber-accent: #b78641;
  --brand-grad-primary: linear-gradient(90deg, #6d5321, #8a6d33);
  --brand-grad-primary-alt: linear-gradient(90deg, #6b5424, #8a6d33);
  --brand-grad-card: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 55%,
    var(--primary-dark) 100%
  );
  /* Warm neutral palette */
  --white: #ffffff;
  --gray-50: #fffdf8;
  --gray-100: #fbf8f1;
  --gray-200: #f2eadb;
  --gray-300: #e7dcc8;
  --gray-400: #dacdaf;
  --gray-500: #ab9d82;
  --gray-600: #655942;
  --gray-700: #3f3527;
  --gray-800: #241d13;
  --shadow-sm: 0 8px 20px rgba(47, 33, 13, 0.07);
  --shadow-md: 0 14px 30px rgba(47, 33, 13, 0.11);
  --shadow-lg: 0 22px 46px rgba(47, 33, 13, 0.13);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --anim-duration: 0.3s;
  --btn-radius: 999px;
  --btn-padding: 0.86rem 1.8rem;
  --btn-min-width: 156px;
  --btn-height: 46px;
  --section-space: clamp(3.2rem, 5.4vw, 5.4rem);
  --section-space-tight: clamp(2.5rem, 4.2vw, 4rem);
  --card-radius: 20px;
  --card-padding: clamp(1.1rem, 2.1vw, 1.45rem);
  --surface-grad-card-warm: linear-gradient(180deg, #fffdf8 0%, #f8f2e7 100%);
  --card-surface: linear-gradient(180deg, #fffdf8 0%, #f7f1e4 100%);
  --card-border: #d8cfbf;
  --card-border-strong: #c6bba8;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Manrope", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.7;
  color: var(--gray-800);
  background:
    radial-gradient(
      circle at 20% -5%,
      rgba(183, 134, 65, 0.12) 0%,
      rgba(183, 134, 65, 0) 30%
    ),
    var(--gray-100);
  padding-top: 108px;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Sora", "Manrope", sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--gray-800);
  overflow-wrap: anywhere;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.45rem);
}

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
}

h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
}

p {
  color: var(--gray-700);
  overflow-wrap: break-word;
}

.container {
  max-width: 1180px;
  margin: auto;
  padding: 0 clamp(1rem, 2.6vw, 2rem);
}

/* Reusable internal page hero */
.inner-page-hero {
  position: relative;
  min-height: clamp(320px, 52vh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
  padding: clamp(86px, 10vh, 120px) 0 clamp(56px, 8vh, 84px);
}

.inner-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(24, 18, 7, 0.74) 0%,
    rgba(58, 42, 16, 0.58) 44%,
    rgba(74, 55, 23, 0.4) 70%,
    rgba(74, 55, 23, 0.26) 100%
  );
  z-index: 1;
}

.inner-page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  display: block;
  pointer-events: none;
}

.inner-page-hero .container {
  position: relative;
  z-index: 2;
  width: min(100%, 920px);
  display: grid;
  align-content: center;
}

.inner-page-hero-content {
  display: grid;
  gap: 0.8rem;
  justify-items: center;
  text-align: center;
}

.inner-page-hero.is-left .inner-page-hero-content {
  justify-items: start;
  text-align: left;
}

.inner-page-hero h1 {
  margin: 0;
  color: var(--white);
  font-size: clamp(2rem, 4.4vw, 3.35rem);
  line-height: 1.1;
  font-weight: 800;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.44);
}

.inner-page-hero p {
  margin: 0;
  max-width: 64ch;
  color: rgba(255, 248, 236, 0.95);
  font-size: clamp(1rem, 1.9vw, 1.22rem);
  line-height: 1.56;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.32);
}

.inner-page-breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  padding: 0;
  margin: 0 0 0.12rem;
}

.inner-page-hero.is-left .inner-page-breadcrumb ol {
  justify-content: flex-start;
}

.inner-page-breadcrumb li {
  display: inline-flex;
  align-items: center;
  color: rgba(255, 245, 226, 0.93);
  font-size: 0.77rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.inner-page-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.45rem;
  color: rgba(221, 191, 138, 0.95);
}

.inner-page-breadcrumb a {
  color: rgba(255, 245, 226, 0.93);
  text-decoration: none;
}

.inner-page-breadcrumb a:hover {
  color: #f0d3a0;
}

@media (max-width: 768px) {
  .inner-page-hero {
    min-height: 320px;
    padding: 80px 0 52px;
  }

  .inner-page-hero-content {
    gap: 0.65rem;
  }

  .inner-page-hero h1 {
    font-size: clamp(1.9rem, 8vw, 2.65rem);
  }

  .inner-page-hero p {
    max-width: 34ch;
  }
}

main section.container {
  padding-top: clamp(3rem, 5vw, 5rem);
  padding-bottom: clamp(3rem, 5vw, 5rem);
}
/* Image defaults: keep aspect ratio, be responsive, avoid distortion */
img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover; /* when width+height set elsewhere, preserves cover behavior */
}
/* Common utility classes */
.text-center {
  text-align: center;
}

.hidden {
  display: none;
}

/* Animation classes */
.animate {
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.animate.in-view {
  opacity: 1;
  transform: translateY(0);
}

.animate-delay-1 {
  transition-delay: 0.2s;
}

.animate-delay-2 {
  transition-delay: 0.4s;
}

.animate-delay-3 {
  transition-delay: 0.6s;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: var(--btn-padding);
  border-radius: var(--btn-radius);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: all var(--anim-duration) ease;
  min-width: var(--btn-min-width);
  min-height: var(--btn-height);
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

/* Primary button - "Get Quote" style */
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-accent));
  color: var(--white);
  border-color: rgba(79, 56, 24, 0.25);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-accent), var(--primary));
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary button style */
.btn.btn-secondary {
  background: rgba(255, 255, 255, 0.56);
  color: var(--primary);
  border-color: rgba(123, 91, 46, 0.48);
}

.btn.btn-secondary:hover {
  background: var(--gray-200);
  color: var(--primary-dark);
}

/* White variant for dark backgrounds */
.btn.btn-white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn.btn-white:hover {
  background: var(--gray-200);
  color: var(--primary-dark);
}

/* Small variant */
.btn.btn-sm {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
  min-height: 38px;
}

/* Large variant */
.btn.btn-lg {
  padding: 1rem 2.25rem;
  font-size: 1.1rem;
  min-height: 52px;
}
.post-card.card-link {
  text-decoration: none;
  color: inherit;
  display: grid;
}
.post-card.card-link:hover {
  text-decoration: none;
}
/* Blog card aesthetic (aligned with portfolio style) */
.post-grid .post-card.blog-card {
  background: var(--card-surface);
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.post-grid .post-card.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--card-border-strong);
  box-shadow: var(--shadow-md);
}
.post-grid .post-card.blog-card .thumb {
  width: 100%;
  height: 238px;
  overflow: hidden;
  border-top-left-radius: var(--card-radius);
  border-top-right-radius: var(--card-radius);
}
.post-grid .post-card.blog-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}
.post-grid .post-card.blog-card:hover .thumb img {
  transform: scale(1.03);
}
.post-grid .post-card.blog-card .post-body {
  padding: 1.25rem 1.2rem 1.4rem;
}

.post-grid .post-card .post-body h3 {
  color: var(--gray-800);
  margin-bottom: 0.48rem;
  font-size: 1.22rem;
  line-height: 1.34;
}

.post-grid .post-card .post-body p {
  color: var(--gray-700);
  line-height: 1.66;
}

.post-grid .post-card .post-body .meta {
  font-size: 0.76rem;
  color: var(--gray-600);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
/* Blog card date fallback */
/* Generic no-thumb fallback for cards that render date/initial content */
.post-grid .post-card.blog-card.no-thumb .thumb.no-thumb,
.post-card.no-thumb .thumb.no-thumb,
.admin-post-card.no-thumb .thumb.no-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.25rem;
  height: 250px;
  background: var(--brand-grad-card);
  color: var(--white);
  font-weight: 600;
  letter-spacing: 0.5px;
  border-top-left-radius: var(--card-radius);
  border-top-right-radius: var(--card-radius);
}
.post-grid .post-card.blog-card .thumb.no-thumb .date-text,
.post-card.no-thumb .thumb.no-thumb .date-text,
.admin-post-card.no-thumb .thumb.no-thumb .date-text {
  font-size: 0.8rem;
  padding: 0.35rem 0.75rem;
  background: rgba(60, 48, 18, 0.28);
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
/* Toolbar and form controls (used on Blogs and Portfolio) */
.toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.form-control {
  display: inline-block;
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--gray-400);
  border-radius: 10px;
  background: var(--gray-100);
  color: var(--gray-800);
  font: inherit;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 4px rgba(145, 106, 53, 0.14);
}
.toolbar .form-control {
  min-width: 140px;
}
.toolbar input.form-control::placeholder {
  color: var(--gray-600);
}
.pagination {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
/* Hero fallback */
.project-hero.no-hero {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 50%,
    var(--primary-light) 100%
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-hero.no-hero .hero-inner {
  background: rgba(60, 48, 18, 0.28);
  padding: 2rem;
  border-radius: 14px;
}
/* About & team fallback blocks */
.about-image-block.no-thumb,
.team-photo.no-thumb {
  background: var(--brand-grad-card);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: 2px;
  width: 100%;
  height: 100%;
}
.about-image-block.no-thumb .initial,
.team-photo.no-thumb .initial,
.about-image-block.no-thumb .date-text,
.team-photo.no-thumb .date-text {
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* Bottom actions wrapper for post/blog pages */
.bottom-actions {
  margin-top: 2.5rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  text-align: center;
}

/* Alternative CTA style (light card) */
.cta-section.cta-alt {
  background: linear-gradient(180deg, #fffaf1 0%, #f7eedf 100%);
  color: var(--gray-800);
  padding: clamp(3rem, 5vw, 4.5rem) 1rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(123, 91, 46, 0.2);
  margin-top: 3rem;
}
.cta-section.cta-alt h2 {
  color: var(--gray-800);
  margin-bottom: 0.7rem;
}
.cta-section.cta-alt p {
  max-width: 700px;
  margin: 0 auto 1.2rem;
  line-height: 1.7;
  color: var(--gray-700);
}
.cta-section.cta-alt .btn {
  color: var(--white);
}
.cta-section.cta-alt .btn:hover {
  color: var(--white);
}

/* Default CTA uses warm bronze gradient */
.cta-section {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(61, 43, 18, 0.86),
    rgba(114, 82, 38, 0.78)
  );
  color: var(--white);
  padding: clamp(4rem, 5.9vw, 5.85rem) 1rem;
  margin-top: 0;
  text-align: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-top: 1px solid rgba(242, 236, 223, 0.2);
  border-bottom: 1px solid rgba(123, 91, 46, 0.16);
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      115deg,
      rgba(22, 17, 11, 0.72) 0%,
      rgba(39, 30, 20, 0.56) 55%,
      rgba(61, 43, 18, 0.4) 100%
    ),
    radial-gradient(
      circle at 22% 18%,
      rgba(242, 236, 223, 0.15) 0%,
      rgba(242, 236, 223, 0) 45%
    );
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
  max-width: 840px;
  display: grid;
  gap: clamp(0.95rem, 1.6vw, 1.35rem);
}

.cta-section h2 {
  color: var(--white);
  margin: 0;
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.cta-section p {
  max-width: 66ch;
  margin: 0 auto;
  font-size: clamp(1rem, 1.55vw, 1.12rem);
  line-height: 1.76;
  color: rgba(255, 249, 238, 0.92);
}

.cta-section .btn-primary {
  justify-self: center;
  min-width: 226px;
  min-height: 52px;
  padding: 0.95rem 1.95rem;
  background: #fff8ea;
  color: var(--primary-dark);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 14px 30px rgba(24, 18, 12, 0.28);
}

.cta-section .btn-primary:hover {
  background: #fff1d6;
  color: var(--primary-dark);
}

@media (max-width: 700px) {
  .cta-section {
    padding: clamp(3rem, 8.8vw, 4rem) 1rem;
  }

  .cta-section .container {
    gap: 0.75rem;
  }

  .cta-section .btn-primary {
    width: 100%;
    max-width: 340px;
  }
}
