/* Modern CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Variables */
:root {
  --primary: #FFD700; /* Yellow */
  --primary-dark: #e6c200;
  --secondary: #2E7D32; /* Green */
  --dark: #333333;
  --light: #ffffff;
  --gray: #666666;
  --success: #4CAF50;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius: 8px;
  --radius-lg: 16px;
}

/* Base Styles */
body {
  font-family: 'Poppins', 'Roboto', sans-serif;
  line-height: 1.6;
  color: var(--dark);
  background: radial-gradient(1200px 600px at 10% -10%, rgba(255, 215, 0, 0.15), transparent 60%),
              radial-gradient(1200px 600px at 110% 10%, rgba(46, 125, 50, 0.15), transparent 60%),
              var(--light);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

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

.section-header h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.section-header p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  padding: 1rem 0;
  transition: var(--transition);
}

.header.scrolled {
  padding: 0.5rem 0;
}

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

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: #004684;
}

.logo-img {
  height: 75px;
  width: auto;
  vertical-align: middle;
  margin-right: 10px;
}

.logo-text {
  vertical-align: middle;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--dark);
}

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

.nav-links a {
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--dark);
  margin: 3px 0;
  transition: var(--transition);
  border-radius: 2px;
}

/* Hero Section */
.hero {
    padding: 10rem 0 5rem;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.28) 0%, rgba(46, 125, 50, 0.28) 100%);
    position: relative;
    overflow: hidden;
}


.hero-content {
  max-width: 700px;
  text-align: center;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: var(--dark);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--gray);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Services Section */
.services {
  padding: 6rem 0;
  background-color: white;
}

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

.service-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(46, 125, 50, 0.1); /* Light green background */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary); /* Yellow color for the icon */
}

.service-icon img {
    width: 64px;
    height: 64px;
}

.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--gray);
}

/* About Section */
.about {
  padding: 6rem 0;
  background-color: #f1f5f9;
}

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

.about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 500px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background: url('../images/our_team.jpg') center/cover no-repeat;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  color: var(--gray);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
}

.stat-item {
  text-align: center;
}

.stat-item h3 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.22) 0%, transparent 70%);
    z-index: -1;
}

.stat-item p {
  color: var(--gray);
  font-weight: 500;
}

/* Portfolio Section */
.portfolio {
  padding: 6rem 0;
  background-color: white;
}

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

.portfolio-item {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.portfolio-image {
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.portfolio-content {
  padding: 1.5rem;
  background: white;
}

.portfolio-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.portfolio-content p {
  color: var(--gray);
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background-color: #f1f5f9;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.contact-info p {
  color: var(--gray);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-item svg {
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 0.3rem;
}

.contact-item span {
  color: var(--gray);
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2); /* Green shadow */
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  background-color: var(--dark);
  color: white;
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-column h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-column h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--primary);
}

.footer-column p {
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #cbd5e1;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--primary);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.8rem;
  }
  
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-image {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    right: -100%;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: var(--transition);
    box-shadow: var(--shadow);
    padding: 2rem 0;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  
  .hamburger.active span:nth-child(2) {
    opacity: 0;
  }
  
  .hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  
  .hero {
    padding: 8rem 0 4rem;
  }
  
  .hero h1 {
    font-size: 2.3rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .section-header h2 {
    font-size: 2rem;
  }
  
  .stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .container {
    width: 95%;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
}

/* Style to keep logo and text in same line */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #004684;
}

/* === Portfolio rows layout (added) === */
.portfolio-rows {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Make each portfolio item a row */
.portfolio-rows .portfolio-item.detailed-view {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Image column */
.portfolio-rows .portfolio-item .portfolio-image {
    flex: 0 0 320px;
    max-width: 320px;
}

.portfolio-rows .portfolio-item .portfolio-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    object-fit: cover;
}

/* Content column */
.portfolio-rows .portfolio-item .portfolio-content {
    flex: 1 1 auto;
}

.portfolio-rows .portfolio-item .portfolio-content h3 {
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-size: 1.35rem;
}

.portfolio-rows .portfolio-item .portfolio-content p {
    line-height: 1.6;
    color: #333;
}

/* Add anchor offset for in-page links so headings aren't hidden behind fixed header */
[id]::before {
    display: block;
    content: " ";
    margin-top: -80px;
    height: 80px;
    visibility: hidden;
}

/* Responsive: stack image above content on small screens */
@media (max-width: 768px) {
    .portfolio-rows .portfolio-item.detailed-view {
        flex-direction: column;
    }
    .portfolio-rows .portfolio-item .portfolio-image {
        flex: 0 0 auto;
        max-width: 100%;
    }
}

/* Insights & Articles */
.insights {
  padding: 6rem 0;
  background-color: #f8fafc;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.insight-card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 180px;
  transition: var(--transition);
}

.insight-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.insight-title {
  font-size: 1.1rem;
  line-height: 1.35;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.insight-meta {
  color: var(--gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.insights-error {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  text-align: center;
}

@media (max-width: 576px) {
  .insights {
    padding: 4rem 0;
  }
}

/* Insights & Articles - layout refinements */
.insights .insights-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.insight-source {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #64748b; /* slate-500 */
  font-weight: 500;
  font-size: 0.95rem;
}

.insight-favicon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.insight-date {
  color: #94a3b8; /* slate-400 */
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.insight-title {
  font-size: 1.05rem;
  line-height: 1.4;
  font-weight: 600;
  margin: 0.35rem 0 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;       /* clamp to keep card heights consistent */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.insight-title a {
  color: var(--dark);
}

.insight-title a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.insight-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: auto;
}

@media (min-width: 768px) {
  .insight-card {
    min-height: 240px; /* ensure balanced rows on desktop */
  }
}

/* Insights & Articles - design polish (overrides) */
.insights {
  background: #F5F7FB;
}

.insights .section-header {
  margin-bottom: 2rem;
}

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

.insight-card {
  border: 1px solid rgba(0,0,0,0.06);
  padding: 1.25rem 1.25rem 1.25rem;
}

.insight-header {
  border-bottom: 1px dashed #e2e8f0;
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.insight-title {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.1rem;
  -webkit-line-clamp: 2;
}

.insight-excerpt {
  color: #475569; /* slate-600 */
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.insight-footer .btn {
  padding: 0.55rem 0.9rem;
  font-size: 0.95rem;
  border-width: 2px;
}

@media (min-width: 992px) {
  .insight-card {
    min-height: 260px;
  }
}

/* Insights grid: force 3x2 layout on desktop */
@media (min-width: 768px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
  }
}
@media (min-width: 992px) {
  .insights-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem;
  }
}

/* Insights fixed grid overrides to enforce 3x2 layout */
.insights .insights-grid {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 1fr; /* default mobile: 1 per row */
}

/* >=768px: 2 per row */
@media (min-width: 768px) {
  .insights .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 2rem;
  }
}

/* >=992px: 3 per row (two rows total for 6 cards) */
@media (min-width: 992px) {
  .insights .insights-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 2rem;
  }
}
