/*
Theme Name: KPB Presents
Author: Kevin
Description: Custom dark theme for KPB Presents
Version: 1.4 (Robust Content Fix)
*/

/* =========================================
   1. THE "NUCLEAR" GOLD STANDARD (Global Colors)
   ========================================= */
/* Force Gold on all standard text elements */
body, p, li, dt, dd, span, div, blockquote, address, pre,
h1, h2, h3, h4, h5, h6,
a, a:visited,
.nav-links a,
.card-text,
header p {
  color: #d4af7f !important; 
}

/* Links Hover State */
a:hover, a:focus, a:active {
  color: #d4af7f !important; 
  text-decoration: underline;
  text-shadow: 0 0 8px rgba(212, 175, 127, 0.35);
}

/* EXCEPTION: Form Inputs (White for readability) */
input, textarea, select {
  color: #ffffff !important;
}

/* =========================================
   2. BASE LAYOUT & TYPOGRAPHY
   ========================================= */
body {
  font-family: 'Open Sans', sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #1b2a3d, #2c3e50);
}

section {
  margin-bottom: 5rem;
}

/* =========================================
   3. ROBUST CONTENT STYLING (The Fix)
   ========================================= */
/* This section fixes the "Text all over the place" 
   and "Non-uniform images" issues on pages like About Us.
*/

/* Limit the width of ALL page content so it's readable */
.entry-content,
.container,
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px; /* Safety padding on mobile */
  display: block;
}

/* Make ALL images inside pages uniform */
.entry-content img,
.wp-block-image img {
  max-width: 100%;    /* Never let image go wider than screen */
  height: auto;       /* Maintain aspect ratio (don't stretch) */
  border-radius: 12px; /* Consistent rounded corners */
  box-shadow: 0 5px 15px rgba(0,0,0,0.3); /* Subtle shadow for depth */
  margin-bottom: 20px;
}

/* Handle WordPress Alignments (Left/Right floats) */
.alignleft {
  float: left;
  margin-right: 20px;
  margin-bottom: 20px;
}

.alignright {
  float: right;
  margin-left: 20px;
  margin-bottom: 20px;
}

.aligncenter {
  display: block;
  margin: 20px auto;
}

/* Clear floats so text doesn't overlap weirdly */
.entry-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Headings inside pages */
.entry-content h1, 
.entry-content h2, 
.entry-content h3 {
  margin-top: 40px; /* Space above headings */
  margin-bottom: 20px;
  clear: both; /* Force heading to start on a new line */
}

/* Paragraph spacing */
.entry-content p {
  margin-bottom: 20px;
}

/* =========================================
   4. NAVIGATION
   ========================================= */
.top-nav {
  background: rgba(27, 42, 61, 0.8);
  backdrop-filter: blur(6px);
  padding: 15px 20px;
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand a {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.2em;
  text-decoration: none;
  color: #f5e6d3 !important; /* Cream Logo */
}

.nav-links, .nav-links ul {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  margin-left: 20px;
  font-family: 'Poppins', sans-serif;
  display: inline-block;
  transition: color 0.3s;
  text-decoration: none !important;
}

/* =========================================
   5. HEADER & HERO
   ========================================= */
header {
  text-align: center;
  padding: 60px 20px 40px;
}

header h1,
.page-title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-size: 3em;
  color: #f5e6d3 !important; /* Cream Titles */
  text-align: center;
  margin-bottom: 40px;
}

header p {
  margin: 10px 0;
  font-size: 1.2em;
}

header span {
  font-style: italic;
}

.intro {
  max-width: 700px;
  margin: 0 auto 60px;
  padding: 0 20px;
  text-align: center;
}

/* =========================================
   6. CARDS (THE LANES)
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 20px;
}

/* Generic .lane class for static DIVs or Links */
.lane {
  background: rgba(44, 50, 64, 0.85);
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none !important;
  color: #d4af7f !important;
  cursor: pointer;
}

.lane:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.lane img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px 8px 0 0;
  margin-bottom: 15px;
  display: block;
  transition: transform 0.35s ease;
}

.lane:hover img {
  transform: scale(1.03);
}

.lane h3 {
  margin: 10px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3em;
  text-align: center;
}

.card-text {
  font-size: 1em;
  text-align: center;
}

/* =========================================
   7. LATEST NEWS
   ========================================= */
.news-item {
  display: flex;
  align-items: center;
  gap: 15px;
  background: rgba(44,50,64,0.85);
  padding: 10px 15px;
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}

/* =========================================
   8. FORMS (WPFORMS)
   ========================================= */
div.wpforms-container-full {
  margin: 10px auto 40px auto !important;
  max-width: 700px;
}

div.wpforms-container-full .wpforms-form .wpforms-field-label {
  color: #d4af7f !important;
  font-weight: 500;
}

div.wpforms-container-full input, 
div.wpforms-container-full textarea,
div.wpforms-container-full select {
  background-color: rgba(44, 50, 64, 0.85) !important;
  color: #fff !important; 
  border: 1px solid #555 !important;
}

div.wpforms-container-full input:focus, 
div.wpforms-container-full textarea:focus {
  border-color: #d4af7f !important;
}

/* =========================================
   9. BUTTONS
   ========================================= */
.btn-gold {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(135deg, #d4af7f, #b08c5f);
  color: #1b2a3d !important; 
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 1.1em;
  transition: background 0.3s, transform 0.2s;
  border: none;
  cursor: pointer;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #b08c5f, #d4af7f);
  transform: translateY(-2px);
}

.btn-gold.btn-small {
  padding: 6px 16px;
  font-size: 0.85em;
  margin-top: 8px;
}

/* =========================================
   10. RESPONSIVE
   ========================================= */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .news-item {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .news-item img {
    width: 100%;
    height: auto;
  }
  
  /* On mobile, center images */
  .alignleft, .alignright {
    float: none;
    display: block;
    margin: 0 auto 20px;
  }
}

/* =========================================
   11. FIX FOR FOOTER CTA (The "Get in Touch" Section)
   ========================================= */
.cta {
  text-align: center !important;
  padding: 60px 20px;
  max-width: 800px;
  margin: 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle separator line */
}

.cta p {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #d4af7f !important;
}

/* Turn the 'Get in touch' link back into a Gold Button */
.cta a {
  display: inline-block;
  padding: 14px 35px;
  background: linear-gradient(135deg, #d4af7f, #b08c5f);
  color: #1b2a3d !important; /* Dark text for contrast */
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  border-radius: 50px; /* Fully rounded pill shape */
  text-decoration: none !important;
  font-size: 1.1em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 127, 0.3);
}

.cta a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(212, 175, 127, 0.5);
  background: linear-gradient(135deg, #b08c5f, #d4af7f);
}

/* =========================================
   13. LAYOUT FIX: THE "TETRIS" BLOCK
   ========================================= */
/* Make the News Card span 2 columns to fill the gap */
.lane.latest-news-card {
    grid-column: span 2;
    align-items: flex-start !important; /* Left align content */
    text-align: left !important;
    padding: 30px;
}

/* Tablet (2 Columns): Make it span both so it sits at the bottom nicely */
@media (max-width: 1024px) {
    .lane.latest-news-card {
        grid-column: span 2;
    }
}

/* Mobile (1 Column): Stack normally */
@media (max-width: 768px) {
    .lane.latest-news-card {
        grid-column: span 1;
    }
}

/* Style the mini news list inside the card */
.mini-news-item {
    width: 100%;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mini-news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}
.mini-news-item a {
    font-weight: 600;
    font-size: 1.1em;
    display: block;
}
.mini-news-date {
    font-size: 0.85em;
    opacity: 0.7;
}