:root {
  --bg: #f7f9fa;
  --white: #ffffff;
  --primary: #3bbec0;
  --secondary: #6b7c85;
  --text: #2a2e30;
  --glass: rgba(255, 255, 255, 0.65);
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

  /* Category Colors */
  --hogar: #2f80ed;
  --sostenibilidad: #27ae60;
  --clima: #56ccf2;
  --movilidad: #f2994a;
  --familia: #bb6bd9;
  --disruptivas: #8e44ad;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

section {
  padding: 6rem 6vw;
}

.hero {
  position: relative;
  height: 90vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-content {
  max-width: 600px;
  background: var(--glass);
  backdrop-filter: blur(15px);
  padding: 3rem;
  border-radius: var(--radius);
  margin-left: 5vw;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 1rem;
}

.btn {
  padding: 0.9rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  cursor: pointer;
}

.btn.primary {
  background: var(--primary);
  color: white;
  border: none;
}

.btn.primary:hover {
  background: #2dafb1;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(59, 190, 192, 0.3);
}

.btn.secondary {
  background: white;
  border: 1px solid var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--primary);
  color: white;
}

.btn.small {
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
}

.about {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.about img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: var(--shadow);
  border: 4px solid white;
}

.about h2 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.1rem;
  color: var(--secondary);
}

.categories {
  background: white;
}

.categories h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.categories .category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.category-card {
  padding: 2.5rem 1.5rem;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: center;
  font-size: 1.2rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.category-card:hover {
  transform: translateY(-5px);
  background: white;
  border-color: var(--primary);
  box-shadow: var(--shadow);
  color: var(--primary);
}

.featured h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
}

.featured .cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  border-radius: 18px;
  padding: 20px;
  background: #ffffff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* Category Card Colors */
.card.hogar {
  border-left: 6px solid var(--hogar);
}

.card.hogar h3,
.card.hogar .code,
.card.hogar .id-badge {
  color: var(--hogar);
}

.card.sostenibilidad {
  border-left: 6px solid var(--sostenibilidad);
}

.card.sostenibilidad h3,
.card.sostenibilidad .code,
.card.sostenibilidad .id-badge {
  color: var(--sostenibilidad);
}

.card.clima {
  border-left: 6px solid var(--clima);
}

.card.clima h3,
.card.clima .code,
.card.clima .id-badge {
  color: var(--clima);
}

.card.movilidad {
  border-left: 6px solid var(--movilidad);
}

.card.movilidad h3,
.card.movilidad .code,
.card.movilidad .id-badge {
  color: var(--movilidad);
}

.card.familia {
  border-left: 6px solid var(--familia);
}

.card.familia h3,
.card.familia .code,
.card.familia .id-badge {
  color: var(--familia);
}

.card.disruptivas {
  border-left: 6px solid var(--disruptivas);
}

.card.disruptivas h3,
.card.disruptivas .code,
.card.disruptivas .id-badge {
  color: var(--disruptivas);
}

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 12px;
  /* Small radius for inner image */
  margin-bottom: 1rem;
}

.card-content {
  padding: 0 0.5rem;
  /* Less padding as card has padding */
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  padding: 0;
  margin-top: 0.5rem;
}

