/* public/assets/css/style.css - COMPLETE AND CONSOLIDATED (FIXED) */

/* Custom CSS variables for consistent theming (Light Mode) */
:root {
  --primary-bg: #f9fbfd; /* Very light background for body */
  --secondary-bg: #ffffff; /* White background for main sections (like tool wrapper, header, footer) */
  --border-color: #e6e9ed; /* Light subtle borders */
  --text-color: #3f4a56; /* Darker grey for body text */
  --heading-color: #2c343e; /* Even darker grey for headings */

  /* --- BLACK BUTTONS --- */
  --accent-color: #1a1a1a; /* Black for primary actions/highlights */
  --accent-hover: #333333; /* Darker grey for hover */
  --copy-btn-bg: #1a1a1a; /* Black for specific copy buttons */
  --copy-btn-hover: #333333; /* Darker grey for copy button hover */

  --shadow-color: rgba(0, 0, 0, 0.04); /* Very subtle shadow for cards */
  /* --- GREY CARDS / INPUTS --- */
  --input-bg: #f0f2f5; /* A very light, almost white, neutral grey for cards and inputs */
  --input-border-focus: #90caf9; /* Lighter blue for input focus (kept blue as it's a focus state, not button color) */
  --success-bg: #e8f5e9; /* Light green for success messages */
  --success-text: #2e7d32; /* Dark green for success text */
  --error-bg: #ffebee; /* Light red for error messages */
  --error-text: #c62828; /* Dark red for error text */

  /* Global Border Radius */
  --border-radius-sm: 6px;
  --border-radius-md: 10px;
  --border-radius-lg: 14px; /* Larger radius for overall sections/containers */

  /* Typography Scale (using rem for scalability) */
  --font-size-base: 1rem;     /* 16px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;   /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 2rem;      /* 32px */
  --font-size-4xl: 2.5rem;    /* 40px */
  --font-size-5xl: 3rem;      /* 48px */
}

/* Basic Resets & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--primary-bg);
  color: var(--text-color);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column; /* Allows footer to stick to bottom */
}

/* Main Container for overall content width */
.container {
  max-width: 1400px; /* Adjusted from 1000px to 1400px for more width */
  margin: 0 auto;
  padding: 20px 15px; /* Top/bottom, left/right padding */
  width: 100%; /* Ensures it takes full width on small screens */
  flex-grow: 1; /* Allows main content to take up available space */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--heading-color);
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: var(--font-size-4xl); /* 40px */
  margin-bottom: 20px;
  text-align: center;
}

h2 {
  font-size: var(--font-size-3xl); /* 32px */
  margin-bottom: 15px;
  font-weight: 600;
  display: flex; /* For optional icon alongside text */
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border-color); /* Dashed border for sub-headings */
  justify-content: center; /* Center h2 for sections like "Popular Tools" */
}

h3 {
  font-size: var(--font-size-xl); /* 20px */
  margin-bottom: 10px;
  font-weight: 600;
}

/* Sections/Cards - Applied to main content blocks like 'tool-section' or 'info-section' */
.section-card {
  background-color: var(--secondary-bg); /* These main containers remain white */
  padding: 25px;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 8px 30px var(--shadow-color);
  border: 1px solid var(--border-color);
  margin-bottom: 25px; /* Spacing between sections */
}

/* Paragraphs */
p {
  font-size: var(--font-size-base); /* 16px */
  margin-bottom: 1rem;
}

