/*!
Theme Name: Iranpeida
Theme URI:
Author: Masoud
Author URI:
Description: قالب اختصاصی ایران‌پیدا.
Version: 1.0.0
License: GNU General Public License v3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: iranpeida
*/
/* =========================================
   Global Font: iran
========================================= */
@font-face {
    font-family: 'iran';
    src: url('/wp-content/uploads/2024/10/IRANSansWebFaNum.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'iran';
    src: url('/wp-content/uploads/2024/10/IRANSansWebFaNum_Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-bg: #f4f8f8;
    --color-surface: #ffffff;
    --color-surface-alt: #eef4f4;
    --color-text: #1f2a37;
    --color-muted: #5b6b7a;
    --color-border: #d8e4e4;
    --color-primary: #0e8385;
    --color-primary-contrast: #ffffff;
}

html[data-theme='dark'] {
    --color-bg: #0f1518;
    --color-surface: #162126;
    --color-surface-alt: #1d2b31;
    --color-text: #e6eef3;
    --color-muted: #afc0cc;
    --color-border: #2b3c45;
    --color-primary: #2ab2b4;
    --color-primary-contrast: #0f1518;
}

body, h1, h2, h3, h4, h5, h6, p, a, span, div, li, input, button, textarea, select {
    font-family: 'iran', Tahoma, Arial, sans-serif !important;
}

/* Sticky footer layout: keep footer at page bottom when content is short. */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--color-bg);
    color: var(--color-text);
    transition: background-color 0.25s ease, color 0.25s ease;
}

input,
textarea,
select {
    color: var(--color-text);
}

.site-content {
    flex: 1 0 auto;
    display: block;
}

a {
    color: var(--color-primary);
}

/* Shared SVG behavior so inline icons follow currentColor in light/dark mode. */
.term-icon-svg,
.subcat-icon,
.home-category-icon svg {
    color: currentColor;
}

.term-icon-svg [fill]:not([fill="none"]),
.subcat-icon [fill]:not([fill="none"]),
.home-category-icon svg [fill]:not([fill="none"]) {
    fill: currentColor;
}

.term-icon-svg [stroke]:not([stroke="none"]),
.subcat-icon [stroke]:not([stroke="none"]),
.home-category-icon svg [stroke]:not([stroke="none"]) {
    stroke: currentColor;
}

/* Dark mode coverage for taxonomy/category/city/combo listing pages. */
html[data-theme='dark'] .custom-tax-container .tax-title,
html[data-theme='dark'] .custom-tax-container .section-title,
html[data-theme='dark'] .custom-tax-container .ad-title,
html[data-theme='dark'] .custom-tax-container .sidebar-title,
html[data-theme='dark'] .custom-tax-container .combo-related-title {
    color: var(--color-text);
}

html[data-theme='dark'] .custom-tax-container .tax-breadcrumb,
html[data-theme='dark'] .custom-tax-container .tax-description-box p,
html[data-theme='dark'] .custom-tax-container .no-ads-msg,
html[data-theme='dark'] .custom-tax-container .locations-list li a,
html[data-theme='dark'] .custom-tax-container .combo-description {
    color: var(--color-muted);
}

html[data-theme='dark'] .custom-tax-container .tax-description-box,
html[data-theme='dark'] .custom-tax-container .tax-locations-box,
html[data-theme='dark'] .custom-tax-container .subcat-item,
html[data-theme='dark'] .custom-tax-container .ad-card,
html[data-theme='dark'] .custom-tax-container .combo-hero,
html[data-theme='dark'] .custom-tax-container .combo-description,
html[data-theme='dark'] .custom-tax-container .combo-related-box {
    background: var(--color-surface);
    border-color: var(--color-border);
}

html[data-theme='dark'] .custom-tax-container .combo-hero {
    background-image: linear-gradient(135deg, #172227 0%, #162126 50%, #1a2830 100%);
}

html[data-theme='dark'] .custom-tax-container .combo-stat-pill,
html[data-theme='dark'] .custom-tax-container .combo-chip {
    background: #1b2a31;
    border-color: #2d444f;
    color: #9fdde0;
}

html[data-theme='dark'] .custom-tax-container .combo-chip:hover {
    background: #21333b;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

html[data-theme='dark'] .custom-tax-container .subcat-item {
    color: var(--color-text);
}

html[data-theme='dark'] .custom-tax-container .subcat-icon {
    color: var(--color-primary);
}

html[data-theme='dark'] .custom-tax-container .location-search,
html[data-theme='dark'] .custom-tax-container .subcat-search-input {
    background: var(--color-surface-alt);
    border-color: var(--color-border);
    color: var(--color-text);
}

html[data-theme='dark'] .custom-tax-container .locations-list li a {
    border-bottom-color: #22323b;
}

html[data-theme='dark'] .custom-tax-container .locations-list li a:hover {
    background: #1c2a31;
    color: var(--color-primary);
}

html[data-theme='dark'] .custom-tax-container .ad-thumbnail .no-thumbnail {
    background: linear-gradient(145deg, #1b2a31 0%, #23363f 100%);
    color: #afc0cc;
}

html[data-theme='dark'] .custom-tax-container .tax-pagination a,
html[data-theme='dark'] .custom-tax-container .tax-pagination .page-numbers {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-muted);
}

html[data-theme='dark'] .custom-tax-container .tax-pagination a:hover,
html[data-theme='dark'] .custom-tax-container .tax-pagination a.page-numbers:hover {
    background: #1c2a31;
    border-color: var(--color-primary);
    color: var(--color-primary);
}

html[data-theme='dark'] .custom-tax-container .tax-pagination span.current,
html[data-theme='dark'] .custom-tax-container .tax-pagination .page-numbers.current {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-primary-contrast);
}

/* Dark mode coverage for single post/ad pages. */
html[data-theme='dark'] .iranpeida-single-ad-wrapper,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .content-inner,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .ad-title,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .ad-box h3 {
    color: var(--color-text);
}

html[data-theme='dark'] .iranpeida-single-ad-wrapper .ad-top-bar,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .ad-box {
    background: var(--color-surface);
    border-color: var(--color-border);
}

html[data-theme='dark'] .iranpeida-single-ad-wrapper .details-list li,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .routing-links,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .ad-footer-actions,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .ad-box h3 {
    border-color: #273741;
}

html[data-theme='dark'] .iranpeida-single-ad-wrapper .details-list strong,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .routing-links strong {
    color: var(--color-muted);
}

html[data-theme='dark'] .iranpeida-single-ad-wrapper .btn-action {
    background: var(--color-surface-alt);
    border-color: #35515f;
    color: var(--color-text);
}

html[data-theme='dark'] .iranpeida-single-ad-wrapper .btn-action:hover,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .btn-social:hover,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .btn-route:hover {
    background: #1d2b32;
}

html[data-theme='dark'] .iranpeida-single-ad-wrapper .btn-social,
html[data-theme='dark'] .iranpeida-single-ad-wrapper .btn-route {
    color: var(--color-muted) !important;
    border-color: var(--color-border);
}

body .container,
body .footer-container,
body .account-page-container,
body .iranpeida-single-ad-wrapper,
body .custom-tax-container,
body .single-container,
body .latest-wrapper,
body .home-container,
body main.site-main.container,
body main.site-main {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

body.ips-restaurant-menu-standalone,
body.ips-restaurant-menu-standalone #page,
body.ips-restaurant-menu-standalone #content,
body.ips-restaurant-menu-standalone main,
body.ips-restaurant-menu-standalone .site-main {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
}
