/* Custom Grid & Utility Styles (Optimized) */
html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    line-height: inherit;
    background-color: #f8fafc;
    color: #334155;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* LAYOUT */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-end {
    justify-content: flex-end;
}

.flex-1 {
    flex: 1 1 0%;
}

.shrink-0 {
    flex-shrink: 0;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .md\:flex-row {
        flex-direction: row;
    }

    .md\:gap-8 {
        gap: 2rem;
    }

    .md\:p-8 {
        padding: 2rem;
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* SPACING */
.p-2 {
    padding: 0.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.p-10 {
    padding: 2.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.m-auto {
    margin: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-10 {
    margin-top: 2.5rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* SIZING */
.w-full {
    width: 100%;
}

.w-fit {
    width: fit-content;
}

.h-full {
    height: 100%;
}

.h-screen {
    height: 100vh;
}

.min-h-screen {
    min-height: 100vh;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-16 {
    width: 4rem;
}

.h-16 {
    height: 4rem;
}

.w-20 {
    width: 5rem;
}

.h-20 {
    height: 5rem;
}

/* TYPOGRAPHY */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/Tajawal-Regular.ttf') format('truetype');
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/Tajawal-Bold.ttf') format('truetype');
}

@font-face {
    font-family: 'Tajawal';
    font-style: normal;
    font-weight: 900;
    font-display: swap;
    src: url('../fonts/Tajawal-Black.ttf') format('truetype');
}

.font-bold {
    font-weight: 700;
}

.font-black {
    font-weight: 900;
}

.text-center {
    text-align: center;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

/* COLORS */
.bg-white {
    background-color: #ffffff;
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.bg-slate-900 {
    background-color: #0f172a;
}

.bg-emerald-50 {
    background-color: #fff1f2;
    /* ROSE 50 */
}

.bg-emerald-100 {
    background-color: #ffe4e6;
    /* ROSE 100 */
}

.bg-emerald-500 {
    background-color: #f43f5e;
    /* ROSE 500 */
}

.bg-emerald-600 {
    background-color: #e11d48;
    /* ROSE 600 */
}

.text-white {
    color: #ffffff;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-500 {
    color: #64748b;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-800 {
    color: #1e293b;
}

.text-emerald-500 {
    color: #f43f5e;
    /* ROSE 500 */
}

.text-emerald-600 {
    color: #e11d48;
    /* ROSE 600 */
}

/* BORDERS & EFFECTS */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-\[2rem\] {
    border-radius: 2rem;
}

.rounded-\[2\.5rem\] {
    border-radius: 2.5rem;
}

.border {
    border-width: 1px;
}

.border-2 {
    border-width: 2px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-slate-100 {
    border-color: #f1f5f9;
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.border-emerald-100 {
    border-color: #ffe4e6;
    /* ROSE 100 */
}

.border-emerald-500 {
    border-color: #f43f5e;
    /* ROSE 500 */
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* CUSTOM COMPONENTS */
.btn-premium-glow {
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
    box-shadow: 0 10px 30px -10px rgba(244, 63, 94, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-premium-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px -10px rgba(244, 63, 94, 0.6);
}

.group:hover .group-hover\:text-emerald-600 {
    color: #e11d48;
    /* ROSE 600 */
}

.group:hover .group-hover\:bg-emerald-600 {
    background-color: #e11d48;
    /* ROSE 600 */
}

.group:hover .group-hover\:text-white {
    color: white;
}

.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.z-10 {
    z-index: 10;
}

/* ARTICLE TYPOGRAPHY - HEADERS 2 TO 6 */

/* Using !important to override Tailwind's Preflight reset which forces headers to be unstyled */

h2 {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 2rem !important;
    /* 32px */
    line-height: 2.5rem !important;
    font-weight: 900 !important;
    /* Black */
    color: #1e293b !important;
    /* Slate 800 */
    margin-top: 2.5rem !important;
    margin-bottom: 1.25rem !important;
    padding-bottom: 0.5rem !important;
}

h3 {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1.5rem !important;
    /* 24px */
    line-height: 2rem !important;
    font-weight: 700 !important;
    /* Bold */
    color: #334155 !important;
    /* Slate 700 */
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    position: relative;
    /* Determine border side based on direction */
    border-inline-start: 4px solid #f43f5e !important;
    /* Logical property for RTL/LTR */
    padding-inline-start: 15px !important;
}

/* Fallback if logical properties are not supported by some older browsers, though unlikely for target audience */
html[dir="rtl"] h3 {
    border-right: 4px solid #f43f5e !important;
    border-left: none !important;
    padding-right: 15px !important;
    padding-left: 0 !important;
    text-align: right !important;
}

html[dir="ltr"] h3 {
    border-left: 4px solid #f43f5e !important;
    border-right: none !important;
    padding-left: 15px !important;
    padding-right: 0 !important;
}

h4 {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1.25rem !important;
    /* 20px */
    line-height: 1.75rem !important;
    font-weight: 700 !important;
    color: #334155 !important;
    margin-top: 1.5rem !important;
    margin-bottom: 0.75rem !important;
}

h5 {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1.125rem !important;
    /* 18px */
    line-height: 1.5rem !important;
    font-weight: 600 !important;
    color: #475569 !important;
    /* Slate 600 */
    margin-top: 1.25rem !important;
    margin-bottom: 0.5rem !important;
}

h6 {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1rem !important;
    /* 16px */
    line-height: 1.5rem !important;
    font-weight: 600 !important;
    color: #64748b !important;
    /* Slate 500 */
    margin-top: 1rem !important;
    margin-bottom: 0.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
}

/* Paragraph styling improvement */
article p,
.main-content p {
    font-family: 'Tajawal', sans-serif !important;
    font-size: 1.05rem !important;
    line-height: 1.8 !important;
    color: #334155 !important;
    margin-bottom: 1.25rem !important;
}