/* src/input.css */

*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/* ! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com */

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

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

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

.container {
  width: 100%;
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }
}

.block {
  display: block;
}

.flex {
  display: flex;
}

/* ============================
   Google Font Imports (Ensured by HTML, but good practice to note)
   ============================ */

/* @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Cairo:wght@400;500;600;700&display=swap'); */

/* ============================
   1. General Variables & Global Settings
   ============================ */

:root {
  /* Color Palette - Light Mode */
  --color-background: #F9FAFB;
  /* soft light-gray */
  --color-text-primary: #111827;
  /* dark navy */
  --color-text-secondary: #374151;
  /* medium gray for less emphasis text */
  --color-accent: #2563EB;
  /* elegant blue for interactive elements */
  --color-accent-hover: #1D4ED8;
  /* darker blue for hover */
  --color-secondary-accent: #10B981;
  /* mint green for highlights/confirmations */
  --color-secondary-accent-hover: #059669;
  /* darker mint green for hover */
  --color-card-background: #FFFFFF;
  --color-border: #E5E7EB;
  /* light gray for borders */
  --color-icon-background: rgba(37, 99, 235, 0.1);
  /* Light blue for icon backgrounds */
  --color-danger: #EF4444;
  /* Red for errors or destructive actions */
  /* Footer Colors */
  --color-footer-background: #1F2937;
  --color-footer-text: #D1D5DB;
  --color-footer-link-hover: #FFFFFF;
  /* Typography */
  --font-family-ar: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  --font-family-en: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* Border Radius */
  --border-radius-sm: 0.25rem;
  /* 4px */
  --border-radius-md: 0.375rem;
  /* 6px */
  --border-radius-lg: 0.5rem;
  /* 8px */
  --border-radius-xl: 0.75rem;
  /* 12px */
  --border-radius-2xl: 1rem;
  /* 16px (for cards) */
  --border-radius-button: var(--border-radius-md);
  /* Box Shadows */
  --box-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --box-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  /* Transitions */
  --transition-duration: 0.2s;
  --transition-timing-function: ease-in-out;
}

/* ============================
   1.1. Dark Mode Variables
   ============================ */

html[data-theme="dark"] {
  --color-background: #111827;
  --color-text-primary: #F9FAFB;
  --color-text-secondary: #9CA3AF;
  --color-accent: #3B82F6;
  /* Lighter blue for dark mode */
  --color-accent-hover: #2563EB;
  --color-card-background: #1F2937;
  --color-border: #374151;
  --color-icon-background: rgba(59, 130, 246, 0.15);
  /* Adjusted for dark mode */
  /* Footer is already dark, might need slight adjustments if body becomes darker */
  --color-footer-background: #0F172A;
  /* Even darker for contrast if needed */
  --color-footer-text: #9CA3AF;
  --color-footer-link-hover: #E5E7EB;
  --box-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
  --box-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.15);
  --box-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.15);
}

/* ============================
   2. Base Styles
   ============================ */

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family-ar);
  /* Default to Arabic font */
  color: var(--color-text-primary);
  background-color: var(--color-background);
  line-height: 1.7;
  direction: rtl;
  /* Default to RTL */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-duration) var(--transition-timing-function), color var(--transition-duration) var(--transition-timing-function);
}

html[dir="ltr"] body {
  font-family: var(--font-family-en);
  direction: ltr;
}

/* Headings */

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text-primary);
  font-weight: 700;
  margin-bottom: 0.75em;
  line-height: 1.3;
}

/* Links */

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-duration) var(--transition-timing-function);
}

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

/* Basic container (Tailwind's container is often preferred) */

.container {
  width: 90%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Accessibility: Focus visible */

*:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 20%, transparent);
}

html[data-theme="dark"] *:focus-visible {
  outline-color: var(--color-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 30%, transparent);
}

/* ============================
   3. Header Styles
   ============================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 0.75rem 0;
  /* Reduced padding slightly */
  /* Glassmorphism Effect */
  background-color: rgba(255, 255, 255, 0.7);
  /* Light mode semi-transparent white */
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  box-shadow: var(--box-shadow-sm);
  transition: background-color var(--transition-duration) var(--transition-timing-function),
                box-shadow var(--transition-duration) var(--transition-timing-function);
}

html[data-theme="dark"] .site-header {
  background-color: rgba(31, 41, 55, 0.75);
  /* Dark mode semi-transparent */
  border-bottom: 1px solid var(--color-border);
  /* Add a subtle border in dark mode for better separation */
}

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

