/* Modern textarea for project forms */
.textarea-large {
  width: 100%;
  min-height: 180px;
  font-size: var(--project-label-font-size, 1.5rem);
  padding: 0.4em 0.6em;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text-primary, #333);
  font-family: inherit;
  resize: vertical;
  box-shadow: 0 2px 8px rgba(100, 181, 246, 0.07);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  box-sizing: border-box;
}

.textarea-large:focus {
  border-color: #1976d2;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.10);
  outline: none;
}

@media (max-width: 600px) {
  .textarea-large {
    font-size: 1.1rem;
    min-height: 120px;
    padding: 0.3em 0.4em;
  }
}

/* Output div should match textarea font size */
#outdv,
.card-bg {
  font-size: var(--project-label-font-size, 1.5rem);
  min-height: 180px;
}

.card-minheight {
  min-height: 180px;
}

/* Form section responsive layout */
.form-section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Form actions - responsive button layout */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Audio element responsive */
.audio-fullwidth {
  width: 100%;
  max-width: 100%;
  margin: 1rem 0;
}

@media (max-width: 768px) {
  .form-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .form-actions .button {
    width: 100%;
    justify-content: center;
  }

  .hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
  }

  .description-text {
    font-size: 1rem;
    line-height: 1.6;
  }
}

@media (max-width: 600px) {

  #outdv,
  .card-bg {
    font-size: 1.1rem;
    min-height: 120px;
  }

  .card-minheight {
    min-height: 120px;
  }
}

/* CSS Variables for Color Scheme */
:root {
  /* Project icon/label scaling */
  --project-icon-font-size: 2.25rem;
  --project-icon-img-size: 2.25rem;
  --project-label-font-size: 1.5rem;
  --primary: #2d3a4b;
  --accent: #4fc3f7;
  --bg: #f0f8ff;
  --header-bg: linear-gradient(90deg, #64b5f6 0%, #020079 100%);
  --footer-bg: var(--white);
  --nav-glass: rgba(255, 255, 255, 0.1);
  --nav-border: rgba(255, 255, 255, 0.2);
  --nav-hover: rgba(255, 255, 255, 0.2);
  --nav-shadow: rgba(255, 235, 59, 0.3);

  /* Responsive variables */
  --container-padding: 20px;
  --header-height: 14vh;
  --border-radius: 12px;
  --nav-gap: 10px;

  /* Layout width variables for consistency */
  --layout-max-width: 1024px;

  /* Typography variables for consistency */
  --font-size-small: 0.85rem;
  --font-size-base: 1rem;
  --font-size-medium: 1.25rem;
  --font-size-large: 1.5rem;
  --font-size-xl: 2rem;
  --font-size-xxl: 2.5rem;

  /* Common text colors */
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-muted: #666666;
  --text-light: #888888;

  /* Link color variables */
  --link-primary: #1976d2;
  --link-hover: #1565c0;
  --link-visited: #7b1fa2;
  --link-active: #0d47a1;

  /* Link typography variables - matching w1 class size */
  --link-font-size: 1.5rem;
  --link-font-size-enhanced: 1.5rem;

  /* Article responsive font sizes - similar to table fonts */
  --article-font-base: clamp(1.3rem, 3vw, 1.7rem);
  --article-font-large: clamp(1.5rem, 3.5vw, 2rem);
  --article-font-heading: clamp(1.4rem, 3.2vw, 1.8rem);

  /* Common component variables */
  --card-bg: var(--white);
  --card-radius: 20px;
  --card-padding: 1.75rem;
  --card-padding-top: 1rem;
  --card-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --card-border: 1px solid rgba(255, 255, 255, 0.2);
  --card-hover-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  --transition-standard: 0.3s ease;

  /* Unified color variables */
  --white: #ffffff;
  --black: #000000;
  --text-dark: #222222;

  /* Border and separator colors */
  --border-light: #eeeeee;
  --border-medium: #dddddd;
  --border-dark: #cccccc;
  --border-darker: #bbbbbb;
  --separator: #e0e0e0;

  /* Blue accent variations */
  --blue-light: #64b5f6;
  --blue-medium: #42a5f5;
  --blue-accent-light: #f0f6ff;
  --blue-hover-light: rgba(100, 181, 246, 0.6);

  /* Common gradients */
  --gradient-primary: linear-gradient(135deg, var(--link-primary) 0%, var(--blue-light) 100%);
  --gradient-hover: linear-gradient(135deg, var(--link-hover) 0%, var(--blue-medium) 100%);

  /* Additional commonly used colors */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: var(--accent);

  /* Modern Navigation Variables */
  --nav-bg-mobile: rgba(45, 58, 75, 0.98);
  --nav-item-bg: rgba(255, 255, 255, 0.08);
  --nav-item-hover: var(--blue-hover-light);
  --nav-item-active: rgba(100, 181, 246, 0.3);
  --nav-border-radius: 8px;
  --nav-mobile-padding: 16px;
  --nav-desktop-padding: 8px 12px;
  --nav-item-height: calc(var(--header-height) * 0.3);
  --nav-font-size: calc(var(--header-height) * 0.25);
  --nav-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --nav-backdrop-blur: blur(20px);
  --nav-box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);

  /* Responsive breakpoints */
  --breakpoint-mobile: 480px;
  --breakpoint-tablet: 768px;
  --breakpoint-desktop: 991px;
}

/* 
 * ============================================
 * OPTIMIZED STYLES.CSS - 2025 WEB PROJECT
 * ============================================
 * 
 * OPTIMIZATION SUMMARY:
 * - Consolidated .btn, .link-button, .button classes into unified system
 * - Removed duplicate .card definitions 
 * - Added CSS variables for typography, colors, and breakpoints
 * - Merged similar section title classes
 * - Reduced file size from 2346 to ~2000 lines (15% reduction)
 * 
 * COMPONENT SYSTEM:
 * - .button (with .button-primary, .button-secondary, .button-large, .button-small)
 * - .card (unified card/section component)
 * - .section-title (consolidated title system)
 * - Legacy aliases maintained for backward compatibility
 */

/* ============================================ */
/* SHARED LAYOUT CLASSES */
/* ============================================ */

/* Consistent layout width for major elements */
.layout-container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
}

/* Basic CSS Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: Kalpurush;
  src: url(/downloads/font/kalpurush.ttf);
}

@font-face {
  font-family: TiroBangla;
  src: url(/downloads/font/TiroBangla-Regular.ttf);
}

/* ============================================ */
/* COMPONENT ORGANIZATION NOTE */
/* ============================================ */
/*
  COMPONENTS ARE NOW ORGANIZED IN LOGICAL SECTIONS BELOW:
  
  1. MAJOR LAYOUT ELEMENTS: page-container, header, main, footer
  2. NAVIGATION SYSTEM: nav, menu buttons, mobile navigation  
  3. SECTIONS & CARDS: .section, .card components
  4. BUTTONS & LINKS: .button, anchor tags
  5. FORMS & INPUT: form elements, search boxes
  6. TABLES & DATA: table styling, data display
  7. UTILITY CLASSES: helpers, responsive utilities
  
  This provides better organization and maintainability.
*/

/* Duplicate definitions removed - see organized sections below */

