/* ========================================
   OltinFond Homepage — Figma Design
   Colors: #0645ad (primary), #0b0080 (hover),
           #202122 (dark text), #54595d (secondary),
           #f8f9fa (light bg), white (cards)
   ======================================== */

/* --- Hero Section --- */
.fg-hero {
    position: relative;
    padding: 80px 0 64px;
    overflow: hidden;
    background: linear-gradient(to bottom right, var(--surface-alt-color, #f8f9fa), var(--surface-color));
    text-align: center;
}

.fg-hero-blur {
    position: absolute;
    width: 384px;
    height: 384px;
    background: var(--accent-color);
    opacity: 0.05;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}

.fg-hero-blur-tr { top: 0; right: 0; }
.fg-hero-blur-bl { bottom: 0; left: 0; }

.fg-hero-content {
    position: relative;
    z-index: 1;
}

.fg-hero-title {
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 16px;
    line-height: 1.15;
    font-family: var(--heading-font);
}

.fg-hero-subtitle {
    font-size: 1.15rem;
    color: var(--secondary-color);
    margin-bottom: 40px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* Search */
.fg-search-wrap {
    max-width: 720px;
    margin: 0 auto 32px;
}

.fg-search-pill {
    display: flex;
    flex-direction: row;
    gap: 12px;
    background: var(--surface-color);
    border-radius: var(--fg-radius-lg);
    padding: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
}

.fg-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 14px 20px;
    font-size: 1rem;
    color: var(--heading-color);
    background: transparent;
    min-width: 0;
    border-radius: var(--fg-radius-md);
}

.fg-search-input::placeholder {
    color: #9ca3af;
}

.fg-search-input:focus {
    box-shadow: none;
    outline: none;
}

.fg-search-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: var(--fg-radius-md);
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.fg-search-btn:hover {
    background: var(--accent-color-dark);
}

/* Hero Stats */
.fg-hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.fg-hero-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fg-hero-stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.fg-hero-stat-text {
    color: var(--secondary-color);
}

/* --- Section Headers --- */
.fg-section-head {
    text-align: center;
    margin-bottom: 40px;
}

.fg-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--heading-color);
    margin-bottom: 8px;
    font-family: var(--heading-font);
}

.fg-section-sub {
    font-size: 1.05rem;
    color: var(--secondary-color);
    margin: 0;
}

/* --- Categories Section --- */
.fg-categories {
    padding: 64px 0;
    background: var(--surface-color);
}

.fg-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.fg-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--fg-radius-lg);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
    overflow: hidden;
}

.fg-cat-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.fg-cat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--fg-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.fg-cat-card:hover .fg-cat-icon {
    transform: scale(1.1);
}

.fg-cat-icon i {
    font-size: 28px;
    color: #fff;
}

