/* Updated home.css for scr.ing with dark mode support */

/* default.css – Updated for scr.ing (clean, variable-based, dual-mode) */

:root {
  /* Primary accent system */
  --accent: #3CB043; /* Green */
  --accent-secondary: #0e76bc; /* Blue */

  /* scr.ing brand colors */
  --scring-blue: #0e76bc;
  --scring-green: #3CB043;

  /* Global backgrounds and text (light/dark mode foundation) */
  --bg-light: #ffffff;
  --bg-dark: #121212;
  --text-light: #000000;
  --text-dark: #ffffff;

  /* Card and content zones */
  --card-light: #f5f5f5;
  --card-dark: #2b2b2b;

  /* Generic border colors */
  --border-color: #ccc;
  --border-color-dark: #444;

  /* Main text defaults for themes */
  --main-text: var(--text-light);
  --main-text-dark: var(--text-dark);

  /* Tap-to-copy feedback */
  --taptocopy: var(--scring-blue);
  --copied: var(--scring-green);

  /* Rank Box - Normal
  --rank-border-light: var(--accent);
  --rank-bg-light: transparent;
  --rank-text-light: var(--accent);

  --rank-border-dark: var(--accent);
  --rank-bg-dark: transparent;
  --rank-text-dark: var(--accent); */

  /* Rank Box - Active 
  --rank-active-border-light: var(--accent-secondary);
  --rank-active-bg-light: var(--accent-secondary);
  --rank-active-text-light: var(--text-dark);

  --rank-active-border-dark: var(--accent-secondary);
  --rank-active-bg-dark: var(--accent-secondary);
  --rank-active-text-dark: var(--text-light);*/

  /* Rank Box - Hover */
  --rank-hover-border-light: var(--accent-secondary);
  --rank-hover-bg-light: #e0f0ff;
  --rank-hover-text-light: var(--accent);

  --rank-hover-border-dark: var(--accent-secondary);
  --rank-hover-bg-dark: #3b3b3b;
  --rank-hover-text-dark: var(--accent);

  /* --- Rank Box Colours: Light Mode --- */
  --rank-border-light: var(--accent);                  /* Border on normal rank boxes */
  --rank-bg-light: transparent;                        /* Background on normal rank boxes */
  --rank-text-light: var(--accent);                    /* Text on normal rank boxes */

  --rank-active-border-light: var(--accent-secondary); /* Active rank border */
  --rank-active-bg-light: var(--accent-secondary);     /* Active rank background */
  --rank-active-text-light: var(--text-dark);          /* Active rank text */

  --rank-hover-border-light: var(--accent-secondary);  /* Hover border */
  --rank-hover-bg-light: #fef6fa;                      /* Hover background */
  --rank-hover-text-light: var(--accent);              /* Hover text */


  /* --- Rank Box Colours: Dark Mode --- */
  --rank-border-dark: var(--accent);
  --rank-bg-dark: transparent;
  --rank-text-dark: var(--accent);

  --rank-active-border-dark: var(--accent-secondary);
  --rank-active-bg-dark: var(--accent-secondary);
  --rank-active-text-dark: var(--text-light);

  --rank-hover-border-dark: var(--accent-secondary);
  --rank-hover-bg-dark: #3b3b3b;
  --rank-hover-text-dark: var(--accent);


  /* Checkbox Accent */
  --checkbox-accent-light: var(--accent);
  --checkbox-accent-dark: var(--accent);
  --checkbox-item-hover-light: #f5f5f5;
  --checkbox-item-hover-dark: #3b3b3b;

  /* Checked Backgrounds */
  --item-checked-bg-light: transparent;
  --item-checked-bg-dark: transparent;

  /* Divider line fallback */
  --divider-color-light: #ccc;
  --divider-color-dark: #444;

  /* Menu Dropdown Styling */
  --menu-text-light: #ffffff;
  --menu-bg-light: var(--accent-secondary);
  --menu-text-dark: #ffffff;
  --menu-bg-dark: var(--accent-secondary);

  /* Optional background tiles */
  /* --background-image-light: url('../test/background.svg');
  --background-image-dark: url('../test/background.svg'); */
  --background-repeat: repeat;
  --background-size: auto;
  --background-position: center;

  /* Header Gradient */
  --header-bg: linear-gradient(90deg, var(--accent-secondary), var(--accent));
  
  /* Header Tagline, Theme Toggle, Menu Icon */

  --header-icon-light: var(--text-light);
  --header-icon-dark: var(--text-dark);
  --header-tagline-light: var(--text-light);
  --header-tagline-dark: var(--text-dark);
  
  /* Heading <h1>					*/
  --heading-light: var(--accent-secondary);  /* or any value per theme */
  --heading-dark: var(--accent);             /* or whatever fits dark mode contrast */
}

