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

:root {
    --saudiGreen: #245C36;
    --saudiWhite: #FFFFFF;
    --saudiBlack: #000000;
    --primary: #1DA1F2;
    --secondary: #14171A; /* Used for dark mode body background */
    --accent: #17BF63; /* Used for dark mode saudiGreen equivalent */
    --text-primary-light: #1a1a1a;
    --text-secondary-light: #374151;
    --bg-primary-light: #ffffff;
    --bg-secondary-light: #f3f4f6; /* e.g. gray-100 */

    --text-primary-dark: #e5e7eb; /* e.g. gray-200 */
    --text-secondary-dark: #d1d5db; /* e.g. gray-300 */
    --bg-primary-dark: #14171A; /* secondary color from config */
    --bg-secondary-dark: #1f2937; /* e.g. gray-800 */
    --border-dark: #4b5563; /* e.g. gray-700 */
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary-light);
    background-color: var(--bg-primary-light);
    transition: background-color 0.3s, color 0.3s;
}

body.dark {
    background-color: var(--bg-primary-dark);
    color: var(--text-primary-dark);
}

.container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--saudiGreen), var(--accent));
    z-index: 1000;
    transition: width 0.1s;
}

.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Placeholder Images (General, can be overridden) */
.placeholder-image {
    background-color: #f3f4f6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-weight: 500;
    text-align: center;
    overflow: hidden;
    border-radius: 0.75rem; /* rounded-xl */
}
body.dark .placeholder-image {
    background-color: #374151; /* Tailwind gray-700 */
    color: #9ca3af; /* Tailwind gray-400 */
}
.placeholder-img { /* For index page hero and cards */
    background-color: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-weight: bold;
}
body.dark .placeholder-img {
    background-color: #374151;
}


/* Breadcrumbs */
.breadcrumb {
    font-size: 0.875rem;
    color: #6b7280; /* gray-500 */
    transition: color 0.2s;
}
.breadcrumb:hover {
    color: var(--saudiGreen);
}
body.dark .breadcrumb {
    color: #9ca3af; /* gray-400 */
}
body.dark .breadcrumb:hover {
    color: var(--accent);
}
.breadcrumb-separator {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
    color: #9ca3af; /* gray-400 */
}
body.dark .breadcrumb .font-medium { /* Active breadcrumb */
    color: var(--accent) !important;
}
.breadcrumb .font-medium { /* Active breadcrumb light */
     color: var(--saudiGreen) !important;
}


/* Article Content Styling (from About, Privacy, Article pages) */
.article-content h2 {
    font-size: 1.875rem; /* text-3xl */
    font-weight: 600;
    color: var(--saudiGreen);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb; /* border-gray-200 */
}
body.dark .article-content h2 {
    border-bottom-color: var(--border-dark); /* gray-700 */
    color: var(--accent);
}

.article-content h3 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600;
    color: #1f2937; /* gray-800 */
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}
body.dark .article-content h3 {
    color: var(--text-primary-dark); /* gray-200 */
}

.article-content p {
    color: var(--text-secondary-light); /* gray-700 */
    margin-bottom: 1.25rem;
}
body.dark .article-content p {
    color: var(--text-secondary-dark); /* gray-300 */
}

.article-content ul, .article-content ol {
    list-style-position: inside;
    padding-left: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary-light);
}
.article-content ul { list-style-type: disc; }
.article-content ol { list-style-type: decimal; }

body.dark .article-content ul, body.dark .article-content ol {
    color: var(--text-secondary-dark);
}

.article-content ul li::marker {
    color: var(--saudiGreen);
}
body.dark .article-content ul li::marker {
    color: var(--accent);
}

.article-content a {
    color: var(--saudiGreen);
    text-decoration: underline;
}
body.dark .article-content a {
    color: var(--accent);
}

.article-content strong {
    font-weight: 600;
    color: #1f2937; /* gray-800 */
}
body.dark .article-content strong {
    color: #f3f4f6; /* gray-100 */
}