/* Base button component - consolidates .btn and .link-button */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  margin: 0.5rem 0;
  border: 2px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
  transition: all var(--transition-standard);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.button-primary {
  background: var(--gradient-primary);
  color: white;
}

.button-primary:hover {
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

.button-primary .button-icon {
  color: white;
}

.button-secondary {
  background: white;
  color: var(--link-primary);
  border-color: var(--link-primary);
}

.button-secondary:hover {
  background: var(--link-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.2);
}

/* Ensure button-icon inherits button colors */
.button-secondary .button-icon {
  color: #1976d2;
}

.button-secondary:hover .button-icon {
  color: white;
}

.button-large {
  padding: 1rem 2.5rem;
  font-size: 1.65rem;
}

.button-small {
  padding: 0.5rem 1rem;
  font-size: 1.275rem;
  border-radius: 25px;
}

.button-icon {
  margin-right: 8px;
  color: inherit;
}

.button-icon img {
  width: clamp(1.8rem, 2.25rem, 2.7rem);
  height: clamp(1.8rem, 2.25rem, 2.7rem);
  object-fit: contain;
}

/* Scale button-icon images with button variants */
.button-large .button-icon img {
  width: clamp(2rem, 2.475rem, 3rem);
  height: clamp(2rem, 2.475rem, 3rem);
}

.button-small .button-icon img {
  width: clamp(1.5rem, 1.9125rem, 2.3rem);
  height: clamp(1.5rem, 1.9125rem, 2.3rem);
}

/* Legacy aliases for backward compatibility */
.btn,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border: 2px solid transparent;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-standard);
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* ============================================ */
/* MAJOR LAYOUT ELEMENTS */
/* ============================================ */

/* Base Layout */
html,
body {
  height: 100%;
  font-family: 'TiroBangla', 'Kalpurush', 'Noto Sans Assamese', 'Arial', sans-serif;
  background: var(--bg);
  color: var(--primary);
  line-height: 1.6;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Page Container */
.page-container {
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  border: 0px;
  border-radius: var(--border-radius);
  box-sizing: border-box;
  background: transparent;
}

/* Header */
header {
  background: var(--header-bg);
  padding: 8px var(--container-padding);
  border-bottom: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  min-height: var(--header-height);
  position: relative;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  gap: 12px;
}

#logo {
  height: 100%;
  width: auto;

  /* White background for prominence against blue header */
  background: var(--white);
  border-radius: 8px;
  padding: 2px;

  /* Subtle shadow for depth */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);

  /* Smooth transitions */
  transition: all 0.3s ease;
}

#logo:hover {
  /* Enhanced effect on hover */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

header picture {
  height: 100%;
  display: flex;
  align-items: center;
}

/* Main Content */
main {
  flex: 1;
  padding: 2.5rem var(--container-padding);
  background: var(--white);
  width: 100%;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  box-sizing: border-box;
  overflow-wrap: break-word;
  border-radius: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 0;
}

main:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* Footer */
footer {
  background: var(--footer-bg);
  padding: 15px var(--container-padding);
  border-top: 1px solid var(--separator);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  border-radius: 0 0 12px 12px;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* ============================================ */
/* NAVIGATION SYSTEM */
/* ============================================ */

/* Modern Navigation System */
nav {
  display: flex;
  gap: clamp(6px, 1vw, 12px);
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
  max-width: 65%;
}

.nav-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  /* Fixed padding to prevent size changes */
  padding: 8px 12px;
  height: var(--nav-item-height);
  min-height: var(--nav-item-height);
  box-sizing: border-box;

  /* Typography - viewport-based size for consistent scaling */
  color: var(--white);
  font-size: var(--nav-font-size);
  /* 25% of header height */
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;

  /* Visual styling */
  background: var(--nav-item-bg);
  border: 1px solid var(--nav-border);
  border-radius: var(--nav-border-radius);
  backdrop-filter: var(--nav-backdrop-blur);

  /* Prevent any layout shifts */
  flex-shrink: 0;
  overflow: hidden;

  /* Smooth transitions only for visual properties */
  transition: background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;

  /* Modern touch */
  cursor: pointer;
  user-select: none;
}

/* Removed ::before pseudo-element to prevent flickering */

.nav-item:hover,
.nav-item:focus {
  color: var(--white);
  background: var(--nav-item-hover);
  border-color: var(--accent);
  /* No box-shadow to prevent layout shifts */
}

.nav-item:active {
  background: var(--nav-item-active);
  /* No box-shadow to prevent layout shifts */
}

.nav-item:visited,
.nav-item:focus {
  color: var(--white);
}

.nav-icon {
  font-size: var(--nav-font-size);
  /* Match nav text size - 25% of header height */
  opacity: 0.95;
  /* No transform transitions to prevent flickering */
}

.nav-item:hover .nav-icon {
  opacity: 1;
  /* Simple opacity change only */
}

/* Modern Mobile Menu Button */
#menuButton {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  background: var(--nav-item-bg);
  border: 1px solid var(--nav-border);
  border-radius: var(--nav-border-radius);
  color: var(--white);
  cursor: pointer;
  backdrop-filter: var(--nav-backdrop-blur);
  transition: var(--nav-transition);

  /* Center the hamburger */
  align-items: center;
  justify-content: center;

  /* Improved accessibility */
  outline: none;
  font-size: 18px;
  font-weight: 300;
}

#menuButton::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--nav-item-hover);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.2s ease;
}

#menuButton:hover::before,
#menuButton:focus::before {
  opacity: 1;
}

#menuButton:hover,
#menuButton:focus {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--nav-box-shadow);
}

#menuButton:active {
  transform: translateY(0);
}

/* Hamburger animation */
#menuButton[aria-expanded="true"] {
  background: var(--nav-item-active);
}

/* Main Content section moved to MAJOR LAYOUT ELEMENTS above */

/* Typography */
h1 {
  font-size: 2rem;
  margin-bottom: 20px;
  color: #222222;
  text-align: center;
}

h2 {
  font-size: 1.5rem;
  margin: 25px 0 15px 0;
  color: var(--text-primary);
  text-align: left;
}

h3 {
  font-size: 1.25rem;
  margin: 20px 0 10px 0;
  color: var(--text-primary);
  text-align: left;
}

h4,
h5,
h6 {
  font-size: 1.1rem;
  margin: 15px 0 8px 0;
  color: var(--text-primary);
  text-align: left;
}

p {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.6;
  text-align: justify;
}

main ul,
main ol {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin: 15px 0;
  padding-left: 30px;
  line-height: 1.6;
  text-align: left;
  display: block;
  list-style-type: disc;
}

main ol {
  list-style-type: decimal;
}

main li {
  margin-bottom: 5px;
}

/* ============================================ */
/* SECTIONS & CARDS COMPONENTS */
/* ============================================ */

/* Base section container */
.section {
  margin-bottom: 2rem;
}

.content-sections .card {
  margin-top: 1.5rem;
}

/* Base card/section component */
.card {
  background: var(--card-bg);
  border-radius: var(--card-radius);
  padding: var(--card-padding-top) var(--card-padding) var(--card-padding) var(--card-padding);
  box-shadow: var(--card-shadow);
  border: var(--card-border);
  backdrop-filter: blur(10px);
  transition: transform var(--transition-standard), box-shadow var(--transition-standard);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-hover-shadow);
}

