:root {
  --primary-color: #0077B6;
  --secondary-color: #90E0EF;
  --text-color: #2D3142;
  --bg-color: #F8F9FA;
  --sand-color: #F4F1DE;
  --white: #FFFFFF;
  --transition: all 0.3s ease;
  --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

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

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.6;
}

/* Typography */
h1, h2, h3 { font-weight: 700; line-height: 1.2; margin-bottom: 1rem; color: var(--primary-color); }
p { margin-bottom: 1rem; }
a { text-decoration: none; color: var(--primary-color); transition: var(--transition); }
a:hover { color: #005f92; }

/* Components */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  background-color: var(--primary-color);
  color: var(--white);
  border-radius: 8px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}
.btn:hover {
  background-color: #005f92;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 119, 182, 0.3);
}

/* Layout */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}
.logo {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  gap: 10px;
}
nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}
nav a {
  font-weight: 500;
  color: var(--text-color);
}
nav a:hover {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  position: relative;
  color: var(--white);
  text-align: center;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 4rem;
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);
}
.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
  font-weight: 500;
}

/* Widget Finder */
.widget-finder {
  background: var(--white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border: 1px solid #eaeaea;
}
.finder-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  align-items: end;
}
.form-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}
.form-control {
  width: 100%;
  padding: 12px;
  border: 2px solid #eee;
  border-radius: 8px;
  font-size: 1rem;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: var(--transition);
  cursor: pointer;
}
.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

/* Grids */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

/* Cards */
.card {
  background: var(--white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.card-img {
  height: 200px;
  object-fit: cover;
  width: 100%;
}
.card-content {
  padding: 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}
.card p {
  color: #666;
  margin-bottom: 1.5rem;
  flex-grow: 1;
  text-shadow: none; /* Reset shadow for card text */
}

/* Sections */
section {
  padding: 5rem 0;
}
.bg-sand {
  background-color: var(--sand-color);
}
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem auto;
}

/* Article Detail */
.article-header {
  height: 50vh;
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding-bottom: 3rem;
}

.article-title-wrap {
  position: relative;
  z-index: 1;
  color: var(--white);
}
.article-title-wrap h1 {
  color: var(--white);
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.8), 0 0 20px rgba(0,0,0,0.5);
}
.article-title-wrap p {
  text-shadow: 1px 1px 5px rgba(0,0,0,0.8), 0 0 10px rgba(0,0,0,0.5);
  font-weight: 500;
}
.article-body {
  max-width: 800px;
  margin: -3rem auto 3rem auto;
  background: var(--white);
  padding: 3rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 2;
  font-size: 1.1rem;
}

/* Affiliation Banner */
.affiliation-banner {
  background: var(--primary-color);
  color: var(--white);
  padding: 3rem;
  border-radius: 12px;
  text-align: center;
  margin: 4rem 0;
}
.affiliation-banner h2 { color: var(--white); }
.affiliation-banner .btn {
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 1.1rem;
  padding: 1rem 2rem;
  margin-top: 1rem;
  text-shadow: none;
}

/* Animations */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* --- FOOTER SEARCH & ENHANCEMENTS --- */
.site-footer {
  background: #1a1a2e;
  color: #fff;
  padding: 0;
  margin-top: 8rem;
}

.footer-search-wrapper {
  background-color: var(--primary-color);
  padding: 4rem 0 2rem 0;
  position: relative;
}

.footer-search {
  max-width: 950px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 16px;
  padding: 3rem;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  color: var(--text-color);
  position: relative;
  top: -8rem;
  margin-bottom: -6rem;
}

.footer-search-content h2 {
  color: var(--primary-color);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}

.footer-search-content p {
  color: #555;
  margin-bottom: 2.5rem;
  font-size: 1.1rem;
}

.search-icon {
  width: 50px;
  height: 50px;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

.footer-form {
  display: flex;
  background: #f8f9fa;
  padding: 8px;
  border-radius: 50px;
  border: 1px solid #e1e4e8;
  align-items: center;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.footer-form .form-group-inline {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid #e1e4e8;
}

.footer-form .form-group-inline:last-of-type {
  border-right: none;
}

.footer-form .form-group-inline i {
  color: var(--primary-color);
  margin-right: 12px;
  width: 22px;
  height: 22px;
}

.footer-form input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 1rem;
  color: var(--text-color);
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.btn-search {
  border-radius: 50px;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.text-center {
  text-align: center;
}

/* Footer Widgets Grid */
.footer-widgets {
  padding: 4rem 0 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}
.footer-col h3 {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}
.footer-col h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 3px;
  background: var(--secondary-color);
  border-radius: 2px;
}
.footer-col p {
  color: #a0a0b0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.8rem;
}
.footer-links a {
  color: #a0a0b0;
  text-decoration: none;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links a i {
  width: 16px;
  height: 16px;
}
.footer-links a:hover {
  color: var(--secondary-color);
  transform: translateX(5px);
}

.footer-bottom {
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
}

.footer-bottom-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  margin: 0;
  color: #888;
  font-size: 0.95rem;
}

.footer-partner {
  font-size: 0.95rem;
  color: #888;
}

.footer-partner a {
  color: var(--secondary-color);
}

@media (max-width: 900px) {
  .footer-form {
    flex-direction: column;
    border-radius: 16px;
    background: transparent;
    border: none;
    padding: 0;
    gap: 15px;
    box-shadow: none;
  }
  .footer-form .form-group-inline {
    border-right: none;
    background: #f8f9fa;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    width: 100%;
  }
  .btn-search {
    width: 100%;
    justify-content: center;
  }
  .footer-search {
    padding: 2.5rem 1.5rem;
    top: -6rem;
    margin-bottom: -4rem;
  }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  nav ul { display: none; }
  .article-body { margin-top: 0; border-radius: 0; padding: 1.5rem; }
  .finder-form { grid-template-columns: 1fr; }
  .widget-finder { padding: 1.5rem; }
  .footer-bottom-flex { flex-direction: column; text-align: center; }
}