.article-content blockquote {
    border-left: 4px solid var(--saudiGreen);
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #4b5563; /* gray-600 */
}
body.dark .article-content blockquote {
    border-left-color: var(--accent);
    color: #9ca3af; /* gray-400 */
}

/* Tags for Article Page */
.tag {
    display: inline-block;
    background-color: #f3f4f6; /* gray-100 */
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151; /* gray-700 */
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.2s;
}
.tag:hover {
    background-color: var(--saudiGreen);
    color: var(--saudiWhite);
}
body.dark .tag {
    background-color: #374151; /* gray-700 */
    color: #e5e7eb; /* gray-200 */
}
body.dark .tag:hover {
    background-color: var(--accent);
    color: var(--secondary); /* dark body bg for contrast */
}


/* Tailwind dark mode utilities for general elements if needed */
/* These might be redundant if Tailwind is configured correctly, but can serve as overrides */
body.dark .bg-gray-50 { background-color: var(--bg-secondary-dark) !important; }
body.dark .bg-gray-100 { background-color: var(--bg-primary-dark) !important; } /* Footer bg */
body.dark .text-gray-500 { color: #9ca3af !important; } /* gray-400 */
body.dark .text-gray-600 { color: var(--text-secondary-dark) !important; } /* gray-300 */
body.dark .text-gray-700 { color: var(--text-primary-dark) !important; } /* gray-200 */
body.dark .text-gray-800 { color: #f9fafb !important; } /* gray-50 */
body.dark .border-gray-200 { border-color: var(--border-dark) !important; } /* gray-700 */
body.dark .border-gray-300 { border-color: #4b5563 !important; } /* gray-600 for form inputs */

/* Specific overrides for contact page form inputs in dark mode */
body.dark input[type="text"],
body.dark input[type="email"],
body.dark textarea {
    background-color: #374151 !important; /* gray-700 */
    border-color: #4b5563 !important; /* gray-600 */
    color: #e5e7eb !important; /* gray-200 */
}
body.dark input[type="text"]:focus,
body.dark input[type="email"]:focus,
body.dark textarea:focus {
    --tw-ring-color: var(--accent) !important;
}


/* Navigation Active Link */
.nav-link.active {
    color: var(--saudiGreen) !important;
    font-weight: 600;
}
body.dark .nav-link.active {
    color: var(--accent) !important;
}

/* Index Page Specifics */
.logo-marquee {
    animation: scroll 40s linear infinite; /* Slower scroll */
}
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); } /* Adjust if you have more or fewer logos */
}
body.dark .logo-marquee div[class*="bg-white"] { /* Target logo containers */
    background-color: var(--bg-secondary-dark) !important; /* gray-800 */
}

/* Article page theme toggle specific positioning (already in its HTML) */
/* Can be removed if you standardize the header fully, but kept if it's an exception */
/* .theme-toggle-article {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    padding: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

body.dark .theme-toggle-article {
    background-color: #1f2937;
    border-color: #4b5563;
} */

/* Ensure header/footer social icons have consistent hover */
footer a[aria-label]:hover, .contact-social-icons a[aria-label]:hover {
    background-color: var(--saudiGreen);
    color: var(--saudiWhite);
}
body.dark footer a[aria-label]:hover, body.dark .contact-social-icons a[aria-label]:hover {
    background-color: var(--accent);
    color: var(--secondary); /* Dark bg for contrast */
}

/* General button styling consistency */
.button-primary {
    background-color: var(--saudiGreen);
    color: var(--saudiWhite);
    /* Add other tailwind classes or direct styles for padding, rounded, etc. */
}
.button-primary:hover {
    background-color: #166534; /* Darker green */
}
body.dark .button-primary {
    background-color: var(--accent);
    color: var(--secondary); /* For text contrast on accent bg */
}
body.dark .button-primary:hover {
    background-color: #15803d; /* Darker accent */
}