.card p {
  color: var(--secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
  padding: 0;
  font-size: 0.95rem;
}

.card-actions {
  display: block;
  /* Block for full width button */
  padding: 0;
  margin-top: auto;
}

/* Button Ver */
.btn-ver {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: transparent;
  transition: all 0.25s ease;
  text-decoration: none;
  cursor: pointer;
}

/* Button Colors */
.card.hogar .btn-ver {
  color: var(--hogar);
}

.card.hogar .btn-ver:hover {
  background: var(--hogar);
  color: white;
}

.card.sostenibilidad .btn-ver {
  color: var(--sostenibilidad);
}

.card.sostenibilidad .btn-ver:hover {
  background: var(--sostenibilidad);
  color: white;
}

.card.clima .btn-ver {
  color: var(--clima);
}

.card.clima .btn-ver:hover {
  background: var(--clima);
  color: white;
}

.card.movilidad .btn-ver {
  color: var(--movilidad);
}

.card.movilidad .btn-ver:hover {
  background: var(--movilidad);
  color: white;
}

.card.familia .btn-ver {
  color: var(--familia);
}

.card.familia .btn-ver:hover {
  background: var(--familia);
  color: white;
}

.card.disruptivas .btn-ver {
  color: var(--disruptivas);
}

.card.disruptivas .btn-ver:hover {
  background: var(--disruptivas);
  color: white;
}

.open-ideas {
  background: #eaf6f6;
  text-align: center;
  max-width: 800px;
  margin: 4rem auto;
  border-radius: 32px;
  padding: 4rem;
}

.open-ideas h2 {
  margin-bottom: 1.5rem;
  color: #2b7a7c;
}

.open-ideas p {
  font-size: 1.2rem;
  color: #4a6364;
}

.books,
.contact {
  text-align: center;
}

.books h2,
.contact h2 {
  margin-bottom: 1.5rem;
  font-size: 2.5rem;
}

.books p,
.contact p {
  margin-bottom: 2rem;
  font-size: 1.1rem;
  color: var(--secondary);
}

footer {
  padding: 4rem 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--secondary);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .hero-content {
    margin: 0 5vw;
    bottom: 10%;
    padding: 2rem;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .about {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .about img {
    width: 200px;
    margin: 0 auto;
  }
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 6vw;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .logo {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--text);
}

.navbar nav a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--secondary);
  font-weight: 500;
  transition: color 0.3s;
}

.navbar nav a:hover {
  color: var(--primary);
}

/* Invention Page */
.invention-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  padding: 4rem 6vw;
  align-items: center;
  background: white;
}

.image-container img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.content-container h1 {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  line-height: 1.1;
}

.content-container .tagline {
  font-size: 1.5rem;
  color: var(--secondary);
  margin-bottom: 2rem;
  font-weight: 300;
}

/* Editorial Biography Page */
body.editorial-page {
  background-color: #f7f9fc;
  /* Light grey background */
}

.editorial-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

.editorial-header {
  text-align: center;
  margin-bottom: 3rem;
  padding-top: 2rem;
}

.editorial-header h1 {
  font-size: 3rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.editorial-header .subtitle {
  font-size: 1.2rem;
  color: var(--secondary);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  align-items: start;
}

.bio-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
  /* Subtle shadow */
  transition: transform 0.3s ease;
}

.bio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
}

.bio-card.photo {
  padding: 0;
}

.bio-card.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bio-card.text {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bio-card.text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #4a5568;
  margin-bottom: 1rem;
}

.bio-card.text p:last-child {
  margin-bottom: 0;
}