/* Remove hover effects for non-collapsible section cards */
.card:has(.section-header:not(.collapsible)):hover {
  transform: none;
  box-shadow: var(--card-shadow);
}

/* Card utility classes */
.card-centered {
  margin: 0 auto;
}

.card-maxwidth {
  max-width: 600px;
}

/* Message styles */
.error-message {
  color: #d32f2f;
  background: #ffebee;
  border: 1px solid #ffcdd2;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}

.success-message {
  color: #2e7d32;
  background: #e8f5e8;
  border: 1px solid #c8e6c9;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
}

/* Login Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.popup-container {
  background: var(--white);
  border-radius: var(--card-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.popup-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.popup-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.popup-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all 0.2s ease;
}

.popup-close:hover {
  background: var(--bg-light);
  color: var(--text-primary);
}

.popup-content {
  padding: 1.5rem;
}

.popup-result {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  display: none;
}

.popup-result.show {
  display: block;
}

.popup-result.error {
  background: #ffebee;
  border: 1px solid #ffcdd2;
  color: #d32f2f;
}

.popup-result.success {
  background: #e8f5e8;
  border: 1px solid #c8e6c9;
  color: #2e7d32;
}

.popup-result.info {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  color: #1565c0;
}

.popup-footer {
  padding: 0 1.5rem 1.5rem 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
}

.popup-footer a {
  color: var(--link-primary);
  font-weight: 500;
}

/* User Greeting Styles */
.user-greeting {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-right: 1rem;
}

.greeting-text {
  color: var(--white);
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Responsive popup */
@media (max-width: 480px) {
  .popup-container {
    width: 95%;
    margin: 1rem;
  }

  .popup-header,
  .popup-content {
    padding: 1rem;
  }

  .popup-footer {
    padding: 0 1rem 1rem 1rem;
  }

  .user-greeting {
    margin-right: 0.5rem;
  }

  .greeting-text {
    font-size: 0.8rem;
  }
}

/* ============================================ */
/* MODERN ANCHOR TAG STYLING */
/* ============================================ */

/* Base anchor styling */
a {
  color: var(--link-primary);
  text-decoration: none;
  position: relative;
  transition: all var(--transition-standard);
  border-radius: 4px;
  padding: 1px 2px;
  font-weight: 500;
  font-size: var(--link-font-size);
  /* Using CSS variable for consistency */
}

/* Modern hover effect with underline animation */
a:hover {
  color: var(--link-hover);
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.08) 0%, rgba(100, 181, 246, 0.05) 100%);
  transform: translateY(-1px);
}

/* Animated underline effect */
a:not(.button):not(.btn):not(.link-button):not(.nav-item)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--link-primary), var(--link-hover));
  transition: all 0.3s ease;
  transform: translateX(-50%);
  border-radius: 1px;
}

a:not(.button):not(.btn):not(.link-button):not(.nav-item):hover::after {
  width: 100%;
}

/* Visited links */
a:visited {
  color: var(--link-visited);
}

/* Active/pressed state */
a:active {
  color: var(--link-active);
  transform: translateY(0);
}

/* Focus state for accessibility */
a:focus {
  outline: 2px solid var(--link-primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* External link styling */
a[href^="http"]:not([href*="xobdo.org"])::before {
  content: '🔗';
  font-size: 0.8em;
  margin-right: 4px;
  opacity: 0.7;
}

/* Email links */
a[href^="mailto:"]::before {
  content: '✉️';
  font-size: 0.8em;
  margin-right: 4px;
  opacity: 0.8;
}

/* Phone links */
a[href^="tel:"]::before,
a[href^="https://wa.me/"]::before {
  content: '📞';
  font-size: 0.8em;
  margin-right: 4px;
  opacity: 0.8;
}

/* Special styling for links in paragraphs */
p a,
.description-text a {
  font-weight: 600;
  font-size: var(--link-font-size-enhanced);
  /* Slightly larger for better readability */
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.05) 0%, transparent 50%);
  padding: 2px 4px;
  border-radius: 6px;
  border: 1px solid transparent;
}