.site-header .logo {
  font-size: 1.75rem;
  /* Tailwind text-2xl */
  font-weight: 700;
  color: var(--color-accent);
}

/* Navigation centered (if structure allows, otherwise adjust flex properties) */

.main-nav {
  flex-grow: 1;
  /* Allow nav to take space if search is also in header */
}

.main-nav ul {
  display: flex;
  justify-content: center;
  /* Center navigation links */
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0.5rem;
  /* Space between nav items */
}

.main-nav ul li a {
  color: var(--color-text-secondary);
  font-weight: 600;
  /* Slightly bolder */
  padding: 0.6rem 1rem;
  /* Balanced padding */
  border-radius: var(--border-radius-md);
  transition: color var(--transition-duration) var(--transition-timing-function), background-color var(--transition-duration) var(--transition-timing-function);
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
  color: var(--color-accent);
  background-color: color-mix(in srgb, var(--color-accent) 10%, transparent);
}

html[data-theme="dark"] .main-nav ul li a {
  color: var(--color-text-secondary);
}

html[data-theme="dark"] .main-nav ul li a:hover,
html[data-theme="dark"] .main-nav ul li a.active {
  color: var(--color-accent);
  background-color: color-mix(in srgb, var(--color-accent) 20%, transparent);
}

/* Header Search Bar (if part of .site-header) */

.header-search-bar {
  /* Styles for search bar within the header */
  /* Example: */
  /* max-width: 300px; */
  /* margin-left: auto; /* Pushes to the right in LTR, to the left in RTL if it's the last item */
}

/* Language Toggle Placeholder */

.language-toggle button {
  background-color: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition-duration) ease;
}

.language-toggle button:hover {
  background-color: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

html[data-theme="dark"] .language-toggle button {
  color: var(--color-text-secondary);
  border-color: var(--color-border);
}

html[data-theme="dark"] .language-toggle button:hover {
  background-color: color-mix(in srgb, var(--color-accent) 20%, transparent);
  color: var(--color-accent);
  border-color: var(--color-accent);
}

/* ============================
   4. Hero Section & Main Search Bar
   ============================ */

.hero-section {
  padding: 3rem 0;
  /* Adjusted padding */
  text-align: center;
}

.hero-section h2 {
  font-size: 2.25rem;
  /* Tailwind text-4xl */
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.hero-section p {
  font-size: 1.125rem;
  /* Tailwind text-lg */
  color: var(--color-text-secondary);
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}

/* Smart Search Bar (used in Hero or prominently) */

.search-bar {
  display: flex;
  position: relative;
  /* For dropdown */
  max-width: 450px;
  /* Compact width */
  margin: 0 auto;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-md);
  border: 1px solid var(--color-border);
  overflow: visible;
  /* Allow dropdown to overflow */
}

html[data-theme="dark"] .search-bar {
  border-color: var(--color-border);
}

.search-bar input[type="search"] {
  width: 100%;
  padding: 0.9rem 1.25rem;
  font-size: 1rem;
  border: none;
  outline: none;
  font-family: inherit;
  background-color: var(--color-card-background);
  color: var(--color-text-primary);
  border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
  /* RTL: 0 var(--border-radius-lg) var(--border-radius-lg) 0 */
}

html[dir="rtl"] .search-bar input[type="search"] {
  border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
}

html[dir="ltr"] .search-bar input[type="search"] {
  /* Ensure LTR is correct */
  border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

.search-bar button {
  padding: 0 1.25rem;
  /* Tailwind px-5 */
  font-size: 1.1rem;
  border: none;
  background-color: var(--color-accent);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color var(--transition-duration) var(--transition-timing-function);
  border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
  /* RTL: var(--border-radius-lg) 0 0 var(--border-radius-lg) */
}

html[dir="rtl"] .search-bar button {
  border-radius: var(--border-radius-lg) 0 0 var(--border-radius-lg);
}

html[dir="ltr"] .search-bar button {
  /* Ensure LTR is correct */
  border-radius: 0 var(--border-radius-lg) var(--border-radius-lg) 0;
}

.search-bar button:hover {
  background-color: var(--color-accent-hover);
}

/* Search Results Dropdown (Placeholder Style) */

.search-results-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-card-background);
  border: 1px solid var(--color-border);
  border-top: none;
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg);
  z-index: 999;
  margin-top: 0.25rem;
  max-height: 300px;
  overflow-y: auto;
  display: none;
  /* Shown by JS */
}

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

.search-results-dropdown li a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--color-text-primary);
  text-decoration: none;
}