/* Lists in Info/FAQ sections */
.info-list {
  list-style-type: none; /* Remove default bullets */
  padding: 0;
  margin-left: 0;
}
.info-list li {
  margin-bottom: 10px;
  font-size: var(--font-size-base); /* 16px */
  color: var(--text-color);
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.info-list li::before { /* Custom bullet point */
  content: "\2022"; /* Unicode for bullet point */
  color: var(--accent-color);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-top: 2px;
}
.info-list li strong {
  color: var(--accent-color);
  font-weight: 600;
}


/* --- THIS IS THE PERMANENT FIX --- */
/* Input Fields (Textarea, Text, Number, Select) */
textarea, select, input[type="text"], input[type="number"] {
  width: 100%;
  padding: 12px 15px;
  /* CHANGED: Border is now darker for visibility */
  border: 1px solid #d1d5db; 
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  /* CHANGED: Background is now always white for contrast */
  background-color: var(--secondary-bg); 
  color: var(--text-color);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
}

/* Remove default arrows from number inputs for a consistent look */
input[type="number"] {
    appearance: none;
    -moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* --- END OF PERMANENT FIX --- */

textarea:focus, select:focus, input[type="text"]:focus, input[type="number"]:focus {
  outline: none;
  border-color: var(--accent-color); /* Focus color remains distinct */
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

/* General Buttons (primary buttons like "Use Tool", action buttons) */
.btn {
  background-color: var(--accent-color); /* BLACK */
  color: white; /* White text on black buttons */
  padding: 10px 18px;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base); /* 16px */
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  text-decoration: none; /* For button-like links */
}

.btn:hover {
  background-color: var(--accent-hover); /* Darker grey on hover */
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn .lucide {
  width: 1em; /* Make icon size relative to font size */
  height: 1em;
}

/* Specific Copy Button Style (for small, distinct copy actions, e.g., in a color swatch) */
.copy-btn-secondary {
  background-color: var(--copy-btn-bg); /* BLACK */
  color: white; /* White text */
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-sm); /* 14px */
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Consistent shadow */
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}
.copy-btn-secondary:hover {
  background-color: var(--copy-btn-hover); /* Darker grey on hover */
  transform: translateY(-2px);
  box-shadow: 0 44px 8px rgba(0,0,0,0.15);
}
.copy-btn-secondary:active {
  transform: translateY(0);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.copy-btn-secondary .lucide {
  width: 16px;
  height: 16px;
}
/* Smaller version for inline use (like in Tailwind Color Palette tool) */
.copy-btn-small {
  background-color: var(--copy-btn-bg); /* BLACK */
  color: white; /* White text */
  padding: 5px 8px;
  border-radius: 4px;
  font-size: var(--font-size-xs);
  margin-top: 0;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
  box-shadow: none; /* No extra shadow on small copy button */
  transform: none; /* No transform on small copy button */
}
.copy-btn-small:hover {
  background-color: var(--copy-btn-hover); /* Darker grey on hover */
  transform: none; /* Override parent hover */
  box-shadow: none; /* Override parent hover */
}
.copy-btn-small .lucide {
  width: 12px;
  height: 12px;
}


/* Message Box (for copy success/error notifications) */
.message-box {
  padding: 12px;
  border-radius: var(--border-radius-sm);
  margin-top: 15px;
  text-align: center;
  font-weight: 600;
  font-size: var(--font-size-sm);
  opacity: 0; /* Start hidden */
  transition: opacity 0.3s ease; /* Smooth fade-in/out */
}
.message-box.visible { /* Class to add when message should be shown */
  opacity: 1;
}
.message-box.bg-green-100 { background-color: var(--success-bg); color: var(--success-text); }
.message-box.bg-red-100 { background-color: var(--error-bg); color: var(--error-text); }


/* Card Grid for Homepage/Category Pages */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); /* Adjusted from 320px to 350px */
  gap: 25px;
  margin-top: 25px; /* Spacing from heading above */
}

.card {
  background-color: var(--input-bg); /* --- GREY CARD BACKGROUND --- */
  border-radius: var(--border-radius-md); /* Slightly smaller radius for individual cards */
  box-shadow: 0 4px 15px var(--shadow-color);
  border: 1px solid var(--border-color);
  padding: 25px;
  text-align: center;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes button to bottom if content varies */
  min-height: 200px; /* Consistent height for cards */
}

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

.card h3 {
  font-size: var(--font-size-xl); /* 20px */
  margin-bottom: 15px;
  color: var(--accent-color); /* --- BLACK HEADING ON CARD --- */
}

.card p {
  font-size: var(--font-size-sm); /* 14px */
  color: var(--text-color);
  margin-bottom: 20px;
  flex-grow: 1; /* Allows text to grow */
}

.card .btn {
  margin-top: auto; /* Pushes button to the bottom */
}


/* Header Styles */
.site-header {
  background-color: var(--secondary-bg); /* White background */
  padding: 15px 0;
  box-shadow: 0 2px 10px var(--shadow-color);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  flex-shrink: 0; /* Prevents header from shrinking */
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 15px; /* Consistent internal padding */
  max-width: 1200px; /* Adjusted to match .container */
  margin: 0 auto;
}

.site-logo {
  color: var(--heading-color);
  text-decoration: none;
  font-size: var(--font-size-2xl); /* 24px */
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--border-radius-sm);
  transition: background-color 0.3s ease;
}

