/*
Theme Name: C2 Realty
Theme URI: https://c2-realty.com
Author: C2 Realty
Description: Custom theme for C Squared Realty. Provides site chrome — navigation, footer, global reset, and brand tokens. Page layouts are self-contained.
Version: 2.0
License: GNU General Public License v2 or later
Text Domain: c2-realty
*/

/* ============================================================
   BRAND TOKENS
   ============================================================ */
:root {
  --c2-black:      #000000;
  --c2-gold:       #e9cf9b;
  --c2-tan:        #bfa574;
  --c2-gold-hover: #f0dbb2;
  --c2-cream:      #faf8f4;
  --c2-muted:      rgba(233,207,155,0.55);
  --c2-white:      #ffffff;
  --c2-text:       #2c2a26;
  --c2-text-light: #5a574f;
  --serif:         'DM Serif Display', Georgia, serif;
  --sans:          'Outfit', system-ui, sans-serif;
  --nav-height:    80px;
}

/* ============================================================
   GLOBAL RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  font-family: var(--sans);
  background: #fff;
  color: var(--c2-text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* ============================================================
   NAV CHROME
   ============================================================ */
.c2r-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  background: rgba(0,0,0,0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(233,207,155,0.1);
}

.admin-bar .c2r-nav { top: 32px; }
@media screen and (max-width: 782px) {
  .admin-bar .c2r-nav { top: 46px; }
}

/* Top bar */
.c2r-nav-top {
  display: flex;
  align-items: center;
  padding: 0.9rem 2rem;
  width: 100%;
  gap: 0;
}

/* Logo */
.c2r-logo {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.8rem 0.55rem;
  border: 2.5px solid var(--c2-tan);
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 1.5rem;
}
.c2r-logo-text {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 2rem;
  color: var(--c2-gold);
  letter-spacing: 0.14em;
  line-height: 1;
}
.c2r-logo-text .sup {
  font-size: 0.6em;
  position: relative;
  top: -0.5em;
  margin-left: 0.02em;
  margin-right: 0.08em;
}

/* Desktop nav links */
.c2r-nav-links {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.c2r-nav-link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c2-gold);
  text-decoration: none;
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.c2r-nav-link:hover { opacity: 0.7; }

/* Dropdown */
.c2r-dropdown { position: relative; }
.c2r-dropdown-toggle {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--c2-gold);
  letter-spacing: 0.06em;
  padding: 0.45rem 1rem;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: opacity 0.2s;
  background: none;
  border: none;
  line-height: inherit;
}
.c2r-dropdown-toggle:hover { opacity: 0.7; }
.c2r-dropdown-toggle svg {
  width: 13px; height: 13px;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.c2r-dropdown:hover .c2r-dropdown-toggle svg { transform: rotate(180deg); }

.c2r-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: rgba(0,0,0,0.98);
  border: 1px solid rgba(233,207,155,0.15);
  min-width: 200px;
  flex-direction: column;
  z-index: 200;
}
.c2r-dropdown:hover .c2r-dropdown-menu { display: flex; }
.c2r-nav-scrolling .c2r-dropdown-menu { display: none !important; }

.c2r-dropdown-menu a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--c2-gold);
  text-decoration: none;
  padding: 0.75rem 1.2rem;
  border-bottom: 1px solid rgba(233,207,155,0.07);
  transition: background 0.2s;
  white-space: nowrap;
}
.c2r-dropdown-menu a:last-child { border-bottom: none; }
.c2r-dropdown-menu a:hover { background: rgba(233,207,155,0.08); }

/* Spacer + right section */
.c2r-nav-spacer { flex: 1; }

.c2r-nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-shrink: 0;
  margin-right: 1.5rem;
}
.c2r-nav-contact {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.15rem;
}
.c2r-nav-contact a {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--c2-muted);
  text-decoration: none;
  letter-spacing: 0.03em;
  transition: color 0.2s;
  white-space: nowrap;
}
.c2r-nav-contact a:hover { color: var(--c2-gold); }

