/*
Theme Name: Astra Child - Coach Directory
Theme URI: https://directory.adhdcoaches.org
Description: Child theme for Astra with custom coach directory styling
Author: Your Name
Author URI: https://directory.adhdcoaches.org
Template: astra
Version: 1.0.9
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
*/
/* ==========================================================================
   Base Styles & CSS Variables
   ========================================================================== */
:root {
    /* Color Palette */
    --color-primary: #a82d2d;
    --color-primary-dark: #8b1f1f;
    --color-primary-light: #c74343;
    --color-accent: #d4a574;
    --color-background: #f5f5f5;
    --color-white: #ffffff;
    --color-text: #2c2c2c;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    /* Typography */
    --font-primary: 'Playfair Display', Georgia, serif;
    --font-secondary: 'Lato', 'Helvetica Neue', Arial, sans-serif;
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    /* Breakpoints */
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;
    /* Borders & Shadows */
    --border-radius: 4px;
    --box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}
/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Lato:wght@300;400;700&display=swap');
/* ==========================================================================
   Astra Theme Overrides for Directory Pages
   ========================================================================== */
body.single-directory .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body.single-directory #primary {
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
}
body.single-directory .hentry,
body.single-directory .ast-article-single {
    margin: 0 !important;
    padding: 0 !important;
}
/* ==========================================================================
   Directory Header - White H1 (only on single directory pages)
   ========================================================================== */
body.single-directory .directory-header h1,
body.single-directory .directory-header .directory-title {
    color: #ffffff !important;
}
/* ==========================================================================
   Directory Header Section
   ========================================================================== */
.directory-single-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: #ffffff;
}
.directory-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}
.directory-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}
.directory-header-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}
.directory-title {
    font-family: var(--font-primary);
    font-size: 3rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}
.directory-actions {
    display: flex;
    gap: var(--spacing-sm);
}
.btn-new-search {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-family: var(--font-secondary);
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.btn-new-search:hover {
    background: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
/* ==========================================================================
   Navigation Section
   ========================================================================== */
.directory-navigation {
    max-width: 1200px;
    margin: 0 auto !important;
    padding: var(--spacing-md) 20px;
    width: 100%;
    box-sizing: border-box;
}
.return-link,
.return-search-btn {
    color: var(--color-primary);
    text-decoration: none;
    font-family: var(--font-secondary);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
    cursor: pointer;
}
.return-link:hover,
.return-search-btn:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
/* ==========================================================================
   Directory Entry Layout
   ========================================================================== */
body.single-directory .directory-entry {
    max-width: 1200px;
    margin: 0 auto var(--spacing-xl) !important;
    padding: 0 20px !important;
    box-sizing: border-box;
}
.directory-content-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-xl);
    background: var(--color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}
/* ==========================================================================
   Sidebar (Photo Section)
   ========================================================================== */
.directory-sidebar {
    background: var(--color-background);
    padding: var(--spacing-lg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.directory-photo {
    width: 100%;
    max-width: 260px;
}
.directory-photo img,
.coach-image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    object-fit: cover;
}
/* ==========================================================================
   Main Content Section
   ========================================================================== */
.directory-main-content {
    padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-xl) 0;
}
.directory-header-info {
    position: relative;
    padding-right: 0;
    margin-bottom: var(--spacing-lg);
}

.directory-header-info.has-badge {
    padding-right: 170px;
    min-height: 160px;
}
.coach-name-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}
.coach-name,
.dir-name {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.2;
}
.coach-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
    margin: var(--spacing-sm) 0 0;
}
/* ==========================================================================
   Badge
   ========================================================================== */
.coach-badge-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: auto;
    box-shadow: none !important;
    background: transparent;
}
/* ==========================================================================
   Details Section
   ========================================================================== */
.directory-details {
    border-top: 2px solid var(--color-border);
    padding-top: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}
.detail-row {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-secondary);
    background-color: transparent !important;
}
.detail-row:last-child {
    border-bottom: none;
}
/* Kill any hover background tint on data rows */
.detail-row:hover,
.detail-row-email:hover,
.detail-row-phone:hover,
.detail-row-website:hover {
    background-color: transparent !important;
}
.detail-label {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}
.detail-value {
    color: var(--color-text-light);
    font-size: 1rem;
    line-height: 1.6;
}
.detail-value a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.3s ease;
}
.detail-value a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
/* ==========================================================================
   Special Styling for ACF Shortcode Output
   ========================================================================== */
