/* Custom Styles */
:root {
    --primary-blue: #1C9FFC;
    --primary-blue-darker: #1A8DE4; /* Slightly darker for hover */
    --accent-green: #16A34A; /* Tailwind green-700 */
    --accent-green-darker: #14853C; /* Tailwind green-800 */
    --light-gray-bg: #F4F7F8;
    --light-blue-bg: #CCEEFF;
    --light-blue-text: #109DFF;
    --primary-shadow-color: rgba(25, 172, 255, 0.55);
    --accent-green-shadow-color: rgba(22, 163, 74, 0.55); /* Green shadow tint */
    --text-gray-800: #1f2937; /* Tailwind gray-800 */
    --text-gray-600: #4b5563; /* Tailwind gray-600 */
    --text-gray-700: #374151; /* Tailwind gray-700 */
    --text-gray-900: #111827; /* Tailwind gray-900 */
    --text-gray-500: #6b7280; /* Tailwind gray-500 */
    --white: #ffffff;
    --blue-100: #DBEAFE;
    --blue-200: #BFDBFE;
    --blue-500: #3b82f6;
    --orange-500: #f97316;
    --purple-600: #9333ea;
    --red-500: #ef4444;
    --sky-100: #e0f2fe; /* For Footer */
    --sky-200: #bae6fd; /* For Footer */
    --gray-200: #e5e7eb; /* For borders */
    --gray-300: #d1d5db; /* For borders */
    --gray-400: #9ca3af; /* For dots */
}

/* --- Base Styles & Utilities --- */
body {
    background-color: var(--white);
    color: var(--text-gray-800);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; /* Better default font stack */
    margin: 0; /* Ensure no default body margin */
    line-height: 1.6;
}

.container {
    max-width: 1280px; /* Example max-width, adjust as needed */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem; /* px-6 */
    padding-right: 1.5rem; /* px-6 */
}

/* Basic Grid & Flex fallbacks if needed */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-3 { gap: 0.75rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }

/* Responsive utilities */
@media (min-width: 640px) { /* sm */
    .sm\:flex-row { flex-direction: row; }
    .sm\:left-2 { left: 0.5rem; }
    .sm\:right-2 { right: 0.5rem; }
    .sm\:-translate-x-0 { transform: translateX(0) translateY(-50%) !important; } /* Reset RTL/LTR overrides below */
    html[dir="rtl"] .sm\:-translate-x-0 { transform: translateX(0) translateY(-50%) scaleX(-1) !important; }
}
@media (min-width: 768px) { /* md */
    .md\:flex-row { flex-direction: row; }
    .md\:w-1\/2 { width: 50%; }
    .md\:pr-10 { padding-right: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:col-span-1 { grid-column: span 1 / span 1; }
    .md\:mb-0 { margin-bottom: 0; }
}
@media (min-width: 1024px) { /* lg */
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}


/* Basic Typography & Spacing */
h1 { font-size: 2.25rem; line-height: 2.5rem; } /* text-4xl */
h2 { font-size: 1.875rem; line-height: 2.25rem; } /* text-3xl */
h3 { font-size: 1.25rem; line-height: 1.75rem; } /* text-xl */
h4 { font-size: 1rem; line-height: 1.5rem; } /* text-base */
p { margin-bottom: 1rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.italic { font-style: italic; }
.leading-tight { line-height: 1.25; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-8 { margin-top: 2rem; }
.mr-1 { margin-right: 0.25rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.pt-10 { padding-top: 2.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; } /* Adjusted from py-12 */
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-md { max-width: 28rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.w-full { width: 100%; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.w-40 { width: 10rem; }
.h-auto { height: auto; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-full { border-radius: 9999px; }
.border { border-width: 1px; border-style: solid; }
.border-4 { border-width: 4px; }
.border-gray-200 { border-color: var(--gray-200); }
.border-gray-300 { border-color: var(--gray-300); }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06); }
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.transition { transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-1\/2 { top: 50%; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.-translate-y-1\/2 { transform: translateY(-50%); }
.-translate-x-full { transform: translateX(-100%); }
.translate-x-full { transform: translateX(100%); }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }
.list-none { list-style: none; }
.p-0 { padding: 0; }
.m-0 { margin: 0; }
.space-y-2 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.5rem; }
.inline-block { display: inline-block; }
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.no-underline { text-decoration: none; }

/* Focus Styles */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color); --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color); box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000); }
.focus\:ring-\[color\:var\(--primary-blue\)\]:focus { --tw-ring-color: var(--primary-blue); }


/* Specific Element Styling */
header { background-color: var(--white); }
input[type="email"] { padding: 0.75rem; border-radius: 0.5rem; border: 1px solid var(--gray-300); }
input[type="email"]:focus { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 2px var(--primary-blue); }
blockquote { quotes: "" ""; } /* Basic reset */
blockquote p::before { content: open-quote; }
blockquote p::after { content: close-quote; }
#testimonial-container button { background-color: rgba(255, 255, 255, 0.5); } /* Semi-transparent arrow bg */


/* --- General Button Styling --- */
.btn { /* Base styles defined in specific buttons below */ }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600; /* semibold */
    padding: 0.75rem 1.5rem; /* py-3 px-6 */
    border-radius: 0.5rem; /* rounded-lg */
    color: var(--white);
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
    border: none; /* Ensure no default border */
    text-decoration: none; /* For <a> tags styled as buttons */
    background-color: var(--primary-blue);
    box-shadow: 0 0.3125rem 0.625rem 0.0625rem var(--primary-shadow-color);
}
.btn-primary:hover {
    background-color: var(--primary-blue-darker);
    box-shadow: 0 0.375rem 0.75rem 0.125rem var(--primary-shadow-color);
}
 .btn-primary:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(28, 159, 252, 0.5); /* Focus ring */
 }
 /* Specific icon margin */
 .btn-primary > i { margin-right: 0.5rem; }
 html[dir="rtl"] .btn-primary > i { margin-right: 0; margin-left: 0.5rem; }

