/**
 * Artisans Nigeria - Main Stylesheet
 * Version: 2.0.0 (Definitive "Emerald & Gold" Design System)
 */

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0  Global & Variables
2.0  Accessibility & Resets
3.0  General Typography & Links
4.0  Content Elements
5.0  Forms & Buttons
6.0  Site Header & Navigation
    6.1  General Header Styles
    6.2  Desktop Header & Navigation
    6.3  Header Actions & Search
    6.4  Mobile Header & Navigation
    6.5  Sticky Header
7.0  Main Content & Layout
8.0  Blog & Archives
9.0  Comments Section
10.0 Sidebar & Widgets
11.0 Footer
12.0 Directory Plugin Styles
    12.1 Homepage Hero & Search
    12.2 Homepage Content Sections
    12.3 Artisan Card
    12.4 Single Artisan Page
    12.5 Artisan Archive Page
    12.6 Submission Form
13.0 Helper Classes & Animations
14.0 Responsive Design
--------------------------------------------------------------*/

/*--------------------------------------------------------------
1.0  Global & Variables
--------------------------------------------------------------*/
:root {
    --color-primary-green: #007A3D;
    --color-primary-green-dark: #006400;
    --color-accent-gold: #FFD700;
    --color-accent-gold-dark: #DAA520;
    
    --color-text-dark: #111111; /* Charcoal */
    --color-text-medium: #374151;
    --color-text-light: #6b7280;
    --color-text-inverse: #ffffff;
    --color-background-white: #ffffff;
    --color-background-light: #f9fafb;
    --color-background-dark: #111111; /* Charcoal for dark sections */
    --color-border: #e5e7eb;
    --color-footer-bg: var(--color-background-dark);
    --color-footer-text: rgba(255, 255, 255, 0.7);

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

/*--------------------------------------------------------------
2.0  Accessibility & Resets
--------------------------------------------------------------*/
html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    line-height: 1.7;
    color: var(--color-text-medium);
    background-color: var(--color-background-white);
    font-size: 1rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/*--------------------------------------------------------------
3.0  General Typography & Links
--------------------------------------------------------------*/
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-dark);
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
}
h1 { font-size: 3rem; font-weight: 800; }
h2 { font-size: 2.5rem; font-weight: 800; }
h3 { font-size: 2rem; font-weight: 700; }
h4 { font-size: 1.5rem; font-weight: 700; }
h5 { font-size: 1.25rem; font-weight: 600; }
h6 { font-size: 1rem; font-weight: 600; }

p {
    margin: 0 0 1.5rem 0;
}
p:last-child {
    margin-bottom: 0;
}

a {
    color: var(--color-primary-green);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--color-primary-green-dark);
}

strong {
    font-weight: 600;
    color: var(--color-text-dark);
}

/*--------------------------------------------------------------
4.0  Content Elements
--------------------------------------------------------------*/
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-radius: 8px;
}

blockquote {
    border-left: 4px solid var(--color-accent-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--color-text-dark);
}

hr.golden-divider {
    border: 0;
    height: 2px;
    background-image: linear-gradient(to right, rgba(255, 215, 0, 0), var(--color-accent-gold), rgba(255, 215, 0, 0));
    margin: 3rem 0;
}

/*--------------------------------------------------------------
5.0  Forms & Buttons
--------------------------------------------------------------*/
input[type="text"],
input[type="email"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    color: var(--color-text-dark);
    background-color: var(--color-background-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary-green);
    box-shadow: 0 0 0 3px rgba(0, 122, 61, 0.2);
}

button,
input[type="submit"],
.button {
    display: inline-block;
    background: linear-gradient(to right, var(--color-accent-gold), var(--color-accent-gold-dark));
    color: var(--color-text-dark);
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

button:hover,
input[type="submit"]:hover,
.button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-text-dark);
}
.button.primary {
    background: linear-gradient(to right, var(--color-primary-green), var(--color-primary-green-dark));
    color: var(--color-text-inverse);
}
.button.primary:hover {
     color: var(--color-text-inverse);
}


