/* =========================================
   Business Upturn - Main Unified Stylesheet
   Common styles for all pages - OPTIMIZED VERSION
========================================= */

/* ===== CSS VARIABLES & ROOT ===== */
:root {
  /* Global Container Settings */
  --global-max-width: 1300px;
  --global-width-percent: 92%;
  
  /* Brand Colors */
  --brand-primary: #cc0000;
  --brand-primary-dark: #a60000;
  
  /* Text Colors */
  --text-primary: #1a1a1a;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  
  /* Background Colors */
  --background-white: #fff;
  --background-light: #f7fafc;
  --background-gray: #f9fafb;
  --background-gray-dark: #f3f4f6;
  
  /* Border Colors */
  --border-light: #e2e8f0;
  --border-medium: #cbd5e0;
  
  /* Typography Scale */
  --font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
  --font-xs: 12px;
  --font-sm: 14px;
  --font-base: 16px;
  --font-lg: 18px;
  --font-xl: 22px;
  --font-2xl: 26px;
  --font-3xl: 30px;
  --font-4xl: 36px;
  
  /* Font Weights */
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Spacing Scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-base: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 25px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
}

/* ===== GLOBAL RESETS ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-radius: 0 !important;
}

/* ===== GLOBAL STYLES ===== */
html, body {
  height: 100%;
  margin: 0;
  font-family: var(--font-family);
  background: var(--background-white);
  color: var(--text-primary);
}

/* Content container */
.container {
  width: var(--global-width-percent);
  max-width: var(--global-max-width);
  margin: 0 auto;
  padding: 0;
}



a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-primary-dark);
}

p {
  margin: 0 0 var(--space-4);
}

/* ===== COMMON COMPONENTS ===== */

/* Breadcrumbs */
.breadcrumb {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
  font-weight: var(--font-medium);
}

.breadcrumb a {
  color: var(--brand-primary);
  text-decoration: none;
}

.breadcrumb .separator {
  margin: 0 var(--space-2);
  color: var(--text-muted);
}

.breadcrumb .current {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
}

/* Page Headers */
.page-header {
  background: var(--background-white);
  padding: var(--space-4) 0;
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-light);
}

/* Title Rows */
.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.page-title {
  font-size: var(--font-3xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.01em;
}

/* Section Headers */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-light);
}

.section-title {
  font-size: var(--font-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin: 0;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--brand-primary);
  display: inline-block;
  position: relative;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-weight: var(--font-semibold);
  font-size: var(--font-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: var(--background-white);
}

.btn-primary:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--background-white);
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  background: var(--background-gray);
  border-color: var(--brand-primary);
}

.load-more-btn {
  background: var(--brand-primary);
  color: var(--background-white);
  border: none;
  font-weight: var(--font-semibold);
  font-size: var(--font-sm);
  padding: var(--space-3) var(--space-8);
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-3);
}

.load-more-btn:hover {
  background: var(--brand-primary-dark);
  transform: translateY(-1px);
}

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

/* ===== FILTER TABS ===== */
.filter-group {
  display: inline-flex;
  border: 2px solid var(--border-light);
  background: var(--background-white);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.filter-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: var(--font-semibold);
  font-size: var(--font-sm);
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  transition: all var(--transition-fast);
  border-right: 1px solid var(--border-light);
}

.filter-tab:last-child {
  border-right: none;
}

.filter-tab:hover {
  color: var(--text-primary);
  background: var(--background-gray);
}

.filter-tab.active {
  color: var(--background-white);
  background: var(--brand-primary);
}

/* ===== CATEGORY BADGES ===== */
.story-category,
.article-category,
.card-category,
.trend-kicker,
.related-category {
  background: var(--brand-primary);
  color: var(--background-white);
  font-weight: var(--font-bold);
  font-size: var(--font-xs);
  text-transform: uppercase;
  padding: var(--space-1) var(--space-2);
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: background-color var(--transition-fast);
  display: inline-block;
}

