/*
Theme Name: Triple P Trio Theme
Theme URI: https://triple-p-trio.com
Author: Triple P Trio
Description: A premium, industry-standard WordPress theme.
Version: 2.1.0
Text Domain: triple-p-trio
*/

:root {
  --primary-color: #8B1E1E;
  /* Dark Red */
  --secondary-color: #008080;
  /* Teal */
  --accent-color: #F4EBEB;
  /* Light Red/Grey Tint */
  --background-color: #F9F7F2;
  /* Off-white */
  --text-main: #333333;
  /* Dark Grey for body */
  --text-light: #666666;
  --font-family: 'Kanit', sans-serif;
  --border-radius: 12px;
  --container-width: 1200px;
  --content-width: 750px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--primary-color);
}

img {
  max-width: 100%;
  height: auto;
  border-radius: var(--border-radius);
  display: block;
}

/* Header & Nav */
.site-header {
  background: white;
  padding: 1rem 5%;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-width);
  margin: 0 auto;
}

.custom-logo {
  height: 50px;
  width: auto;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.main-navigation a {
  font-weight: 500;
  font-size: 1rem;
}

.btn-cta {
  background-color: var(--secondary-color);
  color: white !important;
  padding: 0.6rem 1.4rem;
  border-radius: 30px;
  /* Pill shape */
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 128, 128, 0.2);
  transition: transform 0.2s ease;
}

.btn-cta:hover {
  background-color: #006666;
  transform: translateY(-2px);
}

/* Main Layout */
.site-main {
  max-width: var(--container-width);
  margin: 3rem auto;
  padding: 0 5%;
  min-height: 60vh;
}

/* --- INDEX: Featured Post --- */
.featured-post {
  margin-bottom: 4rem;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.featured-content-wrapper {
  display: flex;
  flex-direction: row;
  /* Horizontal split on desktop */
  align-items: stretch;
  /* Ensure equal height */
}

.featured-thumbnail {
  flex: 1.2;
  min-height: 400px;
}

.featured-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.featured-text {
  flex: 0.8;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-badge {
  display: inline-block;
  background-color: var(--accent-color);
  color: var(--primary-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
  align-self: flex-start;
}

.featured-text h2 {
  font-size: 2.2rem;
  /* Slightly smaller for balance */
  line-height: 1.25;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.featured-text h2 a {
  color: var(--text-main);
}

.featured-text h2 a:hover {
  color: var(--primary-color);
}

.entry-excerpt {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-light);
  margin-bottom: 2rem;
}

.btn-read-more {
  display: inline-block;
  padding: 0.8rem 2rem;
  background: var(--secondary-color);
  /* Teal button */
  color: white !important;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  border: none;
  transition: background 0.3s;
  align-self: flex-start;
}

.btn-read-more:hover {
  background: #006666;
}

/* --- Section Separator --- */
.grid-section-title {
  margin-top: 4rem;
  margin-bottom: 2rem;
  position: relative;
  padding-bottom: 1rem;
}

.grid-section-title h2 {
  font-size: 1.8rem;
  color: var(--text-main);
  font-weight: 700;
  display: inline-block;
  background: var(--background-color);
  padding-right: 1.5rem;
  z-index: 2;
  position: relative;
}

.section-divider {
  position: absolute;
  bottom: 1.5rem;
  /* Align with mid-text roughly or baseline */
  left: 0;
  width: 100%;
  height: 1px;
  background: #e0e0e0;
  z-index: 1;
}


/* --- INDEX: Grid Layout --- */
.post-grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  /* Clean 2-column grid */
  gap: 2.5rem;
}

.post-card {
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.post-thumbnail {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  /* 16:9 Aspect Ratio */
  overflow: hidden;
}

.post-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.post-content h3 {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  /* Limit title lines if needed, optional */
}

.post-content h3 a:hover {
  color: var(--primary-color);
}

.post-content .entry-excerpt {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: auto;
  /* Pushes button to bottom */

  /* Strict 3-line clamp */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.read-more-link {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.6rem 1.5rem;
  background: var(--secondary-color);
  /* Button style match */
  color: white !important;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: none;
  /* Normalize */
  text-align: center;
  width: fit-content;
}

.read-more-link:hover {
  background: #006666;
}

/* --- SINGLE POST --- */
#reading-progress-container {
  width: 100%;
  height: 4px;
  background: #eee;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
}

#reading-progress-bar {
  height: 4px;
  background: var(--secondary-color);
  width: 0%;
  transition: width 0.1s;
}

.single-article-layout .entry-header.align-wide,
.single-article-layout .post-thumbnail.align-wide {
  max-width: 900px;
  margin: 0 auto 3rem;
  text-align: center;
}

.single-article-layout .entry-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-top: 1rem;
  color: #1a1a1a;
}

.header-meta {
  text-transform: uppercase;
  font-size: 0.9rem;
  color: var(--secondary-color);
  letter-spacing: 1px;
  font-weight: 600;
}

.entry-content {
  max-width: var(--content-width);
  margin: 0 auto;
  font-size: 1.15rem;
  /* Increased readability */
  line-height: 1.7;
  /* Increased line-height */
  color: var(--text-main);
}

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

.entry-content h2,
.entry-content h3 {
  margin-top: 3rem;
  /* Generous whitespace */
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.entry-content h2 {
  font-size: 2rem;
}

.entry-content h3 {
  font-size: 1.6rem;
}

.entry-content ul,
.entry-content ol {
  margin-bottom: 2rem;
  padding-left: 1rem;
}

.entry-content li {
  margin-bottom: 0.8rem;
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.entry-content li::before {
  content: "•";
  color: var(--secondary-color);
  font-weight: bold;
  font-size: 1.5em;
  position: absolute;
  left: 0;
  top: -5px;
}

blockquote {
  border-left: 4px solid var(--secondary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
  font-size: 1.3rem;
}

/* Footer & Author */
.entry-footer {
  max-width: var(--content-width);
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.site-footer {
  background-color: var(--primary-color);
  color: white;
  padding: 4rem 5% 1rem;
  margin-top: 5rem;
  text-align: center;
}

.footer-widgets {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.site-info {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .featured-content-wrapper {
    flex-direction: column;
    /* Stack on mobile */
  }

  .featured-thumbnail {
    flex: auto;
    width: 100%;
    min-height: 250px;
  }

  .featured-thumbnail img {
    height: 250px;
  }

  .featured-text {
    padding: 2rem;
    flex: auto;
  }

  .featured-text h2 {
    font-size: 1.8rem;
  }

  .post-grid-container {
    grid-template-columns: 1fr;
    /* 1 col on mobile */
  }

  .single-article-layout .entry-title {
    font-size: 2rem;
  }

  .header-container {
    flex-direction: column;
    gap: 1rem;
  }

  .main-navigation ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}