.fg-cat-color-1 { background: #3b82f6; }
.fg-cat-color-2 { background: #22c55e; }
.fg-cat-color-3 { background: #a855f7; }
.fg-cat-color-4 { background: #f97316; }
.fg-cat-color-5 { background: #ec4899; }
.fg-cat-color-6 { background: #ef4444; }
.fg-cat-color-7 { background: #6366f1; }
.fg-cat-color-8 { background: #06b6d4; }

.fg-cat-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 4px;
}

.fg-cat-count {
    font-size: 0.82rem;
    color: var(--secondary-color);
}

/* --- Featured Articles --- */
.fg-articles {
    padding: 64px 0;
    background: var(--surface-alt-color, #f8f9fa);
}

.fg-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fg-article-card {
    display: flex;
    flex-direction: column;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--fg-radius-lg);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.fg-article-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.fg-article-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: var(--border-color);
}

.fg-article-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.fg-article-card:hover .fg-article-img img {
    transform: scale(1.05);
}

.fg-article-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: rgba(255, 255, 255, 0.3);
    font-size: 3rem;
}

.fg-article-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.fg-article-badge {
    display: inline-block;
    background: #eff6ff;
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    width: fit-content;
}

.fg-article-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.fg-article-card:hover .fg-article-title {
    color: var(--accent-color);
}

.fg-article-excerpt {
    font-size: 0.88rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin: 0 0 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.fg-article-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fg-article-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    color: var(--secondary-color);
}

.fg-article-read {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--accent-color);
    transition: gap 0.2s ease;
}

.fg-article-card:hover .fg-article-read {
    gap: 8px;
}

/* --- Knowledge Section (Bilasizmi + Bugun tarixda) --- */
.fg-knowledge {
    padding: 64px 0;
    background: var(--surface-alt-color, #f8f9fa);
}

.fg-knowledge-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.fg-knowledge-col {
    /* Each column */
}

.fg-knowledge-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.fg-knowledge-icon {
    width: 48px;
    height: 48px;
    background: var(--accent-color);
    border-radius: var(--fg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.fg-knowledge-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0;
    font-family: var(--heading-font);
}

/* Fact Cards */
.fg-facts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fg-fact-card {
    display: flex;
    gap: 14px;
    padding: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--fg-radius-md);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.fg-fact-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--accent-color);
}

.fg-fact-num {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: var(--surface-alt-color, #f8f9fa);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.fg-fact-card:hover .fg-fact-num {
    background: var(--accent-color);
    color: #fff;
}

.fg-fact-text {
    margin: 0;
    font-size: 0.92rem;
    color: var(--heading-color);
    line-height: 1.6;
}

/* Event Cards (Timeline) */
.fg-events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fg-event-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--fg-radius-md);
    transition: all 0.3s ease;
    align-items: flex-start;
}

.fg-event-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: var(--accent-color);
}

.fg-event-year-box {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    background: linear-gradient(to bottom right, var(--accent-color), var(--accent-color-dark));
    border-radius: var(--fg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(6, 69, 173, 0.25);
    transition: transform 0.2s ease;
}

.fg-event-card:hover .fg-event-year-box {
    transform: scale(1.05);
}

.fg-event-year {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

.fg-event-info {
    flex: 1;
    min-width: 0;
}

.fg-event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 6px;
    transition: color 0.2s ease;
}

.fg-event-card:hover .fg-event-title {
    color: var(--accent-color);
}

.fg-event-desc {
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.5;
    margin: 0;
}

/* --- Quick Links Section --- */
.fg-quicklinks {
    padding: 64px 0;
    background: var(--surface-color);
}

.fg-quicklinks-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.fg-quicklink-card {
    padding: 16px 12px;
    border-radius: var(--fg-radius-md);
    border: 1px solid var(--border-color);
    text-align: center;
    background: var(--surface-color);
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
}

.fg-quicklink-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
}

.fg-quicklink-icon {
    width: 44px;
    height: 44px;
    background: var(--surface-alt-color, #f8f9fa);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition: all 0.2s ease;
}

.fg-quicklink-icon i {
    font-size: 1.2rem;
    color: var(--accent-color);
    transition: color 0.2s ease;
}

.fg-quicklink-card:hover .fg-quicklink-icon {
    background: var(--accent-color);
}

.fg-quicklink-card:hover .fg-quicklink-icon i {
    color: #fff;
}

.fg-quicklink-card h3 {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0 0 4px;
    transition: color 0.2s ease;
}

.fg-quicklink-card:hover h3 {
    color: var(--accent-color);
}

.fg-quicklink-card p {
    font-size: 0.72rem;
    color: var(--secondary-color);
    margin: 0;
}

/* --- Stats Section --- */
.fg-stats {
    padding: 64px 0;
    background: var(--surface-color);
}

.fg-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.fg-stat-card {
    padding: 24px;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--fg-radius-lg);
    text-align: center;
    transition: all 0.3s ease;
}

.fg-stat-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.fg-stat-icon {
    width: 56px;
    height: 56px;
    background: var(--surface-alt-color, #f8f9fa);
    border-radius: var(--fg-radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    transition: all 0.2s ease;
}

.fg-stat-icon i {
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: color 0.2s ease;
}

.fg-stat-card:hover .fg-stat-icon {
    background: var(--accent-color);
}

.fg-stat-card:hover .fg-stat-icon i {
    color: #fff;
}

.fg-stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 4px;
}

.fg-stat-label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin: 0;
    font-weight: 500;
}

/* --- Empty State --- */
.fg-empty {
    text-align: center;
    padding: 36px 20px;
    background: var(--surface-color);
    border-radius: var(--fg-radius-md);
    border: 1px solid var(--border-color);
}

.fg-empty i {
    font-size: 2rem;
    color: #d1d5db;
    display: block;
    margin-bottom: 10px;
}

.fg-empty p {
    color: var(--secondary-color);
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.fg-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: var(--accent-color);
    color: #fff;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.fg-btn-primary:hover {
    background: var(--accent-color-dark);
    color: #fff;
    text-decoration: none;
}

/* ========================================
   DARK MODE
   ======================================== */
body.dark-mode .fg-hero {
    background: linear-gradient(to bottom right, #0e0e0e, #1a1a1a);
}

body.dark-mode .fg-hero-blur {
    opacity: 0.03;
}

body.dark-mode .fg-hero-title {
    color: #f1f5f9;
}

body.dark-mode .fg-hero-subtitle {
    color: #999;
}

body.dark-mode .fg-search-pill {
    background: #1a1a1a;
    border-color: #333;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .fg-search-input {
    color: #e0e0e0;
}

body.dark-mode .fg-hero-stat-num {
    color: var(--accent-color);
}

body.dark-mode .fg-hero-stat-text {
    color: #777;
}

body.dark-mode .fg-section-title {
    color: #f1f5f9;
}

body.dark-mode .fg-section-sub {
    color: #999;
}

body.dark-mode .fg-categories {
    background: #121212;
}

body.dark-mode .fg-cat-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .fg-cat-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .fg-cat-name {
    color: #e0e0e0;
}

body.dark-mode .fg-cat-count {
    color: #777;
}

body.dark-mode .fg-articles {
    background: #0e0e0e;
}

body.dark-mode .fg-article-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .fg-article-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

body.dark-mode .fg-article-img {
    background: #2a2a2a;
}

body.dark-mode .fg-article-badge {
    background: #1e293b;
    color: var(--accent-color);
}

body.dark-mode .fg-article-title {
    color: #f1f5f9;
}

body.dark-mode .fg-article-card:hover .fg-article-title {
    color: var(--accent-color);
}

body.dark-mode .fg-article-excerpt {
    color: #999;
}

body.dark-mode .fg-article-meta {
    color: #777;
}

body.dark-mode .fg-article-read {
    color: var(--accent-color);
}

body.dark-mode .fg-knowledge {
    background: #0e0e0e;
}

body.dark-mode .fg-knowledge-title {
    color: #f1f5f9;
}

body.dark-mode .fg-fact-card,
body.dark-mode .fg-event-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .fg-fact-card:hover,
body.dark-mode .fg-event-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

body.dark-mode .fg-fact-num {
    background: #2a2a2a;
}

body.dark-mode .fg-fact-text {
    color: #ccc;
}

body.dark-mode .fg-event-title {
    color: #f1f5f9;
}

body.dark-mode .fg-event-card:hover .fg-event-title {
    color: var(--accent-color);
}

body.dark-mode .fg-event-desc {
    color: #999;
}

body.dark-mode .fg-quicklinks {
    background: #121212;
}

body.dark-mode .fg-quicklink-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .fg-quicklink-card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .fg-quicklink-icon {
    background: #2a2a2a;
}

body.dark-mode .fg-quicklink-card h3 {
    color: #e0e0e0;
}

body.dark-mode .fg-quicklink-card p {
    color: #777;
}

body.dark-mode .fg-stats {
    background: #121212;
}

body.dark-mode .fg-stat-card {
    background: #1a1a1a;
    border-color: #333;
}

body.dark-mode .fg-stat-card:hover {
    border-color: var(--accent-color);
}

body.dark-mode .fg-stat-icon {
    background: #2a2a2a;
}

body.dark-mode .fg-stat-num {
    color: #f1f5f9;
}

body.dark-mode .fg-stat-label {
    color: #999;
}

body.dark-mode .fg-empty {
    background: #1a1a1a;
    border-color: #333;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 991.98px) {
    .fg-hero { padding: 56px 0 48px; }
    .fg-hero-title { font-size: 2.4rem; }
    .fg-cat-grid { grid-template-columns: repeat(4, 1fr); }
    .fg-articles-grid { grid-template-columns: repeat(2, 1fr); }
    .fg-knowledge-grid { grid-template-columns: 1fr; }
    .fg-quicklinks-grid { grid-template-columns: repeat(3, 1fr); }
    .fg-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767.98px) {
    .fg-hero { padding: 48px 0 36px; }
    .fg-hero-title { font-size: 1.8rem; }
    .fg-hero-subtitle { font-size: 1rem; margin-bottom: 28px; }
    .fg-search-pill { flex-direction: column; }
    .fg-search-btn { justify-content: center; }
    .fg-hero-stats { gap: 20px; }
    .fg-hero-stat-num { font-size: 1.2rem; }
    .fg-cat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .fg-articles-grid { grid-template-columns: 1fr; }
    .fg-quicklinks-grid { grid-template-columns: repeat(2, 1fr); }
    .fg-section-title { font-size: 1.5rem; }
    .fg-event-year-box { width: 56px; height: 56px; }
    .fg-event-year { font-size: 0.95rem; }

    .fg-categories,
    .fg-articles,
    .fg-knowledge,
    .fg-quicklinks,
    .fg-stats { padding: 40px 0; }
}

@media (max-width: 575.98px) {
    .fg-hero-title { font-size: 1.5rem; }
    .fg-hero-stats { flex-direction: column; gap: 12px; }
    .fg-stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .fg-quicklinks-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
}
