/* =========================================================
   MI TECNOLOGICO — GLOBAL SITE STYLES
   Add to every page:
   <link rel="stylesheet" href="css/style.css">
   ========================================================= */

:root {
  --ink: #10252b;
  --deep: #07181d;
  --teal: #00a8a8;
  --lime: #caff4b;
  --paper: #f6f6ef;
  --white: #ffffff;
  --muted: #61777c;
  --line: rgba(16, 37, 43, 0.15);

  --content-width: 1180px;
  --shadow: 12px 12px 0 var(--ink);
  --radius: 0;
}

/* Reset and foundation */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background-color: var(--paper);
  background-image: url("../Image1.jpg");
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
}

body[background] {
  background-image: url("../Image1.jpg");
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--lime);
  transition: color 180ms ease, border-color 180ms ease;
}

a:hover {
  color: var(--teal);
  border-color: var(--teal);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 4px;
}

/* Main content wrapper.
   Works with legacy table-based pages without requiring HTML changes. */
body > table,
body > center > table,
body > div > table {
  width: min(var(--content-width), calc(100% - 32px)) !important;
  margin: 24px auto !important;
  background: rgba(246, 246, 239, 0.96);
  border-collapse: collapse;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow);
}

/* Legacy tables become modern content grids */
table {
  border-color: var(--line);
}

table[border] {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.66);
}

table[border] td,
table[border] th {
  padding: 24px !important;
  vertical-align: top;
  border-color: var(--line) !important;
  transition: background-color 180ms ease, transform 180ms ease;
}

table[border] td:hover {
  background: var(--white);
}

/* Keep tables readable on compact screens */
@media (max-width: 720px) {
  body > table,
  body > center > table,
  body > div > table {
    width: calc(100% - 20px) !important;
    margin: 10px auto !important;
    box-shadow: 7px 7px 0 var(--ink);
  }

  table[border],
  table[border] tbody,
  table[border] tr,
  table[border] td,
  table[border] th {
    display: block;
    width: 100% !important;
  }

  table[border] td,
  table[border] th {
    min-height: auto !important;
    padding: 20px !important;
  }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 0.65em;
  color: var(--ink);
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-weight: 900;
  line-height: 0.96;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(38px, 7vw, 82px);
}

h2 {
  font-size: clamp(29px, 5vw, 52px);
}

h3 {
  font-size: clamp(20px, 3vw, 31px);
}

h4 {
  font-size: 19px;
}

p {
  margin: 0 0 1.25rem;
}

p:last-child {
  margin-bottom: 0;
}

b,
strong {
  font-weight: 800;
}

blockquote {
  margin: 32px 0;
  padding: 28px 30px;
  color: var(--ink);
  border-left: 9px solid var(--teal);
  background: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(21px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.03em;
}

/* Older font tags: retain intended emphasis while making pages coherent */
font[color="#ff0000"],
font[color="#FF0000"] {
  color: var(--teal) !important;
}

font[size="5"] {
  font-family: "Arial Black", Arial, Helvetica, sans-serif;
  font-size: clamp(30px, 5vw, 56px) !important;
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

font[size="4"] {
  font-size: 1.25rem !important;
}

font[size="3"] {
  font-size: 1rem !important;
}

font[size="2"] {
  color: var(--muted);
  font-size: 0.875rem !important;
}

/* Lists */
ul,
ol {
  margin: 1.5rem 0;
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.65rem;
}

/* Preserve numbered/symbol-based ID lists and give them card styling */
ul[id*="0"],
ul[id*="1"],
ul[id*="2"],
ul[id*="3"],
ul[id*="4"],
ul[id*="5"],
ul[id*="6"],
ul[id*="7"],
ul[id*="8"],
ul[id*="9"] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 28px 0;
  padding: 1px;
  list-style: none;
  background: var(--line);
}

ul[id*="0"] li,
ul[id*="1"] li,
ul[id*="2"] li,
ul[id*="3"] li,
ul[id*="4"] li,
ul[id*="5"] li,
ul[id*="6"] li,
ul[id*="7"] li,
ul[id*="8"] li,
ul[id*="9"] li {
  margin: 0;
  padding: 22px;
  background: var(--paper);
}

ul[id*="0"] li:hover,
ul[id*="1"] li:hover,
ul[id*="2"] li:hover,
ul[id*="3"] li:hover,
ul[id*="4"] li:hover,
ul[id*="5"] li:hover,
ul[id*="6"] li:hover,
ul[id*="7"] li:hover,
ul[id*="8"] li:hover,
ul[id*="9"] li:hover {
  background: var(--white);
}

@media (max-width: 720px) {
  ul[id*="0"],
  ul[id*="1"],
  ul[id*="2"],
  ul[id*="3"],
  ul[id*="4"],
  ul[id*="5"],
  ul[id*="6"],
  ul[id*="7"],
  ul[id*="8"],
  ul[id*="9"] {
    grid-template-columns: 1fr;
  }
}

/* Forms */
form {
  margin: 28px 0;
  padding: clamp(22px, 4vw, 42px);
  background: var(--white);
  border: 1px solid var(--line);
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  margin: 0 0 18px;
  padding: 13px 14px;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  font: inherit;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  background: var(--white);
  outline: 3px solid rgba(0, 168, 168, 0.18);
}

/* Buttons and legacy submit controls */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
  display: inline-block;
  width: auto;
  margin: 0 8px 8px 0;
  padding: 13px 20px;
  cursor: pointer;
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 0;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
  transform: translate(2px, 2px);
  background: var(--teal);
  box-shadow: 2px 2px 0 var(--ink);
}

/* Decorative image separators retained from original site */
img[src*="line1.gif"] {
  display: block;
  width: min(573px, 92%) !important;
  max-width: 100%;
  height: 6px !important;
  margin: 30px auto !important;
  object-fit: cover;
  opacity: 0.9;
}

/* Images that are not decorative */
a img {
  border: 0;
  transition: transform 180ms ease, filter 180ms ease;
}

a:hover img {
  transform: scale(1.015);
  filter: saturate(1.08);
}

/* Utility classes for newer pages */
.site-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 24px auto;
  background: rgba(246, 246, 239, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.site-header {
  padding: clamp(38px, 7vw, 82px);
  color: var(--white);
  background: var(--ink);
}

.site-header h1,
.site-header h2,
.site-header h3 {
  color: var(--white);
}

.content-section {
  padding: clamp(28px, 5vw, 70px);
  border-bottom: 1px solid var(--line);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.card {
  padding: 28px;
  background: var(--paper);
  transition: background-color 180ms ease, transform 180ms ease;
}

.card:hover {
  background: var(--white);
  transform: translateY(-3px);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 26px clamp(24px, 5vw, 70px);
  color: #c6d5d5;
  background: var(--deep);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .site-shell {
    width: calc(100% - 20px);
    margin: 10px auto;
    box-shadow: 7px 7px 0 var(--ink);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    flex-direction: column;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Printing */
@media print {
  body {
    background: var(--white) !important;
  }

  body > table,
  .site-shell {
    width: 100% !important;
    margin: 0 !important;
    box-shadow: none !important;
  }

  a {
    color: var(--ink);
    border-bottom: 0;
  }
}
