/*
  styles.css - Consolidated CSS for kivypython.com
  Main rules are from index.html. If similar rules existed in other HTML files, only the index.html version is kept.
*/
:root {
  --primary-color: #8e44ad;
  /* Vibrant Purple */
  --gradient-start: #6a11cb;
  --gradient-end: #2575fc;
  --dark-color: #1a1a2e;
  --light-gray: #f4f4f7;
  --text-color: #333;
  --light-text: #e0e0e0;
  --heading-color: #1a1a2e;
  --border-color: #EAEAEA;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-color);
  background-color: #fff;
}

h2 {
  margin-top: 1.5em;
}

.selection-heading h2 {
  margin-top: 0;
}

/* --- Header & Navigation --- */
header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  padding: 20px;
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--heading-color);
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2.5rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: var(--heading-color);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--primary-color);
}

 main:not(.full-width) {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* --- Sections --- */
.section {
  padding: 80px 20px;
}

.section-dark {
  background-color: var(--dark-color);
  color: var(--light-text);
}

.section-gray {
  background-color: var(--light-gray);
}

.section-heading {
  text-align: center;
  margin-bottom: 60px;
}

.section-heading h1 {
  font-size: 3.125rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 15px;
}

.section-heading h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-bottom: 15px;
}

.section-heading.dark h2 {
  color: #fff;
}

.section-heading p {
  font-size: 1.1rem;
  max-width: 700px;
  margin: 0 auto;
  color: #555;
}

.section-heading.dark p {
  color: var(--light-text);
}

/* --- Hero --- */
.hero-section {
  padding-top: 60px;
  padding-bottom: 60px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: auto;
}

.hero-text h1 {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--heading-color);
  line-height: 1.2;
}

.hero-text .subheadline {
  font-size: 1.2rem;
  margin: 20px 0;
}

.hero-text .platforms {
  margin-top: 30px;
  font-weight: 500;
  opacity: 0.8;
}

.hero-image-wrapper {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-radius: 15px;
}

.hero-image-wrapper img {
  border-radius: 15px;
  width: 100%;
  display: block;
}

/* --- Features Grid --- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.feature-card {
  background: #fff;
  text-align: center;
  padding: 30px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.feature-card .icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 1.25rem;
  color: var(--heading-color);
  margin-bottom: 10px;
}

/* --- IDE Section --- */
.ide-section-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.ide-section-grid img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.ide-features li {
  margin-bottom: 15px;
}

/* --- App Examples --- */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.app-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.app-card-link:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.app-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e9ecef;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.app-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-bottom: 1px solid #e9ecef;
}

.app-card-content {
  padding: 25px;
  flex-grow: 1;
}

.app-card h3 {
  font-size: 1.2rem;
  color: var(--heading-color);
  margin-bottom: 10px;
}

/* --- Misc --- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.cta-section .section-heading p {
  font-size: 1.25rem;
}

.image-box {
  display: flex;
  gap: 20px;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

button {
  background-color: var(--primary-color);
  color: var(--light-text);
  border: none;
  padding: 12px 25px;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

button a,
button a:visited {
  color: var(--light-text);
}
button a:hover {
  color: #fff;
}

/* --- Modal Styling --- */
.modal-lg {
  max-width: 800px;
}

pre {
  background-color: #2b2b2b;
  color: #a9b7c6;
  padding: 20px;
  border-radius: 6px;
  max-height: 60vh;
  overflow-y: auto;
  border: 1px solid #3c3f41;
}

code {
  font-family: "JetBrains Mono", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.9rem;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: #6a11cb;
  border-color: #6a11cb;
}

footer {
  text-align: center;
}