:root {
  --primary-color: #616b73;
  --primary-color-alpha: rgba(97, 107, 115, 0.75);
  --text-color: #333;
  --bg-light: #f8f9fa;
}

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

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navbar */
.navbar {
  background: var(--primary-color);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-brand a {
  font-size: 1.5rem;
  font-weight: bold;
  color: white;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.8;
}

.nav-brand .logo {
  height: 60px; 
  width: auto;
  display: block;
}

/* Responsive sizing */
@media (max-width: 768px) {
  .nav-brand .logo {
    height: 25px;
  }
}

/* Footer */
.footer {
  background: var(--bg-light);
  padding: 2rem 0;
  margin-top: 4rem;
  text-align: center;
}

/* Hero Section */
.hero {
  height: 40vh;
  min-height: 400px;
  background-size: cover;
  background-position: center bottom;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem; /* Add padding here for mobile breathing room */
}

.hero-content {
  background: var(--primary-color-alpha);
  padding: 2rem; /* Start with mobile padding */
  border-radius: 0.5rem;
  text-align: center;
  max-width: 800px;
  width: 100%;
  box-sizing: border-box;
}

.hero-content h1 {
  color: white;
  font-size: 2.5rem; /* Smaller for mobile */
  margin-bottom: 1rem;
  font-family: 'Antonio', sans-serif;
  font-weight: 300;
  letter-spacing: 0.25em;
}

.hero-description {
  color: white;
  font-size: 1rem; /* Smaller for mobile */
  line-height: 1.8;
}

/* Desktop styles */
@media (min-width: 768px) {
  .hero-content {
    padding: 3rem 4rem;
  }
  
  .hero-content h1 {
    font-size: 4rem;
  }
  
  .hero-description {
    font-size: 1.25rem;
  }
}

/* Services Section */
.services {
  padding: 4rem 0;
  background: #f8f9fa;
}

.services h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: white;
  padding: 0;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  overflow: hidden;
}

.card-header {
  padding: 1.5rem 2rem;
  margin: 0;
  text-align: center;
}

.card-header h3 {
  color: white;
  margin: 0;
  font-size: 1.5rem;
}

.card-body {
  padding: 2rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.card-subtitle {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1srem;
  font-weight: 600;
  text-align: center;
}

.card p {
  color: var(--text-color);
  line-height: 1.8;
}

.card-description p {
  margin-bottom: 1rem;
}

.card-description p:last-child {
  margin-bottom: 0;
}

/* Main Service Section */
.main-service {
  padding: 4rem 0;
  background: white;
}

.main-service h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
  font-weight: 700; /* Make the main title bold */
}

.main-service .text-muted {
  color: #6c757d;
  font-weight: 300; /* Make the subtitle lighter */
}

.main-service .lead {
  font-size: 1.25rem;
  font-weight: 300;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.main-service .content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 1.1rem; /* or 1.125rem for slightly larger */
}

/* About Panel */
.about-panel {
  background: var(--primary-color);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.about-panel.open {
  max-height: 500px;
  padding: 3rem 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  color: white;
}

.about-text h5 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.about-text p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

.about-contact h4 {
  margin-bottom: 1rem;
}

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

.about-contact li {
  margin-bottom: 0.5rem;
}

.about-contact a {
  color: white;
  text-decoration: none;
}

.about-contact a:hover {
  opacity: 0.8;
}

/* Hamburger Menu */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: white;
  display: block;
  transition: 0.3s;
}

.hamburger:hover span {
  background: rgba(255, 255, 255, 0.8);
}

/* About Panel */
.about-panel {
  background: #2D363D;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
}

.about-panel.open {
  max-height: 800px; /* Increased from 500px to allow smoother transition */
  padding: 3rem 0;
}

.about-panel h2 {
  color: white;
  margin-bottom: 1.5rem;
}

/* Article Styles */
.article-single {
  padding: 4rem 0;
}

.article-header {
  margin-bottom: 2rem;
  text-align: center;
}

