﻿/**
 * Theme Name: Mahzar
 * Theme URI: https://example.com/mahzar
 * Author: Sapiens AI
 * Author URI: https://sapiens.ai
 * Description: RTL, Persian theme for marriage registration office. Beautiful Islamic geometric design with elegant emerald and gold palette.
 * Version: 2.0.0
 * Text Domain: mahzar
 * Tags: rtl, persian, islamic, one-column, appointment, mahzar
 * Requires at least: 6.0
 * Requires PHP: 7.0
 */

/* ===== CSS RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { direction: rtl; font-size: 16px; scroll-behavior: smooth; }
body {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
    background: var(--mahzar-cream);
    color: var(--mahzar-text);
    line-height: 1.8;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--mahzar-emerald); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--mahzar-emerald-dark); }
ul { list-style: none; }

/* ===== CSS VARIABLES ===== */
:root {
    --mahzar-emerald: #0d7c66;
    --mahzar-emerald-dark: #065f46;
    --mahzar-emerald-deeper: #044d38;
    --mahzar-gold: #c9a84c;
    --mahzar-gold-light: #f4e4a6;
    --mahzar-gold-dark: #a07c2a;
    --mahzar-cream: #faf8f0;
    --mahzar-warm-white: #fefcf6;
    --mahzar-text: #1a2e23;
    --mahzar-text-light: #4a6b5a;
    --mahzar-border: #d4c5a0;
    --mahzar-danger: #c0392b;
    --mahzar-success: #27ae60;
    --mahzar-warning: #f39c12;
    --mahzar-radius: 12px;
    --mahzar-shadow: 0 4px 24px rgba(6,95,70,0.10);
    --mahzar-shadow-lg: 0 8px 40px rgba(6,95,70,0.15);
    --mahzar-gold-shadow: 0 4px 20px rgba(201,168,76,0.25);

/* ===== ISLAMIC GEOMETRIC PATTERN SVG BACKGROUND ===== */
.mahzar-pattern-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c9a84c' fill-opacity='0.07'%3E%3Cpath d='M40 0l40 40-40 40L0 40z'/%3E%3C/g%3E%3Cg fill='%230d7c66' fill-opacity='0.05'%3E%3Cpath d='M40 10l30 30-30 30-30-30z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
    pointer-events: none;
}