/* --- Donate Button Styling --- */
/* Removed .btn-donate specific styles to make it uniform with .btn-primary */
/*
.btn-donate {
    background-color: var(--accent-green);
    box-shadow: 0 0.3125rem 0.625rem 0.0625rem var(--accent-green-shadow-color);
}
.btn-donate:hover {
    background-color: var(--accent-green-darker);
    box-shadow: 0 0.375rem 0.75rem 0.125rem var(--accent-green-shadow-color);
}
 .btn-donate:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.5);
 }
*/

/* --- Text & Icon Colors --- */
.text-primary-blue { color: var(--primary-blue); }
.icon-primary-blue { color: var(--primary-blue); }
.text-gray-600 { color: var(--text-gray-600); }
.text-gray-700 { color: var(--text-gray-700); }
.text-gray-800 { color: var(--text-gray-800); }
.text-gray-900 { color: var(--text-gray-900); }
.text-gray-500 { color: var(--text-gray-500); }
.text-blue-500 { color: var(--blue-500); }
.text-orange-500 { color: var(--orange-500); }
.text-purple-600 { color: var(--purple-600); }
.text-red-500 { color: var(--red-500); }
.text-white { color: var(--white); }


/* --- Background Colors --- */
.bg-light-gray { background-color: var(--light-gray-bg); }
.bg-light-blue { background-color: var(--light-blue-bg); }
.text-light-blue { color: var(--light-blue-text); }
.bg-white { background-color: var(--white); }

/* --- Paper Effect --- */


/* Subtle dot pattern */
.dot-pattern-bg {
     background-image: radial-gradient(circle, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
     background-size: 15px 15px;
}
/* Carousel Styles */
.carousel-item {
    display: none;
    /* Default transition (can include transform etc. if needed for manual clicks) */
    /* Remove the transition here if .is-playing handles it */
    /* transition: opacity 0.5s ease-in-out; */
    opacity: 0;
    position: absolute; /* Added to potentially help layering */
    top: 0;
    left: 0;
    width: 100%;
}
.carousel-item.active {
    display: block;
    opacity: 1;
    position: relative; /* Active slide should be relative */
}
.carousel-item.is-playing {
    transition: opacity 0.5s ease-in-out; /* Only opacity */
}
/* ADD THIS RULE TO PREVENT JITTER */
#carousel-wrapper {
    position: relative;
    overflow: hidden;
    min-height: 280px; /* Keep Adjusting As Needed */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* transform: translateZ(0); */ /* Keep commented out unless needed */
}
/* Keep the explicit margins/padding from previous attempt */
#carousel-wrapper blockquote { /* ... */ }
#carousel-wrapper .font-semibold { /* ... */ }
#carousel-wrapper .text-sm { /* ... */ }