.site-logo:hover {
  background-color: var(--input-bg); /* Light grey hover */
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
  justify-content: center;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 15px;
  border-radius: var(--border-radius-sm);
  transition: background-color 0.3s ease, color 0.3s ease;
  font-size: var(--font-size-base); /* 16px */
}

.main-nav a:hover,
.main-nav a.active {
  background-color: var(--accent-color); /* BLACK */
  color: white;
}

/* Footer Styles */
.site-footer {
  background-color: var(--secondary-bg); /* White background */
  padding: 25px 0;
  text-align: center;
  color: var(--text-color);
  font-size: var(--font-size-sm); /* 14px */
  margin-top: auto; /* Pushes footer to bottom of viewport */
  border-top: 1px solid var(--border-color);
  flex-shrink: 0; /* Prevents footer from shrinking */
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  padding: 0 15px;
  max-width: 1200px; /* Adjusted to match .container */
  margin: 0 auto;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  margin: 0 10px;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-color); /* BLACK */
}

/* Utility classes for alignment and spacing */
.text-center {
  text-align: center;
}
.margin-bottom-lg {
  margin-bottom: 30px;
}
.margin-top-lg {
  margin-top: 30px;
}
.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.button-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px; /* Spacing between buttons */
  margin-top: 15px;
}

/* --- ADVERTISING SECTION SPECIFIC STYLES --- */
.ad-section {
  background-color: #e0f7fa; /* A very light blue background to distinguish it */
  border: 1px dashed #80deea; /* Dashed border for visual interest */
  padding: 30px; /* More padding */
  text-align: center;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05); /* Subtle shadow */
  margin-top: 30px; /* Ensures space from element above */
  margin-bottom: 30px; /* Ensures space from element below */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}
.ad-section h2 {
  color: #00838f; /* Dark teal heading */
  margin-bottom: 10px;
  border-bottom: none; /* No dashed border here */
  font-weight: 700;
}
.ad-section p {
  font-size: var(--font-size-lg);
  color: #263238; /* Darker text for readability */
  max-width: 700px;
  margin-bottom: 0;
}
.ad-placeholder {
  width: 100%;
  max-width: 728px; /* Standard leaderboard ad size max-width */
  height: 90px; /* Standard leaderboard ad height */
  background-color: #d1e8ef; /* Placeholder background */
  border: 2px dashed #90a4ae;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #607d8b;
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-top: 20px;
}

/* Contact Email Section Styling */
.contact-email-container {
  max-width: 600px;
  margin: 40px auto 20px auto; /* Centered horizontally, vertical margin for spacing relative to other sections */
  padding: 50px 30px; /* INCREASED VERTICAL PADDING for more internal space */
  background-color: var(--input-bg); /* Use the light grey background for distinction */
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  
  /* --- Styles for centering content within the card --- */
  display: flex;
  flex-direction: column;
  align-items: center; /* Horizontally center items */
  justify-content: center; /* Vertically center items */
  min-height: 280px; /* SLIGHTLY INCREASED MIN-HEIGHT for more vertical room */
  /* --- END Centering Styles --- */

  gap: 15px; /* Spacing between elements inside the container */
  text-align: center; /* Ensure text alignment is centered for children like p/a */
}

.contact-email-container .contact-icon {
  width: 60px; /* Large icon size */
  height: 60px;
  color: var(--accent-color); /* Use black button color for the icon */
  margin-bottom: 10px;
}

.contact-email-container .email-text {
  font-size: var(--font-size-lg); /* Larger text for the prompt */
  color: var(--text-color);
  margin-bottom: 0; /* Override default paragraph margin */
}

.contact-email-container .contact-email-link {
  font-size: var(--font-size-2xl); /* Very large for prominence */
  font-weight: 700;
  color: var(--accent-color); /* Black color for the email link */
  text-decoration: none;
  transition: color 0.2s ease;
  word-break: break-all; /* Ensures long emails wrap */
}

