/* ThinkingIF - Professional FT-Inspired Design
   Clean, refined editorial styling with perfect proportions
*/

:root {
  /* Financial Times Inspired Color Palette */
  --ft-blue: #003a70;
  --ft-blue-dark: #002347;
  --ft-blue-light: #0f5c99;
  --navy: #0a1628;
  --navy-dark: #050b14;
  
  --white: #ffffff;
  --cream: #fbf9f7;
  --gray-50: #fafbfc;
  --gray-100: #f4f5f7;
  --gray-200: #e4e6e9;
  --gray-300: #cfd2d6;
  --gray-400: #9fa4aa;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  
  --accent: #003a70;
  --accent-hover: #002347;
  
  /* Typography - FT Editorial Style */
  --font-display: 'Libre Baskerville', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Refined Spacing */
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Subtle Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--navy);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Lock page scroll when reader modal is open */
body.modal-open {
  overflow: hidden;
}

/* ========================================
   HEADER - Compact & Professional
   ======================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--gray-200);
  backdrop-filter: blur(8px);
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}

.brand-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 2px;
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--ft-blue);
  margin-bottom: 0;
  line-height: 1;
}

.brand-tagline {
  font-size: 10px;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  margin-top: 2px;
  display: block;
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all 0.25s var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--ft-blue);
  border-bottom-color: var(--ft-blue);
}

/* ========================================
   FEATURED HERO - Properly Sized
   ======================================== */

.featured-hero {
  position: relative;
  height: 480px;
  margin-top: 60px;
  overflow: hidden;
  background: var(--gray-100);
}

.featured-background {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.featured-image-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.featured-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--transition), opacity 0.7s ease;
}

.featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 58, 112, 0.92) 0%,
    rgba(0, 58, 112, 0.75) 45%,
    rgba(0, 58, 112, 0.45) 75%,
    rgba(0, 58, 112, 0.15) 100%
  );
}

.featured-content-wrapper {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-content {
  max-width: 580px;
  animation: fadeInUp 0.6s var(--transition);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.featured-label {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 16px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.featured-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.featured-description {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  max-width: 520px;
}

.featured-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.featured-meta span {
  font-size: 12px;
  color: var(--white);
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.featured-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--white);
  color: var(--ft-blue);
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--transition);
  border-radius: 2px;
  letter-spacing: 0.2px;
}

.featured-cta:hover {
  background: var(--cream);
  transform: translateX(3px);
  box-shadow: var(--shadow-md);
}

/* Carousel Controls - Refined */
.featured-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--transition);
  border-radius: 2px;
  backdrop-filter: blur(8px);
  font-size: 20px;
}

.carousel-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

.carousel-indicators {
  display: flex;
  gap: 8px;
}

.carousel-indicator {
  width: 28px;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s var(--transition);
  border-radius: 2px;
}

.carousel-indicator.active {
  background: var(--white);
  width: 40px;
}

/* ========================================
   FILTERS - Cleaner & More Compact
   ======================================== */

.filters-section {
  background: var(--cream);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 61px;
  z-index: 100;
}

.filters-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.filters-left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid var(--gray-300);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  border-radius: 2px;
}

.filter-btn:hover {
  background: var(--white);
  border-color: var(--ft-blue);
  color: var(--ft-blue);
}

.filter-btn.active {
  background: var(--ft-blue);
  color: var(--white);
  border-color: var(--ft-blue);
}

.search-box {
  position: relative;
  min-width: 260px;
}

.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 8px 12px 8px 38px;
  border: 1px solid var(--gray-300);
  background: var(--white);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--navy);
  transition: all 0.2s var(--transition);
  border-radius: 2px;
}

.search-box input:focus {
  outline: none;
  border-color: var(--ft-blue);
  box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.08);
}

.search-box input::placeholder {
  color: var(--gray-400);
}

/* Filter Options Dropdown */
.filter-options {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 16px;
  background: var(--cream);
}

.filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 6px 14px;
  background: var(--white);
  border: 1px solid var(--gray-300);
  color: var(--navy);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s var(--transition);
  border-radius: 2px;
}

.filter-tag:hover {
  border-color: var(--ft-blue);
  color: var(--ft-blue);
  background: var(--gray-50);
}

.filter-tag.active {
  background: var(--ft-blue);
  color: var(--white);
  border-color: var(--ft-blue);
}

/* ========================================
   INSIGHTS GRID - Better Proportions
   ======================================== */

