/*
Theme Name: Afzal - Professional Banking Theme
Theme URI: https://example.com/afzal
Author: Sapiens AI
Author URI: https://sapiens.ai
Description: A professional WordPress theme with full RTL Persian support for institutional, banking, and service websites. Inspired by Bank Melli and Bank Melat.
Version: 1.1.0
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: afzal
Tags: rtl-language-support, custom-logo, custom-menu, featured-images, theme-options, translation-ready, banking, institutional
*/

/* === CSS Variables === */
:root {
    --primary-color: #003366;
    --secondary-color: #001a33;
    --accent-color: #d4af37;
    --accent-light: #e5c14d;
    --button-color: #003366;
    --link-color: #003366;
    --header-color: #001a33;
    --footer-color: #001a33;
    --background-color: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    
    --font-family: "Vazirmatn", "IRANSans", "Tahoma", "Arial", sans-serif;
    --font-heading: "Vazirmatn", "IRANSans", "Tahoma", sans-serif;
    
    --shadow-sm: 0 2px 8px rgba(0,51,102,0.06);
    --shadow-md: 0 4px 20px rgba(0,51,102,0.08);
    --shadow-lg: 0 10px 40px rgba(0,51,102,0.12);
    --shadow-xl: 0 20px 60px rgba(0,51,102,0.15);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Reset & Base === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--background-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary-color);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* === Screen Reader === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* === Layout === */
.site-content {
    min-height: 50vh;
}

.section {
    padding: 5rem 0;
}

.section-light {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header p {
    color: var(--text-light);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    text-align: center;
    border: none;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-light) 100%);
    color: var(--secondary-color);
    box-shadow: 0 4px 20px rgba(212,175,55,0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212,175,55,0.5);
    color: var(--secondary-color);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: #ffffff;
}

/* === Navigation === */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 0.25rem;
}

.main-navigation a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.main-navigation a:hover,
.main-navigation a.active {
    color: var(--accent-color);
    background: rgba(0,51,102,0.05);
}

/* === Articles === */
article {
    margin-bottom: 2rem;
}

.entry-header {
    margin-bottom: 1.5rem;
}

.entry-title {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.entry-title a {
    color: var(--primary-color);
}

.entry-title a:hover {
    color: var(--accent-color);
}

.entry-meta {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.entry-content {
    line-height: 1.8;
}

.entry-content p {
    margin-bottom: 1.25rem;
}

.entry-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.pagination a:hover,
.pagination span.current {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

/* === Forms === */
input, textarea, select {
    font-family: inherit;
    font-size: 1rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: #ffffff;
    color: var(--text-color);
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

/* === Widgets === */
.widget {
    margin-bottom: 2rem;
}

.widget-title,
.widget h2,
.widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
}

.widget a:hover {
    color: var(--accent-color);
}

/* === 404 === */
.error-404 {
    text-align: center;
    padding: 4rem 2rem;
}

.error-404 .page-title {
    font-size: 6rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

/* === Accessibility === */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* === Responsive === */
@media (max-width: 1024px) {
    html { font-size: 15px; }
    .container { padding: 0 1.5rem; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    .section { padding: 3rem 0; }
}

@media (max-width: 480px) {
    html { font-size: 13px; }
    .container { padding: 0 1rem; }
}

/* === Print === */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .hero-slider {
        display: none;
    }
    
    body {
        direction: ltr;
        text-align: left;
    }
}
