

/* ========== CSS VARIABLES ========== */
:root {
  /* Primary theme colors */
  --color-bg-light: #ffffff;
  --color-bg-dark: #003366;
  --color-bg-accent: #fafad2;
  --color-bg-secondary: #c1d3fb;
  --color-bg-hover: #e2ecf9;
  --color-bg-body: #C0C0C0;
  --color-bg-noteText: #fcfcfc;

  /* Additional backgrounds */
  --color-bg-subnav: #fefae0;
  --color-bg-subnav-hover: #f0e68c;
  --color-bg-hover-light: #d6e8ff;
  --color-bg-changed: #FFCCCB;
  --color-bg-header: #6666ff;
  --color-bg-module_0: #ccccff;
  --color-bg-module_1: #d4d4ff;
  --color-bg-module_2: #ddddff;
  --color-bg-module_3: #e5e5ff;
  --color-bg-module_4: #eeeeff;

  /* Text colors */
  --color-text-black: #000000;
  --color-text-dark: #003366;
  --color-text-default: #333;
  --color-text-link: #447744;
  --color-text-link-hover: #000000;
  --color-text-invert: #ffffff;
  --color-text-boxgray: LightSlateGray;
  --color-text-label: #555;
  --color-text-generation: #888;
  --color-text-personHeader: #222;

  /* Bullet colors */
  --color-bullet-default: #666;

  /* Neutral tones */
  --color-gray-light: #eeeeee;
  --color-black: #000000;
  --color-white: #ffffff;
  --color-blue: #0000ff;

  /* Border / shadow */
  --color-border-light: #ccc;
  --color-border-right: #888;
  --color-border-grey: #999;
  --color-border-card: #d6d1c4;
  --color-shadow: rgba(0, 0, 0, 0.1);
}

/* ========== GLOBAL RESET ========== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  background-color: var(--color-bg-body);
  background-image: url('../img/fondo_azul.gif');
  line-height: 1.5;
}

@media (max-width: 600px) {
  body {
    font-size: 14px;
  }
}

table {
  font-family: inherit;
  font-size: inherit;
  border-collapse: collapse;
}

hr {
  margin: 5px 0;
  color: var(--color-text-black);
}

li {
  list-style-type: none;
}

/* ========== TYPOGRAPHY ========== */
a {
  text-decoration: none;
  color: var(--color-text-link);
  transition: all 0.2s ease-in-out;
}

a:hover { color: var(--color-black); }

a.button { color: var(--color-blue); }
a.button:hover { color: var(--color-black); }

a.act_button { color: var(--color-gray-light); }
a.act_button:hover { color: var(--color-bg-light); }

th { color: var(--color-white); }

.label { font-weight: bold; }

/* Headers */
.personHeader, .familyHeader, .noteHeader {
  background-color: var(--color-bg-accent) !important;
  font-weight: bold;
  padding: 5px;
  margin-bottom: 4px;
}

.personLinkHeader {
  background-color: var(--color-bg-secondary) !important;
  font-weight: bold;
  padding: 5px;
  margin-bottom: 4px;
}

/* ====================== LAYOUT ====================== */
.wrapper {
  display: grid;
  grid-template-areas:
    "header"
    "nav"
    "content"
    "right-col"
    "footer";
  gap: 20px;
  max-width: 990px;
  margin-left: 25px;
  margin-right: auto;
  padding: 10px;
}

@media (min-width: 700px) {
  .wrapper {
    grid-template-columns: 1fr 4fr 1fr;
    grid-template-areas:
      "header header  header"
      "nav    nav     nav"
      "content content right-col"
      "footer footer  footer";
  }
}

/* Flex Layouts */
.horizontal { display: flex; flex-direction: row; }

#bodyDiv {
  width: 100%;
  margin: 0 auto;
  display: flex;
}

/* Columns */
.leftDiv { width: 150px; }
.centerDiv { margin: 20px; width: 600px; }
.rightDiv { margin: 0; }

/* Right Column Box */
.right-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 12px;
}

/* ====================== COMPONENTS ====================== */

/* Navbar */
.modern-navbar-lite {
  width: 100%;
}

.modern-navbar-lite .main-nav-lite {
  display: flex;
  list-style: none;
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--color-bg-light);
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.modern-navbar-lite .main-nav-lite li {
  flex: 1 1 auto;
  text-align: center;
  border-right: 1px solid var(--color-border-light);
}

.modern-navbar-lite .main-nav-lite li:last-child { border-right: none; }

.modern-navbar-lite .main-nav-lite a {
  display: block;
  padding: 12px 0;
  font-weight: bold;
  background-color: var(--color-bg-secondary);
  color: var(--color-text-dark);
  transition: all 0.2s ease-in-out;
}

.modern-navbar-lite .main-nav-lite li.active a {
  background-color: var(--color-bg-dark);
  color: var(--color-white);
}

.modern-navbar-lite .main-nav-lite a:hover {
  background-color: var(--color-bg-hover-light);
  color: var(--color-text-black);
}

/* Sub Nav */
.sub-nav-lite {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  background-color: var(--color-bg-accent);
  border-radius: 10px;
  font-size: 13px;
}

/* Boxes */
.box-header {
  background-color: var(--color-bg-secondary);
  text-align: center;
  padding: 6px;
  color: var(--color-text-boxgray);
  font-weight: bold;
  border-radius: 4px;
}

.box-content {
  background-color: var(--color-bg-light);
  padding: 6px;
  border: 1px solid var(--color-border-light);
  border-radius: 4px;
}

/* Special Modules */
.modulo_0 { background-color: var(--color-bg-module_0); }
/* ... modulo_1, modulo_2, etc. ... */

/* ====================== UTILITIES ====================== */
.float-left { float: left; }
.float-right { float: right; }
.align-bottom { vertical-align: bottom; }
.mousePointer { cursor: pointer; }
.changed { background-color: var(--color-bg-changed); }

/* Attribute Selectors Cleanup */
td[bgcolor="C1D3FB"] { background-color: var(--color-bg-secondary); }
/* ... other td[bgcolor] ... */
td[align="center"] { text-align: center; }
td[width="100%"], td[width="120"] { width: 100%; }

.header-logo { float: right; border: 0; }

/* ====================== PAGE-SPECIFIC (Optional) ====================== */
/* #resultList and other specific IDs */
#resultList {
  width: 100%;
  border-spacing: 0;
}

#resultList .header {
  background-color: var(--color-bg-header);
  color: var(--color-white);
  font-weight: bold;
}

.main-head {
  grid-area: header;
  background-color: var(--color-bg-light);
}

.navBarDiv {
  grid-area: nav;
}

#contentCell {
  grid-area: content;
}

.right-col {
  grid-area: right-col;
}

.main-footer {
  grid-area: footer;
}