.contact-email-container .contact-email-link:hover {
  color: var(--accent-hover); /* Darker black on hover */
  text-decoration: underline;
}

.contact-email-container .email-note {
  font-size: var(--font-size-sm); /* Smaller note text */
  color: var(--text-color);
  margin-top: 10px;
  margin-bottom: 0;
}


/* Header Search Container */
.header-search-container {
  display: flex;
  align-items: center;
  position: relative; /* For dropdown positioning */
  gap: 5px; /* Space between input and buttons */
  margin-left: auto; /* Push to the right on large screens */
  margin-right: 0;
  padding: 0 15px; /* Ensure padding matches header-content */
  width: 100%; /* Default to full width on smaller screens */
  max-width: 350px; /* Limit width on larger screens */
  order: 3; /* Forces it below logo and nav on smaller screens */
  flex-grow: 1;
  margin-top: 15px; /* Space below nav on smaller screens */
}

.header-search-container input {
  flex-grow: 1;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--input-bg);
  color: var(--text-color);
  font-size: var(--font-size-sm);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.header-search-container input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.2), inset 0 1px 3px rgba(0,0,0,0.05);
}

.header-search-container button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: var(--font-size-sm);
  flex-shrink: 0; /* Prevent buttons from shrinking */
  box-shadow: none; /* Override default btn shadow for small header buttons */
  transform: none; /* Override default btn transform */
}
.header-search-container button:hover {
  background-color: var(--accent-hover);
  box-shadow: none;
  transform: none;
}
.header-search-container button .lucide {
  width: 16px;
  height: 16px;
}

#global-search-clear-btn.hidden {
  display: none;
}

/* Global Search Results Dropdown */
.global-search-results-dropdown {
  position: absolute;
  top: 100%; /* Position below the header */
  left: 0;
  right: 0;
  max-height: 300px; /* Limit height for scrollability */
  overflow-y: auto;
  background-color: var(--secondary-bg); /* White background */
  border: 1px solid var(--border-color);
  border-top: none; /* Blend with header */
  border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  z-index: 999; /* Above other content */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  transform: translateY(-5px); /* Start slightly up for smooth dropdown effect */
}

.global-search-results-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.global-search-results-dropdown ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.global-search-results-dropdown li {
  padding: 12px 20px;
  border-bottom: 1px solid var(--input-bg); /* Subtle separator */
}
.global-search-results-dropdown li:last-child {
  border-bottom: none;
}

.global-search-results-dropdown li a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 500;
}
.global-search-results-dropdown li a strong {
  color: var(--heading-color);
  font-weight: 600;
}

.global-search-results-dropdown li a span.category {
  font-size: var(--font-size-xs);
  color: #888;
  display: block;
  margin-top: 2px;
}

.global-search-results-dropdown li:hover {
  background-color: var(--input-bg); /* Light grey hover */
}

.global-search-results-dropdown .no-results {
  padding: 15px;
  text-align: center;
  color: var(--text-color);
  font-size: var(--font-size-sm);
}

/* === NEW BREADCRUMB STYLES FOR HEADER === */
.header-breadcrumb {
  max-width: 1200px; /* Adjusted to match .container */
  margin: 0 auto;
  padding: 10px 15px 15px 15px; /* Top, Right, Bottom, Left */
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--font-size-sm);
  list-style: none; /* Remove default list bullets */
}

.breadcrumb-item a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.breadcrumb-item .separator {
  color: #b0b0b0; /* Lighter separator color */
  margin: 0 4px;
  user-select: none;
}

.breadcrumb-item.current {
  color: var(--heading-color);
  font-weight: 600; /* Make the current page bold */
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Darker overlay */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000; /* Ensure it's above everything */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--secondary-bg); /* White background */
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  max-width: 800px; /* Wider modal */
  width: 90%;
  max-height: 90vh; /* Max height for scrollable content */
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Important for scrollable body */
  transform: translateY(-20px); /* Initial position for animation */
  transition: transform 0.3s ease-out;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
  font-size: var(--font-size-xl); /* Larger title */
  margin-bottom: 0; /* Override default heading margin */
  color: var(--heading-color);
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: var(--font-size-2xl); /* Larger close icon */
  color: var(--text-color);
  cursor: pointer;
  padding: 5px;
  line-height: 1;
  transition: color 0.2s ease, transform 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