.article-header h1 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.article-meta {
  color: #6c757d;
  font-size: 0.9rem;
}

.article-meta .author {
  margin-left: 1rem;
}

.featured-image {
  width: 100%;
  max-width: 800px;
  height: auto;
  margin: 2rem auto;
  display: block;
  border-radius: 0.5rem;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-tags {
  margin-top: 3rem;
  text-align: center;
}

.tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin: 0.25rem;
  font-size: 0.85rem;
}

/* Custom Carousel */
.custom-carousel {
  position: relative;
  max-width: 100%;
  margin: 3rem 0; /* Changed from auto */
  overflow: hidden;
  width: 100%; /* Explicit width */
}

.carousel-container {
  display: flex;
  transition: transform 0.6s ease-in-out;
  width: 100%;
  position: relative; /* Add this */
}

.article-content .custom-carousel {
  margin-left: 0;
  margin-right: 0;
}

.carousel-slide {
  min-width: 100%;
  width: 100%; /* Add explicit width */
  flex-shrink: 0;
  position: relative;
  max-height: 500px;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: auto; /* Change back to auto */
  max-height: 500px; /* Move max-height here */
  object-fit: contain;
  display: block;
  margin: 0 auto; /* Center the image */
}

.carousel-caption {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(248, 249, 250, 0.95);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  max-width: 80%;
  text-align: center;
}

.carousel-caption h5 {
  color: var(--primary-color);
  margin: 0 0 0.5rem 0;
  font-size: 1.25rem;
}

.carousel-caption p {
  color: var(--text-color);
  margin: 0;
  font-size: 0.95rem;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(97, 107, 115, 0.7);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 0.25rem;
  transition: background 0.3s;
  z-index: 10;
}

.carousel-btn:hover {
  background: rgba(97, 107, 115, 0.9);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

.carousel-dots {
  text-align: center;
  padding: 1rem 0;
}

.carousel-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ddd;
  margin: 0 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dot.active {
  background: var(--primary-color);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .carousel-caption {
    display: none;
  }
  
  .carousel-btn {
    font-size: 1.5rem;
    padding: 0.25rem 0.75rem;
  }
}

.article-content ul {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
  list-style-type: disc;
}

.article-content ul li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.article-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
  list-style-type: decimal;
}

.article-content ol li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.article-tags-top {
  margin-bottom: 1rem;
}

.article-tags-top {
  margin-bottom: 1rem;
}

.tag {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  margin: 0.25rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.3s;
}

.tag:hover {
  opacity: 0.8;
  color: white; /* Keep text white on hover */
}

/* Tag Archive Pages */
.tag-archive {
  padding: 4rem 0;
}

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

.archive-header h1 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.archive-count {
  color: #6c757d;
  font-size: 0.9rem;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.article-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.article-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

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

.article-card h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.article-card h2 a {
  color: var(--primary-color);
  text-decoration: none;
}

.article-card h2 a:hover {
  opacity: 0.8;
}

.article-card .article-meta {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.article-summary {
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  opacity: 0.8;
}

/* Latest Articles Section */
.latest-articles {
  padding: 4rem 0;
  background: var(--bg-light);
}

.latest-articles h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--primary-color);
}

.latest-articles .article-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.latest-articles .article-card h3 a {
  color: var(--primary-color);
  text-decoration: none;
}

.latest-articles .article-card h3 a:hover {
  opacity: 0.8;
}

/* Frameworks Section */
.frameworks {
  padding: 4rem 0;
  background: white;
}

.frameworks-content {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 3rem;
  align-items: center;
}

.frameworks h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.frameworks .lead {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.frameworks ul {
  list-style-type: disc;
  margin-left: 2rem;
}

.frameworks li {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.frameworks-logo img {
  width: 100%;
  max-width: 200px;
  height: auto;
}

@media (max-width: 768px) {
  .frameworks-content {
    grid-template-columns: 1fr;
  }
  
  .frameworks-logo {
    text-align: center;
  }
}