.insights-section {
  background: var(--white);
  padding: 48px 0 80px;
}

.insights-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.insight-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s var(--transition);
  display: flex;
  flex-direction: column;
}

.insight-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--gray-300);
  transform: translateY(-4px);
}

.insight-image-wrapper {
  position: relative;
  width: 100%;
  padding-top: 56%;
  overflow: hidden;
  background: var(--gray-100);
}

.insight-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--transition);
}

.insight-card:hover .insight-image {
  transform: scale(1.05);
}

.insight-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.insight-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.insight-tag {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--ft-blue);
  padding: 4px 10px;
  background: rgba(0, 58, 112, 0.08);
  border-radius: 2px;
  transition: all 0.25s var(--transition);
}

.insight-tag.tag-matched {
  background: var(--ft-blue);
  color: white;
  box-shadow: 0 2px 4px rgba(0, 58, 112, 0.2);
}

.insight-title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.insight-excerpt {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-600);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Loading & Empty States */
.loading-state,
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--gray-500);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 16px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--ft-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 8px;
}

.empty-state p {
  font-size: 14px;
  color: var(--gray-500);
}

/* ========================================
   READER MODAL - Professional Article View
   ======================================== */

.reader-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.reader-background {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.reader-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reader-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 35, 71, 0.92);
  backdrop-filter: blur(20px);
}

.reader-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.96);
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 300;
  color: var(--navy);
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
  line-height: 1;
  padding: 0;
}

.reader-close:hover {
  background: white;
  transform: scale(1.08);
  box-shadow: var(--shadow-lg);
}

.reader-close:active {
  transform: scale(0.96);
}

.reader-container {
  position: relative;
  z-index: 2;
  max-width: 800px;
  width: 100%;
  padding: 80px 24px 60px 24px;
  margin: 0 auto;

  /* Prevent scroll from escaping to the modal/body */
  max-height: 100vh;
  overflow: hidden;
}

.reader-article {
  background: var(--white);
  padding: 48px 56px;
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  animation: fadeInModal 0.4s ease-out;
  max-height: 85vh;
  overflow-y: auto;
  overflow-x: hidden;
  
  /* Keep scroll inside the white tile */
  overscroll-behavior: contain;
  
  /* Optional: avoid layout shift when scrollbar appears */
  scrollbar-gutter: stable;
}

/* Custom scrollbar on the white blog tile */
.reader-article::-webkit-scrollbar {
  width: 10px;
}

.reader-article::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}

.reader-article::-webkit-scrollbar-thumb {
  background: rgba(0, 58, 112, 0.4);
  border-radius: 5px;
}

.reader-article::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 58, 112, 0.6);
}

@keyframes fadeInModal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 2px solid var(--gray-200);
}

.article-meta {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.article-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--ft-blue);
  padding: 6px 14px;
  background: rgba(0, 58, 112, 0.08);
  border-radius: 2px;
  border: 1px solid rgba(0, 58, 112, 0.15);
}

.article-date {
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
}

.article-title {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--navy);
  margin-bottom: 16px;
  letter-spacing: -0.5px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-description {
  font-size: 18px;
  line-height: 1.6;
  color: var(--gray-600);
  font-style: italic;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-image-container {
  margin-bottom: 36px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.article-image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.article-image:hover {
  transform: scale(1.02);
}

.article-content {
  font-size: 16px;
  line-height: 1.75;
  color: var(--navy);
  margin-bottom: 32px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: break-word;
}

.article-content h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  margin: 32px 0 16px;
  color: var(--navy);
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  margin: 24px 0 12px;
  color: var(--navy);
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content p {
  margin-bottom: 20px;
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content ul,
.article-content ol {
  margin: 16px 0 20px 24px;
  max-width: 100%;
}

.article-content li {
  margin-bottom: 8px;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.article-content a {
  color: var(--ft-blue);
  text-decoration: underline;
  word-break: break-all;
}

.article-content blockquote {
  border-left: 3px solid var(--ft-blue);
  padding-left: 20px;
  margin: 24px 0;
  font-style: italic;
  color: var(--gray-600);
  max-width: 100%;
  overflow-wrap: break-word;
}

.article-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 24px 0;
  border-radius: 2px;
}

.article-content pre {
  background: var(--gray-100);
  padding: 16px;
  border-radius: 2px;
  overflow-x: auto;
  margin: 20px 0;
  font-size: 14px;
}

.article-content code {
  background: var(--gray-100);
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 14px;
  font-family: 'Monaco', 'Courier New', monospace;
}

.article-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 28px;
  margin-top: 32px;
  border-top: 2px solid var(--gray-200);
}

.article-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  padding: 7px 14px;
  background: var(--gray-100);
  border-radius: 2px;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.article-tag:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

/* ========================================
   INFO MODALS - About & Terms
   ======================================== */

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.info-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

.info-modal-content {
  position: relative;
  background: var(--white);
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 2px;
  box-shadow: var(--shadow-lg);
}

.info-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  font-size: 22px;
  font-weight: 300;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
  padding: 0;
  z-index: 1;
}

.info-modal-close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg) scale(1.05);
}