.modal-close-btn .lucide {
    width: 24px;
    height: 24px;
}

.modal-body {
  padding: 20px 25px;
  overflow-y: auto; /* Make body scrollable */
  flex-grow: 1; /* Allow body to take available height */
  font-size: var(--font-size-base);
  color: var(--text-color);
  line-height: 1.6;
}

.modal-body h3 {
    font-size: var(--font-size-lg);
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--heading-color);
    font-weight: 700;
}

.modal-body h4 {
    font-size: var(--font-size-base);
    margin-top: 15px;
    margin-bottom: 8px;
    color: var(--heading-color);
    font-weight: 600;
}

.modal-body p {
    margin-bottom: 1em;
}

.modal-body ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 1em;
}

.modal-body ul li {
    margin-bottom: 0.5em;
}

.modal-body a {
    color: var(--accent-color);
    text-decoration: underline;
}

.modal-body a:hover {
    color: var(--accent-hover);
}


/* Responsive Adjustments */
@media (min-width: 769px) { /* On larger screens, position search in header row */
  .header-content {
      flex-wrap: nowrap; /* Prevent wrapping in header on large screens */
      justify-content: space-between;
      gap: 20px; /* Space between nav and search */
  }
  .main-nav {
      flex-grow: 1; /* Allow navigation to take space */
      justify-content: flex-start; /* Align nav to left */
      order: 2; /* Put nav after logo */
  }
  .header-search-container {
      order: 4; /* Put search after nav */
      margin-top: 0; /* Remove top margin */
      max-width: 250px; /* Adjust max width for desktop */
      padding: 0;
  }
  .site-logo {
      order: 1;
  }
}