/* Featured Quote Card */
.bio-card.quote-featured {
  grid-column: 1 / -1;
  /* Full width on mobile/tablet, control via grid-template-columns if needed */
  background: #2d3748;
  color: white;
  padding: 4rem 2rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bio-card.quote-featured blockquote {
  font-size: 2rem;
  font-family: 'Outfit', serif;
  font-style: italic;
  line-height: 1.4;
  max-width: 800px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .editorial-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  /* Make quote span 2 columns or full width? Let's make it span 2 columns in a 3 col grid for asymmetry, or fully wide. */
  .bio-card.quote-featured {
    grid-column: span 3;
  }

  /* Create some visual interest with spans */
  .bio-card.tall {
    grid-row: span 2;
  }
}

.specs {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.specs span {
  background: var(--bg);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.intro {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

/* Gallery */
.gallery {
  background: var(--bg);
  text-align: center;
}

.gallery h2 {
  margin-bottom: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-grid img {
  width: 100%;
  border-radius: var(--radius);
  transition: transform 0.3s;
  cursor: pointer;
}

.gallery-grid img:hover {
  transform: scale(1.02);
}

/* Technical Details */
.technical-details {
  background: white;
  max-width: 800px;
  margin: 0 auto;
  padding: 6rem 6vw;
}

.technical-details article h2 {
  font-size: 2rem;
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.technical-details article p,
.technical-details article ul {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.technical-details ul {
  padding-left: 2rem;
}

.technical-details li {
  margin-bottom: 0.5rem;
}

/* Patent Footer */
.patent-footer {
  background: #2a2e30;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  padding: 4rem 6vw;
  flex-wrap: wrap;
}

.patent-footer .lock-icon {
  font-size: 3rem;
}

.patent-footer h3 {
  margin-bottom: 0.5rem;
  color: white;
  /* Ensure visible */
}

.patent-footer p {
  opacity: 0.8;
  max-width: 500px;
  color: #ccc;
}

@media (max-width: 768px) {
  .invention-hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 2rem;
  }

  .specs {
    justify-content: center;
  }

  .patent-footer {
    text-align: center;
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* Invention ID Badge */
.id-badge {
  color: var(--secondary);
  font-size: 0.7em;
  font-weight: 400;
  margin-right: 0.5rem;
  opacity: 0.8;
  background: rgba(0, 0, 0, 0.03);
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  vertical-align: middle;
  display: inline-block;
}

.invention-id {
  color: var(--primary);
  font-size: 0.6em;
  margin-right: 1rem;
  opacity: 0.7;
  border: 1px solid var(--primary);
  padding: 0.2rem 0.8rem;
  border-radius: 99px;
}

/* Video Player Wrapper */
.video-wrapper {
  max-width: 720px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100%;
  height: 100%;
  border: 0;
}


/* Categories List Layout */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  /* Wider columns for lists */
  gap: 2rem;
  max-width: 1400px;
  /* Allow more width */
  margin: 0 auto;
  align-items: start;
  /* Align to top */
}

/* Category Columns */
.category-column {
  border-radius: 20px;
  padding: 24px;
  color: white;
  background: white;
  /* Fallback */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow);
}

.category-column h3,
.category-column .category-header {
  margin-bottom: 12px;
  font-size: 1.4rem;
  font-weight: 600;
  color: white;
  padding-bottom: 0;
  /* Remove old style */
  border-bottom: none;
  /* Remove old style */
}

/* Category Colors */
.category-column.hogar {
  background: linear-gradient(135deg, var(--hogar), #1c5fbf);
}

.category-column.sostenibilidad {
  background: linear-gradient(135deg, var(--sostenibilidad), #1e8449);
}

.category-column.clima {
  background: linear-gradient(135deg, var(--clima), #2d9cdb);
}

.category-column.movilidad {
  background: linear-gradient(135deg, var(--movilidad), #d9822b);
}

.category-column.familia {
  background: linear-gradient(135deg, var(--familia), #9b51e0);
}

.category-column.disruptivas {
  background: linear-gradient(135deg, var(--disruptivas), #6c3483);
}

/* Updated List Item Styles for Dark Backgrounds */
.category-column .invention-list a {
  color: rgba(255, 255, 255, 0.9);
}

.category-column .invention-list a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.category-column .invention-list .id-ref {
  color: rgba(255, 255, 255, 0.7);
}

.invention-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.invention-list li {
  font-size: 0.95rem;
}

.invention-list a {
  text-decoration: none;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}

.invention-list a:hover {
  background: rgba(59, 190, 192, 0.05);
  color: var(--primary);
  transform: translateX(4px);
}

.invention-list .id-ref {
  font-family: monospace;
  font-size: 0.85em;
  opacity: 0.7;
  min-width: 35px;
}

/* Back to Portal Button */
.back-link {
  text-align: center;
  padding: 3rem 0 4rem;
}

/* About Summary (Home Page) */
.about-summary {
  text-align: center;
  padding: 4rem 2rem;
  background: #fff;
  max-width: 800px;
  margin: 0 auto;
}

.about-summary .avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  border: 4px solid white;
}

.about-summary h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.about-summary p {
  font-size: 1.1rem;
  color: var(--secondary);
  margin-bottom: 2rem;
}

.btn-back {
  display: inline-block;
  padding: 1rem 2rem;
  background: white;
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  border-radius: 99px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.btn-back:hover {
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}