/*
Theme Name: Render Infinity
Theme URI: https://renderinfinity.com
Author: Render Infinity Studio
Author URI: https://renderinfinity.com
Description: Official architectural visualization luxury WordPress theme designed to sync seamlessly with the Render Infinity React website.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: render-infinity
Tags: custom-colors, custom-menu, featured-images, flexible-header, full-width-template
*/

/* Reset & Global Tokens matching React SPA */
:root {
  --bg-ivory: #fff8f3;
  --color-charcoal: #1A1A1A;
  --color-gold: #C5A059;
  --color-gold-light: #E5C079;
  --color-text: #2C2A29;
  --color-muted: #5C5A59;
  --color-outline: rgba(127, 118, 103, 0.2);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  background-color: var(--bg-ivory);
  color: var(--color-text);
  font-family: 'Manrope', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

/* Custom smooth scrollbar matching React SPA */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #1A1A1A;
}
::-webkit-scrollbar-thumb {
  background: #C5A059;
}
::-webkit-scrollbar-thumb:hover {
  background: #E5C079;
}

/* Material Symbols alignment */
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
  display: inline-block;
  vertical-align: middle;
}

/* Typography Overrides */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  color: var(--color-charcoal);
}

/* WordPress Content Body & Block Typography Styling */
.content-body {
  font-family: 'Manrope', sans-serif;
  font-size: 1.125rem;
  line-height: 1.8;
  color: #4e4639;
}

.content-body p {
  margin-bottom: 2rem;
  color: #4e4639;
  line-height: 1.8;
  font-size: 1.125rem;
  font-family: 'Manrope', sans-serif;
}

/* Lists & Bullet Points Overrides against Tailwind Preflight */
.content-body ul,
.content-body ul.wp-block-list {
  list-style-type: disc !important;
  list-style-position: outside;
  padding-left: 2rem !important;
  margin-top: 1rem;
  margin-bottom: 2rem;
  color: #4e4639;
  font-size: 1.125rem;
  line-height: 1.8;
  font-family: 'Manrope', sans-serif;
}

.content-body ol,
.content-body ol.wp-block-list {
  list-style-type: decimal !important;
  list-style-position: outside;
  padding-left: 2rem !important;
  margin-top: 1rem;
  margin-bottom: 2rem;
  color: #4e4639;
  font-size: 1.125rem;
  line-height: 1.8;
  font-family: 'Manrope', sans-serif;
}

.content-body ul ul,
.content-body ul.wp-block-list ul.wp-block-list {
  list-style-type: circle !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.content-body ol ol,
.content-body ol.wp-block-list ol.wp-block-list {
  list-style-type: lower-alpha !important;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.content-body li {
  margin-bottom: 0.75rem;
  color: #4e4639;
  font-size: 1.125rem;
  line-height: 1.8;
  font-family: 'Manrope', sans-serif;
  padding-left: 0.25rem;
}

.content-body li > p {
  margin-bottom: 0.5rem;
}

.content-body li > p:last-child {
  margin-bottom: 0;
}

/* Links inside article content */
.content-body a {
  color: var(--color-gold);
  text-decoration: underline;
  text-underline-offset: 4px;
  font-weight: 600;
  transition: color 0.3s ease;
}

.content-body a:hover {
  color: var(--color-charcoal);
}

/* Inline Formatting */
.content-body strong,
.content-body b {
  font-weight: 700;
  color: var(--color-charcoal);
}

.content-body em,
.content-body i {
  font-style: italic;
}

/* Headings inside article content */
.content-body h1,
h1.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.25rem, 4.5vw, 3.25rem); /* 36px to 52px */
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-charcoal);
  line-height: 1.15;
  font-weight: 700;
}

.content-body h2,
h2.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem); /* 28px to 40px */
  margin-top: 3.5rem;
  margin-bottom: 1.5rem;
  color: var(--color-charcoal);
  line-height: 1.2;
  font-weight: 700;
}

.content-body h3,
h3.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.35rem, 2.5vw, 1.875rem); /* ~22px to 30px */
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-charcoal);
  line-height: 1.3;
  font-weight: 600;
}

.content-body h4,
h4.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem); /* ~18px to 24px */
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--color-charcoal);
  line-height: 1.35;
  font-weight: 600;
}