@media (max-width: 768px) {
  .container {
      padding: 15px 10px;
  }

  h1 {
      font-size: var(--font-size-3xl); /* 32px */
  }
  h2 {
      font-size: var(--font-size-2xl); /* 24px */
      margin-bottom: 10px;
      flex-direction: column; /* Stack icon and text on small screens */
  }
  h3 {
      font-size: var(--font-size-lg); /* 18px */
  }
  p, .info-list li {
      font-size: var(--font-size-sm); /* 14px */
  }

  .section-card {
      padding: 20px;
      margin-bottom: 20px;
  }

  .header-content {
      flex-direction: column;
      gap: 15px;
  }

  .main-nav ul {
      flex-direction: column;
      gap: 10px;
  }

  .site-logo {
      font-size: var(--font-size-xl); /* 20px */
  }

  .card-grid {
      grid-template-columns: 1fr; /* Stack cards on small screens */
      gap: 20px;
  }

  .card {
      padding: 20px;
      min-height: auto; /* Remove fixed height for stacked cards */
  }
  .card h3 {
      font-size: var(--font-size-lg); /* 18px */
  }
  .card p {
      font-size: var(--font-size-sm); /* 14px */
  }
  .btn, .copy-btn-secondary {
      font-size: var(--font-size-sm); /* 14px */
      padding: 9px 15px;
  }
  .copy-btn-secondary .lucide {
      width: 14px;
      height: 14px;
  }
  .copy-btn-small {
      font-size: var(--font-size-xs); /* 12px */
      padding: 6px 10px;
  }
  .ad-section {
      padding: 20px;
      margin-top: 20px;
      margin-bottom: 20px;
  }
  .ad-section h2 {
      font-size: var(--font-size-xl);
  }
  .ad-section p {
      font-size: var(--font-size-sm);
  }
  .ad-placeholder {
      height: 60px; /* Adjust height for mobile banners */
      font-size: var(--font-size-lg);
  }
  /* Contact Email Section Responsive */
  .contact-email-container {
      padding: 40px 25px; /* Adjust padding for smaller screens */
      margin-top: 30px;
      margin-bottom: 15px;
      gap: 10px;
      min-height: 220px; /* Adjusted min-height for responsiveness */
  }
  .contact-email-container .contact-icon {
      width: 48px;
      height: 48px;
  }
  .contact-email-container .email-text {
      font-size: var(--font-size-base);
  }
  .contact-email-container .contact-email-link {
      font-size: var(--font-size-xl);
  }
  .contact-email-container .email-note {
      font-size: var(--font-size-xs);
  }
  /* Header Search Responsive */
  .header-search-container {
      width: calc(100% - 30px); /* Fill available width with padding */
      margin-left: 15px;
      margin-right: 15px;
  }
  .global-search-results-dropdown {
      width: 100%;
      left: 0;
      right: 0;
      border-radius: 0; /* No rounding */
  }
    /* Responsive adjustments for modal */
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    .modal-header {
        padding: 15px 20px;
    }
    .modal-header h3 {
        font-size: var(--font-size-xl);
    }
    .modal-body {
        padding: 15px 20px;
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 480px) {
  .container {
      padding: 10px;
  }
  h1 {
      font-size: var(--font-size-2xl); /* 24px */
      margin-bottom: 15px;
  }
  h2 {
      font-size: var(--font-size-xl); /* 20px */
  }
  .section-card {
      padding: 15px;
  }
  .main-nav a {
      font-size: var(--font-size-sm); /* 14px */
  }
  .site-footer {
      padding: 20px 0;
  }
  .ad-placeholder {
      height: 50px; /* Smaller height for very small screens */
      font-size: var(--font-size-base);
  }
  /* Contact Email Section Responsive */
  .contact-email-container {
      padding: 30px 15px; /* Adjust padding for very small screens */
      margin-top: 20px;
      margin-bottom: 10px;
      min-height: 180px; /* Adjusted min-height for responsiveness */
  }
  .contact-email-container .contact-icon {
      width: 40px;
      height: 40px;
  }
  .contact-email-container .contact-email-link {
      font-size: var(--font-size-lg);
  }
  /* Header Search Responsive */
  .header-search-container {
      margin-top: 10px;
  }
    .modal-header h3 {
        font-size: var(--font-size-lg);
    }
    .modal-close-btn .lucide {
        width: 20px;
        height: 20px;
    }
    .modal-body h3 {
        font-size: var(--font-size-base);
    }
    .modal-body h4 {
        font-size: var(--font-size-sm);
    }
}
/* === NEW DEFINITION LIST STYLES (STACKED LAYOUT) === */
.definition-list {
  margin-top: 25px;
  display: flex; /* Use flexbox for simple stacking */
  flex-direction: column; /* Stack items vertically */
  gap: 20px; /* Space between each item (dt+dd pair) */
}

.definition-list dt { /* This is for the term/heading */
  font-weight: 700;
  color: var(--heading-color);
  font-size: var(--font-size-lg); /* Make the heading a bit larger */
}

.definition-list dd { /* This is for the description */
  margin: 0 0 0 5px; /* Remove default margins and add a small left indent */
  padding-left: 15px; /* Add padding for the border */
  border-left: 3px solid var(--border-color); /* Add a subtle vertical line */
  line-height: 1.7;
}

/* We remove the old responsive code as the new layout works on all screen sizes */

/* Responsive adjustments for smaller screens */
@media (max-width: 576px) {
  .definition-list {
    grid-template-columns: 1fr; /* Stack them on top of each other */
    gap: 8px 0;
  }
  .definition-list dt {
    text-align: left;
    margin-bottom: 5px; /* Add a little space below the term */
  }
  .definition-list dd {
    grid-column: 1; /* Ensure it's in the single column */
    padding-left: 10px; /* Indent the description slightly */
    border-left: 3px solid var(--border-color);
  }
}

/* === NEW ACCORDION STYLES (FOR FAQs) === */
.accordion-container {
    margin-top: 25px;
}
.accordion-item {
  border-bottom: 1px solid var(--border-color);
}
.accordion-item:first-child {
    border-top: 1px solid var(--border-color);
}
.accordion-header {
  background-color: transparent;
  border: none;
  color: var(--heading-color);
  cursor: pointer;
  padding: 18px 5px;
  width: 100%;
  text-align: left;
  font-size: var(--font-size-lg);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}
.accordion-header:hover {
  background-color: var(--input-bg);
}
.accordion-header .lucide {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 15px;
}
.accordion-header.active .lucide {
  transform: rotate(180deg);
}
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  background-color: transparent;
}
.accordion-content p, .accordion-content .definition-list, .accordion-content .info-list {
  padding: 0px 10px 18px 10px;
  margin-bottom: 0;
  font-size: var(--font-size-base);
  line-height: 1.7;
}