/*
Theme Name: 300 Grams v2
Theme URI: https://300-grams.com
Template: astra
Author: 300 Grams
Version: 2.0.0
*/

:root {
  --gold: #C9A96E;
  --gold-light: #D4B87A;
  --gold-dark: #A6894F;
  --red: #8B1A1A;
  --red-dark: #6B1212;
  --black: #1A1A1A;
  --black-soft: #222222;
  --cream: #F5E6C8;
  --cream-light: #FAF3E6;
  --stone: #E8D5B7;
  --stone-dark: #C4A882;
  --text: #2C2416;
  --text-light: #5C4D3A;
  --white: #FFFFFF;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--cream-light);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

a { color: var(--gold-dark); text-decoration: none; transition: 0.3s ease; }
a:hover { color: var(--red); }

/* ===== HEADER ===== */
.site-header {
  background: url('assets/images/header-bg.jpg') center top / cover no-repeat;
  border-bottom: 2px solid var(--gold);
  position: relative;
}
.site-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
}
.site-header .custom-logo-link img {
  max-height: 112px;
  max-width: 112px;
  width: auto;
  height: auto;
}
.site-header .ast-container,
.site-header .ast-flex {
  padding-left: 24px !important;
  padding-right: 24px !important;
}

/* Table responsive */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 24px 0;
}
.table-responsive table {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
}
.table-responsive th,
.table-responsive td {
  padding: 12px;
  border: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}
.table-responsive th {
  background: #f8fafc;
  font-weight: 700;
}
.site-header .site-title,
.site-header .site-description,
.ast-site-title-wrap {
  display: none !important;
}
.main-header-menu .menu-link {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  padding: 26px 18px;
  position: relative;
}
.main-header-menu .menu-link::after {
  content: '';
  position: absolute;
  bottom: 18px; left: 18px; right: 18px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: 0.3s ease;
}
.main-header-menu .menu-link:hover::after,
.main-header-menu .current-menu-item .menu-link::after { transform: scaleX(1); }

/* ===== HERO ===== */
.tg-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: url('assets/images/hero-bg.jpg') center 30% / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.tg-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(26,26,26,0.1) 0%, rgba(26,26,26,0.4) 60%, rgba(26,26,26,0.7) 100%);
}
.tg-hero__content {
  position: relative;
  z-index: 2;
  max-width: 600px;
  padding: 120px 64px 80px;
  text-align: right;
}
.tg-hero__badge {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 10px 24px;
  margin-bottom: 24px;
}
.tg-hero__title {
  font-family: 'Cinzel', serif;
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: 900;
  color: var(--white);
  text-shadow: 0 2px 20px rgba(0,0,0,0.6);
  margin-bottom: 16px;
}
.tg-hero__title span { color: var(--gold); }
.tg-hero__tagline {
  font-family: 'Cinzel', serif;
  font-size: clamp(0.85rem, 1.5vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 40px;
}
.tg-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  padding: 16px 36px;
  border: 2px solid var(--gold);
}
.tg-hero__cta:hover { background: transparent; color: var(--gold); gap: 14px; }

/* ===== SECTIONS ===== */
.tg-section {
  width: 100%;
  padding: 100px 24px;
}
.tg-section--cream { background: var(--cream); }
.tg-section--light { background: var(--cream-light); }
.tg-section--dark { background: var(--black); color: var(--cream); }

.tg-container {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.tg-section__header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 60px;
}
.tg-section__label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 12px;
}
.tg-section__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 16px;
}
.tg-section__title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 16px auto 0;
}
.tg-section__subtitle {
  font-size: 1.05rem;
  color: var(--text-light);
  line-height: 1.7;
}

/* ===== PILLARS (3 columns) ===== */
.tg-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}
.tg-pillar__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.tg-pillar__icon--gold { background: var(--gold); color: var(--black); }
.tg-pillar__icon--red { background: var(--red); color: var(--white); }
.tg-pillar__title {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.tg-pillar__text {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ===== FOOTER ===== */
.tg-footer {
  position: relative;
  background: url('assets/images/footer-bg.jpg') center bottom / cover no-repeat;
  color: var(--cream);
  padding: 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.tg-footer__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,26,0.85) 0%, rgba(26,26,26,0.2) 50%, transparent 100%);
}
.tg-footer__content {
  position: relative;
  z-index: 2;
  padding: 60px 24px 24px;
  text-align: center;
}
.tg-footer__tagline {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
.tg-footer__socials {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}
.tg-footer__socials a {
  width: 40px; height: 40px;
  border: 2px solid var(--gold-dark);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s ease;
}
.tg-footer__socials a:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}
.tg-footer__legal {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--stone-dark);
  margin-bottom: 12px;
  list-style: none;
  padding: 0;
}
.tg-footer__legal li { list-style: none; }
.tg-footer__legal a { color: var(--text); text-shadow: 0 1px 2px rgba(255,255,255,0.5); text-decoration: none; }
.tg-footer__legal a:hover { color: var(--red); text-shadow: none; }

