/*
Theme Name: M.A Foundation Theme
Theme URI: https://momtazahsanfoundation.site/
Author: M.A Foundation Dev Team
Author URI: https://momtazahsanfoundation.site/
Description: Official WordPress theme for M.A Foundation & Research Center For Rural People's Development.
Version: 1.0.2
Requires PHP: 7.4
License: GPL v2 or later
Text Domain: ma-theme
*/

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
}

body {
    margin: 0;
    color: #1f2937;
    background-color: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
    line-height: inherit;
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: inherit;
}

p {
    margin: 0;
}

ul, ol {
    list-style: none;
    padding: 0;
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* ============================================
   LAYOUT: FLEXBOX
   ============================================ */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

.gap-10 {
    gap: 2.5rem;
}

/* ============================================
   LAYOUT: GRID
   ============================================ */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ============================================
   DISPLAY
   ============================================ */
.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline-flex {
    display: inline-flex;
}

.hidden {
    display: none;
}

/* ============================================
   POSITION
   ============================================ */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-10 {
    z-index: 10;
}

.z-50 {
    z-index: 50;
}

/* ============================================
   SPACING: PADDING
   ============================================ */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }

.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pt-16 { padding-top: 4rem; }

.pb-8 { padding-bottom: 2rem; }

/* ============================================
   SPACING: MARGIN
   ============================================ */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }

.ml-2 { margin-left: 0.5rem; }

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   SIZE: WIDTH & HEIGHT
   ============================================ */
.w-full { width: 100%; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-16 { width: 4rem; }
.w-32 { width: 8rem; }

.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.h-48 { height: 12rem; }
.h-96 { height: 24rem; }

.max-w-xl { max-width: 36rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-none { max-width: none; }

/* ============================================
   TYPOGRAPHY
   ============================================ */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.font-extrabold {
    font-weight: 800;
}

.text-center {
    text-align: center;
}

.leading-tight {
    line-height: 1.25;
}

.leading-relaxed {
    line-height: 1.625;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.no-underline {
    text-decoration: none;
}

/* ============================================
   COLORS: TEXT
   ============================================ */
.text-white { color: #ffffff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-900 { color: #111827; }
.text-red-500 { color: #ef4444; }
.text-green-800 { color: #166534; }
.text-primary { color: #059669; }

/* ============================================
   COLORS: BACKGROUND
   ============================================ */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-900 { background-color: #111827; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-red-50 { background-color: #fef2f2; }
.bg-primary { background-color: #059669; }
.bg-primary-dark { background-color: #047857; }
.bg-secondary { background-color: #2563eb; }

/* ============================================
   COLORS: BORDER
   ============================================ */
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-800 { border-color: #1f2937; }
.border-green-300 { border-color: #86efac; }
.border-red-300 { border-color: #fca5a5; }
.border-primary { border-color: #059669; }

/* ============================================
   BORDERS
   ============================================ */
.border { border-width: 1px; border-style: solid; }
.border-2 { border-width: 2px; border-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* ============================================
   SHADOWS
   ============================================ */
.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* ============================================
   EFFECTS & TRANSITIONS
   ============================================ */
.transition-all {
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-colors {
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
}

.overflow-hidden {
    overflow: hidden;
}

.object-cover {
    object-fit: cover;
}

.opacity-10 {
    opacity: 0.1;
}

/* ============================================
   GRADIENTS
   ============================================ */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, #059669, #047857);
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, #059669, #047857);
}

/* ============================================
   BACKDROP BLUR
   ============================================ */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.bg-white-95 {
    background-color: rgba(255, 255, 255, 0.95);
}

/* ============================================
   HOVER STATES
   ============================================ */
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-primary:hover { color: #059669; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-primary-dark:hover { background-color: #047857; }
.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}
.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}
.hover\:scale-105:hover {
    transform: scale(1.05);
}
.hover\:underline:hover {
    text-decoration: underline;
}
.hover\:border-primary:hover {
    border-color: #059669;
}

/* ============================================
   LINE CLAMP
   ============================================ */
.line-clamp-2 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

/* ============================================
   FOCUS STATES
   ============================================ */
.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px #059669;
}

.focus\:ring-4:focus {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.4);
}

/* ============================================
   DISABLED STATES
   ============================================ */
.disabled\:opacity-50:disabled {
    opacity: 0.5;
}

.disabled\:cursor-not-allowed:disabled {
    cursor: not-allowed;
}

/* ============================================
   ANIMATION
   ============================================ */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* ============================================
   RESPONSIVE: MOBILE FIRST
   ============================================ */
@media (min-width: 640px) {
    .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm\:flex-row { flex-direction: row; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
    .md\:flex { display: flex; }
    .md\:hidden { display: none; }
    .md\:py-32 { padding-top: 8rem; padding-bottom: 8rem; }
    .md\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:flex { display: flex; }
    .lg\:hidden { display: none; }
    .lg\:h-20 { height: 5rem; }
}

/* ============================================
   COMPONENT: BUTTON DONATE
   ============================================ */
.btn-donate {
    display: inline-block;
    padding: 0.625rem 1.5rem;
    background-color: #059669;
    color: #ffffff;
    font-weight: 700;
    border-radius: 0.5rem;
    transition: all 0.2s;
    box-shadow: 0 10px 15px -3px rgba(5, 150, 105, 0.25);
    cursor: pointer;
    border: none;
}

.btn-donate:hover {
    background-color: #047857;
    transform: translateY(-1px);
}

/* ============================================
   COMPONENT: FORM INPUTS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="date"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    background-color: #ffffff;
    transition: all 0.15s;
    outline: none;
    font-size: 1rem;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

/* ============================================
   COMPONENT: NAVIGATION MENU
   ============================================ */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.25rem;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #4b5563;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.15s;
}

.main-navigation a:hover {
    color: #059669;
    background-color: rgba(5, 150, 105, 0.05);
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Pagination */
.nav-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
}

.page-numbers {
    padding: 0.5rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    text-decoration: none;
}

.page-numbers.current {
    background-color: #059669;
    color: #ffffff;
    border-color: #059669;
}

/* Entry content */
.entry-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.entry-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.entry-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.entry-content a {
    color: #059669;
    text-decoration: underline;
}

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

/* ============================================
   MOBILE RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 640px) {
    .text-3xl { font-size: 1.5rem; }
    .text-4xl { font-size: 1.875rem; }
    h1.text-4xl { font-size: 2rem; }
    .py-20 { padding-top: 3rem; padding-bottom: 3rem; }
    .p-8 { padding: 1.5rem; }
    
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr));
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .no-print { display: none; }
    body { background: white; color: black; }
}
