:root {
  --primary-color: #90caf9;
  --secondary-color: #f48fb1;
  --accent-color: #42a5f5;
  --background-color: #121212;
  --foreground-color: #e0e0e0;
  --shadow-color: rgba(0, 0, 0, 0.6);
  --header-bg: rgba(0, 0, 0, 0.2);
  --footer-bg: rgba(0, 0, 0, 0.25);
}
body.light-mode {
  --primary-color: #265084;
  --secondary-color: #e85e94;
  --accent-color: #4a90e2;
  --background-color: #f3f6fa;
  --foreground-color: #21242b;
  --shadow-color: rgba(120, 140, 160, 0.15);
  --header-bg: rgba(240, 245, 255, 0.9);
  --footer-bg: rgba(220, 230, 240, 0.95);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(120deg, var(--background-color) 0%, #1a2332 100%);
  color: var(--foreground-color);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  transition: background 0.5s, color 0.4s;
}
body.light-mode {
  background: linear-gradient(120deg, var(--background-color) 0%, #e0eafc 100%);
  color: var(--foreground-color);
}
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px 18px 32px;
  background: var(--header-bg);
  box-shadow: 0 2px 6px var(--shadow-color);
  backdrop-filter: blur(2px);
}
.header-left {
  display: flex;
  align-items: center;
}
.header-left img {
  width: 112px;
  height: auto;
  margin-right: 20px;
  /* border-radius: 12px;  Eliminado para logo cuadrado */
  /* background: #fff;     Eliminado si tu logo es transparente */
  box-shadow: 0 2px 6px var(--shadow-color);
  object-fit: contain;
  display: block;
}
.company-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.company-title h1 {
  font-size: 1.7em;
  color: var(--primary-color);
  margin-bottom: 2px;
  font-weight: bold;
  letter-spacing: 0.5px;
}
.company-title .desc {
  color: #b8b8b8;
  font-size: 1em;
  font-weight: 400;
  margin-top: 2px;
}
header nav a {
  color: var(--foreground-color);
  font-size: 1em;
  margin-left: 24px;
  text-decoration: none;
  transition: color 0.3s;
}
header nav a:hover {
  color: var(--secondary-color);
}
#theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 0 0 18px;
  font-size: 1.5em;
  color: var(--foreground-color);
  outline: none;
  transition: color 0.25s;
}
#theme-toggle:focus { outline: 2px solid var(--accent-color);}
#theme-toggle .fa-sun {
  color: #ffca38;
  transition: color 0.2s;
}
#theme-toggle .fa-moon {
  color: var(--secondary-color);
  transition: color 0.2s;
}
main {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  padding: 50px 40px 40px 40px;
  justify-items: center;
  align-items: center;
  width: 100%;
}
.tile {
  background: #1e2738;
  color: var(--foreground-color);
  text-align: center;
  border-radius: 16px;
  padding: 44px 22px 38px 22px;
  width: 260px;
  min-height: 250px;
  box-shadow: 0 8px 20px var(--shadow-color);
  transition: transform 0.25s, box-shadow 0.25s, background 0.4s;
  cursor: pointer;
  opacity: 0;
  transform: translateY(28px);
  animation: fadeInUp 0.5s forwards;
}
body.light-mode .tile {
  background: #f8fbff;
  color: var(--foreground-color);
  box-shadow: 0 6px 16px var(--shadow-color);
}
.tile:hover {
  transform: translateY(-5px) scale(1.04);
  box-shadow: 0 14px 32px var(--shadow-color);
  background: #22314a;
}
body.light-mode .tile:hover {
  background: #e7f1fa;
}
.tile i {
  font-size: 2.4em;
  margin-bottom: 14px;
  color: var(--accent-color);
  display: block;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px);}
  to { opacity: 1; transform: translateY(0);}
}
/* Animation delays */
.tile:nth-child(1) { animation-delay: 0.17s;}
.tile:nth-child(2) { animation-delay: 0.35s;}
.tile:nth-child(3) { animation-delay: 0.52s;}
.tile:nth-child(4) { animation-delay: 0.7s;}
.tile:nth-child(5) { animation-delay: 0.87s;}
.tile h2 {
  font-size: 1.28em;
  margin-bottom: 10px;
  color: var(--primary-color);
  font-weight: 500;
}
.tile p {
  font-size: 1em;
  margin-bottom: 18px;
  color: #bcc3cf;
  min-height: 46px;
}
body.light-mode .tile h2 {
  color: var(--accent-color);
}
.tile .button {
  display: inline-block;
  padding: 10px 22px;
  background: var(--accent-color);
  color: var(--background-color);
  border-radius: 4px;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 0.98em;
  transition: background 0.3s;
  text-decoration: none;
  letter-spacing: 1px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.16);
}
.tile .button:hover {
  background: var(--primary-color);
  color: var(--background-color);
}
footer {
  background: var(--footer-bg);
  text-align: center;
  padding: 19px 0 8px 0;
  font-size: 0.95em;
  color: var(--foreground-color);
  letter-spacing: 0.1px;
  margin-top: 10px;
  box-shadow: 0 -2px 12px var(--shadow-color);
}
.footer-desc {
  display: block;
  margin-top: 2px;
  font-size: 0.93em;
  color: #b0bac8;
}
@media (max-width: 900px) {
  header { flex-direction: column; align-items: flex-start; padding: 22px 14px 16px 14px;}
  main { padding: 20px 10px 24px 10px; gap: 20px;}
  .tile { width: 98vw; max-width: 340px;}
  .header-left img { width: 44px;}
  .company-title h1 { font-size: 1.2em;}
  .company-title .desc { font-size: 0.93em;}
}
@media (max-width: 600px) {
  main { grid-template-columns: 1fr; }
  .tile { width: 98vw; max-width: 98vw; padding: 28px 5vw;}
  .company-title h1 { font-size: 1em;}
}
