/* Hide mobile menu on desktop */
@media (min-width: 993px) {
  .mobile-menu {
    display: none !important;
  }
}
:root {
  --primary: #0D3B66;
  --secondary: #47B5FF;
  --accent: #F4A261;
  --light: #f7f9fc;
  --dark: #1a1a2e;
  --text: #333;
  --white: #ffffff;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--light);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Navigation */
#site-header {
  background-color: var(--light);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fadeIn 1s ease-in;
}

.logo {
  height: 50px;
  transition: var(--transition);
}

.logo:hover {
  transform: scale(1.1);
}

.nav-container {
  display: flex;
  align-items: center;
}

nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-left: 1.5rem; /* Aligns menu with logo's left edge */
}

/* Mobile menu hidden by default; shown only at small widths */
.mobile-menu {
  display: none;
}

nav a {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0.8rem;
  border-radius: 4px;
}

nav a:hover {
  color: var(--secondary);
  background: rgba(71, 181, 255, 0.1);
}

.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1.8rem;
  color: var(--primary);
  padding: 0.5rem;
  position: absolute;
  right: 1.5rem;
  top: 1.5rem;
  z-index: 101;
}

.mobile-menu-toggle {
  position: absolute;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

/* Hero Section */
.hero {
  padding: 5rem 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(135deg, rgba(13, 59, 102, 0.05) 0%, rgba(71, 181, 255, 0.05) 100%);
  z-index: -1;
  border-radius: 0 0 30px 30px;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
}

.hero h2 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 1.5rem;
  line-height: 1.3;
  color: var(--primary);
}

.hero h2 span {
  display: block;
}

.hero p {
  max-width: 700px;
  margin: 0 auto 2.5rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text);
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
}

/* Insights Section */
.insights {
  padding: 4rem 0;
}

/* Ensure filter controls use the theme font and consistent sizing */
.insights-filter select,
.insights-filter input[type="text"],
.insights-filter button {
  font-family: inherit; /* use the site's font (Lato) */
  font-size: 1rem;
  line-height: 1.4;
}

.insights-filter input[type="text"]::placeholder {
  color: #9aa4b2;
  opacity: 1; /* ensure consistent placeholder visibility */
  font-family: inherit;
}

.insights-filter select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.section-title {
  text-align: center;
  margin-bottom: 2.5rem;
  color: var(--primary);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--secondary);
  margin: 0.8rem auto;
  border-radius: 2px;
}

.insight-list {
  display: grid;
  gap: 2rem;
}

/* Local adjustments for Insights page: ensure 16:9 thumbnails and equal-height cards */
.insight-list { align-items: stretch; }
.insight-item { height: 100%; }
.image-16-9 { width: 100%; aspect-ratio: 16/9; overflow: hidden; display: block; }
.image-16-9 img, .image-16-9 .wp-post-image, .image-16-9 > a > img { width:100%; height:100%; object-fit:cover; display:block; }
.insight-content { display:flex; flex-direction:column; }
@media (min-width: 900px) {
  /* Two columns on desktop for the Insights listing */
  /* Three columns on desktop for the Insights listing */
  .insight-list { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; }
}

.insight-item {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.insight-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.12);
  cursor: pointer; /* show it's clickable */
}
/* subtle image scale and title underline on hover to indicate clickability */
.insight-item .insight-img img { transition: transform var(--transition); }
.insight-item:hover .insight-img img { transform: scale(1.03); }
.insight-item:hover h3 { color: var(--secondary); text-decoration: underline; }

.insight-img {
  /* Thumbnail container — don't add inner padding so images can fully cover the area */
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 140px; /* fallback for older browsers/small screens */
  overflow: hidden;
  position: relative;
}

.insight-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.insight-item h3 {
  margin: 0 0 1rem 0;
  color: var(--primary);
  font-size: 1.4rem;
  transition: var(--transition);
}

.insight-item:hover h3 {
  /* keep title color subtle on hover but not light-blue */
  color: var(--primary);
}