.c2r-nav-social {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.c2r-nav-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  color: rgba(233,207,155,0.55);
  transition: color 0.2s;
  text-decoration: none;
}
.c2r-nav-social a:hover { color: var(--c2-gold); }
.c2r-nav-social svg { width: 18px; height: 18px; fill: currentColor; }

/* CTA button */
.c2r-nav-cta {
  display: inline-block;
  padding: 0.9rem 2rem;
  background: var(--c2-gold);
  color: var(--c2-black);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition: background 0.25s, transform 0.2s;
  flex-shrink: 0;
  white-space: nowrap;
  border: none;
  cursor: pointer;
}
.c2r-nav-cta:hover {
  background: var(--c2-gold-hover);
  transform: translateY(-1px);
  color: var(--c2-black);
}

/* Hamburger */
.c2r-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--c2-gold);
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
.c2r-hamburger svg { width: 26px; height: 26px; }

/* Mobile menu */
.c2r-mobile-menu {
  display: none;
  flex-direction: column;
  background: rgba(0,0,0,0.98);
  border-top: 1px solid rgba(233,207,155,0.08);
  width: 100%;
}
.c2r-mobile-menu.is-open { display: flex; }

.c2r-mobile-link {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--c2-gold);
  text-decoration: none;
  letter-spacing: 0.06em;
  padding: 0.85rem 1.5rem;
  border-bottom: 1px solid rgba(233,207,155,0.06);
  transition: background 0.2s;
}
.c2r-mobile-link:hover { background: rgba(233,207,155,0.04); }

.c2r-mobile-dropdown-toggle {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(233,207,155,0.06);
  cursor: pointer;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--c2-gold);
  letter-spacing: 0.06em;
  padding: 0.85rem 1.5rem;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}
.c2r-mobile-dropdown-toggle:hover { background: rgba(233,207,155,0.04); }
.c2r-mobile-dropdown-toggle svg { width: 13px; height: 13px; transition: transform 0.2s; flex-shrink: 0; }
.c2r-mobile-dropdown.is-open .c2r-mobile-dropdown-toggle svg { transform: rotate(180deg); }

.c2r-mobile-submenu {
  display: none;
  flex-direction: column;
  background: rgba(255,255,255,0.02);
}
.c2r-mobile-dropdown.is-open .c2r-mobile-submenu { display: flex; }

.c2r-mobile-submenu a {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.95rem;
  color: rgba(233,207,155,0.75);
  text-decoration: none;
  padding: 0.65rem 2.5rem;
  border-bottom: 1px solid rgba(233,207,155,0.05);
  transition: background 0.2s;
}
.c2r-mobile-submenu a:last-child { border-bottom: none; }
.c2r-mobile-submenu a:hover { background: rgba(233,207,155,0.04); color: var(--c2-gold); }

/* Mobile CTA in menu */
.c2r-mobile-cta {
  display: block;
  margin: 1rem 1.5rem;
  padding: 0.8rem 1.5rem;
  background: var(--c2-gold);
  color: var(--c2-black);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  letter-spacing: 0.04em;
  border: none;
}

/* ============================================================
   NAV RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 1350px) {
  .c2r-nav-links,
  .c2r-nav-right,
  .c2r-nav-spacer { display: none; }

  .c2r-nav-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.6rem;
  }
  .c2r-hamburger { display: flex; grid-column: 1; justify-self: start; }
  .c2r-logo { grid-column: 2; margin-right: 0; }
  .c2r-nav-cta { grid-column: 3; justify-self: end; font-size: 0.95rem; padding: 0.6rem 1rem; }
}

@media (max-width: 700px) {
  .c2r-nav-top { display: flex; align-items: center; gap: 0.5rem; }
  .c2r-logo { margin-right: auto; }
}

@media (max-width: 600px) {
  .c2r-nav-cta { font-size: 0.78rem; padding: 0.45rem 0.7rem; }
  .c2r-logo-text { font-size: 1.25rem; }
}

@media (max-width: 420px) {
  .c2r-nav-top { padding-left: 0.75rem; padding-right: 0.75rem; }
  .c2r-nav-cta { font-size: 0.65rem; padding: 0.35rem 0.5rem; }
  .c2r-logo-text { font-size: 0.95rem; }
  .c2r-logo { padding: 0.25rem 0.5rem; }
}

/* ============================================================
   CONTENT AREA — push below fixed nav
   ============================================================ */