p a:hover,
.description-text a:hover {
  border-color: rgba(25, 118, 210, 0.2);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

/* Horizontal Rule Styling */
hr {
  border: none;
  height: 2px;
  background: linear-gradient(to right, transparent, #64b5f6, transparent);
  margin: 2rem auto;
  width: 100%;
  max-width: 800px;
  position: relative;
}

hr::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 3px;
  background: #64b5f6;
  border-radius: 1px;
}

/* Large Desktop Styles */
@media (min-width: 1200px) {
  .page-container {
    max-width: var(--layout-max-width);
  }

  main {
    padding: 40px var(--container-padding);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  p {
    font-size: 1.25rem;
  }

  main ul,
  main ol {
    font-size: 1.25rem;
  }

  .nav-item {
    padding: 6px 15px;
    /* Slightly more padding for consistency */
    height: calc(var(--nav-item-height) * 0.85);
    min-height: calc(var(--nav-item-height) * 0.85);
    /* 85% of base vh height for large screens */
    font-size: calc(var(--nav-font-size) * 0.9);
    /* 90% of base font size for large screens */
    box-sizing: border-box;
    flex-shrink: 0;
  }
}

/* Ultra-wide screens */
@media (min-width: 1600px) {
  .page-container {
    max-width: var(--layout-max-width);
  }

  main {
    padding: 50px var(--container-padding);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  h1 {
    font-size: 3rem;
  }

  p {
    font-size: 1.5rem;
  }

  main ul,
  main ol {
    font-size: 1.5rem;
  }

  .nav-item {
    padding: 8px 18px;
    /* More padding for ultra-wide */
    height: calc(var(--nav-item-height) * 1.1);
    min-height: calc(var(--nav-item-height) * 1.1);
    /* 110% of base vh height for ultra-wide screens */
    font-size: calc(var(--nav-font-size) * 1.1);
    /* 110% of base font size for ultra-wide screens */
    box-sizing: border-box;
    flex-shrink: 0;
  }
}

/* Responsive Utility Classes */
.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.text-responsive {
  font-size: clamp(0.9rem, 2.5vw, 1.1rem);
}

.heading-responsive {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
}

/* Improved image responsiveness */
img {
  max-width: 100%;
  height: auto;
}

/* ============================================ */
/* TABLES & DATA COMPONENTS */
/* ============================================ */

/* Better table responsiveness */
table {
  width: 100%;
  overflow-x: auto;
  display: block;
  white-space: nowrap;
}

/* Modern Desktop Navigation */
@media (min-width: 769px) {
  header {
    align-items: flex-start;
    padding: 12px var(--container-padding) 16px;
    gap: 20px;
    flex-wrap: wrap;
    min-height: max(60px, calc(var(--header-height) * 0.8));
  }

  #menuButton {
    display: none;
  }

  nav {
    position: static;
    display: flex;
    background: transparent;
    backdrop-filter: none;
    padding: 0;
    border: none;
    border-radius: 0;
    max-width: none;
    flex: 1;
    justify-content: flex-end;
    align-items: center;
  }

  .nav-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(6px, 1vw, 12px);
    justify-content: flex-end;
    min-height: var(--nav-item-height);
  }

  .nav-item {
    position: static;
    padding: 8px 12px;
    /* Fixed padding */
    height: var(--nav-item-height);
    min-height: var(--nav-item-height);
    /* Viewport-based height */
    font-size: var(--nav-font-size);
    /* Viewport-based font size - 25% of header height */
    box-sizing: border-box;
    border-bottom: none;
    background: var(--nav-item-bg);
    border: 1px solid var(--nav-border);
    align-items: center;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
  }

  .nav-item:hover {
    background: var(--nav-item-hover);
    /* No padding changes to prevent layout shifts */
  }

  .nav-icon {
    font-size: 0.85rem;
    min-width: auto;
  }

  table {
    display: table;
    white-space: normal;
  }
}

/* Large Desktop Optimization */
@media (min-width: 1024px) {
  nav {
    gap: clamp(8px, 1.2vw, 14px);
  }

  .nav-item {
    padding: 8px 14px;
    font-size: 1rem;
    min-height: 38px;
  }

  .nav-icon {
    font-size: 0.9rem;
  }
}

/* Extra Large Screens */
@media (min-width: 1400px) {
  nav {
    gap: 16px;
  }

  .nav-item {
    padding: 10px 16px;
    font-size: 1.05rem;
    min-height: 40px;
  }

  .nav-icon {
    font-size: 1rem;
  }
}

/* Mobile optimization - when menu button is hidden */
@media (max-width: 767px) {
  /* This will be overridden by the mobile menu styles at 768px */
}

/* Extra small mobile screens */
@media (max-width: 480px) {
  nav {
    gap: 6px;
  }

  .nav-item {
    padding: 10px 12px;
    font-size: 0.95rem;
    min-height: 40px;
  }

  .nav-icon {
    font-size: 1rem;
  }
}

/* Responsive video embeds */
.video-container {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  /* 16:9 ratio */
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Footer */
footer {
  background: var(--footer-bg);
  padding: 15px var(--container-padding);
  border-top: 1px solid var(--separator);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-light);
  border-radius: 0 0 12px 12px;
  max-width: var(--layout-max-width);
  margin: 0 auto;
  width: 100%;
}

/* Tablet Styles */
@media (max-width: 1024px) {
  :root {
    --container-padding: 15px;
    --nav-gap: 10px;
  }

  .page-container {
    margin: 0 10px;
  }

  nav {
    gap: 10px;
  }

  nav a {
    padding: 5px 10px;
    font-size: 0.9rem;
  }
}

/* Modern Mobile Navigation */
@media (max-width: 768px) {
  :root {
    --container-padding: 12px;
    --nav-mobile-padding: 16px;
    --nav-item-height: calc(var(--header-height) * 0.45);
    /* 45% of header height for mobile */
    --nav-font-size: calc(var(--header-height) * 0.28);
    /* 28% of header height for mobile (slightly larger for touch) */
  }

  .page-container {
    border: none;
    margin: 0;
    border-radius: var(--border-radius);
    padding: 0;
  }

  header {
    position: relative;
    padding: 12px var(--container-padding);
    background: var(--header-bg);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
    gap: 16px;
    align-items: center;
    min-height: 64px;
  }

  #menuButton {
    display: flex;
    order: 3;
  }

  #logo {
    order: 1;
    height: clamp(40px, 8vh, 56px);
    max-width: 200px;
  }

  nav {
    /* Mobile menu overlay */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;

    /* Hide by default */
    display: none;
    opacity: 0;
    visibility: hidden;

    /* Backdrop */
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);

    /* Flex container */
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    /* Transitions */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  nav.show {
    display: flex !important;
    opacity: 1;
    visibility: visible;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.5);
  }

  nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: var(--header-bg);
    z-index: -1;
  }

  .nav-container {
    width: 100%;
    max-width: 320px;
    margin: 80px 0 0 0;
    background: var(--nav-bg-mobile);
    backdrop-filter: var(--nav-backdrop-blur);
    border-radius: 0 var(--nav-border-radius) var(--nav-border-radius) 0;
    box-shadow: var(--nav-box-shadow);
    overflow: hidden;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  nav.show .nav-container {
    transform: translateX(0);
    background: var(--nav-bg-mobile);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
  }

  .nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: var(--nav-mobile-padding);
    width: 100%;
    min-height: var(--nav-item-height);

    /* Typography */
    color: var(--white);
    font-size: var(--nav-font-size);
    font-weight: 500;
    text-decoration: none;

    /* Visual */
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

    /* Interaction */
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
  }

  .nav-item:last-child {
    border-bottom: none;
  }

  .nav-item:hover,
  .nav-item:focus {
    background: var(--nav-item-hover);
    color: var(--white);
    /* No padding changes to prevent layout shifts */
  }

  .nav-item:active {
    background: var(--nav-item-active);
  }

  .nav-item:visited {
    color: var(--white);
  }

  .nav-icon {
    font-size: 1.2rem;
    opacity: 0.9;
    min-width: 24px;
  }

  main {
    padding: 20px var(--container-padding);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  h1 {
    font-size: 1.75rem;
    margin-bottom: 15px;
  }

  h2 {
    font-size: 1.35rem;
    margin: 20px 0 12px 0;
  }

  h3 {
    font-size: 1.15rem;
    margin: 15px 0 8px 0;
  }

  p {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  main ul,
  main ol {
    font-size: 0.875rem;
    padding-left: 25px;
  }

  .search-container {
    margin: 2vh auto 1rem;
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --container-padding: 8px;
    --card-padding: 1rem;
    --card-padding-top: 0.5rem;
  }

  main {
    padding: 15px var(--container-padding);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  header {
    padding: 0 var(--container-padding);
    background: var(--header-bg);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  #logo {
    height: auto;
    max-height: min(8vh, 48px);
    max-width: 150px;
  }

  h1 {
    font-size: 1.5rem;
    margin-bottom: 12px;
  }

  h2 {
    font-size: 1.25rem;
    margin: 15px 0 10px 0;
  }

  h3 {
    font-size: 1.1rem;
    margin: 12px 0 6px 0;
  }

  p {
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  main ul,
  main ol {
    font-size: 0.75rem;
  }

  .nav-item {
    padding: 10px 12px;
    font-size: 0.9rem;
    flex: 1;
    width: 100%;
  }

  #menuButton {
    padding: 6px 10px;
    font-size: 16px;
  }

  .search-container {
    margin: 1vh auto 0.5rem;
  }
}

/* Extra small mobile and landscape phones */
@media (max-width: 360px) {
  :root {
    --container-padding: 5px;
  }

  h1 {
    font-size: 1.3rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  p {
    font-size: 0.65rem;
  }

  main ul,
  main ol {
    font-size: 0.65rem;
  }

  .nav-item {
    padding: 8px 10px;
    font-size: 0.85rem;
    flex: 1;
    width: 100%;
  }
}


/* Search box styling */
.search-container {
  width: 100%;
  max-width: 450px;
  margin: 5vh auto 2rem;
  position: relative;
  display: flex;
  justify-content: center;
}

#search-box {
  width: 100%;
  padding: 0.8em 1em;
  font-size: 1.1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#search-box:focus {
  border-color: #1976d2;
  box-shadow: 0 0 5px rgba(25, 118, 210, 0.4);
  outline: none;
}

#suggestions {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--white);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 100;
  border: 1px solid #bbb;
  border-top: none;
  max-height: 220px;
  overflow-y: auto;
  display: none;
}

#suggestions li {
  padding: 0.8em 1em;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-family: inherit;
  font-size: 1.05rem;
  transition: background 0.2s ease;
}