.story-category:hover,
.article-category:hover,
.card-category:hover,
.trend-kicker:hover,
.related-category:hover {
  background: var(--brand-primary-dark);
  color: var(--background-white);
}

/* ===== META INFORMATION ===== */
.story-meta,
.article-meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.story-meta time,
.article-meta time {
  font-size: var(--font-xs);
  color: var(--text-muted);
  font-weight: var(--font-semibold);
}

/* ===== HEADLINES ===== */
.story-headline,
.article-headline {
  font-weight: var(--font-semibold);
  line-height: 1.4;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.01em;
  font-size: var(--font-base);
}

.story-headline a,
.article-headline a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.story-headline a:hover,
.article-headline a:hover {
  color: var(--brand-primary);
}

/* ===== BYLINES ===== */
.story-byline,
.article-byline {
  font-size: var(--font-sm);
  color: var(--text-muted);
  font-weight: var(--font-semibold);
}

.story-byline a,
.article-byline a {
  color: var(--text-primary);
  text-decoration: none;
}

.story-byline a:hover,
.article-byline a:hover {
  color: var(--brand-primary);
}

/* ===== STORY/ARTICLE CARDS ===== */
.story-card,
.article-item {
  background: var(--background-white);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.story-card:hover,
.article-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.story-media,
.article-image {
  display: block;
  position: relative;
  overflow: hidden;
  height: 140px;
  background: var(--background-gray-dark);
}

.story-media img,
.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.story-card:hover .story-media img,
.article-item:hover .article-image img {
  transform: scale(1.05);
}

.story-content,
.article-content {
  padding: var(--space-4);
}

.story-excerpt,
.article-excerpt {
  font-size: var(--font-sm);
  line-height: 1.4;
  color: var(--text-secondary);
  margin: 0 0 var(--space-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-footer,
.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== ARTICLE GRIDS ===== */
.stories-grid,
.articles-container {
  display: grid;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.stories-grid,
.articles-container.grid-view {
  grid-template-columns: repeat(4, 1fr);
}

/* ===== SOCIAL SHARING - UPDATED WITH PLATFORM COLORS ===== */
.story-share-wrapper,
.article-share-wrapper {
  position: relative;
  margin-left: auto;
}

.share-trigger {
  background: var(--background-gray);
  color: var(--text-secondary);
  border: 1px solid var(--border-light);
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 11px;
  transition: all var(--transition-fast);
}

.share-trigger:hover {
  background: var(--background-white);
  color: var(--text-primary);
  border-color: var(--border-medium);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transform: scale(1.1);
}

/* Fixed dropdown positioning for proper hover */
.share-dropdown {
  position: absolute;
  top: 50%;
  right: calc(100% + 5px);
  transform: translateY(-50%) translateX(10px);
  background: var(--background-white);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-lg);
  padding: var(--space-1);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-fast);
  z-index: 200;
  display: flex;
  flex-direction: row;
  gap: var(--space-1);
  align-items: center;
}

/* Create hover bridge with pseudo-element */
.story-share-wrapper::before,
.article-share-wrapper::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -10px;
  bottom: -10px;
  left: -180px;
  z-index: 199;
  display: none;
}

/* Show dropdown on hover */
.story-share-wrapper:hover::before,
.article-share-wrapper:hover::before {
  display: block;
}

.story-share-wrapper:hover .share-dropdown,
.article-share-wrapper:hover .share-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0);
}

/* Individual share links - icon only with platform colors by default */
.social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  text-decoration: none;
  font-size: 14px;
  transition: all var(--transition-fast);
  color: var(--background-white);
  overflow: hidden;
  text-indent: -9999px;
  position: relative;
  font-weight: var(--font-medium);
}

.social-share i {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  margin: 0;
  text-indent: 0;
}

