/*
Theme Name: RISI Theme
Theme URI: https://risi.ac.cn
Author: OpenAI
Description: Landing page theme inspired by a modern IT services layout.
Version: 1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: RISI
*/

:root {
  --primary: #093387;
  --primary-dark: #021743;
  --text: #0f172a;
  --muted: #5b6478;
  --light: #f4f6fb;
  --border: #e2e8f0;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1280px, 90%);
  margin: 0 auto;
}

.site-header {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.2rem;
}

.logo img {
  height: 49px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 600;
}

.nav-links a {
  padding: 8px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.nav-links a:hover {
  color: #093387;
  background-color: #eff1ff;
  padding: 8px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.9rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 8px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: 0.2s ease;
}

.button.primary {
  background: var(--primary);
  color: #fff;
}

.button.primary:hover {
  background: var(--primary-dark);
}

/* Members Page Styles */
.team-header {
  text-align: center;
  margin-bottom: 4rem;
}

.team-subtitle {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  color: #64748b;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.page-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.team-photo-wrapper {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  line-height: 0;
}

.team-photo {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.team-photo-wrapper:hover .team-photo {
  transform: scale(1.02);
}

.members-page .section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}

/* Story Tags Styles */
.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.tag-pill {
  background-color: #e0f2fe;
  color: #64748b;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

.member-section {
  margin-bottom: 4rem;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
}

.member-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.member-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.member-photo:hover {
  transform: scale(1.05);
}

.member-name {
  color: #000;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  transition: color 0.2s ease;
}

.member-position {
  color: #64748b;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.member-unit {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.4;
  transition: color 0.2s ease;
}

.member-name:hover,
.member-position:hover,
.member-unit:hover {
  color: var(--primary);
}

@media (max-width: 1024px) {
  .members-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .members-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.button.ghost {
  background: #eef1ff;
  color: var(--primary);
}

.button.ghost:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.member-item .learn-more {
  margin-left: 0;
}

.hero {
  padding: 50px 0 50px;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.4rem, 3vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero p {
  color: var(--muted);
  margin-bottom: 28px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-image {
  border-radius: 24px 24px 24px 100px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.hero-image:hover {
  transform: scale(1.03);
}

.stats {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  text-align: center;
  font-size: 0.95rem;
}

.stats strong {
  font-size: 1.3rem;
  display: block;
  margin-bottom: 6px;
}

/* University Carousel */
.logo-carousel-section {
  padding: 40px 0;
  background: #fff;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.logo-carousel-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: scroll-left 40s linear infinite;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: 0.3s;
}

.logo-item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.logo-item img {
  height: 50px;
  width: auto;
}

.logo-placeholder {
  font-weight: 700;
  font-size: 1.2rem;
  color: #94a3b8;
  white-space: nowrap;
}

@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.dark-callout {
  background: #1c1f2a;
  color: #f8fafc;
  margin: 50px auto;
  padding: 40px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}

.dark-callout::after {
  content: "";
  position: absolute;
  right: 30px;
  top: 50%;
  width: 160px;
  height: 160px;
  background-image: radial-gradient(#8b97ff 2px, transparent 2px);
  background-size: 14px 14px;
  transform: translateY(-50%);
  opacity: 0.6;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 20px 0 40px;
}

.feature-card {
  background: #fff;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.feature-card h4 {
  margin: 14px 0 10px;
}

.feature-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.section-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /** min-height: 50vh; **/
  margin-bottom: 30px;
}

.section-title {
  font-size: 2rem;
}

.solutions {
  background: linear-gradient(180deg, #d9e1ff, #f7f8fd 70%);
  padding: 70px 0 80px;
}

.solution-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.solution-card {
  background: #fff;
  padding: 24px;
  border-radius: 16px;
  border: 1px solid var(--border);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.solution-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(15, 23, 42, 0.1);
}

.solution-card h4 {
  font-size: 1.1rem;
}

.solution-card p {
  color: var(--muted);
  font-size: 0.95rem;
}

.solution-card a {
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
  display: inline-block;
  padding: 6px 12px;
  margin-left: -12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.solution-card a:hover {
  background-color: #eef1ff;
}

.section-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

.stories-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
}

/* Success Stories */
.success-stories {
  padding: 80px 0;
  background: #fff;
}

.stories-header {
  margin-bottom: 40px;
  text-align: center;
}

.stories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.story-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 6px rgba(0,0,0,0.02);
  transition: transform 0.2s;
}

.story-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.06);
}

.story-image {
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 3rem;
  font-weight: bold;
}

.story-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.story-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 12px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: color 0.2s ease;
}

.story-tag:hover {
  color: var(--primary);
}

.story-image-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.story-content h3 {
  font-size: 1.1rem;
  margin-bottom: 12px;
  line-height: 1.4;
  color: var(--text);
}

.story-content h3 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.story-content h3 a:hover {
  color: var(--primary);
}

.story-content p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

.story-features {
  list-style: none;
  margin-bottom: 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.story-features li {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.story-features li::before {
  content: "✓";
  color: var(--text);
  font-weight: bold;
}

.story-footer {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 12px;
}

.story-footer-left {
  flex: 0 0 50%;
  display: flex;
  align-items: center;
}

.story-footer-left .learn-more {
  margin-left: 0;
}

.story-footer-right {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.story-footer-right .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #cbd5e1;
}

.story-footer-right .avatar.avatar-more {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
}

.learn-more {
  margin-top: auto;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  padding: 6px 12px;
  margin-left: -12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.learn-more:hover {
  background-color: #eef1ff;
}

.industry-links {
  display: flex;
  align-items: center;
}

.industry-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-block;
  padding: 8px 16px;
  border: 2px solid var(--primary);
  border-radius: 6px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.industry-link:hover {
  background-color: var(--primary);
  color: white;
}

.site-footer {
  padding: 40px 0 60px;
  background: #0f172a;
  color: #e2e8f0;
  text-align: center;
}

.site-footer a {
  color: #e2e8f0;
  font-weight: 600;
}

.posts-page {
  padding: 60px 0;
  background: #fff;
}

.posts-grid {
  display: grid;
  grid-template-columns: 350px 1fr 1fr;
  gap: 30px;
}

.filter-sidebar {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.filter-group {
  margin-bottom: 20px;
}

.filter-title {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 12px;
  font-weight: 600;
}

.filter-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px;
  color: var(--text);
  border-radius: 8px;
}

.filter-item.active {
  background: #eef1ff;
  border: 1px solid #dbeafe;
  font-weight: 600;
}

.filter-item:hover {
  background: #f8fafc;
}

.filter-item .count {
  color: #64748b;
}

.posts-list {
  grid-column: 2 / span 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  align-items: start;
}

.story-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pagination-container {
  grid-column: 2 / span 2;
  margin-top: 20px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-link a,
.pagination .page-link span {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.pagination .page-numbers.current {
  background: #eef1ff;
  color: var(--primary);
  border-color: #dbeafe;
}

.pagination .page-link a:hover {
  background: #eef1ff;
  color: var(--primary);
}
.single-post {
    background: #fff;
}
.post-header {
    padding: 60px 0 40px;
    margin-bottom: 0;
}
.post-header-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}
.post-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 12px;
  display: inline-block;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.single-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.post-header-right img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
}
.featured-image-placeholder {
  width: 100%;
  height: 300px;
  background: #e2e8f0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: #64748b;
}
.post-content {
    max-width: 950px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text);
    padding: 40px 0;
    text-align: justify;
    font-weight: 400;
    text-indent: 2em;
}
.post-content p {
  margin-bottom: 20px;
}
.single-title-avatars {
  justify-content: flex-start;
  margin-top: 12px;
}
.related-posts {
  padding: 60px 0 80px;
}
.related-posts.container {
  width: 1280px;
}
@media (max-width: 1240px) {
  .related-posts.container {
    width: 90%;
  }
}

.post-date {
    color: #64748b;
    font-size: 1rem;
    margin-left: 12px;
    align-self: center;
}

.member-hero {
  width: 100%;
  height: 240px;
  background-image: url('https://images.unsplash.com/photo-1521737604893-d14cc237f11d?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center;
  border-radius: 0 0 24px 24px;
}

.member-profile-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 30px;
  align-items: start;
}

.member-bio-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.04);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.member-bio-avatar {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 12px auto;
  transition: transform 0.2s ease;
}

.member-bio-avatar:hover {
  transform: scale(1.05);
}

.member-bio-name {
  font-weight: 800;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.member-bio-field {
  color: var(--muted);
  margin-bottom: 6px;
}

.member-group-pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.8rem;
  margin-top: 10px;
}

.member-group-pill.group-faculty { background: #eef1ff; color: #093387; }
.member-group-pill.group-collaborators { background: #fff7ed; color: #9a3412; }
.member-group-pill.group-students { background: #ecfeff; color: #0e7490; }
.member-group-pill.group-past { background: #f1f5f9; color: #334155; }
.member-group-pill.group-default { background: #f8fafc; color: #475569; }

.member-news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
 
.affiliations {
  padding: 4rem 0 6rem;
  text-align: center;
}
.affiliations-header {
  margin-bottom: 3rem;
}
.affiliations-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5rem;
}
.affiliation-item {
  flex: 0 1 220px;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.affiliation-item:hover {
  transform: translateY(-4px);
}
.affiliation-logo {
  width: 100%;
  height: auto;
  filter: grayscale(100%) opacity(0.7);
  transition: filter 0.3s ease;
  cursor: pointer;
}
.affiliation-item:hover .affiliation-logo {
  filter: grayscale(0%) opacity(1);
}
@media (max-width: 768px) {
  .affiliations-grid { gap: 1.5rem; }
  .affiliation-item { flex: 0 1 120px; }
}
 
.contact-section {
  padding: 60px 0;
  background: linear-gradient(180deg, #d9e1ff, #f7f8fd 70%);
}
.contact-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 30px;
  align-items: stretch;
}
.map-container {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}
.map-container iframe {
  width: 100%;
  height: 100%;
  min-height: 400px;   /* 关键：给一个高度 */
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  border: 0;
}
.map-container #amap-container {
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: block;
}
.map-container .map-image {
  width: 100%;
  height: 100%;
  min-height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 12px;
}
.contact-card {
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  color: var(--text);
  box-shadow: 0 4px 8px rgba(0,0,0,0.04);
}
.contact-card h3 {
  font-size: 1.6rem;
  margin-bottom: 16px;
  color: #0f172a;
}
.contact-item {
  margin-bottom: 16px;
}
.contact-item .label {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 6px;
  font-weight: 600;
}
.contact-item .value a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.wechat-qr {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  object-fit: cover;
}
@media (max-width: 1024px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .map-container iframe {
    height: 320px;
  }
  .map-container .map-image {
    height: 320px;
  }
  .map-container #amap-container {
    height: 320px;
  }
}
@media (max-width: 1024px) {
  .solution-grid, .stories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .posts-grid {
    grid-template-columns: 220px 1fr;
  }
  .posts-list {
    grid-column: 2 / span 1;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .header-actions {
    flex-direction: column;
    align-items: flex-end;
  }

  .dark-callout::after {
    display: none;
  }
  
  .solution-grid, .stories-grid {
    grid-template-columns: 1fr;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .filter-sidebar {
    order: 2;
  }
  .posts-list {
    order: 1;
    grid-column: auto;
    grid-template-columns: 1fr;
  }
}

/* Scroll to top button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--primary);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(9, 51, 135, 0.2);
  z-index: 1000;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(9, 51, 135, 0.3);
}

.scroll-to-top:active {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
}

/* Team Page RISI */
.team-title {
  font-size: clamp(2.4rem, 3vw, 2.7rem);
  line-height: 1.1;
  margin-bottom: 20px;
  color: #0f172a;
}

/* RISI 高亮样式 */
.risi-badge {
  font-family: 'Noto Serif', serif;
  font-weight: 700;
  color: #ffffff;

  background: var(--primary);
  padding: 0.15em 0.5em;

  border-radius: 6px;

  display: inline-block;
  line-height: 1;
  letter-spacing: 0.05em;
}

.subscribe-section {
  background: #0f172a;
  color: #e2e8f0;
  padding: 60px 0;
}
.subscribe-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 40px;
  align-items: center;
}
.subscribe-title {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 24px;
}
.subscribe-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.subscribe-input {
  flex: 1 1 340px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0b162e;
  color: #e2e8f0;
}
.subscribe-input::placeholder {
  color: #94a3b8;
}
.subscribe-button {
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}
.subscribe-button:hover {
  background: #0444c5;
  box-shadow: 0 6px 16px rgba(9, 51, 135, 0.3);
  transform: translateY(-1px);
}
.subscribe-note {
  margin-top: 10px;
  font-size: 0.85rem;
  color: #9fb0c5;
}
.subscribe-note a {
  color: #c7d2fe;
  text-decoration: none;
}
.subscribe-illustration {
  height: 200px;
  
}
@media (max-width: 1024px) {
  .subscribe-grid {
    grid-template-columns: 1fr;
  }
  .subscribe-illustration {
    height: 140px;
  }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal-card {
  width: 560px;
  max-width: 92%;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 22px 50px rgba(0,0,0,0.25);
  overflow: hidden;
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title {
  font-weight: 800;
  font-size: 1.2rem;
  color: #0f172a;
}
.modal-close {
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #334155;
}
.modal-body {
  padding: 18px;
}
.modal-row {
  margin-bottom: 14px;
}
.modal-row label {
  display: block;
  font-size: 0.8rem;
  color: #64748b;
  margin-bottom: 6px;
}
.modal-input, .modal-captcha {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 1rem;
}
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 0 18px 18px;
}
.button.primary {
  background: var(--primary);
  color: #fff;
  border: 1px solid transparent;
}
.button.primary:hover {
  background: var(--primary-dark);
}
.modal-error {
  color: #b91c1c;
  font-size: 0.9rem;
  margin-top: 6px;
}
.modal-success {
  color: #065f46;
  font-size: 0.95rem;
  margin-top: 6px;
}
