:root {
  --color-blue: #3776AB;
  --color-blue-dark: #2d5a88;
  --color-yellow: #FFD343;
  --color-yellow-hover: #ffe070;
  --color-gray-text: #333;
  --font-family: 'Source Sans 3', sans-serif;
  --font-mono: 'Consolas', 'Monaco', monospace;
  --bg-gradient: linear-gradient(to right, #2d5a88, #3776AB);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: #333;
  background-color: #fff;
}

a {
  text-decoration: none;
  color: var(--color-blue);
}

a:hover {
  text-decoration: underline;
  color: var(--color-blue-dark);
}

.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

/* TOP BAR */
.top-bar {
  background-color: #2d2d2d;
  font-size: 0.85rem;
  border-bottom: 2px solid #555;
}

.top-bar .container {
  display: flex;
  justify-content: flex-start;
  padding: 0;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  /* Safety for mobile */
}

.top-nav a {
  color: #999;
  padding: 8px 15px;
  border-left: 1px solid #3d3d3d;
  transition: all 0.2s;
}

.top-nav a:last-child {
  border-right: 1px solid #3d3d3d;
}

.top-nav a:hover,
.top-nav a.active {
  background-color: #3d3d3d;
  color: #fff;
  text-decoration: none;
  border-top: 2px solid var(--color-blue);
  margin-top: -2px;
}

.top-nav a.active {
  border-top-color: var(--color-blue);
  background-color: #3776AB;
  color: white;
}

/* HEADER */
header {
  padding: 20px 0;
  background-color: #1e415e;
  /* Same as hero */
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjMWU0MTVlIj48L3JlY3Q+CjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiPjwvcmVjdD4KPC9zdmc+');
  color: white;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 250px;
  flex-shrink: 0;
}

.logo-img {
  width: 60px;
  height: auto;
}

.logo-text {
  font-size: 2.5rem;
  font-weight: 300;
  color: #fff;
  /* Changed from #555 to white for contrast */
  font-family: 'Source Sans 3', sans-serif;
  letter-spacing: -1px;
}

.tm {
  font-size: 0.8rem;
  vertical-align: super;
  margin-left: 2px;
  color: #ccc;
  /* Lighter color for TM */
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-grow: 1;
}

.header-utils {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-donate {
  background-color: var(--color-yellow);
  color: #333;
  padding: 6px 12px;
  border-radius: 3px;
  font-weight: 600;
  font-size: 0.85rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* DROPDOWN */
.dropdown {
  position: relative;
  display: inline-block;
}

.btn-socialize {
  background-color: #ccc;
  /* Lighter background for the button itself */
  color: #333;
  padding: 8px 16px;
  /* Increased padding slightly */
  border-radius: 3px 3px 0 0;
  /* Rounded top only when open effectively, but initially all round */
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  font-family: var(--font-family);
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background-color: #ccc;
  /* Match button bg */
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 100;
  border-radius: 3px 0 3px 3px;
}

.dropdown-content a {
  color: #333;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 0.9rem;
}

.dropdown-content a:hover {
  background-color: #ddd;
  color: #000;
  text-decoration: none;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown:hover .btn-socialize {
  background-color: #ccc;
  color: #333;
  border-radius: 3px 3px 0 0;
  /* Keep top rounded, bottom flat for connection */
}

.search-box {
  display: flex;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 3px;
  padding: 2px;
  align-items: center;
}

.search-icon {
  padding: 5px;
  color: #999;
}

.search-box input {
  border: none;
  outline: none;
  padding: 5px;
  width: 150px;
  font-family: inherit;
}

.search-box button {
  background-color: var(--color-blue);
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 2px;
  font-weight: bold;
  cursor: pointer;
  font-size: 0.75rem;
  margin-left: 5px;
}

/* MAIN NAV */
.main-nav {
  background: var(--bg-gradient);
  border-radius: 5px;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  width: 100%;
}

.main-nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
  justify-content: center;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  font-weight: 400;
  font-size: 1rem;
  padding: 12px 15px;
  display: block;
}

.main-nav a:hover {
  text-decoration: none;
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* HERO */
.hero {
  width: 100%;
  background-color: #1e415e;
  background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1IiBoZWlnaHQ9IjUiPgo8cmVjdCB3aWR0aD0iNSIgaGVpZ2h0PSI1IiBmaWxsPSIjMWU0MTVlIj48L3JlY3Q+CjxyZWN0IHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InJnYmEoMjU1LDI1NSwyNTUsMC4wNSkiPjwvcmVjdD4KPC9zdmc+');
  color: white;
  padding: 30px 0;
  margin-top: 0;
  /* Removed border-top since header now matches */
  box-shadow: inset 0 5px 10px rgba(0, 0, 0, 0.2);
  position: relative;
}

.hero-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  position: relative;
  min-height: 300px;
}

/* CAROUSEL */
.carousel-item {
  display: none;
  width: 100%;
  /* Keep flex layout for side-by-side */
  gap: 40px;
  align-items: flex-start;
}

.carousel-item.active {
  display: flex;
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* HERO LEFT (CODE) */
.hero-code {
  background-color: #111;
  padding: 20px;
  border-radius: 5px;
  font-family: var(--font-mono);
  width: 50%;
  position: relative;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  height: 100%;
}

.code-window-header {
  color: #75715E;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.hero-code pre {
  font-size: 0.95rem;
  line-height: 1.4;
  color: #f8f8f2;
  margin: 0;
  white-space: pre-wrap;
  /* Wrap long lines on mobile */
  word-break: break-word;
}

.prompt {
  color: #555;
  user-select: none;
}

.variable {
  color: #fff;
}

.keyword {
  color: #F92672;
  font-weight: bold;
}

.string {
  color: #E6DB74;
}

.function {
  color: #66D9EF;
}

.operator {
  color: #F92672;
}

.hero-code-arrow {
  position: absolute;
  right: 20px;
  top: 20px;
  background: var(--color-yellow);
  color: #333;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 3px;
  opacity: 0.9;
}

/* HERO RIGHT (TEXT) */
.hero-text {
  width: 50%;
  padding-top: 10px;
}

.hero-text h1 {
  font-size: 2rem;
  margin: 0 0 15px 0;
  color: var(--color-yellow);
  font-weight: 600;
}

.hero-text p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 20px;
  color: #fff;
}

.hero-text .highlight {
  font-style: italic;
  font-weight: bold;
  color: #fff;
}

.learn-more-link {
  color: var(--color-yellow);
  font-weight: bold;
  text-decoration: underline;
}

.hero-carousel-dots {
  display: flex;
  gap: 8px;
}

.dot {
  background: rgba(255, 255, 255, 0.3);
  color: white;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.dot.active {
  background: #3776AB;
  color: white;
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.1);
}

.dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

/* INFO COLUMNS */
.info-columns {
  padding: 40px 0;
  border-bottom: 1px solid #eee;
}

.info-columns .container {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.info-col {
  flex: 1;
  border-top: 3px solid var(--color-blue);
  padding-top: 20px;
  text-align: left;
}

.info-col h3 {
  margin: 0 0 15px 0;
  font-size: 1.3rem;
  font-weight: 400;
  color: #555;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 0;
}

.info-col h3 i {
  color: #777;
  font-size: 1.1em;
}

.info-col p {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.4;
  margin-bottom: 15px;
}

.info-col a {
  color: var(--color-blue);
  font-size: 0.9rem;
}

.info-col .small {
  font-size: 0.8rem;
  color: #777;
}

/* FOOTER */
footer {
  background-color: #fff;
  padding: 40px 0;
  margin-top: 0;
  text-align: center;
  border-top: 1px solid #eee;
}

footer a {
  color: #777;
  margin: 0 10px;
}

footer .legal {
  margin-top: 20px;
  font-size: 0.8rem;
  color: #999;
}

/* RESPONSIVE */
@media screen and (max-width: 768px) {
  .header-container {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .header-right {
    align-items: center;
    width: 100%;
  }

  .header-utils {
    justify-content: center;
  }

  .carousel-item,
  .carousel-item.active {
    flex-direction: column;
  }

  .hero-code,
  .hero-text {
    width: 100%;
  }

  .info-columns .container {
    flex-direction: column;
  }

  .hero-carousel-dots-container {
    position: relative;
    width: 100%;
    justify-content: center;
    padding-top: 20px;
  }
}

/* CONTENT LAYOUTS */
.content-wrapper {
  display: flex;
  gap: 40px;
  padding: 40px 0;
  align-items: flex-start;
}

.main-content {
  flex: 3;
}

.sidebar {
  flex: 1;
  min-width: 250px;
}

.sidebar-widget {
  background: #fdfdfd;
  padding: 0;
  margin-bottom: 30px;
}

.sidebar-widget h3 {
  margin-top: 0;
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.widget-content {
  font-size: 0.9rem;
  line-height: 1.5;
  color: #555;
}

.widget-content p {
  margin-bottom: 15px;
}

/* EVENTS LIST */
.event-list-header {
  font-size: 1.5rem;
  margin-bottom: 20px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.event-item {
  margin-bottom: 25px;
}

.event-date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.event-title {
  font-size: 1.2rem;
  margin: 0 0 5px 0;
}

.event-title a {
  color: var(--color-blue);
  font-weight: 400;
}

.event-location {
  font-size: 0.9rem;
  color: #333;
}

/* NEWS LIST */
.news-item {
  margin-bottom: 30px;
}

.news-title {
  font-size: 1.3rem;
  margin: 0 0 8px 0;
}

.news-title a {
  color: var(--color-blue);
}

.news-meta {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

/* COMMUNITY / SUCCESS GRID */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.card {
  border: 1px solid #eee;
  border-radius: 5px;
  padding: 20px;
  background: #fff;
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

/* NEWS HERO */
.news-hero {
  background-color: #1e415e;
  color: white;
  padding: 30px 0;
  border-top: 1px solid #3d5a7d;
}

.news-hero h1 {
  color: var(--color-yellow);
  font-size: 1.8rem;
  margin: 10px 0;
}

.news-hero .subtitle {
  color: var(--color-yellow);
  font-weight: bold;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.news-hero p {
  font-size: 1.1rem;
  max-width: 800px;
  line-height: 1.5;
}

.news-hero a {
  color: var(--color-yellow);
  text-decoration: underline;
}

/* NEWS SIDEBAR */
.rss-link {
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #333;
  margin-top: 10px;
}



/* QUOTE HERO */
.quote-hero {
  background-color: #2d5a88;
  color: white;
  padding: 40px 0;
  text-align: center;
  border-top: 2px solid #FFD343;
}

.quote-hero h2 {
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--color-yellow);
  max-width: 800px;
  margin: 0 auto 20px auto;
  line-height: 1.4;
}

.quote-hero .author {
  font-size: 0.9rem;
  color: #ddd;
}

/* SUCCESS STORIES */
.h-header {
  color: #3d5a88;
  font-weight: normal;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.success-item {
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
  margin-bottom: 20px;
}

.success-item h3 {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

.success-item h3 a {
  color: var(--color-blue);
}

.success-item p {
  color: #444;
  line-height: 1.5;
  margin-bottom: 10px;
}

.read-more {
  font-size: 0.85rem;
  color: var(--color-blue);
}

.category-col h4 {
  font-size: 1.1rem;
  font-weight: normal;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 10px;
}

.category-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.category-list li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.category-list a {
  color: var(--color-blue);
}

/* COMMUNITY HERO */
.community-hero {
  background-color: #1e415e;
  background-image: linear-gradient(to bottom, #1e415e, #2d5a88);
  color: white;
  padding: 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.community-hero h1 {
  color: var(--color-yellow);
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.community-hero p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.community-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.comm-col {
  flex: 1;
  min-width: 300px;
}

.comm-widget {
  margin-bottom: 40px;
}

.comm-widget h3 {
  font-size: 1.2rem;
  color: #555;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.comm-widget h3 i {
  color: #a32a2a;
  /* Reddish icon color from screenshot */
}

.comm-widget content {
  color: #333;
  line-height: 1.5;
  font-size: 0.95rem;
}

.comm-widget a {
  color: var(--color-blue);
}

.comm-widget ul {
  padding-left: 20px;
  margin-top: 10px;
}

.comm-widget li {
  margin-bottom: 5px;
}

.quote-italic {
  font-style: italic;
  font-family: serif;
  font-size: 1.1rem;
  color: #444;
  margin-bottom: 20px;
  display: block;
}

/* DOCS HERO */
.docs-hero {
  background-color: #1e415e;
  color: white;
  padding: 50px 0;
  border-top: 1px solid #3d5a7d;
  position: relative;
}

.docs-hero-content {
  max-width: 600px;
}

.docs-hero h1 {
  color: var(--color-yellow);
  font-size: 2rem;
  margin-bottom: 15px;
}

.docs-hero p {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 20px;
}

.docs-btn {
  background-color: var(--color-yellow);
  color: #333;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
}

/* DOCS GRID */
.docs-categories {
  display: flex;
  gap: 20px;
  border-bottom: 2px solid #3776AB;
  padding-bottom: 40px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.docs-col {
  flex: 1;
  min-width: 200px;
}

.docs-col h3 {
  color: #555;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.docs-col ul {
  list-style: disc;
  padding-left: 20px;
  color: #333;
}

.docs-col li {
  margin-bottom: 8px;
}

.docs-col a {
  color: var(--color-blue);
}

/* DOCS 3.x vs Porting */
.docs-sections {
  display: flex;
  gap: 40px;
  margin-bottom: 40px;
}

.docs-section-col {
  flex: 1;
}

.docs-section-col h3 {
  color: #555;
  border-bottom: 1px solid #ddd;
  padding-bottom: 10px;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.docs-section-col ul {
  list-style: disc;
  padding-left: 20px;
}

/* NEEDS YOU BANNER */
.needs-you {
  background-color: #2d5a88;
  color: white;
  padding: 30px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 40px;
}

.needs-you-content {
  flex: 1;
}

.needs-you h2 {
  color: var(--color-yellow);
  margin-top: 0;
}

.needs-you p {
  line-height: 1.5;
}

.btn-yellow {
  background-color: var(--color-yellow);
  color: #333;
  padding: 10px 20px;
  border-radius: 4px;
  font-weight: bold;
  display: inline-block;
  margin-right: 10px;
}