/* Default Platform Colors (Normal State) */
.social-share[data-platform="facebook"] {
  background: #1877f2;
}

.social-share[data-platform="twitter"] {
  background: #1da1f2;
}

.social-share[data-platform="linkedin"] {
  background: #0077b5;
}

.social-share[data-platform="whatsapp"] {
  background: #25d366;
}

/* Hover Effects - Scale only, keep icon color white */
.social-share:hover {
  transform: scale(1.1);
  color: var(--background-white);
}

/* ===== LOAD MORE SECTION ===== */
.load-more-section {
  text-align: center;
  padding-top: var(--space-8);
  border-top: 1px solid var(--border-light);
}

.load-info {
  font-size: var(--font-sm);
  color: var(--text-muted);
  margin: 0;
}

/* ===== UTILITY CLASSES ===== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-brand { color: var(--brand-primary); }

.bg-white { background-color: var(--background-white); }
.bg-light { background-color: var(--background-light); }
.bg-gray { background-color: var(--background-gray); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }

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

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
  .stories-grid,
  .articles-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .container {
    width: calc(100% - 40px);
    padding: 0;
    margin: 0 auto;
  }
  
  .stories-grid,
  .articles-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .container {
    width: calc(100% - 32px);
    padding: 0;
    margin: 0 auto;
  }
  
  .title-row {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }
  
  .page-title {
    font-size: var(--font-2xl);
  }
  
  .filter-group {
    overflow-x: auto;
    min-width: max-content;
  }
  
  .stories-grid,
  .articles-container {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  
  .section-header {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-3);
  }
  
  .section-title {
    font-size: var(--font-xl);
  }
  
  .story-headline {
    font-size: var(--font-base);
  }
  
  .article-headline {
    font-size: var(--font-base);
  }
}

@media (max-width: 480px) {
  .container {
    width: calc(100% - 32px);
    padding: 0;
    margin: 0 auto;
  }
  
  .page-header {
    padding: var(--space-3) 0;
  }
  
  .story-content,
  .article-content {
    padding: var(--space-3);
  }
  
  .story-excerpt,
  .article-excerpt {
    font-size: var(--font-sm);
  }
  
  .load-more-btn {
    padding: var(--space-2) var(--space-6);
  }
  
  .filter-tab {
    padding: var(--space-2) var(--space-3);
    font-size: var(--font-sm);
    white-space: nowrap;
  }
}

/* Fix social sharing on mobile - disable hover dropdown */
@media (max-width: 768px) {
  /* Hide the hover dropdown on mobile */
  .story-share-wrapper::before,
  .article-share-wrapper::before {
    display: none !important;
  }
  
  .story-share-wrapper:hover .share-dropdown,
  .article-share-wrapper:hover .share-dropdown {
    display: none !important;
  }
  
  /* Make share trigger clickable for JavaScript solution */
  .share-trigger {
    pointer-events: auto;
  }
}




/* ===== PAGINATION - NUCLEAR FIX ===== */
.pagination,
nav.pagination,
.pagination ul,
nav.pagination ul,
.page-numbers {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  list-style: none !important;
}

.pagination {
  margin: 40px auto !important;
  padding: 20px 0 !important;
  border-top: 1px solid #e2e8f0 !important;
  justify-content: center !important;
  width: 100% !important;
}

.pagination ul,
.page-numbers {
  margin: 0 !important;
  padding: 0 !important;
  gap: 8px !important;
  align-items: center !important;
  justify-content: center !important;
}

.pagination li,
.page-numbers li {
  display: inline-block !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  float: none !important;
}

.pagination a,
.pagination span,
.page-numbers a,
.page-numbers span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 8px 12px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  color: #1a1a1a !important;
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  margin: 0 !important;
}

.pagination a:hover,
.page-numbers a:hover {
  background: #cc0000 !important;
  color: #fff !important;
  border-color: #cc0000 !important;
}