.search-results-dropdown li a:hover,
.search-results-dropdown li a:focus {
  background-color: color-mix(in srgb, var(--color-accent) 10%, transparent);
  color: var(--color-accent);
}

.search-results-dropdown .no-results {
  padding: 1rem 1.25rem;
  color: var(--color-text-secondary);
  text-align: center;
  font-style: italic;
}

html[data-theme="dark"] .search-results-dropdown {
  background-color: var(--color-card-background);
  border-color: var(--color-border);
}

html[data-theme="dark"] .search-results-dropdown li a {
  color: var(--color-text-primary);
}

html[data-theme="dark"] .search-results-dropdown li a:hover,
html[data-theme="dark"] .search-results-dropdown li a:focus {
  background-color: color-mix(in srgb, var(--color-accent) 20%, transparent);
  color: var(--color-accent);
}

/* ============================
   5. Tools Category & Grid
   ============================ */

.tools-category {
  padding: 2.5rem 0;
}

.category-title {
  font-size: 1.875rem;
  /* Tailwind text-3xl */
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

.category-title i {
  margin-left: 0.7rem;
  /* For RTL */
  color: var(--color-accent);
}

html[dir="ltr"] .category-title i {
  margin-right: 0.7rem;
  margin-left: 0;
}

.category-title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

.tools-grid {
  display: grid;
  gap: 1.5rem;
  /* Tailwind gap-6 */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  /* Responsive grid */
}

/* ============================
   6. Tool Card Styles
   ============================ */

.tool-card {
  background-color: var(--color-card-background);
  border-radius: var(--border-radius-2xl);
  /* 1rem */
  box-shadow: var(--box-shadow-md);
  padding: 1.5rem;
  /* Tailwind p-6 */
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: transform var(--transition-duration) var(--transition-timing-function), 
                box-shadow var(--transition-duration) var(--transition-timing-function);
  border: 1px solid var(--color-border);
}

html[data-theme="dark"] .tool-card {
  border-color: var(--color-border);
}

.tool-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--box-shadow-lg);
}

.tool-card-icon {
  font-size: 2.25rem;
  /* Tailwind text-4xl */
  color: var(--color-accent);
  margin-bottom: 1rem;
  line-height: 1;
  width: 60px;
  /* Tailwind w-15 (approx) */
  height: 60px;
  /* Tailwind h-15 (approx) */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--color-icon-background);
  border-radius: 50%;
  margin-left: auto;
  margin-right: auto;
}

.tool-card-title {
  font-size: 1.125rem;
  /* Tailwind text-lg */
  font-weight: 600;
  color: var(--color-text-primary);
  margin-bottom: 0.5rem;
}

.tool-card-description {
  font-size: 0.875rem;
  /* Tailwind text-sm */
  color: var(--color-text-secondary);
  margin-bottom: 1rem;
  flex-grow: 1;
  line-height: 1.6;
}

.tool-card-link {
  /* "Launch" or "Try Now" button */
  display: inline-block;
  background-color: var(--color-accent);
  color: #FFFFFF;
  padding: 0.6rem 1.25rem;
  border-radius: var(--border-radius-button);
  font-weight: 500;
  transition: background-color var(--transition-duration) var(--transition-timing-function);
  margin-top: auto;
  text-decoration: none;
}

.tool-card-link:hover {
  background-color: var(--color-accent-hover);
  color: #FFFFFF;
  text-decoration: none;
}

/* Highlight button style */

.tool-card-link.highlight {
  background-color: var(--color-secondary-accent);
}

.tool-card-link.highlight:hover {
  background-color: var(--color-secondary-accent-hover);
}

/* AOS Animation Support (ensure elements are visible for AOS to trigger) */

[data-aos] {
  opacity: 0;
  /* Start transparent for AOS fade animations */
  transition-property: opacity, transform;
  /* Ensure smooth transitions */
}

[data-aos].aos-animate {
  opacity: 1;
}

/* ============================
   7. Individual Tool Page Layout
   ============================ */

.tool-page-header {
  /* For the title/description of a specific tool */
  text-align: center;
  padding: 2rem 0;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 2rem;
}

.tool-page-header h1 {
  /* Tool Title */
  font-size: 2rem;
  color: var(--color-text-primary);
}

.tool-page-header p {
  /* Tool short instruction */
  font-size: 1rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0.5rem auto 0;
}

.tool-input-area, .tool-output-area {
  background-color: var(--color-card-background);
  padding: 1.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-sm);
  margin-bottom: 1.5rem;
  border: 1px solid var(--color-border);
}

