@font-face {
    font-family: IRANSans;
    font-style: normal;
    font-weight: 500;
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Medium.eot');
    src: url('../fonts/eot/IRANSansWeb(FaNum)_Medium.eot?#iefix') format('embedded-opentype'), /* IE6-8 */
    url('../fonts/woff2/IRANSansWeb(FaNum)_Medium.woff2') format('woff2'), /* FF39+,Chrome36+, Opera24+*/
    url('../fonts/woff/IRANSansWeb(FaNum)_Medium.woff') format('woff'), /* FF3.6+, IE9, Chrome6+, Saf5.1+*/
    url('../fonts/ttf/IRANSansWeb(FaNum)_Medium.ttf') format('truetype');
}

/* Government Style - Clean and Professional */

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 3.5rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5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DI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.footer {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #e9ecef;
}
.footer-dark {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
}
/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 25%, #f1f5f9 50%, #e2e8f0 75%, #ffffff 100%);
    min-height: 70vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Dark Mode Styles */
.hero-section-dark {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 25%, #3a3a3a 50%, #4a4a4a 75%, #2a2a2a 100%) !important;
}

.footer-dark {
    background: linear-gradient(135deg, #1a1a2a 0%, #2a2a3a 100%) !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
        radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.04) 0%, transparent 25%, rgba(255, 255, 255, 0.02) 75%, transparent 100%);
    background-size: 300% 300%, 250% 250%, 400% 400%, 200% 200%;
    pointer-events: none;
    animation: elegantFlow 25s ease-in-out infinite;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 800px 600px at 20% 20%, rgba(147, 197, 253, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 600px 800px at 80% 80%, rgba(196, 181, 253, 0.06) 0%, transparent 50%);
    pointer-events: none;
    animation: gentleGlow 30s ease-in-out infinite reverse;
}

@keyframes elegantFlow {
    0%, 100% {
        background-position: 0% 0%, 100% 100%, 50% 50%, 0% 0%;
        opacity: 0.7;
    }
    20% {
        background-position: 30% 20%, 80% 80%, 60% 40%, 20% 30%;
        opacity: 0.8;
    }
    40% {
        background-position: 60% 40%, 40% 60%, 80% 20%, 40% 60%;
        opacity: 0.9;
    }
    60% {
        background-position: 80% 60%, 20% 40%, 30% 70%, 60% 20%;
        opacity: 0.8;
    }
    80% {
        background-position: 40% 80%, 60% 20%, 70% 30%, 80% 40%;
        opacity: 0.7;
    }
}