.pagination .current,
.page-numbers .current {
  background: #cc0000 !important;
  color: #fff !important;
  border-color: #cc0000 !important;
}

.pagination .dots,
.page-numbers .dots {
  border: none !important;
  background: none !important;
  color: #718096 !important;
}



/* =========================================
   Business Upturn - Complete Typography & Elements
   Add this to your main.css file
========================================= */

/* ===== ENHANCED HEADINGS ===== */
h1, h2, h3, h4, h5, h6 {
  margin: 0 0 var(--space-4);
  font-weight: var(--font-bold);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}

h1 { 
  font-size: var(--font-4xl);
  margin-bottom: var(--space-6);
}

h2 { 
  font-size: var(--font-3xl);
  margin-bottom: var(--space-5);
}

h3 { 
  font-size: var(--font-2xl);
  margin-bottom: var(--space-4);
}

h4 { 
  font-size: var(--font-xl);
  margin-bottom: var(--space-4);
}

h5 { 
  font-size: var(--font-lg);
  margin-bottom: var(--space-3);
}

h6 { 
  font-size: var(--font-base);
  margin-bottom: var(--space-3);
  font-weight: var(--font-semibold);
}

/* Add spacing when headings follow paragraphs */
p + h1,
p + h2,
p + h3,
p + h4,
p + h5,
p + h6 {
  margin-top: var(--space-8);
}

/* ===== LISTS (BULLETS & NUMBERS) ===== */
ul, ol {
  margin: 0 0 var(--space-4);
  padding-left: var(--space-6);
  line-height: 1.6;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

li {
  margin-bottom: var(--space-2);
  color: var(--text-primary);
}

li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
ul ul,
ol ol,
ul ol,
ol ul {
  margin-top: var(--space-2);
  margin-bottom: var(--space-2);
}

ul ul {
  list-style-type: circle;
}

ul ul ul {
  list-style-type: square;
}

/* Custom styled lists */
.styled-list {
  list-style: none;
  padding-left: 0;
}

.styled-list li {
  padding-left: var(--space-6);
  position: relative;
}

.styled-list li::before {
  content: "▸";
  color: var(--brand-primary);
  font-weight: var(--font-bold);
  position: absolute;
  left: 0;
}

/* ===== DEFINITION LISTS ===== */
dl {
  margin: 0 0 var(--space-4);
}

dt {
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

dd {
  margin: 0 0 var(--space-3) var(--space-6);
  color: var(--text-secondary);
  line-height: 1.6;
}

dd:last-child {
  margin-bottom: 0;
}

/* ===== BLOCKQUOTES ===== */
blockquote {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-left: 4px solid var(--brand-primary);
  background: var(--background-light);
  font-style: italic;
  position: relative;
}

blockquote p {
  margin-bottom: var(--space-3);
  font-size: var(--font-lg);
  line-height: 1.6;
  color: var(--text-secondary);
}

blockquote p:last-child {
  margin-bottom: 0;
}

blockquote cite,
blockquote footer {
  display: block;
  margin-top: var(--space-3);
  font-size: var(--font-sm);
  font-style: normal;
  color: var(--text-muted);
  font-weight: var(--font-semibold);
}

blockquote cite::before,
blockquote footer::before {
  content: "— ";
}

/* Pull quote style */
.pullquote {
  border-left: none;
  border-top: 2px solid var(--brand-primary);
  border-bottom: 2px solid var(--brand-primary);
  text-align: center;
  padding: var(--space-5);
  font-size: var(--font-xl);
  background: var(--background-white);
}

/* ===== CODE & PREFORMATTED TEXT ===== */
code {
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
  background: var(--background-gray-dark);
  color: var(--brand-primary-dark);
  padding: 2px 6px;
  border: 1px solid var(--border-light);
}

pre {
  font-family: 'Courier New', Courier, monospace;
  font-size: var(--font-sm);
  line-height: 1.6;
  background: var(--background-gray-dark);
  border: 1px solid var(--border-light);
  padding: var(--space-4);
  margin: var(--space-4) 0;
  overflow-x: auto;
  color: var(--text-primary);
}

pre code {
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ===== HORIZONTAL RULES ===== */
hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: var(--space-8) 0;
  height: 0;
}

hr.thick {
  border-top-width: 2px;
  border-top-color: var(--border-medium);
}

hr.red {
  border-top-color: var(--brand-primary);
  border-top-width: 2px;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  margin: var(--space-6) 0;
  border-collapse: collapse;
  border: 1px solid var(--border-light);
  background: var(--background-white);
}

thead {
  background: var(--brand-primary);
  color: var(--background-white);
}

thead th {
  font-weight: var(--font-bold);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--brand-primary-dark);
}

tbody tr {
  border-bottom: 1px solid var(--border-light);
  transition: background-color var(--transition-fast);
}

tbody tr:hover {
  background: var(--background-light);
}

tbody tr:last-child {
  border-bottom: none;
}

td, th {
  padding: var(--space-3) var(--space-4);
  text-align: left;
  vertical-align: top;
}

td {
  color: var(--text-primary);
}

/* Striped table variant */
table.striped tbody tr:nth-child(even) {
  background: var(--background-gray);
}

table.striped tbody tr:hover {
  background: var(--background-light);
}

/* Bordered table variant */
table.bordered td,
table.bordered th {
  border: 1px solid var(--border-light);
}

/* Compact table variant */
table.compact td,
table.compact th {
  padding: var(--space-2) var(--space-3);
  font-size: var(--font-sm);
}

/* Responsive table wrapper */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: var(--space-4) 0;
}