/* ===== FOOTER BAR (below image) ===== */
.tg-footer-bar {
  background: var(--black);
  color: var(--stone-dark);
  text-align: center;
  padding: 16px 24px;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-top: 1px solid rgba(201, 169, 110, 0.15);
}
.tg-footer-bar p { margin: 0; }

/* ===== SINGLE / ARCHIVE ===== */
.tg-single-header {
  text-align: center;
  padding: 80px 24px 40px;
  background: var(--cream);
  border-bottom: 2px solid var(--gold);
}
.tg-single-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  max-width: 900px;
  margin: 0 auto;
}
.tg-single-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px;
  font-size: 1.05rem;
  line-height: 1.8;
}
.tg-single-body h2 {
  font-size: 1.5rem;
  margin-top: 40px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--stone);
}
.tg-single-body h3 {
  font-size: 1.2rem;
  margin-top: 32px;
  color: var(--red);
}
.tg-single-body a { color: var(--red); text-decoration: underline; }
.tg-single-body blockquote {
  border-left: 4px solid var(--gold);
  padding-left: 24px;
  margin: 28px 0;
  font-style: italic;
  color: var(--text-light);
}

/* ===== ARTICLE LIST (blog page) ===== */
.tg-post-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 800px;
  margin: 0 auto;
}
.tg-post-item {
  display: flex;
  gap: 24px;
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--stone);
  transition: 0.3s ease;
}
.tg-post-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow);
}
.tg-post-item__thumb {
  width: 220px;
  flex-shrink: 0;
}
.tg-post-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tg-post-item__body {
  padding: 24px 24px 24px 0;
}
.tg-post-item__cat {
  font-family: 'Cinzel', serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.tg-post-item__title {
  font-size: 1.15rem;
  margin-bottom: 8px;
}
.tg-post-item__title a { color: var(--black); }
.tg-post-item__title a:hover { color: var(--red); }
.tg-post-item__excerpt {
  color: var(--text-light);
  font-size: 0.92rem;
  line-height: 1.6;
}
.tg-post-item__meta {
  font-size: 0.78rem;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 10px;
}

/* ===== 404 ===== */
.tg-404 {
  text-align: center;
  padding: 120px 24px;
}
.tg-404__num {
  font-family: 'Cinzel', serif;
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 900;
  color: var(--gold);
  opacity: 0.25;
  line-height: 1;
}

/* ===== COOKIE BANNER ===== */
.tg-cookie {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--black);
  border-top: 2px solid var(--gold);
  padding: 18px 24px;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--stone);
}
.tg-cookie a { color: var(--gold); text-decoration: underline; }
.tg-cookie__btn {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 22px;
  border: 2px solid var(--gold);
  background: var(--gold);
  color: var(--black);
  cursor: pointer;
}
.tg-cookie__btn--sec { background: transparent; color: var(--gold); }

/* ===== ASTRA OVERRIDES ===== */
.ast-footer-overlay, .ast-small-footer { display: none !important; }
#primary, #content, .ast-plain-container #primary, .ast-plain-container #content,
.ast-container, .ast-row, .entry-content, article, .ast-article-post, .ast-article-single {
  display: block !important; width: 100% !important; max-width: 100% !important;
  padding: 0 !important; margin: 0 !important; float: none !important;
}
.ast-plain-container .entry-content { margin: 0 !important; }

/* Force vertical stack */
.tg-wrap {
  display: block !important;
  width: 100% !important;
}
.tg-hero, .tg-section {
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .tg-pillars { grid-template-columns: 1fr; gap: 36px; max-width: 420px; margin: 0 auto; }
  .tg-hero__content { padding: 100px 32px 60px; text-align: center; }
  .tg-post-item { flex-direction: column; }
  .tg-post-item__thumb { width: 100%; height: 200px; }
  .tg-post-item__body { padding: 20px; }
}
@media (max-width: 600px) {
  .tg-hero { justify-content: center; }
  .tg-hero__content { text-align: center; padding: 80px 20px 60px; }
  .tg-section { padding: 64px 20px; }
  .site-header .custom-logo-link img { max-height: 64px; max-width: 64px; }
  .site-header .ast-container,
  .site-header .ast-flex { padding-left: 12px !important; padding-right: 12px !important; }
  .tg-single-header h1 { font-size: 1.5rem; }
  .tg-single-body { padding: 32px 16px; }
  .tg-single-body h2 { font-size: 1.2rem; }
  .tg-single-body h3 { font-size: 1rem; }
}