html[data-theme="dark"] .tool-input-area, 
html[data-theme="dark"] .tool-output-area {
  background-color: var(--color-card-background);
  /* Already dark */
  border-color: var(--color-border);
}

.tool-input-area label, .tool-output-area label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text-primary);
}

/* Input fields, textareas, selects (general styling) */

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="url"],
input[type="tel"],
textarea,
select {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text-primary);
  background-color: var(--color-background);
  /* Slightly different from card for depth */
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-md);
  transition: border-color var(--transition-duration) var(--transition-timing-function),
                box-shadow var(--transition-duration) var(--transition-timing-function);
}

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

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  border-color: var(--color-accent);
  /* Focus visible handles outline */
}

html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] input[type="url"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
  background-color: var(--color-footer-background);
  /* Darker input fields */
  border-color: var(--color-border);
  color: var(--color-text-primary);
}

/* Copy Button (example for RTL positioning) */

.copy-button {
  background-color: var(--color-secondary-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-button);
  cursor: pointer;
  font-weight: 500;
  transition: background-color var(--transition-duration);
  display: inline-flex;
  /* For icon alignment */
  align-items: center;
  gap: 0.5rem;
}

.copy-button:hover {
  background-color: var(--color-secondary-accent-hover);
}

.copy-button i {
  /* Assuming Font Awesome or similar */
  font-size: 0.9em;
}

/* Position copy button within an output area (example) */

.output-with-copy {
  position: relative;
}

.output-with-copy .copy-button {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  /* RTL: left */
}

html[dir="ltr"] .output-with-copy .copy-button {
  right: 0.75rem;
  left: auto;
}

/* Advanced Settings Dropdown (Placeholder) */

.advanced-settings-toggle {
  color: var(--color-accent);
  cursor: pointer;
  font-weight: 500;
  margin-top: 1rem;
  display: inline-block;
}

.advanced-settings-content {
  /* Styles for the dropdown content area */
  background-color: color-mix(in srgb, var(--color-background) 95%, black);
  /* Slightly off background */
  padding: 1rem;
  border-radius: var(--border-radius-md);
  margin-top: 0.5rem;
  border: 1px solid var(--color-border);
  display: none;
  /* Shown by JS */
}

html[data-theme="dark"] .advanced-settings-content {
  background-color: color-mix(in srgb, var(--color-background) 95%, white);
  border-color: var(--color-border);
}

/* "You may also like" & Social Sharing (Placeholder Styles) */

.related-tools-section, .social-sharing-section {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.related-tools-section h3, .social-sharing-section h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  text-align: center;
}

.social-sharing-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
}

.social-sharing-buttons a {
  font-size: 1.5rem;
  /* Icon size */
  color: var(--color-text-secondary);
  transition: color var(--transition-duration);
}

.social-sharing-buttons a:hover {
  color: var(--color-accent);
}

/* ============================
   8. Footer
   ============================ */

.site-footer {
  background-color: var(--color-footer-background);
  color: var(--color-footer-text);
  padding: 2.5rem 0;
  text-align: center;
  margin-top: 3rem;
}

.site-footer .footer-links {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  /* Row and column gap */
}

.site-footer .footer-links a {
  color: var(--color-footer-text);
  font-size: 0.9rem;
  opacity: 0.8;
}

.site-footer .footer-links a:hover {
  opacity: 1;
  color: var(--color-footer-link-hover);
  text-decoration: underline;
}

.site-footer .social-icons {
  margin-bottom: 1.25rem;
}

.site-footer .social-icons a {
  color: var(--color-footer-text);
  font-size: 1.5rem;
  /* Icon size */
  margin: 0 0.75rem;
  opacity: 0.8;
  transition: opacity var(--transition-duration), color var(--transition-duration);
}

.site-footer .social-icons a:hover {
  opacity: 1;
  color: var(--color-footer-link-hover);
}

.newsletter-form {
  max-width: 400px;
  margin: 0 auto 1.5rem;
  display: flex;
}

.newsletter-form input[type="email"] {
  flex-grow: 1;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  /* Use a footer-specific border if needed */
  background-color: #2d3748;
  /* Darker input for footer */
  color: var(--color-footer-text);
  border-radius: var(--border-radius-button) 0 0 var(--border-radius-button);
  /* RTL: 0 var(--border-radius-button) var(--border-radius-button) 0 */
}

html[dir="rtl"] .newsletter-form input[type="email"] {
  border-radius: 0 var(--border-radius-button) var(--border-radius-button) 0;
}

