/*
 * Stylesheet for El Chilenazo
 *
 * This theme draws inspiration from the colours of the Chilean flag: deep blue,
 * bright red and crisp whites. A handful of CSS variables define the palette
 * making it easy to adjust the mood if needed. Layouts are designed to be
 * responsive so the site looks good on phones, tablets and desktops. Some
 * basic animations add a modern feel without overwhelming the content.
 */

:root {
  --color-primary: #003f8f; /* deep Chilean blue */
  --color-secondary: #e63946; /* bright red */
  --color-light: #f9f9f9; /* off‑white backgrounds */
  --color-dark: #111827; /* dark text */
  --color-grey: #f1f5f9; /* light grey for cards */
  --max-width: 1200px;
  --font-sans: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  color: var(--color-dark);
  background-color: var(--color-light);
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}
a:hover {
  color: var(--color-secondary);
}

header {
  background-color: white;
  border-bottom: 2px solid var(--color-grey);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header img.logo {
  height: 50px;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
nav ul li {
  font-weight: 600;
}
nav ul li a {
  padding: 0.5rem;
  border-radius: 4px;
}
nav ul li a:hover,
nav ul li a.active {
  background-color: var(--color-primary);
  color: white;
}

/* Hero section */
.hero {
  position: relative;
  background-image: url('images/home_hero.png');
  background-size: cover;
  background-position: center;
  min-height: 70vh;
  display: flex;
  align-items: center;
  color: white;
}
.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}
.hero .content {
  position: relative;
  max-width: 700px;
  margin-left: 2rem;
  z-index: 1;
}
.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.search-bar {
  display: flex;
  max-width: 100%;
}
.search-bar input {
  flex: 1;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  border: none;
  border-radius: 4px 0 0 4px;
  outline: none;
}
.search-bar button {
  padding: 0.8rem 1.5rem;
  background-color: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s;
}
.search-bar button:hover {
  background-color: #b92a3b;
}

/* Section styling */
section {
  padding: 4rem 1rem;
}
section .container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.card {
  background-color: var(--color-grey);
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}
.card:hover {
  transform: translateY(-4px);
}
.card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}
.card p {
  font-size: 0.95rem;
}

/* Lists */
.list {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}
.list li {
  padding: 0.5rem 0;
  font-weight: 500;
}

.cta {
  text-align: center;
  background-color: var(--color-primary);
  color: white;
  padding: 3rem 1rem;
  border-radius: 8px;
}
.cta h2 {
  margin-bottom: 1rem;
}
.cta a {
  display: inline-block;
  margin-top: 1rem;
  background-color: var(--color-secondary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
}
.cta a:hover {
  background-color: #b92a3b;
}

/* Dictionary table */
.dictionary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}
.dictionary-table th,
.dictionary-table td {
  border: 1px solid var(--color-grey);
  padding: 0.75rem;
  text-align: left;
  vertical-align: top;
}
.dictionary-table th {
  background-color: var(--color-primary);
  color: white;
}
.dictionary-table tr:nth-child(even) {
  background-color: var(--color-grey);
}

/* Form styles */
form {
  max-width: 600px;
  margin: 0 auto;
}
form label {
  display: block;
  margin-top: 1rem;
  font-weight: bold;
}
form input,
form textarea,
form select {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.5rem;
  border: 1px solid var(--color-grey);
  border-radius: 4px;
}
form button {
  margin-top: 1.5rem;
  padding: 0.8rem 1.5rem;
  background-color: var(--color-primary);
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
form button:hover {
  background-color: var(--color-secondary);
}

/* Footer */
footer {
  background-color: #0d274d;
  color: white;
  padding: 2rem 1rem;
  text-align: center;
  margin-top: 4rem;
}
footer a {
  color: #bfd8ff;
}
footer p {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  nav ul {
    gap: 0.8rem;
  }
  nav ul li a {
    font-size: 0.9rem;
  }
}