/* Section subtitle styling */
#list-subtitle {
  text-align: center;
  font-size: 1.2rem;
  font-weight: normal;
  margin-top: 0.2rem;
  margin-bottom: 1.2rem;
  color: var(--main-text);
}
body.dark #list-subtitle {
  color: var(--main-text-dark);
}

/* Sponsor display block */
#sponsor-block {
  text-align: center;
  margin-top: 2rem;
}
#sponsor-slogan {
  font-style: italic;
  margin-bottom: 0.5rem;
}
#sponsor-url {
  margin-top: 0;
}
#sponsor-url a {
  text-decoration: none;
  color: var(--accent);
}
#sponsor-url a:hover {
  text-decoration: underline;
}

/* Header Bar Styling */
header {
  background: var(--header-bg);
  color: white;
}

/* Override dropdown background & link color (prevent core3.css bleed) */
#dropdownMenu {
  background-color: var(--menu-bg-light);
  color: var(--menu-text-light);
}
body.dark #dropdownMenu {
  background-color: var(--menu-bg-dark);
  color: var(--menu-text-dark);
}

#dropdownMenu a {
  color: var(--menu-text-light);
}
body.dark #dropdownMenu a {
  color: var(--menu-text-dark);
}

/* No layout or structural CSS in theme file – handled by core3.css */

/* Force override for rank box styling */
body.light .rank {
  border: 2px solid var(--rank-border-light) !important;
  background-color: var(--rank-bg-light) !important;
  color: var(--rank-text-light) !important;
}

body.dark .rank {
  border: 2px solid var(--rank-border-dark) !important;
  background-color: var(--rank-bg-dark) !important;
  color: var(--rank-text-dark) !important;
}

body.light .rank.active {
  background-color: var(--rank-active-bg-light) !important;
  color: var(--rank-active-text-light) !important;
  border-color: var(--rank-active-border-light) !important;
}

body.dark .rank.active {
  background-color: var(--rank-active-bg-dark) !important;
  color: var(--rank-active-text-dark) !important;
  border-color: var(--rank-active-border-dark) !important;
}

body.light .rank:hover {
  border-color: var(--rank-hover-border-light) !important;
  background-color: var(--rank-hover-bg-light) !important;
  color: var(--rank-hover-text-light) !important;
}

body.dark .rank:hover {
  border-color: var(--rank-hover-border-dark) !important;
  background-color: var(--rank-hover-bg-dark) !important;
  color: var(--rank-hover-text-dark) !important;
}



/* Original home.css */
.hero {
  padding: 3rem 2rem;
  text-align: center;
  background: var(--card-light);
  transition: background 0.3s, color 0.3s;
}
body.dark .hero {
  background: var(--card-dark);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}
body.dark .hero p {
  color: var(--text-dark);
}

.hero a {
  background: #0e76bc;
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
}

.examples, .how-it-works {
  padding: 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.examples h2, .how-it-works h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.example {
  background: var(--card-light);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  transition: background 0.3s, color 0.3s;
}
body.dark .example {
  background: var(--card-dark);
}

.example h3 {
  margin: 0 0 0.5rem;
}

.thumbnail, .thumbnail-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-color: #ccc; /* light fallback */
  border-radius: 6px;
  margin-bottom: 0.75rem;
  position: relative;
}

.thumbnail-wrapper img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.how-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  text-align: center;
  gap: 1rem;
}

.how-step {
  flex: 1 1 200px;
  background: var(--card-light);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  transition: background 0.3s, color 0.3s;
}
body.dark .how-step {
  background: var(--card-dark);
}

.button-group {
  margin-top: 1.5rem;
}

.button-group a {
  display: inline-block;
  margin: 0.5rem;
}
@media (max-width: 500px) {
  .example-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}