html[dir="ltr"] .newsletter-form input[type="email"] {
  border-radius: var(--border-radius-button) 0 0 var(--border-radius-button);
}

.newsletter-form button {
  padding: 0.75rem 1.25rem;
  background-color: var(--color-accent);
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 0 var(--border-radius-button) var(--border-radius-button) 0;
  /* RTL: var(--border-radius-button) 0 0 var(--border-radius-button) */
}

html[dir="rtl"] .newsletter-form button {
  border-radius: var(--border-radius-button) 0 0 var(--border-radius-button);
}

html[dir="ltr"] .newsletter-form button {
  border-radius: 0 var(--border-radius-button) var(--border-radius-button) 0;
}

.newsletter-form button:hover {
  background-color: var(--color-accent-hover);
}

.site-footer .copyright {
  font-size: 0.875rem;
  opacity: 0.7;
  margin-bottom: 1rem;
}

.back-to-top-button {
  display: inline-block;
  background-color: var(--color-accent);
  color: #FFFFFF;
  padding: 0.6rem 1rem;
  border-radius: var(--border-radius-button);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color var(--transition-duration);
}

.back-to-top-button:hover {
  background-color: var(--color-accent-hover);
  text-decoration: none;
}

/* ============================
   9. Utility & Miscellaneous
   ============================ */

/* Cookie Consent Banner (Placeholder) */

.cookie-consent-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  /* RTL: left */
  background-color: var(--color-footer-background);
  /* Use footer colors for consistency */
  color: var(--color-footer-text);
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-xl);
  z-index: 2000;
  max-width: calc(100% - 2rem);
  /* Ensure it doesn't overflow on small screens */
  display: flex;
  /* For layout of text and button */
  align-items: center;
  gap: 1rem;
}

html[dir="ltr"] .cookie-consent-banner {
  right: 1rem;
  left: auto;
}

.cookie-consent-banner p {
  margin: 0;
  flex-grow: 1;
  font-size: 0.9rem;
}

.cookie-consent-banner button {
  background-color: var(--color-accent);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius-button);
  cursor: pointer;
  font-weight: 500;
}

.cookie-consent-banner button:hover {
  background-color: var(--color-accent-hover);
}

/* Dark/Light Mode Switcher (Placeholder) */

.theme-switcher button {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  padding: 0.5rem;
  border-radius: 50%;
  /* Circular button */
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.theme-switcher button i {
  /* Icon inside */
  font-size: 1.25rem;
}

.theme-switcher button:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ============================
   10. Responsive Design
   ============================ */

@media (max-width: 768px) {
  html {
    font-size: 15px;
  }

  .site-header .container {
    flex-direction: column;
    gap: 0.75rem;
  }

  .main-nav ul {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
  }

  .hero-section h2 {
    font-size: 1.875rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .category-title {
    font-size: 1.5rem;
  }

  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .cookie-consent-banner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  .search-bar {
    /* Stack search input and button */
    flex-direction: column;
    max-width: 100%;
    /* Full width on small screens */
  }

  .search-bar input[type="search"],
    .search-bar button {
    border-radius: var(--border-radius-lg);
    /* Full radius when stacked */
  }

  .search-bar input[type="search"] {
    margin-bottom: 0.5rem;
    /* Space when stacked */
  }

  html[dir="rtl"] .search-bar input[type="search"],
    html[dir="ltr"] .search-bar input[type="search"],
    html[dir="rtl"] .search-bar button,
    html[dir="ltr"] .search-bar button {
    border-radius: var(--border-radius-lg);
    /* Reset specific corner radii */
  }

  .hero-section h2 {
    font-size: 1.6rem;
  }

  .tool-card {
    padding: 1.25rem;
  }

  .tool-card-icon {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }

  .tool-card-title {
    font-size: 1rem;
  }

  .footer-links {
    flex-direction: column;
    gap: 0.75rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input[type="email"], .newsletter-form button {
    border-radius: var(--border-radius-button);
  }

  .newsletter-form input[type="email"] {
    margin-bottom: 0.5rem;
  }
}

.logo{
  font-size: 2.9rem;
  /* Tailwind text-2xl */
  font-weight: 700;
  color: var(--color-accent);
  transition: 0.4s;
}

.logo:hover{
  font-size: 3.5rem;
  /* Tailwind text-2xl */
  font-weight: 700;
  color: var(--color-accent);
  transition: 0.4s;
}
.logo-text{
  font-size: 3.5rem;
  /* Tailwind text-2xl */
  font-weight: 700;
  color: var(--color-accent);
  transition: 0.4s;
  text-decoration: none;
}