.table-responsive table {
  margin: 0;
}

/* ===== FORM ELEMENTS ===== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-medium);
  background: var(--background-white);
  font-family: var(--font-family);
  font-size: var(--font-base);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.1);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%231a1a1a' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 40px;
  appearance: none;
}

label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  font-size: var(--font-sm);
}

/* Checkbox and Radio buttons */
input[type="checkbox"],
input[type="radio"] {
  width: auto;
  margin-right: var(--space-2);
  cursor: pointer;
}

.form-group {
  margin-bottom: var(--space-5);
}

/* ===== WORDPRESS SPECIFIC ===== */

/* Image Alignments */
.alignleft {
  float: left;
  margin: var(--space-2) var(--space-5) var(--space-4) 0;
}

.alignright {
  float: right;
  margin: var(--space-2) 0 var(--space-4) var(--space-5);
}

.aligncenter {
  display: block;
  margin: var(--space-4) auto;
  text-align: center;
}

/* Image Captions */
.wp-caption {
  max-width: 100%;
  margin-bottom: var(--space-4);
}

.wp-caption img {
  display: block;
  width: 100%;
  height: auto;
}

.wp-caption-text {
  padding: var(--space-2) var(--space-3);
  background: var(--background-gray);
  font-size: var(--font-sm);
  color: var(--text-secondary);
  font-style: italic;
  text-align: center;
  border-left: 2px solid var(--brand-primary);
}

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-base);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* ===== ADDITIONAL TEXT ELEMENTS ===== */

/* Strong and emphasis */
strong, b {
  font-weight: var(--font-bold);
  color: var(--text-primary);
}

em, i {
  font-style: italic;
}

/* Mark/Highlight */
mark {
  background: #fff3cd;
  color: var(--text-primary);
  padding: 2px 4px;
}

/* Small text */
small {
  font-size: 0.875em;
  color: var(--text-muted);
}

/* Abbreviations */
abbr[title] {
  text-decoration: underline dotted;
  cursor: help;
  border-bottom: 1px dotted var(--text-muted);
}

