/*
Theme Name: CTC
Theme URI:
Author: CTC
Author URI:
Description: A professional theme with navy and gold styling, featuring a hero section, card grid layout, and sidebar support for posts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ctc
*/

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #1a2744;
  --navy-deep: #0f1a2e;
  --gold: #c8a45a;
  --gold-light: #ddc07a;
  --slate: #3d4f5f;
  --warm-gray: #f4f1ec;
  --text-dark: #2a2a2a;
  --text-body: #4a4a4a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Source Sans 3', sans-serif;
  color: var(--text-body);
  line-height: 1.7;
  background: #fff;
}

/* ── HEADER ── */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: box-shadow 0.3s ease;
}

header.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--navy);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: var(--navy);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon svg { width: 26px; height: 26px; fill: var(--gold); }

.logo-text {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.logo-text span {
  display: block;
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--slate);
}

nav { display: flex; align-items: center; gap: 2px; }

nav a {
  text-decoration: none;
  color: var(--navy);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 8px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  position: relative;
}

nav a:hover {
  background: rgba(26, 39, 68, 0.08);
  color: #333;
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

nav a:hover::after { transform: scaleX(1); }

/* ── HERO ── */
.hero {
  margin-top: 80px;
  min-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 80%, rgba(200,164,90,0.12), transparent),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(200,164,90,0.08), transparent);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  padding: 4rem 2rem;
  animation: fadeUp 0.8s ease-out;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(200,164,90,0.4);
  padding: 6px 20px;
  border-radius: 30px;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  color: #fff;
  line-height: 1.15;
  margin-bottom: 1.2rem;
}

.hero h1 em {
  font-style: italic;
  font-weight: 400;
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  max-width: 560px;
  margin: 0 auto 2rem;
  font-weight: 300;
  line-height: 1.8;
}

.hero-cta {
  display: inline-flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gold);
  color: var(--navy-deep);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,164,90,0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}
.btn-outline:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

/* ── GOLD DIVIDER ── */
.divider-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
}

/* ── CONTENT SECTION ── */
.content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 5rem 2rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
  animation: fadeUp 0.6s ease-out;
}

.section-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.6rem;
}

.section-header p {
  color: var(--slate);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.section-header .underline {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.col-card {
  background: var(--warm-gray);
  border-radius: 8px;
  padding: 2.5rem;
  border-top: 3px solid var(--gold);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.col-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.col-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.col-card h3 a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s;
}

.col-card h3 a:hover {
  color: var(--gold);
}

.col-card p {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-bottom: 1rem;
}

.col-card .read-more {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.2s;
}

.col-card .read-more:hover { color: var(--navy); }
.col-card .read-more::after { content: ' \2192'; }

.col-card .post-thumbnail {
  margin: -2.5rem -2.5rem 1.5rem;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.col-card .post-thumbnail img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

/* ── FOOTER ── */
footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.5);
  text-align: center;
  padding: 2rem;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
}

footer strong { color: var(--gold-light); font-weight: 600; }

/* ── SITE CONTENT WRAP (for sidebar layouts) ── */
.site-content-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  margin-top: 80px;
}

.site-content-wrap.has-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

/* ── SIDEBAR / WIDGETS ── */
.widget-area {
  padding: 0;
}

.widget {
  background: var(--warm-gray);
  border-radius: 8px;
  padding: 1.8rem;
  margin-bottom: 2rem;
  border-top: 3px solid var(--gold);
}

.widget h2,
.widget-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
}

.widget ul {
  list-style: none;
  padding: 0;
}

.widget ul li {
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.widget ul li a:hover {
  color: var(--gold);
}

/* ── SINGLE POST CONTENT ── */
.entry-header {
  margin-bottom: 2rem;
}

.entry-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.entry-meta {
  font-size: 0.85rem;
  color: var(--slate);
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.entry-meta a {
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s;
}

.entry-meta a:hover {
  color: var(--navy);
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: 'Playfair Display', serif;
  color: var(--navy);
  margin: 2rem 0 1rem;
}

.entry-content h2 { font-size: 1.6rem; }
.entry-content h3 { font-size: 1.3rem; }
.entry-content h4 { font-size: 1.1rem; }

.entry-content p {
  margin-bottom: 1.2rem;
}

.entry-content a {
  color: var(--gold);
  text-decoration: underline;
  transition: color 0.2s;
}

.entry-content a:hover {
  color: var(--navy);
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.entry-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--warm-gray);
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--slate);
}