@keyframes gentleGlow {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* Custom Button Styles - Neon Glow Effect */
.mud-button-root {
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.mud-button-root::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.mud-button-root:hover::before {
    left: 100%;
}

.mud-button-filled-primary {
    box-shadow:
        0 2px 8px rgba(38, 74, 192, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.mud-button-filled-primary:hover {
    box-shadow:
        0 4px 12px rgba(38, 74, 192, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}

.mud-button-outlined-primary {
    box-shadow: none !important;
}

.mud-button-outlined-primary:hover {
    box-shadow: 0 2px 8px rgba(38, 74, 192, 0.2) !important;
    transform: none !important;
}

.mud-button-filled-secondary {
    box-shadow:
        0 2px 8px rgba(24, 176, 206, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.mud-button-filled-secondary:hover {
    box-shadow:
        0 4px 12px rgba(24, 176, 206, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}

.mud-button-filled-success {
    box-shadow:
        0 2px 8px rgba(56, 161, 105, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.mud-button-filled-success:hover {
    box-shadow:
        0 4px 12px rgba(56, 161, 105, 0.4),
        0 6px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
}
.content-section {
    padding: 2rem 0;
}

.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #18b0ce 50%, transparent 100%);
}

/* PostDetail Component Styles */
.post-detail-layout {
    margin-top: 2rem;
}

.hero-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    padding: 2rem 2rem 1rem;
}

.author-stats-card,
.content-card,
.comments-card,
.actions-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.author-stats-card:hover,
.content-card:hover,
.comments-card:hover,
.actions-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.post-header-section {
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px !important;
}

@media (max-width: 960px) {
    .hero-image-container .image-overlay {
        padding: 1.5rem 1rem 0.5rem;
    }

    .hero-image-container .image-overlay .mud-typography {
        font-size: 1.5rem !important;
    }

    /* Mobile optimizations for PostDetail */
    .post-detail-layout .author-stats-card,
    .post-detail-layout .content-card,
    .post-detail-layout .comments-card,
    .post-detail-layout .actions-card,
    .post-detail-layout .related-posts-card {
        margin-bottom: 1rem !important;
        padding: 1rem !important;
    }

    .post-detail-layout .mud-typography-body1 {
        font-size: 0.95rem !important;
        line-height: 1.7 !important;
    }

    .post-detail-layout .mud-chip-root {
        font-size: 0.8rem !important;
    }

    .post-detail-layout .mud-button-root {
        font-size: 0.9rem !important;
        padding: 0.5rem 1rem !important;
    }

    /* Related Posts Styles */
    .related-posts-card .mud-paper-root {
        background: rgba(255,255,255,0.03) !important;
        border: 1px solid rgba(255,255,255,0.05) !important;
        transition: all 0.2s ease !important;
    }

    .related-posts-card .mud-paper-root:hover {
        background: rgba(255,255,255,0.08) !important;
        border-color: rgba(255,255,255,0.1) !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    }

    .related-posts-card .mud-stack {
        gap: 0.75rem !important;
    }

    .related-posts-card .mud-typography-caption {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
    }

    .related-posts-card .related-post-meta {
        display: flex !important;
        align-items: center !important;
        gap: 1rem !important;
        flex-wrap: wrap !important;
    }

    .related-posts-card .related-post-meta > div {
        display: flex !important;
        align-items: center !important;
        gap: 0.25rem !important;
    }

    /* Comments Section Styles */
    .comments-card .mud-stack {
        gap: 1rem !important;
    }

    .comments-card [style*="max-height: 400px"] {
        scrollbar-width: thin;
        scrollbar-color: rgba(255,255,255,0.2) transparent;
    }

    .comments-card [style*="max-height: 400px"]::-webkit-scrollbar {
        width: 6px;
    }

    .comments-card [style*="max-height: 400px"]::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
        border-radius: 3px;
    }

    .comments-card [style*="max-height: 400px"]::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.2);
        border-radius: 3px;
    }

    .comments-card [style*="max-height: 400px"]::-webkit-scrollbar-thumb:hover {
        background: rgba(255,255,255,0.3);
    }


    /* Mobile Optimizations */
    @media (max-width: 959px) {
        .post-detail-layout {
            padding: 0 !important;
        }

        .hero-image-container {
            margin-bottom: 1rem !important;
        }

        .author-stats-card,
        .content-card,
        .actions-card,
        .related-posts-card,
        .comments-card {
            margin-bottom: 1rem !important;
            padding: 0.75rem !important;
        }

        .comments-card [style*="max-height: 300px"] {
            max-height: 250px !important;
        }

        .post-header-section {
            margin-bottom: 1rem !important;
            padding: 1rem !important;
        }

        .mud-typography-h3 {
            font-size: 1.5rem !important;
            line-height: 1.3 !important;
        }

        .mud-typography-h6 {
            font-size: 1.1rem !important;
        }

        .mud-chip {
            font-size: 0.8rem !important;
        }

        /* Contact Page Mobile Optimizations */
        .social-button {
            padding: 1rem !important;
        }

        .mud-expansion-panel-enhanced .mud-expansion-panel-header {
            padding: 0.75rem 1rem !important;
        }
    }

    @media (max-width: 599px) {
        .author-stats-card,
        .content-card,
        .actions-card,
        .related-posts-card,
        .comments-card {
            padding: 0.5rem !important;
            margin-bottom: 0.75rem !important;
        }

        .mud-text-field .mud-input {
            font-size: 0.9rem !important;
        }

        .mud-button {
            font-size: 0.85rem !important;
            padding: 0.5rem 1rem !important;
        }

        /* Contact Page Mobile Optimizations */
        .social-button {
            padding: 0.75rem !important;
            font-size: 0.8rem !important;
        }
    }
}