/*--------------------------------------------------------------
6.0  Site Header & Navigation
--------------------------------------------------------------*/
.site-header {
    background: linear-gradient(135deg, var(--color-primary-green), var(--color-primary-green-dark));
    padding: 1rem 0;
    border-bottom: 2px solid var(--color-accent-gold);
    z-index: 1000;
    transition: padding 0.3s ease, box-shadow 0.3s ease;
}

body.sticky-header-enabled .site-header {
    position: sticky;
    top: 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-branding .site-title a {
    color: var(--color-text-inverse);
    font-size: 1.5rem;
    font-weight: 800;
    text-decoration: none;
}

.main-navigation ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-navigation ul a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: block;
}

.main-navigation ul a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-text-inverse);
    background-color: rgba(255, 255, 255, 0.1);
}

.main-navigation ul li.add-artisan-button a {
    background: linear-gradient(to right, var(--color-accent-gold), var(--color-accent-gold-dark));
    color: var(--color-text-dark);
    padding: 10px 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.main-navigation ul li.add-artisan-button a:hover {
    color: var(--color-text-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background-color: transparent; /* Override hover effect for normal links */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-search {
    position: relative;
}
.header-search .search-toggle {
    background: none;
    border: none;
    color: var(--color-text-inverse);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search .search-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.header-search .search-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

.search-modal {
    display: flex;
    align-items: flex-start; /* Changed from center to flex-start */
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Darker overlay */
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding-top: 100px; /* Add some top padding */
}

body.search-modal-active .search-modal {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    background: var(--color-background-white);
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    transform: translateY(-20px);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    box-shadow: var(--shadow-lg);
}

body.search-modal-active .search-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.search-modal .search-form {
    display: flex;
    gap: 0; /* Remove gap since we're using border-radius carefully */
}

.search-modal .search-field {
    font-size: 1.25rem;
    padding: 1rem 1.5rem;
    border: 2px solid var(--color-primary-green);
    border-right: none;
    border-radius: 8px 0 0 8px;
    flex: 1;
}

.search-modal .search-submit {
    border-radius: 0 8px 8px 0;
    padding: 1rem 2rem;
    border: 2px solid var(--color-primary-green);
    border-left: none;
    background: linear-gradient(to right, var(--color-primary-green), var(--color-primary-green-dark));
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-modal .search-submit:hover {
    background: linear-gradient(to right, var(--color-primary-green-dark), var(--color-primary-green));
    transform: none; /* Override the general button hover */
    box-shadow: none; /* Override the general button hover */
}

.search-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: var(--color-text-inverse);
    background: none;
    border: none;
    cursor: pointer;
    line-height: 1;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.search-modal-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    color: var(--color-text-inverse);
    width: 28px;
    height: 24px;
}

.menu-icon-equals {
    display: block;
    width: 28px;
    height: 3px;
    background: currentColor;
    position: relative;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), background-color 0.3s;
}
.menu-icon-equals::before,
.menu-icon-equals::after {
    content: '';
    display: block;
    width: 28px;
    height: 3px;
    background: currentColor;
    position: absolute;
    left: 0;
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.menu-icon-equals::before {
    top: -8px;
}
.menu-icon-equals::after {
    bottom: -8px;
}

.menu-toggle.is-active .menu-icon-equals {
    background: transparent;
}
.menu-toggle.is-active .menu-icon-equals::before {
    transform: rotate(45deg) translate(5px, 6px);
}
.menu-toggle.is-active .menu-icon-equals::after {
    transform: rotate(-45deg) translate(5px, -6px);
}
.menu-toggle.is-active {
    color: var(--color-primary-green);
}

body.mobile-menu-active {
    overflow: hidden;
}

/*--------------------------------------------------------------
7.0  Main Content & Layout
--------------------------------------------------------------*/
.content-sidebar-wrap {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
    padding: 4rem 0;
}

.content-area {
    flex: 1;
    min-width: 0;
}

.widget-area {
    width: 300px;
    flex-shrink: 0;
}

/*--------------------------------------------------------------
8.0  Blog, Archives, Posts, & Pages
--------------------------------------------------------------*/
.post, .page {
    margin-bottom: 3rem;
}

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

.entry-title {
    font-size: 2.25rem;
    margin: 0 0 1rem;
}
.single .entry-title, .page .entry-title {
    font-size: 2.75rem;
}

.entry-meta {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.post-thumbnail {
    margin-bottom: 2rem;
}

.read-more {
    font-weight: 600;
}

.posts-navigation {
    margin-top: 3rem;
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

/*--------------------------------------------------------------
9.0  Sidebar & Widgets
--------------------------------------------------------------*/
.widget {
    background-color: var(--color-background-white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border: 1px solid var(--color-border);
}

.widget-title {
    font-size: 1.25rem;
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

/*--------------------------------------------------------------
10.0 Footer
--------------------------------------------------------------*/
.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding-top: 4rem;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-widgets .widget {
    background: none; border: none; padding: 0;
}
.footer-widgets .widget-title {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.2);
}

.footer-navigation ul {
    list-style: none;
    margin: 0;
    padding: 1.5rem 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-navigation a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

.footer-credits-wrapper {
    background-color: rgba(0,0,0,0.2);
}
.footer-credits {
    text-align: center;
    padding: 1.5rem 0;
    font-size: 0.9rem;
}
.footer-credits p {
    margin: 0;
}

/*--------------------------------------------------------------
11.0 Directory Plugin Styles
--------------------------------------------------------------*/
.directory-hero {
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), linear-gradient(135deg, var(--color-primary-green), var(--color-primary-green-dark));
    padding: 6rem 0;
    text-align: center;
}

.directory-hero .hero-title {
    color: var(--color-text-inverse);
}
.directory-hero .hero-title .highlight {
    color: var(--color-accent-gold);
}
.directory-hero .hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.artisan-search-form {
    display: grid;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
}

.full-width-widget-area:not(:empty) {
    padding: 4rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

/*--------------------------------------------------------------
12.0 Responsive Design
--------------------------------------------------------------*/
@media (max-width: 992px) {
    .content-sidebar-wrap {
        flex-direction: column;
    }
    .widget-area {
        width: 100%;
        margin-top: 2rem;
        position: static;
    }
    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .main-navigation {
        display: block;
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100%;
        background-color: var(--color-background-white);
        z-index: 1001;
        padding: 6rem 1.5rem 2rem;
        overflow-y: auto;
        box-shadow: var(--shadow-lg);
        transition: left 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    }
    .main-navigation.is-active {
        left: 0;
    }
    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }
    .main-navigation ul li {
        width: 100%;
    }
    .main-navigation ul a {
        color: var(--color-text-medium);
        padding: 1rem;
        border-bottom: 1px solid var(--color-border);
        width: 100%;
        border-radius: 0;
        font-size: 1.1rem;
    }
    .main-navigation ul a:hover {
        color: var(--color-text-dark);
        background-color: var(--color-background-light);
    }
    .main-navigation .current-menu-item > a {
        color: var(--color-text-inverse);
        background-color: var(--color-primary-green);
    }
     .main-navigation ul li.add-artisan-button {
        margin-top: 1rem;
     }
    .main-navigation ul li.add-artisan-button a {
        text-align: center;
        color: var(--color-text-dark);
    }

    /* Mobile search modal improvements */
    /* ULTRA COMPACT VERSION */
.search-modal-content {
    background: var(--color-background-white);
    border-radius: 12px;
    width: 95%;
    max-width: 450px;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.search-modal .search-field {
    padding: 14px 18px;
    min-height: 54px;
    font-size: 1rem;
}

.search-modal .search-submit {
    padding: 14px 20px;
    min-height: 54px;
    min-width: 70px;
}

.search-modal {
    padding-top: 100px;
}