.content-body h5,
h5.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem; /* 20px */
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-charcoal);
  line-height: 1.4;
  font-weight: 600;
}

.content-body h6,
h6.wp-block-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.125rem; /* 18px */
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: var(--color-charcoal);
  line-height: 1.4;
  font-weight: 600;
}

/* Blockquotes & Pull Quotes */
.content-body blockquote,
.content-body .wp-block-quote,
.pull-quote, blockquote {
  border-left: 3px solid var(--color-gold);
  padding: 1.5rem 2rem 1.5rem 2.5rem;
  margin: 3.5rem 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.6rem;
  color: #1A1A1A;
  line-height: 1.6;
  background: rgba(197, 160, 89, 0.05);
}

.content-body blockquote p,
.content-body .wp-block-quote p {
  margin-bottom: 1rem;
  font-size: 1.6rem;
  color: #1A1A1A;
  line-height: 1.6;
  font-family: 'Playfair Display', serif;
}

.content-body blockquote cite,
.content-body .wp-block-quote cite {
  display: block;
  font-family: 'Manrope', sans-serif;
  font-style: normal;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-muted);
  margin-top: 1rem;
}

/* Tables */
.content-body table,
.content-body .wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  margin: 2.5rem 0;
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
}

.content-body th,
.content-body td {
  padding: 1rem 1.25rem;
  border: 1px solid var(--color-outline);
  text-align: left;
}

.content-body th {
  background-color: #f5ede4;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--color-charcoal);
  font-size: 1.1rem;
}

/* Code & Preformatted text */
.content-body code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  background-color: #f0e9df;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #a07528;
}

.content-body pre {
  background-color: var(--color-charcoal);
  color: #f8f6f0;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 2.5rem 0;
  border-left: 4px solid var(--color-gold);
}

.content-body pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Images & Figures */
.content-body figure,
.content-body .wp-block-image,
.content-body .wp-block-media-text__media {
  margin: 2.5rem 0 !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  clear: both !important;
  overflow: hidden;
}

.content-body figure img,
.content-body .wp-block-image img,
.content-body img {
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
  border-radius: 6px;
  margin: 0 auto;
}

/* Clearfix for floated content and article containers */
.content-body::after,
article::after {
  content: "";
  display: table;
  clear: both;
}

/* Image alignment rules for block editor */
.content-body .alignleft {
  float: left;
  margin: 0.5rem 2rem 1.5rem 0 !important;
  max-width: 50% !important;
}

.content-body .alignright {
  float: right;
  margin: 0.5rem 0 1.5rem 2rem !important;
  max-width: 50% !important;
}

.content-body .aligncenter {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
}

.content-body figcaption {
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  color: var(--color-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* Separators */
.content-body hr,
.content-body .wp-block-separator {
  border: 0;
  border-top: 1px solid var(--color-outline);
  margin: 3.5rem 0;
}

.sidebar-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 100px;
}

.sidebar-sticky > *,
aside > div,
aside .flex > div {
  flex-shrink: 0 !important;
}

.article-card:hover .card-image {
  transform: scale(1.05);
}

/* WordPress Comments Styling */
#comments {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--color-outline);
}

.comment-list {
  list-style: none;
  padding: 0;
}

.comment-body {
  background: #ffffff;
  border: 1px solid var(--color-outline);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.comment-author cite {
  font-weight: 700;
  font-style: normal;
  color: var(--color-charcoal);
}

.comment-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  margin-bottom: 1rem;
}

#respond {
  background: #ffffff;
  border: 1px solid var(--color-outline);
  padding: 2.5rem;
  margin-top: 3rem;
}

#reply-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.875rem;
  margin-bottom: 1.5rem;
  color: var(--color-charcoal);
}

#commentform input[type="text"],
#commentform input[type="email"],
#commentform textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color-outline);
  background: transparent;
  margin-bottom: 1rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.875rem;
  outline: none;
}

#commentform input[type="text"]:focus,
#commentform input[type="email"]:focus,
#commentform textarea:focus {
  border-color: var(--color-gold);
}

#commentform input[type="submit"] {
  background-color: var(--color-gold);
  color: #ffffff;
  padding: 1rem 2rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: none;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#commentform input[type="submit"]:hover {
  background-color: var(--color-charcoal);
}
