/*
Theme Name: Zakat Theme
Theme URI: https://zakat-iq.com/blog
Description: Custom theme for Zakat Iraq platform
Author: Zakat Iraq Team
Version: 1.4
*/

@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@300;400;600;700;900&display=swap');

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Alexandria', sans-serif;
    background: #f8fafc;
    color: #0f172a;
    line-height: 1.7;
    direction: rtl;
    text-align: right;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Golden Gradient Background with Animation */
.bg-golden-banner {
    background: linear-gradient(-45deg, #8e6d31, #b8860b, #cc9f3d, #8e6d31);
    background-size: 400% 400%;
    animation: gradientAnim 15s ease infinite;
}

@keyframes gradientAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Header Styles */
.site-header {
    background: linear-gradient(-45deg, #8e6d31, #b8860b, #cc9f3d, #8e6d31);
    background-size: 400% 400%;
    animation: gradientAnim 15s ease infinite;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
	overflow: visible;
}

.site-header .header-container {
    max-width: 1152px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

@media (min-width: 768px) {
    .site-header .header-container {
        flex-direction: row;
    }
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    text-align: right;
}

.logo-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    background: white;
}

.site-title-wrapper {
    text-align: right;
}

.site-title-wrapper h1 {
    font-size: 1.5rem;
    font-weight: 900;
    line-height: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
}

.site-tagline {
    font-size: 0.625rem;
    font-weight: 700;
    opacity: 0.9;
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #f4ecd0;
}

/* Navigation */
.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    font-size: 0.8125rem;
    font-weight: 900;
}

.main-nav a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: all 0.2s;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s;
}

.main-nav a:hover {
    opacity: 1;
}

.main-nav a:hover::after {
    width: 100%;
}

.main-nav a.active {
    border-bottom: 2px solid white;
    font-weight: 900;
}
/* القائمة المنسدلة */
.dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 50%;
    transform: translateX(50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 160px;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #f4ecd0;
    padding-top: 12px;
}
.dropdown-menu::before {
    content: '';
    display: block;
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 12px;
    background: transparent;
}
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 16px !important;
    color: #322413 !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    text-decoration: none !important;
    opacity: 1 !important;
    transition: background 0.2s !important;
    white-space: nowrap !important;
    border-bottom: none !important;
}
.dropdown-menu a:hover {
    background: #fbf8ed !important;
    color: #b8860b !important;
}
.dropdown-menu a::after { display: none !important; }
.dropdown-arrow {
    font-size: 10px;
    opacity: 0.7;
    margin-right: 2px;
}
/* Main Content */
.site-main {
    flex-grow: 1;
    padding: 3rem 0;
    min-height: calc(100vh - 400px);
    display: flex;
    flex-direction: column;
}

.site-main .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Blog Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Post Card */
.post-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

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

.post-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #f1f5f9;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.post-title {
    font-size: 1.125rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.post-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #b8860b;
}

.post-excerpt {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #b8860b;
    text-decoration: none;
    transition: gap 0.2s;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Single Post */
.single-post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f1f5f9;
}

.single-post-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.single-post-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.post-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #334155;
}

.post-content-wrapper h2 {
    font-size: 1.875rem;
    font-weight: 800;
    margin: 2.5rem 0 1rem;
    color: #0f172a;
}

.post-content-wrapper h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: #0f172a;
}

.post-content-wrapper p {
    margin-bottom: 1.5rem;
}

.post-content-wrapper ul,
.post-content-wrapper ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.post-content-wrapper li {
    margin-bottom: 0.75rem;
}

/* Footer */
/* بعد */
.site-footer {
    background: linear-gradient(-45deg, #8e6d31, #b8860b, #cc9f3d, #8e6d31);
    background-size: 400% 400%;
    animation: gradientAnim 15s ease infinite;
    color: white;
    padding: 4rem 0 2rem;
    margin-top: auto;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    width: 100vw;
}

.footer-grid {
    max-width: 1152px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    text-align: right;
}

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

.footer-section {
    text-align: right;
}

.footer-logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
}

.footer-logo-text {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 900;
}

.footer-logo-img {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 50%;
    padding: 0.25rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.footer-description {
    font-size: 0.875rem;
    opacity: 0.9;
    line-height: 1.6;
    text-align: right;
}

.footer-social {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding-top: 0.5rem;
}

.footer-social a {
    color: white;
    transition: color 0.2s;
}

.footer-social a:hover {
    color: #f4ecd0;
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-links-section {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: white;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    text-align: right;
    width: 100%;
}

.footer-columns ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-columns li {
    margin-bottom: 0.75rem;
}

.footer-columns a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 900;
    transition: color 0.2s;
    display: block;
    text-align: right;
}

.footer-columns a:hover {
    color: #f4ecd0;
}

.footer-donate {
    color: #f4ecd0 !important;
}

.footer-newsletter {
    text-align: right;
}

.newsletter-form {
    display: flex;
    gap: 0.5rem;
}

.newsletter-input {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    flex: 1;
    color: white;
    outline: none;
    text-align: right;
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.2);
}

.newsletter-button {
    background: white;
    color: #8e6d31;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 900;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.newsletter-button:hover {
    background: #fbf8ed;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
    line-height: 1.6;
}

.footer-bottom p {
    margin: 0.5rem 0;
}

.footer-org {
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

.footer-org a {
    color: white;
    text-decoration: underline;
    font-weight: 900;
    transition: color 0.2s;
}

.footer-org a:hover {
    color: #f4ecd0;
}

.footer-copyright {
    font-size: 0.625rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1.6;
}

.footer-copyright a {
    color: white;
    font-weight: 900;
}

.footer-copyright a:hover {
    text-decoration: underline;
}
/* Responsive */
@media (max-width: 768px) {
    .main-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        font-size: 0.75rem;
        padding: 0.5rem 0;
    }
}
    .posts-grid {
        grid-template-columns: 1fr;
    }

    .single-post-title {
        font-size: 1.875rem;
    }

    .footer-columns {
        grid-template-columns: 1fr;
    }
}