#c2r-content {
  margin: 0;
  padding: 0;
  width: 100%;
  padding-top: var(--nav-height);
}
.admin-bar #c2r-content { padding-top: calc(var(--nav-height) + 32px); }
@media screen and (max-width: 782px) {
  .admin-bar #c2r-content { padding-top: calc(var(--nav-height) + 46px); }
}

/* ============================================================
   FOOTER
   ============================================================ */
.c2r-footer {
  padding: 2.5rem 4rem;
  background: var(--c2-black);
  border-top: 1px solid rgba(233,207,155,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.c2r-footer-logo {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem 0.35rem;
  border: 1px solid rgba(233,207,155,0.25);
  text-decoration: none;
  flex-shrink: 0;
}
.c2r-footer-logo .c2r-logo-text {
  font-size: 1.3rem;
  color: rgba(233,207,155,0.5);
}

.c2r-footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.c2r-footer-center a {
  font-size: 1rem;
  font-family: var(--sans);
  color: var(--c2-muted);
  text-decoration: none;
  transition: color 0.2s;
  white-space: nowrap;
}
.c2r-footer-center a:hover { color: var(--c2-gold); }

.c2r-footer-social {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}
.c2r-footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  color: rgba(233,207,155,0.4);
  transition: color 0.2s;
  text-decoration: none;
}
.c2r-footer-social a:hover { color: var(--c2-gold); }
.c2r-footer-social svg { width: 18px; height: 18px; fill: currentColor; }

.c2r-footer-legal {
  font-size: 0.8rem;
  font-family: var(--sans);
  color: rgba(255,255,255,0.28);
  text-align: right;
  flex-shrink: 0;
}
.c2r-footer-legal a {
  color: rgba(233,207,155,0.45);
  text-decoration: none;
  transition: color 0.2s;
}
.c2r-footer-legal a:hover { color: var(--c2-gold); }

@media (max-width: 900px) {
  .c2r-footer {
    flex-direction: column;
    padding: 2rem 1.5rem;
    text-align: center;
    gap: 1.25rem;
  }
  .c2r-footer-legal { text-align: center; }
}

/* ============================================================
   INSIGHTS ARCHIVE PAGE
   ============================================================ */
.c2r-archive {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.c2r-archive-header {
  text-align: center;
  margin-bottom: 3rem;
}
.c2r-archive-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--c2-text);
  margin: 0 0 0.75rem;
  line-height: 1.15;
}
.c2r-archive-header p {
  font-size: 1.15rem;
  color: var(--c2-text-light);
  margin: 0;
  font-weight: 300;
}

/* Category tabs */
.c2r-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 3rem;
}
.c2r-cat-tab {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--c2-text-light);
  border: 1.5px solid rgba(0,0,0,0.12);
  transition: all 0.2s;
  background: transparent;
}
.c2r-cat-tab:hover {
  border-color: var(--c2-tan);
  color: var(--c2-tan);
}
.c2r-cat-tab.is-active {
  background: var(--c2-black);
  color: var(--c2-gold);
  border-color: var(--c2-black);
}

/* Post card grid */
.c2r-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 900px) {
  .c2r-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .c2r-card-grid { grid-template-columns: 1fr; }
  .c2r-cat-tabs { gap: 0.35rem; }
  .c2r-cat-tab { font-size: 0.78rem; padding: 0.4rem 0.9rem; }
}

/* Individual card */
.c2r-post-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.07);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
}
.c2r-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}

.c2r-post-card-thumb {
  aspect-ratio: 16/9;
  background: var(--c2-cream);
  overflow: hidden;
  flex-shrink: 0;
}
.c2r-post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}
.c2r-post-card:hover .c2r-post-card-thumb img { transform: scale(1.04); }