/* Subscript and Superscript */
sub, sup {
  font-size: 0.75em;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sup {
  top: -0.5em;
}

sub {
  bottom: -0.25em;
}

/* Delete and Insert */
del {
  text-decoration: line-through;
  color: var(--text-muted);
}

ins {
  text-decoration: none;
  background: #d4edda;
  padding: 2px 4px;
}

/* Address */
address {
  font-style: normal;
  line-height: 1.6;
  margin-bottom: var(--space-4);
  color: var(--text-secondary);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
  h1 { font-size: var(--font-3xl); }
  h2 { font-size: var(--font-2xl); }
  h3 { font-size: var(--font-xl); }
  
  blockquote {
    padding: var(--space-4);
    margin: var(--space-4) 0;
  }
  
  blockquote p {
    font-size: var(--font-base);
  }
  
  .table-responsive {
    margin: var(--space-3) -16px;
  }
  
  .alignleft,
  .alignright {
    float: none;
    display: block;
    margin: var(--space-4) auto;
  }
  
  pre {
    font-size: 13px;
    padding: var(--space-3);
  }
}

@media (max-width: 480px) {
  ul, ol {
    padding-left: var(--space-5);
  }
  
  table {
    font-size: var(--font-sm);
  }
  
  td, th {
    padding: var(--space-2) var(--space-3);
  }
  
  .gallery {
    grid-template-columns: 1fr;
  }
}





/* =========================================
   VOICE SEARCH FEATURE - SAFE VERSION
   Add this to the END of main.css
   Will NOT interfere with existing styles
========================================= */

/* Voice Search Icon - Base Styles */
button.voice-search-icon {
  position: relative;
  background: transparent;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  padding: 8px 12px;
  margin: 0;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  outline: none;
  flex-shrink: 0;
}

button.voice-search-icon:hover {
  color: #cc0000;
  transform: scale(1.1);
}

button.voice-search-icon:focus {
  outline: 2px solid #cc0000;
  outline-offset: 2px;
}

button.voice-search-icon i {
  transition: all 0.3s ease;
}

/* Mobile Voice Icon */
button.voice-search-icon.voice-mobile {
  background: linear-gradient(135deg, #cc0000 0%, #ff3333 100%);
  color: white;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(204, 0, 0, 0.25);
  font-size: 16px;
  padding: 0;
  margin: 0 0 0 auto;
  display: inline-flex;
}

button.voice-search-icon.voice-mobile:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 8px rgba(204, 0, 0, 0.35);
  color: white;
}

/* Desktop Voice Icon */
button.voice-search-icon.voice-desktop {
  display: none;
  margin-right: 8px;
  background: transparent;
  width: auto;
  height: auto;
  padding: 8px 12px;
}

/* Show desktop icon on larger screens */
@media (min-width: 769px) {
  button.voice-search-icon.voice-mobile {
    display: none !important;
  }
  
  button.voice-search-icon.voice-desktop {
    display: inline-flex;
  }
}

/* Listening State */
button.voice-search-icon.listening {
  color: #cc0000;
  animation: voiceIconPulse 1s ease-in-out infinite;
}

@keyframes voiceIconPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Processing State */
button.voice-search-icon.processing {
  color: #10b981;
}

/* =========================================
   FULLSCREEN OVERLAY
========================================= */
#voiceSearchOverlay.voice-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

#voiceSearchOverlay.voice-overlay.active {
  opacity: 1;
  visibility: visible;
}

#voiceSearchOverlay .voice-overlay-content {
  text-align: center;
  color: white;
  max-width: 600px;
  width: 90%;
  padding: 40px 20px;
  animation: voiceSlideUp 0.4s ease;
}

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

/* Microphone Container */
#voiceSearchOverlay .voice-mic-container {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 0 auto 40px;
}

#voiceSearchOverlay .voice-mic-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, #cc0000 0%, #ff3333 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 40px rgba(204, 0, 0, 0.4);
  z-index: 2;
  transition: all 0.3s ease;
}