/* ===== HEADER ===== */
.site-header {
    background: linear-gradient(160deg, var(--mahzar-emerald-deeper) 0%, var(--mahzar-emerald-dark) 40%, var(--mahzar-emerald) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(4,77,56,0.3);
}
.site-header::before {
    content: '"'"''"'"';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.5' opacity='0.15'%3E%3Cpath d='M60 0L120 60L60 120L0 60z'/%3E%3Cpath d='M60 15L105 60L60 105L15 60z'/%3E%3Cpath d='M60 30L90 60L60 90L30 60z'/%3E%3Ccircle cx='60' cy='60' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    animation: mahzarPatternShift 30s linear infinite;
}
@keyframes mahzarPatternShift {
    0% { background-position: 0 0; }
    100% { background-position: 120px 120px; }
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}
.site-branding { display: flex; align-items: center; gap: 1rem; }
.mahzar-logo-icon { width: 56px; height: 56px; flex-shrink: 0; }
.site-title { font-size: 1.4rem; font-weight: 700; color: white; line-height: 1.3; }
.site-title a { color: white; }
.site-title a:hover { color: var(--mahzar-gold-light); }
.site-description { color: var(--mahzar-gold-light); font-size: 0.8rem; font-weight: 400; }
.main-nav ul { display: flex; gap: 0.25rem; }
.main-nav a {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
}
.main-nav a::after {
    content: '"'"''"'"';
    position: absolute;
    bottom: 2px;
    right: 0.5rem;
    width: calc(100% - 1rem);
    height: 2px;
    background: var(--mahzar-gold);
    transform: scaleX(0);
    transition: transform 0.3s;
    border-radius: 2px;
}
.main-nav a:hover { color: white; background: rgba(255,255,255,0.1); }
.main-nav a:hover::after { transform: scaleX(1); }

/* ===== HERO SECTION ===== */
.mahzar-hero {
    background: linear-gradient(160deg, var(--mahzar-emerald-deeper) 0%, var(--mahzar-emerald-dark) 60%, var(--mahzar-emerald) 100%);
    position: relative;
    overflow: hidden;
    padding: 5rem 2rem 4rem;
    text-align: center;
}
.mahzar-hero::before {
    content: '"'"''"'"';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='160' height='160' viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.4' opacity='0.12'%3E%3Cpath d='M80 0L160 80L80 160L0 80z'/%3E%3Cpath d='M80 20L140 80L80 140L20 80z'/%3E%3Cpath d='M80 40L120 80L80 120L40 80z'/%3E%3Cpath d='M80 60L100 80L80 100L60 80z'/%3E%3Ccircle cx='80' cy='80' r='30'/%3E%3Ccircle cx='80' cy='80' r='50'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 160px 160px;
    animation: mahzarPatternShift 40s linear infinite;
}
.mahzar-hero::after {
    content: '"'"''"'"';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--mahzar-cream), transparent);
}
.hero-ornament-top { position: relative; z-index: 1; margin-bottom: 1.5rem; }
.hero-ornament-top svg { opacity: 0.6; }
.mahzar-hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.mahzar-hero-title { font-size: 2.8rem; font-weight: 700; color: white; margin-bottom: 0.5rem; text-shadow: 0 2px 20px rgba(0,0,0,0.2); }
.mahzar-hero-subtitle { font-size: 1.3rem; color: var(--mahzar-gold-light); margin-bottom: 0.75rem; font-weight: 500; }
.mahzar-hero-desc { font-size: 1.05rem; color: rgba(255,255,255,0.8); margin-bottom: 2.5rem; line-height: 1.9; }
.mahzar-hero-cta-group { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.mahzar-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    font-family: inherit;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}
.mahzar-btn-primary {
    background: linear-gradient(135deg, var(--mahzar-gold) 0%, var(--mahzar-gold-dark) 100%);
    color: var(--mahzar-emerald-deeper);
    box-shadow: var(--mahzar-gold-shadow);
}
.mahzar-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(201,168,76,0.4); color: var(--mahzar-emerald-deeper); }
.mahzar-btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.5); }
.mahzar-btn-outline:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }

/* ===== FEATURES SECTION ===== */
.mahzar-features { padding: 4rem 2rem; max-width: 1200px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 3rem; }
.section-title h2 { font-size: 2rem; font-weight: 700; color: var(--mahzar-emerald-dark); margin-bottom: 0.5rem; }
.section-title .section-ornament { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 0.75rem; }
.section-ornament-line { width: 60px; height: 2px; background: linear-gradient(to right, transparent, var(--mahzar-gold), transparent); }
.section-ornament-diamond { width: 10px; height: 10px; background: var(--mahzar-gold); transform: rotate(45deg); flex-shrink: 0; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.feature-card {
    background: white;
    border-radius: var(--mahzar-radius);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--mahzar-shadow);
    transition: all 0.3s;
    border: 1px solid var(--mahzar-border);
    position: relative;
    overflow: hidden;
}
.feature-card::before {
    content: '"'"''"'"';
    position: absolute;
    top: 0; right: 0; left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--mahzar-emerald), var(--mahzar-gold), var(--mahzar-emerald));
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--mahzar-shadow-lg); }
.feature-icon {
    width: 72px; height: 72px;
    margin: 0 auto 1.25rem;
    background: linear-gradient(135deg, rgba(13,124,102,0.1) 0%, rgba(201,168,76,0.1) 100%);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 36px; height: 36px; }
.feature-card h3 { font-size: 1.2rem; font-weight: 600; color: var(--mahzar-emerald-dark); margin-bottom: 0.75rem; }
.feature-card p { font-size: 0.95rem; color: var(--mahzar-text-light); line-height: 1.8; }