.info-modal-body {
  padding: 44px;
}

.info-modal-body h2 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 28px;
  letter-spacing: -0.4px;
}

.info-modal-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 12px;
}

.info-modal-body h4 {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  margin: 20px 0 10px;
}

.info-modal-body p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 16px;
}

.info-modal-body ul {
  margin: 12px 0 20px 24px;
  padding: 0;
}

.info-modal-body ul li {
  font-size: 15px;
  line-height: 1.7;
  color: var(--gray-600);
  margin-bottom: 10px;
}

.info-modal-body .tagline {
  font-style: italic;
  color: var(--ft-blue);
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--gray-200);
}

/* ========================================
   FOOTER - Ultra Compact & Professional
   ======================================== */

.site-footer {
  background: linear-gradient(135deg, #003a70 0%, #002347 100%);
  color: white;
  padding: 28px 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-brand-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.2px;
}

.footer-tagline {
  font-size: 11px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.footer-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: white;
  transition: width 0.25s ease;
}

.footer-links a:hover {
  color: white;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-contact {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  font-weight: 500;
}

.footer-bottom {
  padding: 16px 0 0;
  text-align: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.2px;
}

/* ========================================
   CONTACT FORM
   ======================================== */

.contact-form {
  max-width: 600px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--navy);
  background: var(--white);
  transition: all 0.25s var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ft-blue);
  box-shadow: 0 0 0 3px rgba(0, 58, 112, 0.1);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23334155' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.form-submit {
  margin-top: 28px;
}

.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--ft-blue);
  color: white;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s var(--transition);
}

.btn-submit:hover {
  background: var(--ft-blue-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 58, 112, 0.2);
}

.btn-submit:active {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.form-status.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
  .header-container,
  .filters-container,
  .insights-container,
  .footer-container {
    padding-left: 24px;
    padding-right: 24px;
  }
  
  .featured-content-wrapper {
    padding: 0 24px;
  }
  
  .featured-hero {
    height: 420px;
  }
  
  .featured-title {
    font-size: 32px;
  }
  
  .insights-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }
  
  .footer-links {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 4px 20px;
    min-height: 52px;
  }
  
  .header-nav {
    gap: 16px;
  }
  
  .nav-link {
    font-size: 12px;
  }
  
  .brand-logo {
    height: 44px;
    width: auto;
  }
  
  .brand-text h1 {
    font-size: 18px;
  }
  
  .brand-tagline {
    font-size: 9px;
  }
  
  .featured-hero {
    height: 360px;
    margin-top: 60px;
  }
  
  .filters-section {
    top: 60px;
  }
  
  .featured-title {
    font-size: 28px;
  }
  
  .featured-description {
    font-size: 14px;
  }
  
  .filters-container {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 20px;
  }
  
  .filters-left {
    width: 100%;
    justify-content: flex-start;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .insights-section {
    padding: 36px 0 60px;
  }
  
  .insights-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .reader-article {
    padding: 32px 28px;
  }
  
  .article-title {
    font-size: 30px;
  }
  
  .article-description {
    font-size: 17px;
  }
  
  .article-content h2 {
    font-size: 24px;
  }
  
  .article-content h3 {
    font-size: 20px;
  }
  
  .site-footer {
    padding: 24px 0;
    margin-top: 48px;
  }
  
  .footer-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  
  .info-modal-body {
    padding: 32px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 4px 16px;
    min-height: 48px;
  }
  
  .header-nav {
    gap: 10px;
  }
  
  .nav-link {
    font-size: 11px;
    padding: 4px 0;
  }
  
  .brand-logo {
    height: 40px;
    width: auto;
  }
  
  .brand-text h1 {
    font-size: 16px;
  }
  
  .brand-tagline {
    display: none;
  }
  
  .featured-hero {
    height: 320px;
  }
  
  .featured-title {
    font-size: 24px;
  }
  
  .featured-controls {
    gap: 12px;
  }
  
  .carousel-btn {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .filters-left {
    gap: 6px;
  }
  
  .filter-btn {
    font-size: 12px;
    padding: 7px 14px;
  }
  
  .reader-container {
    padding: 0 16px;
  }
  
  .reader-article {
    max-height: 90vh;
  }
  
  .reader-article {
    padding: 24px 20px;
  }
  
  .article-title {
    font-size: 26px;
  }
  
  .article-description {
    font-size: 16px;
  }
  
  .article-content {
    font-size: 15px;
  }
  
  .article-content h2 {
    font-size: 22px;
  }
  
  .article-content h3 {
    font-size: 19px;
  }
  
  .footer-links {
    width: 100%;
  }
  
  .info-modal-body {
    padding: 28px 24px;
  }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
  .site-header,
  .filters-section,
  .site-footer,
  .reader-close,
  .featured-controls,
  .carousel-indicators {
    display: none;
  }
  
  .reader-article {
    box-shadow: none;
    padding: 0;
  }
  
  .article-content {
    color: black;
  }
}
/* ========================================
   EMAIL GATE
   ======================================== */

.email-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.email-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(8px);
}