#voiceSearchOverlay.active .voice-mic-circle {
  animation: voiceMicPulse 2s ease-in-out infinite;
}

@keyframes voiceMicPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.05);
  }
}

#voiceSearchOverlay .voice-mic-circle i {
  font-size: 50px;
  color: white;
  transition: all 0.3s ease;
}

/* Wave Rings Animation */
#voiceSearchOverlay .voice-wave-rings {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
}

#voiceSearchOverlay .wave-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 120px;
  height: 120px;
  border: 3px solid #cc0000;
  border-radius: 50%;
  opacity: 0;
}

#voiceSearchOverlay.active .wave-ring:nth-child(1) {
  animation: voiceWaveExpand 2s ease-out infinite;
}

#voiceSearchOverlay.active .wave-ring:nth-child(2) {
  animation: voiceWaveExpand 2s ease-out 0.6s infinite;
}

#voiceSearchOverlay.active .wave-ring:nth-child(3) {
  animation: voiceWaveExpand 2s ease-out 1.2s infinite;
}

@keyframes voiceWaveExpand {
  0% {
    width: 120px;
    height: 120px;
    opacity: 0.8;
  }
  100% {
    width: 200px;
    height: 200px;
    opacity: 0;
  }
}

/* Text Styles */
#voiceSearchOverlay .voice-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 12px;
  color: white;
  letter-spacing: -0.5px;
  transition: all 0.3s ease;
}

#voiceSearchOverlay .voice-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 12px;
  font-weight: 400;
  transition: all 0.3s ease;
}

/* Instruction Text */
#voiceSearchOverlay .voice-instruction {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 30px;
  font-style: italic;
  font-weight: 300;
}

/* Transcript Box */
#voiceSearchOverlay .voice-transcript-box {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px 24px;
  margin: 0 auto 30px;
  max-width: 500px;
  animation: voiceTranscriptFadeIn 0.4s ease;
}

@keyframes voiceTranscriptFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#voiceSearchOverlay .voice-transcript-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

#voiceSearchOverlay .voice-transcript-text {
  font-size: 24px;
  color: white;
  margin: 0;
  font-weight: 600;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Transcript State - Hide waves, show transcript */
#voiceSearchOverlay.showing-transcript .wave-ring {
  animation: none !important;
  opacity: 0;
}

#voiceSearchOverlay.showing-transcript .voice-mic-circle {
  animation: voiceTranscriptPop 0.5s ease;
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
  box-shadow: 0 10px 40px rgba(59, 130, 246, 0.4);
}

@keyframes voiceTranscriptPop {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Cancel Button */
#voiceSearchOverlay .voice-cancel-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

#voiceSearchOverlay .voice-cancel-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-2px);
}

#voiceSearchOverlay .voice-cancel-btn:active {
  transform: translateY(0);
}

/* Processing State */
#voiceSearchOverlay.processing .voice-mic-circle {
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
  box-shadow: 0 10px 40px rgba(16, 185, 129, 0.4);
  animation: voiceSuccessPulse 0.6s ease;
}

#voiceSearchOverlay.processing .wave-ring {
  border-color: #10b981;
  animation: none !important;
  opacity: 0;
}

@keyframes voiceSuccessPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    transform: translate(-50%, -50%) scale(1.15);
  }
}

/* Error State */
#voiceSearchOverlay.error .voice-mic-circle {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  box-shadow: 0 10px 40px rgba(220, 38, 38, 0.4);
  animation: voiceErrorShake 0.5s ease;
}

#voiceSearchOverlay.error .wave-ring {
  border-color: #dc2626;
  animation: none !important;
  opacity: 0;
}