#suggestions li:hover,
#suggestions li.active {
  background: #f0f6ff;
}

#suggestions li:last-child {
  border-bottom: none;
}

#suggestions li.no-match {
  color: #888;
  font-style: italic;
  cursor: default;
}

#suggestions strong {
  color: #0d47a1;
}

/* Modern Homepage Styles */
.hero-section {
  text-align: center;
  padding: 3rem 0 4rem 0;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(2, 0, 121, 0.05) 100%);
  border-radius: 16px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(100, 181, 246, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
  z-index: 0;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.hero-subtitle-assamese {
  font-family: 'Kalpurush', 'Noto Sans Assamese', sans-serif;
  font-size: 3rem;
  font-weight: 600;
  color: #4fc3f7;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-description {
  font-size: 1.5rem;
  color: #555;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.content-sections {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  padding: 0 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

/* Contributors and recent words sections now use base .card class */

.section-header {
  text-align: left;
  margin-bottom: 2rem;
}

.section-header:not(.collapsible) {
  text-align: center;
}

.section-title {
  font-size: 2rem;
  font-weight: 600;
  color: #1976d2;
  margin-bottom: 0.5rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  padding-left: 0;
  /* Consistent left alignment */
}

.section-icon {
  font-size: 1.5rem;
}

.section-subtitle {
  font-size: 1.5rem;
  /* 75% of base section-title (2rem * 0.75 = 1.5rem) */
  color: #666;
  margin: 0;
}

.section-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}

/* ============================================ */
/* BUTTON COMPONENT SYSTEM */
/* ============================================ */
/* 
  CONSOLIDATED BUTTON SYSTEM:
  - Base class: .button
  - Variants: .button-primary, .button-secondary  
  - Sizes: .button-large, .button-small
  - Legacy aliases: .btn, .link-button (for backward compatibility)
*/

.icon {
  font-size: 1.2rem;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(180deg);
  }
}

