/* Import centralized color palette */
@import url('./shared-colors.css');

/* Base setup */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
}

/* Layout helpers */
.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

/* Header */
header {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  padding: 0rem 0;
  border-bottom: 3px solid var(--primary-green);
  box-shadow: 0 2px 10px var(--shadow-light);
}

.header-content {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.header-content nav {
  margin-left: auto;      /* pushes nav to the right */
}

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo img {
  height: 120px;
  border-radius: 2px;
  margin-left: -8rem;
}

.logo h1 {
  font-size: 2.8rem;
  color: var(--primary-green);
  font-weight: 600;
}

/* Navigation */

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--primary-green);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

nav a:hover {
  background-color: var(--primary-green);
  color: var(--text-white);
}

/* Hero section */
.intro {
  padding: 2rem 0;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
  text-align: left;
  position: relative;
}

.intro h2 {
  font-size: 2.3rem;
  color: var(--primary-green);
  margin-bottom: 1rem;
  font-weight: 600;
}

.intro p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: auto;
  margin: 0;
}

/* Add modern green gradient accent */
.intro::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-green), var(--primary-green-light), var(--primary-green));
}

/* App preview */
.app-preview {
  padding: 4rem 0;
  background-color: var(--bg-primary);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.app-block {
  background-color: var(--bg-primary);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

.app-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 30px var(--shadow-green);
}

.app-block h3 {
  margin-bottom: 1rem;
}

.app-block h3 a {
  text-decoration: none;
  color: var(--primary-green);
  font-size: 1.4rem;
  font-weight: 600;
}

.app-block h3 a:hover {
  color: var(--primary-green-light);
}

.app-block p {
  color: var(--text-muted);
  line-height: 1.7;
}

/* Footer */
footer {
  background-color: var(--bg-dark);
  color: var(--text-white);
  text-align: center;
  padding: 2rem 0;
  margin-top: 4rem;
}

footer p {
  opacity: 0.9;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-medium);
    border-radius: 4px;
    box-shadow: 0 2px 10px var(--shadow-medium);
    min-width: 250px;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    display: block;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: var(--text-primary);
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: var(--success-green);
    color: var(--text-white);
}

.dropdown-toggle {
    cursor: pointer;
}

/* Responsive design */
@media (max-width: 768px) {
  .header-content {
    justify-content: center;
    text-align: center;
  }
  
  .logo {
    margin-bottom: 1rem;
  }
  
  nav ul {
    justify-content: center;
  }
  
  .intro h2 {
    font-size: 2rem;
  }
  
  .app-grid {
    grid-template-columns: 1fr;
  }
}
/* --- Header tweaks --- */
.logo {
  text-decoration: none;
}
.logo h1 {
  line-height: 1.1;
}

/* Ensure the title text inside the linked logo does not show an underline
   while keeping the link itself discoverable on hover. */
.logo h1 {
  text-decoration: none;       /* prevent underline on the H1 text */
  display: inline-block;      /* ensure text-decoration can be overridden */
}

.logo:hover {
  text-decoration: underline; /* underline the whole link on hover for affordance */
}
.logo .subline {
  font-size: 1.4rem;
  color: var(--text-secondary);
}

/* Fix tooltip cutoff */
.dropdown-menu {
  white-space: normal; /* allow wrapping */
}

/* Responsive logo scaling */
.logo img {
  max-width: 25%;
  height: auto;
}

/* Check for squarish screens */
@media (max-aspect-ratio: 1/1) {
  .logo img {
    height: 90px;
  }
  .logo h1 {
    font-size: 2rem;
  }
}
