@font-face {
    font-family: 'Instrument Sans';
    src: url('font/InstrumentSansvariable.ttf') format('truetype-variations');
    font-weight: 100 900;
    font-stretch: 75% 125%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light dark;
    /* Modern Color Palette */
    --bg-main: light-dark(#fafafa, #09090b);
    --bg-surface: light-dark(#ffffff, #18181b);
    --bg-surface-hover: light-dark(#f4f4f5, #27272a);
    --text-primary: light-dark(#09090b, #fafafa);
    --text-secondary: light-dark(#52525b, #a1a1aa);
    --text-tertiary: light-dark(#71717a, #71717a);
    --border-subtle: light-dark(#e4e4e7, #27272a);
    --border-strong: light-dark(#d4d4d8, #3f3f46);
    --accent-primary: light-dark(#059669, #10b981); /* Emerald */
    --accent-primary-hover: light-dark(#047857, #34d399);
    --accent-surface: light-dark(#ecfdf5, #022c22);
    
    /* Glass & Shadows */
    --glass-bg: light-dark(rgba(255, 255, 255, 0.8), rgba(24, 24, 27, 0.8));
    --glass-border: light-dark(rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.05));
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.05), 0 8px 10px -6px rgb(0 0 0 / 0.05);
    --shadow-glow: 0 0 20px rgb(16 185 129 / 0.15); /* Accent glow */
    
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scrollbar-width: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
}

html::-webkit-scrollbar {
    display: none;
}

body {
    font-family: 'Instrument Sans', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    border-radius: var(--radius-md);
    width: 100%;
    object-fit: cover;
    transition: transform var(--transition-smooth);
}

/* Typography */
.title {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive title */
    line-height: 1.1;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-wrap: balance;
}

.title-sm {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

.subtitle {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    line-height: 1.4;
    font-weight: 400;
    color: var(--text-secondary);
    text-wrap: balance;
}

.big-txt {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 400;
    color: var(--text-primary);
}

.txt {
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Buttons */
.cta_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background-color: var(--text-primary);
    color: var(--bg-main);
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.cta_button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: var(--text-secondary);
}

.cta_button .arrow_icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform var(--transition-fast);
}

.cta_button:hover .arrow_icon {
    transform: translateX(4px);
}

.cta_button_alt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cta_button_alt:hover {
    background-color: var(--bg-surface-hover);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.accent-btn {
    background-color: var(--accent-primary);
    color: white;
}

.accent-btn:hover {
    background-color: var(--accent-primary-hover);
    box-shadow: var(--shadow-glow);
}

/* Layout */
.page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 160px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    overflow: hidden;
    position: relative;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-strong);
}

.featured_card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.featured_card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-strong);
}

.featured_card:hover img {
    transform: scale(1.03);
}

.featured_card .img-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md);
    margin-bottom: -8px;
}

/* Fatwa Items */
.fatwa-item {
    padding: 32px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    background: var(--bg-surface);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.fatwa-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: var(--accent-primary);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform var(--transition-fast);
}

.fatwa-item:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

.fatwa-item:hover::before {
    transform: scaleY(1);
    transform-origin: top;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--accent-surface);
    color: var(--accent-primary);
    border-radius: var(--radius-full);
}

/* Header & Navigation */
.sticky_header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    width: calc(100% - 48px);
    max-width: 1240px;
    left: 50%;
    transform: translateX(-50%);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 24px;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-smooth);
}

.navigation_menu {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.navigation_menu a {
    text-decoration: none;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.navigation_menu a:hover {
    color: var(--text-primary);
}

.navigation_dropdown {
    position: relative;
    cursor: pointer;
}

.navigation_dropdown > span {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.navigation_dropdown:hover > span {
    color: var(--text-primary);
}

.navigation_dropdown > .navigation_menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

.navigation_dropdown:hover > .navigation_menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(20px);
}

/* Grid System */
.section_grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.grid_item_large {
    grid-column: span 2;
    grid-row: span 2;
}
@media (max-width: 768px) {
    .grid_item_large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sticky_header {
        width: 100%;
        top: 0;
        border-radius: 0;
        border-top: none;
        border-left: none;
        border-right: none;
        padding: 16px 20px;
    }
    
    .navigation_menu {
        gap: 16px;
        display: none; /* In a real app we'd have a hamburger menu, for now just hide some links or keep small */
    }
    
    .navigation_menu.mobile-nav {
        display: flex;
    }

    .page {
        padding: 120px 16px 60px;
        gap: 80px;
    }

    .section {
        gap: 24px;
    }

    .card, .featured_card, .fatwa-item {
        padding: 24px;
    }
}

/* Utility */
.text-gradient {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.flex-row { display: flex; gap: 24px; }
@media (max-width: 768px) { .flex-row { flex-direction: column; } }

.footer { 
    padding: 60px 24px; 
    text-align: center; 
    border-top: 1px solid var(--border-subtle); 
    background-color: var(--bg-surface);
}