/* Hero Section with Image Layout */
.hero-section-with-image {
  display: flex;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.hero-image-small {
  width: 160px;
  height: 160px;
  object-fit: contain;
  flex-shrink: 0;
}

.hero-content {
  flex: 1;
  text-align: center;
}

.hero-section-with-image .hero-title,
.hero-section-with-image .hero-subtitle-assamese,
.hero-section-with-image .hero-description {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Responsive Design for Homepage */
@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0 3rem 0;
    margin-bottom: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle-assamese {
    font-size: 2.25rem;
  }

  .hero-description {
    font-size: 1.25rem;
  }

  .contributors-section,
  .recent-words-section {
    padding: 2rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1.125rem;
  }

  .section-actions {
    flex-direction: column;
    align-items: center;
  }

  .link-button {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  /* Responsive Hero Section with Image */
  .hero-section-with-image {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .hero-image-small {
    width: 120px;
    height: 120px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle-assamese {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1.125rem;
  }

  .contributors-section,
  .recent-words-section {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.5rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .content-sections {
    gap: 2rem;
    padding: 0 0.5rem;
  }

  /* Smaller Hero Image for Mobile */
  .hero-image-small {
    width: 100px;
    height: 100px;
  }
}

/* ============================================ */
/* COMMON REUSABLE CLASSES FOR ALL PAGES */
/* ============================================ */

/* Common Typography Classes */
.page-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  text-align: center;
  position: relative;
}

.section-title-large {
  font-size: 2rem;
  font-weight: 600;
  color: #1976d2;
  margin-bottom: 1rem;
  margin-top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Note: .section-title-large is identical to .section-title except for margins */

.section-title-medium {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333333;
  margin: 1.5rem 0 1rem 0;
  border-bottom: 2px solid #64b5f6;
  padding-bottom: 0.5rem;
}

.description-text {
  font-size: 1.2rem;
  color: #555;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: justify;
}

.highlight-text {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(2, 0, 121, 0.05) 100%);
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: 6px;
  border-left: 3px solid #64b5f6;
  margin: clamp(0.5rem, 1.5vw, 0.75rem) 0;
  line-height: 1.4;
}

.highlight-text p {
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

/* Legacy button variants - for backward compatibility */
.btn-primary,
.link-button.primary {
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  color: white;
}

.btn-primary:hover,
.link-button.primary:hover {
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

.btn-secondary,
.link-button.secondary {
  background: white;
  color: #1976d2;
  border-color: #1976d2;
}

.btn-secondary:hover,
.link-button.secondary:hover {
  background: #1976d2;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.2);
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

.btn-small {
  padding: 0.5rem 1.5rem;
  font-size: 0.9rem;
}

/* ============================================ */
/* FORMS & INPUT COMPONENTS */
/* ============================================ */

/* Form Classes - Using base .card styling */
.form-container {
  /* Extends base .card class */
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--card-shadow);
  max-width: 500px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-input {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: #1976d2;
  box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
  outline: none;
}

/* Select dropdown styling */
select.form-input {
  background: white;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

select.form-input:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231976d2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

select.form-input:hover {
  border-color: #bbb;
}

/* Select option styling */
select.form-input option {
  padding: 0.5rem;
  font-size: 1rem;
  color: #333;
  background: white;
}

select.form-input option:checked {
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  color: white;
}

/* Multiple select styling */
select.form-input[multiple] {
  background-image: none;
  padding-right: 1rem;
  min-height: 120px;
  overflow-y: auto;
}

select.form-input[multiple] option {
  padding: 0.5rem 0.75rem;
  margin: 0.125rem 0;
  border-radius: 4px;
}

select.form-input[multiple] option:checked {
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  color: white;
}

/* List Classes */
.styled-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.styled-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #f0f0f0;
  transition: background-color 0.2s ease;
}

.styled-list li:hover {
  background-color: #f8f9fa;
  padding-left: 1rem;
}

.styled-list li:last-child {
  border-bottom: none;
}

.styled-list a {
  color: var(--link-primary);
  text-decoration: none;
  font-weight: 500;
  font-size: var(--link-font-size);
  /* Consistent with base anchor size */
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all var(--transition-standard);
  background: transparent;
}

.styled-list a:hover {
  color: var(--link-hover);
  background: linear-gradient(135deg, rgba(25, 118, 210, 0.1) 0%, rgba(100, 181, 246, 0.05) 100%);
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
}

/* Remove the ::after effect for styled-list links */
.styled-list a::after {
  display: none;
}

/* Card hover effects are already defined in base .card class */

.card-header {
  text-align: center;
  margin-bottom: 1.5rem;
  margin-top: 0;
}

/* Reduce top margin for titles that are first elements in cards */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header .section-title,
.card-header .section-title-large {
  margin-top: 0;
}

.card h1:first-child,
.card h2:first-child,
.card h3:first-child,
.card .section-title:first-child,
.card .section-title-large:first-child {
  margin-top: 0;
}

.card-body {
  text-align: left;
}

.card-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f0;
}

/* Icon Classes */
.icon {
  font-size: 1.2rem;
  margin-right: 0.5rem;
}

.icon-large {
  font-size: 2rem;
}

.icon-small {
  font-size: 1rem;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

.text-error {
  color: #d32f2f;
}

.mb-1 {
  margin-bottom: 1rem;
}

.mb-2 {
  margin-bottom: 1.25rem;
}

.mb-3 {
  margin-bottom: 3rem;
}

.mt-1 {
  margin-top: 1rem;
}

.mt-2 {
  margin-top: 2rem;
}

.mt-3 {
  margin-top: 3rem;
}

.flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-center {
  justify-content: center;
  align-items: center;
}

.flex-between {
  justify-content: space-between;
  align-items: center;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-1 {
  gap: 1rem;
}

.gap-2 {
  gap: 2rem;
}

.gap-3 {
  gap: 3rem;
}

.w-full {
  width: 100%;
}

.max-w-small {
  max-width: 400px;
}

.max-w-medium {
  max-width: 600px;
}

.max-w-large {
  max-width: 800px;
}

/* Responsive adjustments for common classes */
@media (max-width: 768px) {
  main {
    padding: 1.5rem var(--container-padding);
    margin-bottom: 0;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  .page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .section-title-large {
    font-size: 1.75rem;
    flex-direction: column;
    gap: 0.25rem;
  }

  .section-title-medium {
    font-size: 1.35rem;
  }

  .description-text {
    font-size: 1rem;
  }

  .form-container {
    padding: 1.5rem;
  }

  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  .btn-large {
    padding: 0.875rem 2rem;
    font-size: 1rem;
  }

  .card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  main {
    padding: 1rem var(--container-padding);
    max-width: var(--layout-max-width);
    margin: 0 auto;
    width: 100%;
  }

  .page-title {
    font-size: 1.75rem;
  }

  .section-title-large {
    font-size: 1.5rem;
  }

  .section-title-medium {
    font-size: 1.25rem;
  }

  .description-text {
    font-size: 0.9rem;
  }

  .form-container {
    padding: 1rem;
  }

  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }

  .card {
    padding: 1rem;
  }
}

/* Article Page Styles */
.article-breadcrumb {
  margin-bottom: 2rem;
  padding: 1.5rem 0;
  border-bottom: 2px solid rgba(100, 181, 246, 0.15);
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.03) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-radius: 8px;
  font-family: 'Kalpurush', 'Noto Sans Assamese', 'Arial', sans-serif;
}

.breadcrumb-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
  transition: all 0.3s ease;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
}

.breadcrumb-link:hover {
  color: #1976d2;
  background: rgba(100, 181, 246, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.breadcrumb-separator {
  color: #666;
  margin: 0 0.8rem;
  font-weight: bold;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  opacity: 0.7;
}

.article-hero-section {
  text-align: center;
  padding: 2rem 0 3rem 2rem;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(2, 0, 121, 0.05) 100%);
  border-radius: 16px;
  margin-bottom: 3rem;
  position: relative;
  overflow: hidden;
}

.article-hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(100, 181, 246, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
  z-index: 0;
}

.article-title {
  font-size: 2.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  font-family: 'Kalpurush', 'Noto Sans Assamese', 'Arial', sans-serif;
}

.article-content {
  background: transparent;
  border: none;
  padding: 2.5rem 0;
  box-shadow: none;
  backdrop-filter: none;
  transition: none;
  margin-bottom: 2rem;
  font-size: var(--article-font-base);
  line-height: 1.8;
  color: var(--primary);
  font-family: 'Kalpurush', 'Noto Sans Assamese', 'Arial', sans-serif;
}

.article-content:hover {
  transform: none;
  box-shadow: none;
}

.article-content h2,
.article-content h3,
.article-content h4 {
  color: #1976d2;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: var(--article-font-heading);
  font-family: 'Kalpurush', 'Noto Sans Assamese', 'Arial', sans-serif;
}

.article-content p {
  margin-bottom: 1.5rem;
  text-align: justify;
  font-size: var(--article-font-base);
  line-height: 1.8;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
  font-size: var(--article-font-base);
}

.article-content li {
  margin-bottom: 0.8rem;
  line-height: 1.8;
}

.article-content strong,
.article-content b {
  font-size: var(--article-font-large);
  font-weight: bold;
}

.article-content em,
.article-content i {
  font-size: var(--article-font-base);
}

.subarticles-section {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.subarticles-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.subarticles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.subarticle-card {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.05) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1px solid rgba(100, 181, 246, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.subarticle-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.subarticle-number {
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.subarticle-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  transition: color 0.3s ease;
  flex: 1;
}

.subarticle-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Responsive Article Styles */
@media (max-width: 768px) {
  .article-title {
    font-size: 2rem;
  }

  .article-hero-section {
    padding: 1.5rem 0 2rem 1rem;
    margin-bottom: 2rem;
  }

  .article-content {
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
  }

  .subarticles-section {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .subarticles-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .subarticle-card {
    padding: 1rem;
  }

  .article-content {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  :root {
    /* Adjust article fonts for very small screens */
    --article-font-base: clamp(1.2rem, 2.8vw, 1.5rem);
    --article-font-large: clamp(1.3rem, 3.2vw, 1.7rem);
    --article-font-heading: clamp(1.25rem, 3vw, 1.6rem);
  }

  .article-title {
    font-size: 1.75rem;
  }

  .article-breadcrumb {
    padding: 1rem 0;
    margin-bottom: 1.5rem;
  }

  .breadcrumb-link {
    padding: 0.4rem 0.6rem;
  }

  .breadcrumb-separator {
    margin: 0 0.5rem;
  }

  .subarticle-number {
    width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }

  .subarticle-link {
    font-size: 1rem;
  }
}

/* ============================================ */
/* WORD GAMES SECTION STYLING */
/* ============================================ */

.games-section {
  background: #ffffff;
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.games-section:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.games-section .section-title {
  font-family: 'Kalpurush', 'Noto Sans Assamese', sans-serif;
  font-size: 2.5rem;
  color: #1976d2;
  margin-bottom: 0.5rem;
}

.games-section .section-subtitle {
  font-family: 'Kalpurush', 'Noto Sans Assamese', sans-serif;
  font-size: 1.5rem;
  color: #666;
  margin-bottom: 2rem;
}

/* Game cards container styling to work with existing wordgames_card.css */
.games-section #cards-container {
  margin-bottom: 2rem;
}

.games-section #status {
  text-align: center;
  color: #64748b;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.games-section #refresh-btn {
  display: block;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.games-section #refresh-btn:hover {
  background: linear-gradient(135deg, #1565c0 0%, #42a5f5 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(25, 118, 210, 0.3);
}

/* Responsive adjustments for games section */
@media (max-width: 768px) {
  .games-section {
    padding: 2rem;
  }

  .games-section .section-title {
    font-size: 2rem;
  }

  .games-section .section-subtitle {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .games-section {
    padding: 1.5rem;
  }

  .games-section .section-title {
    font-size: 1.75rem;
  }

  .games-section .section-subtitle {
    font-size: 1.125rem;
  }

  .games-section #refresh-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
  }
}

/* ============================================ */
/* PROVERBS & IDIOMS (FJ) PAGE STYLING */
/* ============================================ */

/* FJ Page sections use base .card class instead of custom styling */
/* Classes: .search-section, .index-section, .contribute-section, .results-section */

/* Specific adjustments for index section */
.index-section {
  padding-top: 1.5rem;
}

/* Increase font size for alphabet grid */
.alphabet-grid {
  font-size: 1.1rem;
}

.search-form {
  display: flex;
  gap: 1rem;
  align-items: end;
  max-width: 500px;
  margin: 0 auto 2rem auto;
}

.search-form .form-group {
  flex: 1;
  margin-bottom: 0;
}

.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
}

/* Single column variant for alpha.php */
.alphabet-grid-single {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  width: 100%;
}

/* Adjust alphabet-link size for single column layout to prevent overflow */
.alphabet-grid-single .alphabet-link {
  padding: 0.4rem 0.6rem;
  font-size: 1.35rem;
  min-height: 36px;
}

.alphabet-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 40px;
  padding: 0.5rem 0.75rem;
  margin: 0;
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1px solid rgba(100, 181, 246, 0.3);
  border-radius: 6px;
  color: #1976d2;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
  font-family: 'Kalpurush', 'Noto Sans Assamese', 'Arial', sans-serif;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  text-align: left;
  line-height: 1.2;
}

.alphabet-link:hover {
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.alphabet-link .count {
  font-size: inherit;
  opacity: 0.8;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  margin-left: auto;
  flex-shrink: 0;
  margin-top: 0;
  line-height: 1.2;
}

.proverbs-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.proverb-card {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.05) 0%, rgba(255, 255, 255, 0.9) 100%);
  border: 1px solid rgba(100, 181, 246, 0.2);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.proverb-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  border-radius: 0 2px 2px 0;
}

.proverb-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border-color: var(--accent);
}

.proverb-card h3 {
  color: #1976d2;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-family: 'Kalpurush', 'Noto Sans Assamese', sans-serif;
}

.proverb-card p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #555;
  margin-bottom: 0.75rem;
}

.proverb-meta {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(100, 181, 246, 0.2);
  font-size: 0.9rem;
  color: #777;
}

.proverb-type {
  background: rgba(100, 181, 246, 0.1);
  color: #1976d2;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-weight: 500;
}

/* Responsive Design for FJ Page */
@media (max-width: 768px) {

  .search-section,
  .index-section,
  .contribute-section,
  .results-section {
    padding: 2rem;
  }

  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form .form-group {
    margin-bottom: 1rem;
  }

  .alphabet-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.4rem;
  }

  .alphabet-grid-single {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .alphabet-grid-single .alphabet-link {
    padding: 0.35rem 0.5rem;
    font-size: 1.25rem;
    min-height: 34px;
  }

  .alphabet-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    min-height: 36px;
  }

  .proverb-card {
    padding: 1.5rem;
  }

  .proverb-meta {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {

  .search-section,
  .index-section,
  .contribute-section,
  .results-section {
    padding: 1.5rem;
  }

  .alphabet-grid {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.3rem;
  }

  .alphabet-grid-single {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .alphabet-grid-single .alphabet-link {
    padding: 0.3rem 0.45rem;
    font-size: 1.15rem;
    min-height: 32px;
  }

  .alphabet-link {
    padding: 0.3rem 0.5rem;
    font-size: 0.85rem;
    min-height: 32px;
  }

  .proverb-card {
    padding: 1rem;
  }

  .proverb-card h3 {
    font-size: 1.2rem;
  }

  .proverb-card p {
    font-size: 1rem;
  }
}

/* Additional styling for fjlist.php */
.breadcrumb-section {
  margin-bottom: 2rem;
}

.breadcrumb-current {
  color: #666;
  font-weight: 600;
  font-size: clamp(1.1rem, 2.5vw, 1.3rem);
}

.search-actions,
.footer-actions,
.no-results-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.proverb-number {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, #1976d2 0%, #64b5f6 100%);
  color: white;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.proverb-content {
  margin-right: 3.5rem;
  /* Space for the number */
}

.results-footer {
  margin-top: 3rem;
}

@media (max-width: 768px) {

  .search-actions,
  .footer-actions,
  .no-results-actions {
    flex-direction: column;
    align-items: center;
  }

  .search-actions .btn,
  .footer-actions .btn,
  .no-results-actions .btn {
    width: 100%;
    max-width: 280px;
  }

  .proverb-number {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
    top: 0.75rem;
    right: 0.75rem;
  }

  .proverb-content {
    margin-right: 2.5rem;
  }
}

/* ============================================ */
/* PROJECT NAVIGATION STYLING */
/* ============================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.project-category {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.05) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 1px solid rgba(100, 181, 246, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  transition: all var(--transition-standard);
}

.project-category:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(100, 181, 246, 0.15);
  border-color: rgba(100, 181, 246, 0.3);
}

.category-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1976d2;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(100, 181, 246, 0.2);
  border-radius: 8px;
  text-decoration: none;
  color: #1976d2;
  font-weight: 500;
  transition: all var(--transition-standard);
}

.project-link:hover {
  background: rgba(100, 181, 246, 0.1);
  border-color: rgba(100, 181, 246, 0.4);
  transform: translateX(4px);
  color: #1565c0;
  text-decoration: none;
}

.project-link.primary {
  background: linear-gradient(135deg, #64b5f6 0%, #1976d2 100%);
  color: white;
  font-weight: 600;
  border: 1px solid rgba(100, 181, 246, 0.3);
}

.project-link.primary:hover {
  background: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%);
  color: white;
  transform: translateX(4px);
  border-color: rgba(100, 181, 246, 0.5);
  text-decoration: none;
}


.project-icon {
  font-size: var(--project-icon-font-size);
  min-width: var(--project-icon-img-size);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-icon img {
  width: var(--project-icon-img-size);
  height: var(--project-icon-img-size);
  object-fit: contain;
}

.project-label {
  flex: 1;
  font-size: var(--project-label-font-size);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-category {
    padding: 1.25rem;
  }

  .project-link {
    padding: 0.625rem 0.875rem;
  }

  .project-icon {
    font-size: calc(var(--project-icon-font-size) * 0.8);
  }

  .project-label {
    font-size: calc(var(--project-label-font-size) * 0.8);
  }

  @media (max-width: 480px) {
    .project-icon {
      font-size: calc(var(--project-icon-font-size) * 0.6);
    }

    .project-label {
      font-size: calc(var(--project-label-font-size) * 0.6);
    }
  }
}

@media (max-width: 480px) {
  .projects-grid {
    gap: 1rem;
  }

  .project-category {
    padding: 1rem;
  }

  .category-title {
    font-size: 1rem;
  }
}

/* ============================================ */
/* HOME PAGE - ANCHOR TAG LISTS */
/* ============================================ */

/* Container styling for anchor tag lists */
#contributors-list,
#recent-words-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}



/* Responsive adjustments for anchor lists */
@media (max-width: 768px) {

  #contributors-list,
  #recent-words-list {
    gap: 6px;
  }


}

@media (max-width: 480px) {

  #contributors-list,
  #recent-words-list {
    gap: 4px;
  }



  /* Mobile-specific anchor improvements */
  a {
    padding: 2px 3px;
    min-height: auto;
    /* Remove excessive height, let content determine size */
    display: inline-flex;
    align-items: center;
    line-height: 1.4;
  }

  /* Larger touch targets for interactive links */
  p a,
  .description-text a {
    padding: 4px 6px;
    min-height: auto;
    /* Reduce from 44px to auto */
    border-radius: 6px;
    line-height: 1.4;
  }

  /* Reduce animation on mobile for better performance */
  a:not(.button):not(.btn):not(.link-button)::after {
    transition: width 0.2s ease;
  }

  /* Remove hover effects on touch devices */
  @media (hover: none) {
    a:hover {
      transform: none;
      background: transparent;
    }

    a:not(.button):not(.btn):not(.link-button):hover::after {
      width: 0;
    }
  }
}

/* ============================================ */
/* MODERN ANCHOR TAG DOCUMENTATION */
/* ============================================ */
/*
 * MODERN ANCHOR TAG FEATURES:
 * 
 * ✅ Smooth color transitions
 * ✅ Animated underline effect
 * ✅ Background hover effects
 * ✅ Icon prefixes for external/email/phone links
 * ✅ Enhanced focus states for accessibility
 * ✅ Mobile-optimized touch targets
 * ✅ Performance optimized animations
 * ✅ CSS variable-based theming
 * 
 * USAGE:
 * - Regular links: automatic modern styling
 * - Button-style links: use .button classes
 * - External links: automatic 🔗 icon
 * - Email links: automatic ✉️ icon
 * - Phone/WhatsApp: automatic 📞 icon
 * 
 * CUSTOMIZATION:
 * - --link-primary: main link color
 * - --link-hover: hover state color
 * - --link-visited: visited link color
 * - --link-active: active/pressed color
 * - --link-font-size: responsive base link font size (clamp 1.1rem - 1.25rem)
 * - --link-font-size-enhanced: responsive enhanced link size for paragraphs (clamp 1.15rem - 1.35rem)
 */

/* Loading States */
.loading-indicator {
  text-align: center;
  padding: 2rem;
}

.loading-spinner-container {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Collapsible Section Icons */
.section-icon {
  transition: transform 0.3s ease;
}

.section-icon.collapsed {
  transform: rotate(0deg);
}

.section-icon.expanded {
  transform: rotate(90deg);
}

.section-content {
  display: none;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-bottom: 0.25rem;
  background: white;
}

.section-content.expanded {
  display: block;
}

.section-header.collapsible {
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  background: #f9f9f9;
}

.expand-icon {
  margin-right: 12px;
  font-size: 1.2em;
  transition: transform 0.3s ease;
  width: 20px;
  /* Fixed width for consistent alignment */
  flex-shrink: 0;
  /* Prevent shrinking */
}

/* Section title and subtitle styling */
.section-header .section-title {
  margin: 0;
  font-size: 1.3em;
}

/* Center and style non-collapsible section titles to match buttons */
.section-header:not(.collapsible) .section-title {
  justify-content: center;
  font-size: 1.5rem;
  /* Match button font size */
  padding-left: 0;
  /* Remove left padding for centering */
}

.section-header .section-subtitle {
  margin: 0.25rem 0 0 0;
  font-size: 0.975em;
  /* 75% of section-title (1.3em * 0.75 = 0.975em) */
  color: #666;
}

/* Center subtitles in non-collapsible sections */
.section-header:not(.collapsible) .section-subtitle {
  text-align: center;
  font-size: 1.125rem;
  /* 75% of non-collapsible title (1.5rem * 0.75 = 1.125rem) */
}

.section-header .section-icon {
  margin-right: 8px;
}

/* Section actions styling */
.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
}

.section-actions .button .icon {
  margin-right: 8px;
}

/* Card margin styling */
.card.quick-actions {
  margin-top: 1.5rem;
}

/* Statistics grid and items */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat-item {
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid rgba(100, 181, 246, 0.2);
}

.stat-item:nth-child(1) {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-color: rgba(100, 181, 246, 0.2);
}

.stat-item:nth-child(2) {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-color: rgba(76, 175, 80, 0.2);
}

.stat-item:nth-child(3) {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.1) 0%, rgba(255, 255, 255, 0.8) 100%);
  border-color: rgba(255, 152, 0, 0.2);
}



/* Recent Words Grid */
.recent-words-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Highlight Text with margin */
.highlight-text-spaced {
  margin-top: clamp(0.5rem, 1.5vw, 0.75rem);
}

/* Contributors Grid */
.contributors-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Button spacing */
.button-spaced {
  margin-top: 1rem;
}

/* Icon spacing */
.icon-spaced {
  margin-right: 8px;
}

/* Info section styling */
.info {
  font-size: 1rem !important;
}

.info * {
  font-size: 1rem !important;
}

/* Photo Classes */
.photo-small {
  width: auto;
  max-width: 200px;
  height: auto;
  max-height: 200px;
  margin: 8px auto;
  image-rendering: auto;
  border-radius: 8px;
  display: block;
  box-sizing: border-box;
  object-fit: contain;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.photo-small:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Announcement Banner Styles */
.announcement-banner {
  background: linear-gradient(135deg, #4c51bf 0%, #5a2d82 100%);
  padding: 12px 20px;
  margin: 20px 0;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  position: relative;
}

.announcement-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  animation: slideIn 1s ease-out;
}

.announcement-icon {
  font-size: 1.5em;
  animation: pulse 2s infinite;
}

.announcement-text {
  color: #ffffff;
  font-size: 1.1em;
  font-weight: 500;
}

.announcement-link {
  color: #ffffff !important;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
}

.announcement-link:hover {
  transform: scale(1.05);
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  color: #ffd700 !important;
}

@keyframes slideIn {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

@media (max-width: 768px) {
  .announcement-banner {
    padding: 10px 15px;
  }
  
  .announcement-text {
    font-size: 0.95em;
  }
  
  .announcement-icon {
    font-size: 1.2em;
  }
}

/* Donate Message Banner */
.donate-message {
background: linear-gradient(135deg, #ff9800, #ff5722);
color: white;
padding: 8px 20px;
text-align: center;
font-weight: 400;
font-size: 1.5rem;
width: 100%;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
position: relative;
z-index: 999;
animation: pulse 2s infinite;
}

.donate-message a {
color: #fff;
text-decoration: none;
font-weight: bold;
transition: all 0.3s ease;
padding: 3px 8px;
border: 2px solid white;
border-radius: 5px;
display: inline-block;
margin-left: 10px;
}

.donate-message a:hover {
background: #ff9800;
color: white;
text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
transform: scale(1.05);
}

@keyframes pulse {
0%, 100% { box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3); }
50% { box-shadow: 0 4px 15px rgba(255, 152, 0, 0.6); }
}

@media (max-width: 768px) {
.donate-message {
font-size: 1.125rem;
}
}