/* ===== CTA SECTION ===== */
.mahzar-cta-section {
    background: linear-gradient(160deg, var(--mahzar-emerald-deeper) 0%, var(--mahzar-emerald-dark) 100%);
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mahzar-cta-section::before {
    content: '"'"''"'"';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.3' opacity='0.1'%3E%3Cpath d='M50 0L100 50L50 100L0 50z'/%3E%3Cpath d='M50 15L85 50L50 85L15 50z'/%3E%3Ccircle cx='50' cy='50' r='20'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 100px 100px;
}
.mahzar-cta-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.mahzar-cta-content h2 { font-size: 2rem; color: white; margin-bottom: 1rem; }
.mahzar-cta-content p { color: rgba(255,255,255,0.85); margin-bottom: 2rem; font-size: 1.1rem; }

/* ===== CONTENT AREA ===== */
.content-area {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    align-items: flex-start;
}
.site-main { flex: 1; min-width: 0; }
.widget-area { width: 280px; flex-shrink: 0; }

/* ===== ENTRY ===== */
.entry-header { margin-bottom: 1.5rem; }
.entry-title { font-size: 1.75rem; color: var(--mahzar-emerald-dark); margin-bottom: 0.5rem; }
.entry-content { line-height: 2; font-size: 1.05rem; }
.page-header { margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 2px solid var(--mahzar-border); }
.page-title { font-size: 1.75rem; color: var(--mahzar-emerald-dark); }
.no-results { text-align: center; padding: 3rem 1rem; }
.no-results p { margin-bottom: 1rem; color: var(--mahzar-text-light); }

/* ===== FOOTER ===== */
.site-footer {
    background: linear-gradient(160deg, var(--mahzar-emerald-deeper) 0%, var(--mahzar-emerald-dark) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}
.site-footer::before {
    content: '"'"''"'"';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23c9a84c' stroke-width='0.3' opacity='0.08'%3E%3Cpath d='M40 0l40 40-40 40L0 40z'/%3E%3Ccircle cx='40' cy='40' r='15'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 80px 80px;
}
.footer-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}
.footer-col h4 { color: var(--mahzar-gold-light); font-size: 1.1rem; font-weight: 600; margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid rgba(201,168,76,0.3); }
.footer-col p, .footer-col li { color: rgba(255,255,255,0.8); font-size: 0.9rem; line-height: 2; }
.footer-col a { color: rgba(255,255,255,0.8); transition: color 0.3s; }
.footer-col a:hover { color: var(--mahzar-gold-light); }
.footer-col ul li { padding-right: 1rem; position: relative; }
.footer-col ul li::before { content: '"'"'◆'"'"'; position: absolute; right: 0; color: var(--mahzar-gold); font-size: 0.5rem; top: 0.6rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 1.5rem 2rem; text-align: center; position: relative; z-index: 1; }
.footer-bottom p { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-bottom a { color: var(--mahzar-gold-light); }

/* ===== WIDGETS ===== */
.widget { background: white; border-radius: var(--mahzar-radius); padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--mahzar-shadow); border: 1px solid var(--mahzar-border); }
.widget-title { font-size: 1.1rem; color: var(--mahzar-emerald-dark); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--mahzar-gold); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .content-area { flex-direction: column; }
    .widget-area { width: 100%; }
}
@media (max-width: 768px) {
    .header-inner { flex-direction: column; gap: 0.75rem; text-align: center; }
    .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 0.25rem; }
    .main-nav a { padding: 0.4rem 0.75rem; font-size: 0.9rem; }
    .mahzar-hero { padding: 3rem 1.5rem; }
    .mahzar-hero-title { font-size: 1.8rem; }
    .mahzar-hero-subtitle { font-size: 1.1rem; }
    .mahzar-hero-cta-group { flex-direction: column; align-items: center; }
    .mahzar-btn { width: 100%; max-width: 280px; justify-content: center; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
}