.c2r-post-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(233,207,155,0.12), rgba(191,165,116,0.08));
}
.c2r-post-card-thumb-placeholder svg {
  width: 40px; height: 40px;
  opacity: 0.3;
  fill: var(--c2-tan);
}

.c2r-post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.c2r-post-card-cat {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c2-tan);
  margin-bottom: 0.6rem;
  text-decoration: none;
}

.c2r-post-card-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--c2-text);
  margin: 0 0 0.75rem;
}

.c2r-post-card-excerpt {
  font-size: 0.92rem;
  color: var(--c2-text-light);
  line-height: 1.65;
  margin: 0 0 1.25rem;
  flex: 1;
}

.c2r-post-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(0,0,0,0.35);
  margin-top: auto;
}
.c2r-post-card-read {
  font-weight: 600;
  color: var(--c2-tan);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

/* No posts state */
.c2r-no-posts {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--c2-text-light);
}
.c2r-no-posts p { font-size: 1.1rem; }

/* Pagination */
.c2r-pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}
.c2r-pagination a,
.c2r-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px; height: 40px;
  padding: 0 0.75rem;
  border: 1.5px solid rgba(0,0,0,0.12);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--c2-text);
  transition: all 0.2s;
}
.c2r-pagination a:hover { border-color: var(--c2-tan); color: var(--c2-tan); }
.c2r-pagination .current {
  background: var(--c2-black);
  color: var(--c2-gold);
  border-color: var(--c2-black);
}

/* ============================================================
   SINGLE POST
   ============================================================ */
.c2r-single {
  max-width: 780px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.c2r-single-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.c2r-single-cat {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c2-tan);
  text-decoration: none;
  margin-bottom: 0.75rem;
}
.c2r-single-cat:hover { color: var(--c2-tan); opacity: 0.8; }

.c2r-single-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  line-height: 1.2;
  color: var(--c2-text);
  margin: 0 0 1rem;
}

.c2r-single-meta {
  font-size: 0.85rem;
  color: rgba(0,0,0,0.4);
}

.c2r-single-thumb {
  margin: 0 0 2.5rem;
  border-radius: 0;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--c2-cream);
}
.c2r-single-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.c2r-single-content {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--c2-text);
}
.c2r-single-content h2,
.c2r-single-content h3,
.c2r-single-content h4 {
  font-family: var(--serif);
  color: var(--c2-text);
  margin-top: 2rem;
}
.c2r-single-content p { margin: 0 0 1.4rem; }
.c2r-single-content a { color: var(--c2-tan); text-decoration: underline; }
.c2r-single-content ul,
.c2r-single-content ol { padding-left: 1.5rem; margin-bottom: 1.4rem; }
.c2r-single-content li { margin-bottom: 0.5rem; }
.c2r-single-content blockquote {
  border-left: 3px solid var(--c2-gold);
  margin: 1.5rem 0;
  padding: 0.5rem 0 0.5rem 1.5rem;
  color: var(--c2-text-light);
  font-style: italic;
}

.c2r-single-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--c2-tan);
  text-decoration: none;
  letter-spacing: 0.04em;
}
.c2r-single-back:hover { opacity: 0.75; }

/* ============================================================
   404 PAGE
   ============================================================ */
.c2r-404 {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 2rem;
}
.c2r-404-number {
  font-family: var(--serif);
  font-size: clamp(5rem, 15vw, 10rem);
  color: var(--c2-gold);
  line-height: 1;
  margin: 0 0 0.5rem;
  opacity: 0.35;
}
.c2r-404 h1 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--c2-text);
  margin: 0 0 1rem;
}
.c2r-404 p {
  font-size: 1.1rem;
  color: var(--c2-text-light);
  margin: 0 0 2rem;
  max-width: 460px;
}
.c2r-404-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--c2-black);
  color: var(--c2-gold);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}
.c2r-404-btn:hover { opacity: 0.8; }

/* ============================================================
   GENERIC PAGE / FALLBACK
   ============================================================ */
.c2r-page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--c2-text);
}
.c2r-page-content h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 1.5rem;
}
