/*
Theme Name: Valley Technology Partners
Theme URI: https://www.valleytechpartners.com
Author: Valley Technology Partners
Author URI: https://www.valleytechpartners.com
Description: Custom theme for Valley Technology Partners website
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vtp-theme
*/

body {
  font-family: 'Open Sans', sans-serif;
  background-color: #f7f6f0;
  color: #2B6B6E;
  margin: 0;
  padding: 0;
  overscroll-behavior: none;
  overflow-x: hidden;
}

/* Prevent content overflow */
* {
  box-sizing: border-box;
}

/* Word wrapping for long text and URLs */
.entry-content,
.entry-excerpt,
.blog-content article,
.sidebar {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.entry-content a,
.entry-excerpt a,
.blog-content article a {
  word-break: break-all;
}

header {
  background-color: #f7f6f0;
  color: #2B6B6E;
  padding: 2rem 1rem 0.5rem 1rem;
  text-align: center;
}

header img {
  max-width: 80%;
  height: auto;
  margin-bottom: 1rem;
}

header a:hover img {
  opacity: 0.9;
  transition: opacity 0.3s ease;
}

header h1 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 0.5rem;
}

nav {
  background-color: #355F35;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  color: white;
  text-decoration: none;
  padding: 1rem;
  display: inline-block;
}

nav a:hover {
  background-color: #3F888C;
}