.email-gate-container {
  position: relative;
  z-index: 1;
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.email-gate-content {
  padding: 48px 40px;
}

.email-gate-step {
  animation: gateFadeIn 0.3s ease;
}

@keyframes gateFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.gate-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.gate-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  font-style: italic;
  margin-bottom: 24px;
}

.gate-description {
  margin-bottom: 32px;
  line-height: 1.6;
  color: var(--gray-600);
}

.gate-btn-primary {
  width: 100%;
  padding: 14px 24px;
  background: var(--ft-blue);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.gate-btn-primary:hover {
  background: var(--ft-blue-dark);
}

.gate-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gate-btn-secondary {
  padding: 12px 24px;
  background: white;
  color: var(--navy);
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 15px;
  cursor: pointer;
}

.gate-btn-group {
  display: flex;
  gap: 12px;
}

.gate-step-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--navy);
}

.gate-terms-scroll {
  max-height: 200px;
  overflow-y: auto;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 14px;
}

.gate-checkbox-group {
  margin-bottom: 24px;
}

.gate-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.gate-checkbox input {
  width: 20px;
  height: 20px;
}

.gate-checkbox-label {
  font-size: 14px;
  color: var(--gray-600);
}

.gate-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  font-size: 15px;
  margin-bottom: 16px;
}

.gate-input:focus {
  outline: none;
  border-color: var(--ft-blue);
}

.gate-error {
  padding: 12px;
  background: #fef2f2;
  color: #dc2626;
  border-radius: 4px;
  font-size: 14px;
  margin-bottom: 16px;
}

.gate-success-title {
  font-family: var(--font-display);
  font-size: 24px;
  margin-bottom: 16px;
  color: var(--navy);
  text-align: center;
}

.gate-success-message {
  text-align: center;
  margin-bottom: 24px;
  color: var(--gray-600);
}

body.email-gate-active {
  overflow: hidden;
}
/* Additional Email Gate Polish */

.gate-step-desc {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 24px;
  text-align: center;
}

.gate-privacy-note {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-500);
}

.gate-btn-text {
  display: inline;
}

.gate-btn-loader {
  display: none;
}

.gate-spinner {
  width: 20px;
  height: 20px;
  animation: spinGate 1s linear infinite;
}

@keyframes spinGate {
  to { transform: rotate(360deg); }
}

.gate-success-icon {
  text-align: center;
  margin-bottom: 24px;
}

.gate-success-icon svg {
  margin: 0 auto;
}

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

.gate-terms-scroll h3 {
  font-size: 16px;
  margin-bottom: 12px;
  color: var(--navy);
  font-weight: 600;
}

.gate-terms-scroll ul {
  margin: 12px 0 20px 20px;
  padding: 0;
}

.gate-terms-scroll li {
  margin-bottom: 8px;
  line-height: 1.5;
}
/* Category Navigation */
.nav-separator {
  color: var(--gray-400);
  font-size: 14px;
  padding: 0 8px;
}

.category-link {
  position: relative;
}

.category-link.active {
  color: var(--ft-blue);
  font-weight: 600;
}

.category-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ft-blue);
}

.brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
