/* Unified Navigation and Footer Styles */

:root {
    --background: #fcfcfc;
    --foreground: #171717;
    --primary: #72e3ad;
    --primary-foreground: #1e2723;
    --card: #ffffff;
    --card-foreground: #171717;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --border: #e5e5e5;
    --accent: #f5f5f5;
    --radius: 0.5rem;
    --font-sans: 'Outfit', system-ui, -apple-system, sans-serif;
}

.dark {
    --background: #121212;
    --foreground: #e2e8f0;
    --primary: #006239;
    --primary-foreground: #dde8e3;
    --card: #171717;
    --card-foreground: #e2e8f0;
    --muted: #1f1f1f;
    --muted-foreground: #a2a2a2;
    --border: #292929;
    --accent: #1f1f1f;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.3s, color 0.3s;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4 {
    line-height: 1.2;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header & Navbar */
header {
    border-bottom: 1px solid var(--border);
    height: 4rem;
    display: flex;
    align-items: center;
    background: var(--background);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background-color: rgba(114, 227, 173, 0.1);
    color: var(--primary);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: none;
    gap: 1.5rem;
    align-items: center;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-link:hover {
    color: var(--foreground);
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--card);
    min-width: 200px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    padding: 0.5rem;
    z-index: 1000;
    padding-top: 0.5rem;
}

/* RTL Support */
[dir="rtl"] .dropdown-content {
    left: auto;
    right: 0;
    text-align: right;
}

.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 0.5rem;
    display: none;
}

.dropdown:hover::after {
    display: block;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 0.5rem;
}

.dropdown-item:hover {
    background-color: var(--accent);
    color: var(--primary);
}

.dropdown-item i {
    width: 1rem;
    text-align: center;
}

/* Buttons */
.cta-button {
    background-color: var(--primary);
    color: var(--primary-foreground);
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s;
    font-size: 0.875rem;
}

.cta-button:hover {
    transform: scale(1.05);
}

/* Main Layout */
main {
    padding-top: 4rem;
    padding-bottom: 4rem;
    flex: 1;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

.hero p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-header {
    height: 12rem;
    background-color: var(--muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted-foreground);
    border-bottom: 1px solid var(--border);
}

.card-header svg {
    width: 4rem;
    height: 4rem;
    opacity: 0.4;
    color: var(--primary);
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.card-excerpt {
    color: var(--muted-foreground);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.read-more {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.read-more:hover {
    text-decoration: underline;
}

/* Icons for RTL */
[dir="rtl"] .read-more svg {
    transform: rotate(180deg);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.2);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    color: var(--foreground);
}

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

.footer-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: var(--muted-foreground);
    font-size: 0.875rem;
}