/* Explicit margins/padding for testimonial content */
#carousel-wrapper blockquote {
    margin-top: 1.5rem; /* Consistent top margin (mb-6) */
    margin-bottom: 1.5rem; /* Consistent bottom margin (mb-6) */
    /* Ensure text styles are consistent */
    font-size: 1.125rem; /* text-lg */
    font-style: italic;
    color: var(--text-gray-700);
}

#carousel-wrapper .font-semibold { /* Name */
    margin-bottom: 0.25rem; /* Add small consistent margin below name */
}

#carousel-wrapper .text-sm { /* Title */
    margin-top: 0; /* Ensure no extra top margin */
}

/* Language Dropdown Styles */
.lang-dropdown {
    display: none; /* Initially hidden, shown by JS */
    position: absolute;
    right: 0;
    margin-top: 0.5rem; /* mt-2 */
    width: 12rem; /* w-48 */
    background-color: var(--white);
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); /* shadow-lg */
    padding-top: 0.25rem; /* py-1 */
    padding-bottom: 0.25rem; /* py-1 */
    z-index: 50;
    border: 1px solid var(--gray-200);
    max-height: 15rem; /* max-h-60 */
    overflow-y: auto;
 }
 /* Add a class to show the dropdown */
 .lang-dropdown.show {
    display: block;
 }
/* Style links inside dropdown */
.lang-dropdown a {
    display: block;
    padding: 0.5rem 1rem; /* px-4 py-2 */
    font-size: 0.875rem; /* text-sm */
    color: var(--text-gray-700);
    white-space: nowrap;
    text-decoration: none;
}
.lang-dropdown a:hover {
    background-color: var(--blue-100);
}


/* Basic RTL adjustments */
html[dir="rtl"] .mr-1 { margin-left: 0.25rem; margin-right: 0; }
html[dir="rtl"] .mr-2 { margin-left: 0.5rem; margin-right: 0; }
html[dir="rtl"] .ml-1 { margin-right: 0.25rem; margin-left: 0; }
html[dir="rtl"] .md\:pr-10 { padding-left: 2.5rem; padding-right: 0; } /* Example breakpoint adjustment */
html[dir="rtl"] .text-left { text-align: right; }
/* Add more specific RTL adjustments if needed */

/* Carousel Arrow Adjustments for RTL */
html[dir="rtl"] #prev-testimonial {
    left: auto; right: 0; transform: translate(100%, -50%) scaleX(-1);
}
@media (min-width: 640px) { /* sm breakpoint */
    html[dir="rtl"] #prev-testimonial { transform: translate(0%, -50%) scaleX(-1); } /* Reset sm */
}
html[dir="rtl"] #next-testimonial {
    right: auto; left: 0; transform: translate(-100%, -50%) scaleX(-1);
}
@media (min-width: 640px) { /* sm breakpoint */
     html[dir="rtl"] #next-testimonial { transform: translate(0%, -50%) scaleX(-1); } /* Reset sm */
}

/* Ensure SVG icons inherit color correctly if needed */
.icon-primary-blue svg {
  stroke: var(--primary-blue); /* Ensure stroke is primary blue */
  fill: none; /* Ensure no fill is interfering */
}

/* Footer specific text colors */
footer {
    background-color: var(--primary-blue);
    color: var(--sky-200); /* Default light blue text */
    padding-top: 3rem; /* py-12 */
    padding-bottom: 3rem;
}
footer h4 { color: var(--white); margin-bottom: 0.75rem; font-weight: 600; }
footer a { color: var(--white); text-decoration: none; transition: color 0.2s ease-in-out; }
footer a:hover { color: var(--sky-100); }
footer ul { list-style: none; padding: 0; margin: 0; }
footer ul li { margin-bottom: 0.5rem; }
footer p { color: var(--sky-100); margin-bottom: 1rem; } /* Paragraphs in footer */
footer p.text-blue-200 { color: var(--sky-200); } /* Copyright */