@keyframes voiceErrorShake {
  0%, 100% {
    transform: translate(-50%, -50%);
  }
  25% {
    transform: translate(-50%, -50%) translateX(-10px);
  }
  75% {
    transform: translate(-50%, -50%) translateX(10px);
  }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  /* Voice button on mobile */
  button.voice-search-icon.voice-mobile {
    width: 38px;
    height: 38px;
    font-size: 15px;
  }
  
  /* Listening state - animate the box */
  button.voice-search-icon.voice-mobile.listening {
    animation: voiceMobileBoxPulse 1.5s ease-in-out infinite;
    box-shadow: 0 4px 16px rgba(204, 0, 0, 0.5);
  }
  
  @keyframes voiceMobileBoxPulse {
    0%, 100% {
      transform: scale(1);
    }
    50% {
      transform: scale(1.06);
      box-shadow: 0 6px 20px rgba(204, 0, 0, 0.6);
    }
  }
  
  /* Processing state on mobile */
  button.voice-search-icon.voice-mobile.processing {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.5);
  }
  
  /* Overlay adjustments */
  #voiceSearchOverlay .voice-overlay-content {
    padding: 30px 16px;
  }
  
  #voiceSearchOverlay .voice-mic-container {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
  }
  
  #voiceSearchOverlay .voice-mic-circle {
    width: 100px;
    height: 100px;
  }
  
  #voiceSearchOverlay .voice-mic-circle i {
    font-size: 40px;
  }
  
  #voiceSearchOverlay .wave-ring {
    width: 100px !important;
    height: 100px !important;
  }
  
  @keyframes voiceWaveExpand {
    0% {
      width: 100px;
      height: 100px;
      opacity: 0.8;
    }
    100% {
      width: 180px;
      height: 180px;
      opacity: 0;
    }
  }
  
  #voiceSearchOverlay .voice-title {
    font-size: 26px;
  }
  
  #voiceSearchOverlay .voice-subtitle {
    font-size: 16px;
  }
  
  #voiceSearchOverlay .voice-instruction {
    font-size: 13px;
    margin-bottom: 24px;
  }
  
  #voiceSearchOverlay .voice-transcript-box {
    padding: 16px 20px;
    margin-bottom: 24px;
  }
  
  #voiceSearchOverlay .voice-transcript-text {
    font-size: 20px;
  }
  
  #voiceSearchOverlay .voice-cancel-btn {
    padding: 10px 24px;
    font-size: 14px;
  }
  
  /* Ensure mobile voice button always shows */
  button.voice-search-icon.voice-mobile {
    display: inline-flex !important;
  }
}

/* Tablet Adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  #voiceSearchOverlay .voice-mic-container {
    width: 140px;
    height: 140px;
  }
  
  #voiceSearchOverlay .voice-mic-circle {
    width: 110px;
    height: 110px;
  }
  
  #voiceSearchOverlay .voice-mic-circle i {
    font-size: 45px;
  }
  
  #voiceSearchOverlay .voice-transcript-text {
    font-size: 22px;
  }
}

/* Accessibility - High Contrast Mode */
@media (prefers-contrast: high) {
  button.voice-search-icon {
    border: 2px solid currentColor;
  }
  
  #voiceSearchOverlay.voice-overlay {
    background: rgba(0, 0, 0, 0.98);
  }
  
  #voiceSearchOverlay .voice-mic-circle {
    border: 3px solid white;
  }
  
  #voiceSearchOverlay .voice-transcript-box {
    border-width: 3px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  button.voice-search-icon,
  button.voice-search-icon.listening,
  #voiceSearchOverlay .voice-mic-circle,
  #voiceSearchOverlay .wave-ring,
  #voiceSearchOverlay.processing .voice-mic-circle,
  #voiceSearchOverlay.error .voice-mic-circle,
  #voiceSearchOverlay.showing-transcript .voice-mic-circle {
    animation: none !important;
  }
  
  #voiceSearchOverlay .voice-overlay-content,
  #voiceSearchOverlay .voice-transcript-box {
    animation: none;
  }
}

/* Hide if not supported (done via JS) */
.no-voice-support button.voice-search-icon {
  display: none !important;
}