.insight-item p {
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.insight-link {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.insight-link:hover {
  gap: 0.7rem;
  color: var(--primary);
}

/* Generic helper to force 16:9 with cover behavior */
.image-16-9 {
  width: 100%;
  overflow: hidden;
  display: block;
  position: relative;
}
/* Fallback for browsers without aspect-ratio: keep a 16:9 box using padding trick */
.image-16-9::before {
  content: "";
  display: block;
  padding-top: 56.25%; /* 9/16 = 56.25% */
}
.image-16-9 img,
.image-16-9 .wp-post-image,
.image-16-9 > a > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Allow rounded 16:9 containers (for single view banner) */
.image-16-9.rounded {
  border-radius: 10px;
  overflow: hidden;
}

/* Use 16:9 for about/contact artwork instead of fixed heights */
.about-image,
.contact-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/* About Section */
.about {
  padding: 5rem 0;
  background: var(--primary);
  color: var(--white);
  position: relative;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
}

.about-text p {
  margin-bottom: 1.5rem;
  opacity: 0.9;
}

.about-image {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/* Contact Section */
.contact {
  padding: 4rem 0;
  background-color: #f0f4f9;
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

/* Center forms when the contact page uses a single-column layout */
.contact-content.single-column {
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 2rem;
}

/* Limit form width and ensure it fills available column */
.contact-content.single-column .contact-text {
  width: 100%;
  max-width: 720px;
}

/* Ensure embedded form elements inside .contact-text center nicely */
.contact-content.single-column .contact-text form {
  width: 100%;
}

.contact-image {
  border-radius: 12px;
  height: 350px;
  background: linear-gradient(45deg, #47B5FF, #0D3B66);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

.contact-text {
  color: var(--text);
}

.contact-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.contact-details {
  margin-top: 2rem;
}

.contact-details p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

/* Footer */
#site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.footer-column h3 {
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.7rem;
}

.footer-column h3::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--secondary);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-links a:hover {
  color: var(--secondary);
  transform: translateX(5px);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--white);
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

.newsletter-form {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
}

.newsletter-form input {
  flex-grow: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 4px 0 0 4px;
  max-width: 420px;
  width: 100%;
}

.newsletter-form button {
  background: var(--secondary);
  color: white;
  border: none;
  padding: 0 1rem;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  opacity: 0.7;
}

/* Buttons */
.button {
  background: transparent;
  /* Ensure text is visible even if other styles try to hide it */
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary) !important;
  opacity: 1 !important;
  visibility: visible !important;
  border: 2px solid var(--primary);
  padding: 0.85rem 2rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
  text-align: center;
  box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}

.button:hover {
  background-color: var(--primary);
  color: var(--white) !important;
  -webkit-text-fill-color: var(--white) !important;
  box-shadow: 0 6px 15px rgba(0,0,0,0.12);
  transform: translateY(-3px);
}

.button.outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.button.outline:hover {
  background: var(--primary);
  color: var(--white);
}

/* Ensure buttons inside the dark .about section show text and proper contrast */
.about .button {
  /* No outline: transparent background, no border */
  background: transparent !important;
  color: var(--white) !important;
  -webkit-text-fill-color: var(--white) !important;
  border: none !important;
  padding: 0.7rem 1.8rem !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

.about .button:hover {
  background: var(--white) !important;
  color: var(--primary) !important;
  -webkit-text-fill-color: var(--primary) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 24px rgba(13,59,102,0.12) !important;
}

.about .button:focus {
  outline: none !important;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

.slide-in {
  animation: slideIn 0.8s ease forwards;
}

/* Responsive Design */
@media (max-width: 992px) {
  .about-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-image,
  .contact-image {
    height: 300px;
    order: -1;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
  }

  /* Hide the desktop menu on small screens */
  .desktop-menu {
    display: none !important;
  }

  /* Mobile menu styles (target only .mobile-menu) */
  .mobile-menu {
    display: flex;
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--light);
    flex-direction: column;
    padding: 4rem 2rem 2rem 2rem; /* Increased top padding */
    gap: 1.2rem;
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    transform: translateY(-150%);
    transition: transform 0.4s ease;
    z-index: 9999;
  }

  #mobile-menu-toggle:checked ~ .mobile-menu {
    transform: translateY(0);
  }
  
  .hero {
    padding: 3rem 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
    width: 100%;
  }
  
  .hero-buttons .button {
    width: 100%;
  }
}

@media (max-width: 576px) {
  .header-container {
    padding: 1rem;
  }
  
  .hero h2 span {
    display: inline;
  }
  
  .insights {
    padding: 3rem 0;
  }
  
  .insight-list {
    grid-template-columns: 1fr;
  }
  
  .about,
  .contact {
    padding: 3rem 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Our Method: keep three items side-by-side and disable hover/interactive affordances */
.method-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(3, 1fr);
  align-items: start;
}

/* On smaller screens stack vertically */
@media (max-width: 900px) {
  .method-grid {
    grid-template-columns: 1fr;
  }
}

/* Disable the global .insight-item hover effect inside the method grid */
.method-grid .insight-item:hover {
  transform: none !important;
  box-shadow: var(--shadow) !important;
  cursor: default !important;
}
.method-grid .insight-item .insight-img img {
  transform: none !important;
  transition: none !important;
}
.method-grid .insight-item h3 {
  text-decoration: none !important;
  color: inherit !important;
}