/* Force email/phone/website into the same grid alignment as other rows */
.detail-row-email,
.detail-row-phone,
.detail-row-website {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-secondary);
}
.detail-row-email strong,
.detail-row-phone strong,
.detail-row-website strong {
    font-weight: 700;
    color: var(--color-text);
    font-size: 1rem;
}
.detail-row-email a,
.detail-row-phone a,
.detail-row-website a {
    color: var(--color-primary);
    text-decoration: none;
    font-size: 1rem;
}
.detail-row-email a:hover,
.detail-row-phone a:hover,
.detail-row-website a:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}
/* ==========================================================================
   Description Section
   ========================================================================== */
.directory-description {
    font-family: var(--font-secondary);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--color-border);
}
.directory-description p {
    margin-bottom: var(--spacing-md);
}
.directory-description h3 {
    font-family: var(--font-primary);
    color: var(--color-primary);
    font-size: 1.5rem;
    margin: var(--spacing-lg) 0 var(--spacing-sm);
}
.directory-description ul,
.directory-description ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}
/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .directory-header-content {
        flex-direction: column;
        text-align: center;
    }
    .directory-title {
        font-size: 2.5rem;
    }
    .directory-content-wrapper {
        grid-template-columns: 1fr;
    }
    .directory-sidebar {
        padding: var(--spacing-md);
        order: -1;
    }
    .directory-photo {
        max-width: 200px;
        margin: 0 auto;
    }
    .directory-main-content {
        padding: var(--spacing-lg);
    }
    .coach-name,
    .dir-name {
        font-size: 2rem;
    }
    .detail-row {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    .detail-label {
        font-size: 0.9rem;
    }
    .detail-value {
        font-size: 0.9rem;
    }
    /* Badge: drop out of absolute positioning on mobile */
    .coach-badge-icon {
        position: static;
        display: block;
        width: 80px;
        margin-bottom: var(--spacing-sm);
    }
    .directory-header-info.has-badge {
        padding-right: 0;
        min-height: 0;
    }
}
@media (max-width: 480px) {
    .directory-title {
        font-size: 2rem;
    }
    .btn-new-search {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    .coach-name,
    .dir-name {
        font-size: 1.75rem;
    }
    .coach-subtitle {
        font-size: 1.1rem;
    }
    .directory-main-content {
        padding: var(--spacing-md);
    }
    .directory-entry {
        padding: 0 var(--spacing-sm) !important;
    }
}
/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .directory-header,
    .directory-navigation,
    .directory-actions {
        display: none;
    }
    .directory-content-wrapper {
        box-shadow: none;
        border: 1px solid var(--color-border);
    }
    .directory-photo img {
        max-width: 200px;
    }
}
/* ==========================================================================
   Accessibility Enhancements
   ========================================================================== */
a:focus,
button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
.detail-value a:focus {
    background-color: rgba(168, 45, 45, 0.1);
    padding: 2px 4px;
    border-radius: 2px;
}
html {
    scroll-behavior: smooth;
}
/* ==========================================================================
   Animation & Transitions
   ========================================================================== */
.directory-content-wrapper {
    animation: fadeInUp 0.6s ease-out;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-center {
    text-align: center;
}
.mb-0 {
    margin-bottom: 0 !important;
}
.mt-0 {
    margin-top: 0 !important;
}

/* don't show pencil icon on edit profile page for profile photo */
.acf-icon.-pencil { display: none !important; }

/* Add Media button */
.wp-media-buttons .insert-media {
    display: none !important;
}

/* Text/HTML tab */
.switch-html {
    display: none !important;
}

/* ==========================================================================
   Directory Listing Approval — Show/Hide Sections
   ========================================================================== */

/* Hide all three sections by default */
.show-logged-out,
.show-logged-in-approved,
.show-logged-in-not-approved {
    display: none !important;
}

/* Visitor: not logged in */
body.listing-visitor .show-logged-out {
    display: block !important;
}

/* Logged in + approved */
body.listing-approved .show-logged-in-approved {
    display: block !important;
}

/* Logged in + not approved */
body.listing-not-approved .show-logged-in-not-approved {
    display: block !important;
}

/* ==========================================================================
   Elementor Editor Overrides
   ========================================================================== */

/* Show all visibility sections in Elementor editor regardless of login state */
body.elementor-editor-active .show-logged-out,
body.elementor-editor-active .show-logged-in,
body.elementor-editor-active .show-logged-in-approved,
body.elementor-editor-active .show-logged-in-not-approved {
    display: block !important;
}