.entry-content ul,
.entry-content ol {
  margin: 1rem 0 1.2rem 1.5rem;
}

.entry-content li {
  margin-bottom: 0.4rem;
}

.entry-content pre {
  background: var(--navy-deep);
  color: #e0e0e0;
  padding: 1.5rem;
  border-radius: 6px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.entry-content code {
  font-size: 0.9em;
  background: var(--warm-gray);
  padding: 2px 6px;
  border-radius: 3px;
}

.entry-content pre code {
  background: transparent;
  padding: 0;
}

.entry-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.85rem;
  color: var(--slate);
}

.entry-footer a {
  color: var(--gold);
  text-decoration: none;
}

.entry-footer a:hover {
  color: var(--navy);
}

.post-thumbnail-single {
  margin-bottom: 2rem;
  border-radius: 8px;
  overflow: hidden;
}

.post-thumbnail-single img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── POST NAVIGATION ── */
.post-navigation {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.post-navigation a {
  display: block;
  padding: 1.2rem;
  background: var(--warm-gray);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-body);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.post-navigation a:hover {
  background: var(--navy);
  color: #fff;
}

.post-navigation .nav-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

/* ── PAGE CONTENT ── */
.page-content {
  margin-top: 80px;
}

.page-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 0.5rem;
}

.page-header .underline {
  display: block;
  width: 60px;
  height: 3px;
  background: var(--gold);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* ── PAGINATION ── */
.pagination {
  margin-top: 3rem;
  text-align: center;
}

.pagination .nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-block;
  padding: 8px 14px;
  background: var(--warm-gray);
  color: var(--text-body);
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background: var(--gold);
  color: var(--navy-deep);
}

/* ── COMMENTS ── */
.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.comments-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 2rem;
}

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

.comment-body {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--warm-gray);
  border-radius: 8px;
  border-left: 3px solid var(--gold);
}

.comment-meta {
  margin-bottom: 0.8rem;
  font-size: 0.85rem;
}

.comment-author {
  font-weight: 600;
  color: var(--navy);
}

.comment-metadata {
  color: var(--slate);
}

.comment-metadata a {
  color: var(--slate);
  text-decoration: none;
}

.comment-content {
  font-size: 0.95rem;
  line-height: 1.7;
}

.comment-content p {
  margin-bottom: 0.8rem;
}

.comment-reply-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.comment-reply-link:hover {
  color: var(--navy);
}

.children {
  list-style: none;
  padding-left: 2rem;
}

.comment-respond {
  margin-top: 2rem;
}

.comment-reply-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.3rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  transition: border-color 0.2s;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.comment-form .submit {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  padding: 12px 28px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.comment-form .submit:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200,164,90,0.3);
}

/* ── WORDPRESS ALIGNMENT ── */
.alignleft {
  float: left;
  margin: 0 1.5rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1.5rem;
}

.aligncenter {
  display: block;
  margin: 1.5rem auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.8rem;
  color: var(--slate);
  text-align: center;
  padding: 0.5rem 0;
}

/* ── ACCESSIBILITY ── */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #f1f1f1;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* ── SEARCH FORM ── */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form .search-field {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 4px;
  font-family: 'Source Sans 3', sans-serif;
  font-size: 0.95rem;
}

.search-form .search-field:focus {
  outline: none;
  border-color: var(--gold);
}

.search-form .search-submit {
  background: var(--gold);
  color: var(--navy-deep);
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-form .search-submit:hover {
  background: var(--gold-light);
}

/* ── 404 ── */
.error-404 {
  text-align: center;
  padding: 5rem 2rem;
}

.error-404 h1 {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1.1rem;
  color: var(--slate);
  margin-bottom: 2rem;
}

/* ── RESPONSIVE ── */
@media (min-width: 901px) {
  .site-content-wrap.has-sidebar {
    grid-template-columns: 2fr 1fr;
  }
}

@media (max-width: 900px) {
  .header-inner { flex-direction: column; height: auto; padding: 1rem 1.5rem; gap: 0.8rem; }
  nav { flex-wrap: wrap; justify-content: center; }
  nav a { font-size: 0.78rem; padding: 6px 10px; }
  .two-col { grid-template-columns: 1fr; }
  .hero { min-height: 420px; }
  .post-navigation { grid-template-columns: 1fr; }
  .entry-header h1 { font-size: 1.8rem; }
}