.hero {
  position: relative;
  padding: 6rem 2rem;
  text-align: center;
  color: #ffffff;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('assets/hero.jpg') center/cover no-repeat;
  background-color: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

main {
  padding: 2rem;
  max-width: 900px;
  margin: auto;
}

.services {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
}

.service-box {
  background: #2B6B6E;
  color: #f7f6f0;
  border: 1px solid #ddd;
  border-radius: 8px;
  flex: 1;
  padding: 1rem;
  min-width: 260px;
}

footer {
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #2B6B6E;
}

@media (max-width: 600px) {
  .services {
    flex-direction: column;
    align-items: center;
  }

  .service-box {
    width: 100%;
    max-width: 90%;
  }

  nav a {
    display: block;
    padding: 0.75rem;
  }

  header img {
    max-width: 90%;
  }
}

nav.sticky {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

body.sticky-nav {
  padding-top: 60px;
}

.hamburger {
  font-size: 2rem;
  background: none;
  border: none;
  color: #355F35;
  position: absolute;
  right: 1rem;
  top: 1rem;
  cursor: pointer;
  z-index: 1001;
  display: none;
}

@media (max-width: 600px) {
  .hamburger {
    display: block;
  }

  nav {
    display: none;
    flex-direction: column;
    text-align: left;
  }

  nav.show {
    display: flex;
  }

  nav a {
    display: block;
    padding: 1rem;
    border-top: 1px solid #4a7a4a;
  }
}

/* Blog Layout Styles */
.blog-container {
  display: flex;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.blog-content {
  flex: 1;
  max-width: 800px;
}

.sidebar {
  flex: 0 0 320px;
  background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
  padding: 0;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  align-self: flex-start;
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  border: 1px solid rgba(53, 95, 53, 0.1);
}

.sidebar .widget {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(53, 95, 53, 0.08);
}

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

.sidebar h3 {
  font-family: 'Montserrat', sans-serif;
  color: #355F35;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 0 1.25rem 0;
  padding: 0;
  border: none;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3F888C #f0f0f0;
}

.sidebar ul::-webkit-scrollbar {
  width: 6px;
}

.sidebar ul::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.sidebar ul::-webkit-scrollbar-thumb {
  background: #3F888C;
  border-radius: 3px;
}

.sidebar ul::-webkit-scrollbar-thumb:hover {
  background: #355F35;
}

.sidebar li {
  padding: 0;
  margin-bottom: 0.75rem;
  border: none;
  display: flex;
  align-items: center;
}

.sidebar li:last-child {
  margin-bottom: 0;
}

.sidebar a {
  color: #2B6B6E;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 0.95rem;
  position: relative;
  padding-left: 1rem;
}

.sidebar a::before {
  content: '→';
  position: absolute;
  left: 0.5rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.sidebar a:hover {
  color: #ffffff;
  background: linear-gradient(135deg, #355F35 0%, #3F888C 100%);
  padding-left: 1.75rem;
}

.sidebar a:hover::before {
  opacity: 1;
  left: 0.75rem;
}

.sidebar a:hover .count {
  color: #ffffff;
  opacity: 1;
}

/* Category count styling - keep count inline */
.sidebar .cat-item a,
.sidebar li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.sidebar .count {
  font-size: 0.85rem;
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

/* Blog Post Styles */
.entry-header {
  margin-bottom: 2rem;
}

.entry-header h1 {
  font-family: 'Montserrat', sans-serif;
  color: #355F35;
  margin-bottom: 1rem;
}

.entry-meta {
  color: #666;
  font-size: 0.9rem;
}

.entry-meta span {
  margin-right: 1rem;
}

.post-thumbnail {
  margin-bottom: 2rem;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  border-radius: 8px;
}

.entry-content {
  line-height: 1.8;
  margin-bottom: 2rem;
}

.entry-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd;
}

.tags-links {
  color: #666;
}

.post-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid rgba(53, 95, 53, 0.15);
  display: flex !important;
  justify-content: space-between;
  gap: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  flex: 1;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

.post-navigation .nav-links {
  display: flex !important;
  width: 100% !important;
  gap: 1.5rem;
}

.post-navigation a {
  color: #ffffff !important;
  text-decoration: none;
  padding: 1.75rem 1.5rem !important;
  background: #355F35 !important;
  border-radius: 8px;
  display: block !important;
  text-align: center !important;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-weight: 500;
  line-height: 1.4 !important;
  min-height: auto !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.post-navigation a:hover {
  background: #3F888C !important;
  transform: translateY(-1px);
}

/* Ensure WordPress span elements don't break centering */
.post-navigation a .post-title,
.post-navigation a span,
.post-navigation a .nav-title {
  display: inline !important;
  width: auto !important;
  text-align: center !important;
  margin: 0 !important;
  padding: 0 !important;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
  justify-content: center !important;
  text-align: center !important;
}

/* Blog Listing Styles */
.blog-content h1 {
  font-family: 'Montserrat', sans-serif;
  color: #355F35;
  margin-bottom: 2rem;
}

.blog-content article {
  background: #ffffff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.blog-content article h2 a {
  color: #355F35;
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-content article h2 a:hover {
  color: #3F888C;
}

.entry-excerpt {
  margin-top: 1rem;
  line-height: 1.6;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: #2B6B6E;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: #3F888C;
}

/* Pagination */
.pagination {
  margin-top: 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination .page-numbers {
  padding: 0.5rem 1rem;
  background: #ffffff;
  color: #2B6B6E;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  background-color: #3F888C;
  color: #ffffff;
}

/* Responsive Blog Layout */
@media (max-width: 900px) {
  .blog-container {
    flex-direction: column;
    padding: 1rem;
  }

  .sidebar {
    flex: 1;
    position: static;
    max-height: none;
    margin-top: 2rem;
  }

  .blog-content {
    max-width: 100%;
  }

  .blog-content article {
    padding: 1.5rem;
  }

  .blog-content h1 {
    font-size: 1.75rem;
  }

  .blog-content article h2 {
    font-size: 1.5rem;
  }
}

/* Mobile-specific optimizations */
@media (max-width: 600px) {
  /* Ensure full width on mobile */
  body {
    width: 100vw;
    max-width: 100%;
  }

  /* Hero section mobile */
  .hero {
    padding: 3rem 1.25rem;
    min-height: 250px;
    margin: 0;
    width: 100%;
  }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
  }

  .hero p {
    font-size: 0.95rem;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  /* Blog container mobile */
  .blog-container {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  .blog-content {
    padding: 0;
    width: 100%;
  }

  .blog-content h1 {
    font-size: 1.5rem;
    padding: 0;
    margin-bottom: 1.5rem;
  }

  .blog-content article {
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 6px;
    width: 100%;
    max-width: 100%;
  }

  .blog-content article h2 {
    font-size: 1.25rem;
    line-height: 1.4;
  }

  .entry-meta {
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .entry-meta span {
    margin-right: 0;
  }

  /* Sidebar mobile */
  .sidebar {
    margin-top: 1.5rem;
    border-radius: 8px;
    width: 100%;
  }

  .sidebar .widget {
    padding: 1.25rem;
  }

  .sidebar h3 {
    font-size: 0.9rem;
  }

  /* Post thumbnail mobile */
  .post-thumbnail {
    margin: 1rem -1.25rem;
    border-radius: 0;
    max-width: calc(100% + 2.5rem);
  }

  .post-thumbnail img {
    border-radius: 0;
    width: 100%;
    height: auto;
  }

  /* Entry content mobile */
  .entry-content {
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 100%;
  }

  .entry-content p,
  .entry-excerpt p {
    max-width: 100%;
    overflow-wrap: break-word;
  }

  /* Read more button */
  .read-more {
    font-size: 0.9rem;
  }

  /* Post navigation mobile */
  .post-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  .post-navigation .nav-previous,
  .post-navigation .nav-next {
    width: 100%;
  }

  .post-navigation a {
    padding: 1rem 1.25rem;
    font-size: 0.9rem;
    text-align: center;
  }

  .post-navigation .nav-previous a,
  .post-navigation .nav-next a {
    text-align: center;
  }

  /* Main content mobile */
  main {
    padding: 1.5rem 1.25rem;
    width: 100%;
    max-width: 100%;
  }

  /* Footer mobile */
  footer {
    font-size: 0.8rem;
    padding: 1.5rem 1.25rem;
    line-height: 1.5;
    width: 100%;
  }

  /* Header mobile */
  header {
    padding: 1.5rem 1rem 0.5rem 1rem;
    width: 100%;
  }
}