/*
Theme Name: Astra Child - Nanny Jones
Theme URI: https://nannyjones.com
Description: Custom child theme for Nanny Jones with unified modern styling
Author: Nanny Jones
Author URI: https://nannyjones.com
Template: astra
Version: 2.0
*/

/* ========================================
   CSS Variables (Design Tokens)
   ======================================== */
:root {
    /* Brand Colors */
    --nj-primary: #F97066;
    --nj-primary-dark: #E85C52;
    --nj-primary-light: #FEC6A1;

    /* Neutrals */
    --nj-dark: #1a2332;
    --nj-text: #374151;
    --nj-text-light: #6b7280;
    --nj-border: #e5e7eb;
    --nj-bg: #f9fafb;

    /* Accent Colors */
    --nj-blue: #3b82f6;
    --nj-purple: #8b5cf6;
    --nj-pink: #ec4899;
    --nj-orange: #f97316;
    --nj-green: #22c55e;

    /* Spacing */
    --nj-section-padding: clamp(3rem, 8vw, 5rem);

    /* Typography */
    --nj-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Shadows */
    --nj-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --nj-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);

    /* Radius */
    --nj-radius: 0.5rem;
    --nj-radius-lg: 1rem;
}

/* ========================================
   Global Base Styles
   ======================================== */
body {
    font-family: var(--nj-font);
    color: var(--nj-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   Typography
   ======================================== */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.ast-archive-title {
    font-family: var(--nj-font);
    font-weight: 700;
    color: var(--nj-dark);
    line-height: 1.2;
}

h1, .entry-title { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p { color: var(--nj-text-light); }

a {
    color: var(--nj-primary);
    transition: color 0.2s ease;
}
a:hover { color: var(--nj-primary-dark); }

/* ========================================
   Page Header / Hero Override
   ======================================== */
/* Hide Astra's automatic page title - content has its own H1 */
.ast-separate-container .ast-article-single .entry-header,
.ast-separate-container .page .entry-header,
.entry-header .entry-title {
    display: none;
}

/* Remove empty header space */
.ast-separate-container .ast-article-single .entry-header,
.ast-page-builder-template .entry-header {
    padding: 0;
    margin: 0;
}

/* Archive/Blog Header */
.ast-archive-description {
    background: linear-gradient(135deg, #fff7ed 0%, #fdf2f8 50%, #f5f3ff 100%);
    padding: var(--nj-section-padding) 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: var(--nj-radius-lg);
}

/* ========================================
   Content Container
   ======================================== */
.ast-container,
.site-content .ast-container {
    max-width: 1200px;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-separate-container .page .ast-article-single {
    background: white;
    border-radius: var(--nj-radius-lg);
    box-shadow: var(--nj-shadow);
    border: 1px solid var(--nj-border);
    overflow: hidden;
}

.ast-separate-container .ast-article-single .entry-content,
.ast-separate-container .ast-article-post .entry-content {
    padding: 2rem;
}

/* ========================================
   Buttons - Global Override
   ======================================== */
.wp-block-button__link,
.ast-button,
button:not(.components-button),
input[type="submit"],
input[type="button"],
.button,
.elementor-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.tutor-btn,
.tutor-button,
a.tutor-btn,
.tribe-events .tribe-events-c-cta__link {
    background: linear-gradient(135deg, var(--nj-primary) 0%, var(--nj-pink) 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--nj-radius) !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    font-size: 0.9375rem !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--nj-shadow) !important;
    cursor: pointer;
    display: inline-block;
}

.wp-block-button__link:hover,
.ast-button:hover,
button:not(.components-button):hover,
input[type="submit"]:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.tutor-btn:hover,
a.tutor-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(249, 112, 102, 0.3) !important;
    opacity: 1 !important;
}

/* Secondary/Outline Buttons */
.wp-block-button.is-style-outline .wp-block-button__link,
.button-secondary,
.woocommerce a.button.alt {
    background: white !important;
    color: var(--nj-dark) !important;
    border: 2px solid var(--nj-border) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.button-secondary:hover {
    border-color: var(--nj-primary) !important;
    color: var(--nj-primary) !important;
    transform: translateY(-2px) !important;
}

/* ========================================
   Cards & Boxes
   ======================================== */
.wp-block-group.has-background,
.ast-separate-container .ast-article-post,
.woocommerce ul.products li.product,
.tutor-course-card,
.tribe-events-calendar-list__event {
    background: white;
    border-radius: var(--nj-radius-lg);
    border: 1px solid var(--nj-border);
    transition: all 0.3s ease;
    overflow: hidden;
}

.woocommerce ul.products li.product:hover,
.tutor-course-card:hover,
.tribe-events-calendar-list__event:hover,
.ast-separate-container .ast-article-post:hover {
    transform: translateY(-4px);
    box-shadow: var(--nj-shadow-lg);
    border-color: transparent;
}

/* ========================================
   Forms
   ======================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    border: 1px solid var(--nj-border) !important;
    border-radius: var(--nj-radius) !important;
    padding: 0.75rem 1rem !important;
    font-size: 1rem !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
    width: 100%;
    box-sizing: border-box;
}

input:focus,
textarea:focus,
select:focus {
    outline: none !important;
    border-color: var(--nj-primary) !important;
    box-shadow: 0 0 0 3px rgba(249, 112, 102, 0.15) !important;
}

/* Contact Form 7 */
.wpcf7 input,
.wpcf7 textarea {
    margin-bottom: 1rem;
}

.wpcf7-submit {
    width: auto !important;
}

/* ========================================
   Navigation / Menu
   ======================================== */
.main-header-menu a,
.ast-header-sections-navigation a {
    font-weight: 500;
    color: var(--nj-text);
    transition: color 0.2s ease;
}

.main-header-menu a:hover,
.main-header-menu .current-menu-item > a {
    color: var(--nj-primary);
}

/* Hide the extra dropdown toggle button in desktop nav */
.main-header-menu .ast-menu-toggle,
.ast-desktop .ast-menu-toggle,
.ast-header-sections-navigation .ast-menu-toggle {
    display: none !important;
}

/* Fix dropdown submenu positioning */
.main-header-menu .sub-menu,
.ast-header-sections-navigation .sub-menu {
    background: white !important;
    border: 1px solid var(--nj-border) !important;
    border-radius: var(--nj-radius) !important;
    box-shadow: var(--nj-shadow-lg) !important;
    padding: 0.5rem 0 !important;
    min-width: 200px;
}

.main-header-menu .sub-menu li,
.ast-header-sections-navigation .sub-menu li {
    display: block !important;
}

.main-header-menu .sub-menu a,
.ast-header-sections-navigation .sub-menu a {
    padding: 0.5rem 1rem !important;
    display: block !important;
}

.main-header-menu .sub-menu a:hover {
    background: var(--nj-bg) !important;
}

/* ========================================
   Footer
   ======================================== */
.site-footer,
.ast-footer-overlay,
.ast-small-footer {
    background: var(--nj-dark) !important;
    color: rgba(255,255,255,0.8) !important;
}

.site-footer a,
.ast-small-footer a {
    color: rgba(255,255,255,0.8) !important;
}

.site-footer a:hover,
.ast-small-footer a:hover {
    color: var(--nj-primary-light) !important;
}

/* ========================================
   WooCommerce Specific
   ======================================== */
.woocommerce ul.products li.product {
    padding: 1.5rem;
    text-align: center;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--nj-dark);
}

.woocommerce ul.products li.product .price {
    color: var(--nj-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

.woocommerce ul.products li.product img {
    border-radius: var(--nj-radius);
    margin-bottom: 1rem;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info {
    border-top-color: var(--nj-primary);
    background: #fff7ed;
}

.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before {
    color: var(--nj-primary);
}

/* ========================================
   Tutor LMS Specific
   ======================================== */
.tutor-course-card,
.tutor-card {
    border-radius: var(--nj-radius-lg) !important;
    overflow: hidden;
}

.tutor-course-thumbnail img {
    border-radius: 0;
}

.tutor-course-card .tutor-course-title,
.tutor-card-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    color: var(--nj-dark) !important;
}

.tutor-course-card .tutor-course-price,
.tutor-course-price {
    color: var(--nj-primary) !important;
    font-weight: 700 !important;
}

/* ========================================
   Events Calendar Specific
   ======================================== */
.tribe-events .tribe-events-calendar-list__event {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.tribe-events .tribe-events-calendar-list__event-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--nj-dark);
}

.tribe-events .tribe-events-calendar-list__event-date-tag {
    background: linear-gradient(135deg, var(--nj-primary) 0%, var(--nj-pink) 100%);
    color: white;
    border-radius: var(--nj-radius);
}

.tribe-events .tribe-events-c-nav__next,
.tribe-events .tribe-events-c-nav__prev {
    background: var(--nj-primary) !important;
    border-radius: var(--nj-radius) !important;
}

/* ========================================
   BuddyPress Specific
   ======================================== */
#buddypress .item-list .item-avatar img {
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--nj-shadow);
}

#buddypress .activity-list li,
#buddypress ul.item-list li {
    background: white;
    border-radius: var(--nj-radius-lg);
    border: 1px solid var(--nj-border);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

#buddypress .item-list-tabs ul li a,
#buddypress .item-list-tabs ul li span {
    border-radius: var(--nj-radius);
}

#buddypress .item-list-tabs ul li.selected a,
#buddypress .item-list-tabs ul li.current a {
    background: var(--nj-primary);
    color: white;
}

/* ========================================
   Badges / Tags
   ======================================== */
.cat-links a,
.tag-links a,
.wp-block-tag-cloud a,
.tutor-course-card .tutor-course-category {
    background: rgba(249, 112, 102, 0.1);
    color: var(--nj-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    margin: 0.25rem;
}

.cat-links a:hover,
.tag-links a:hover {
    background: var(--nj-primary);
    color: white;
}

/* ========================================
   Pagination
   ======================================== */
.ast-pagination .page-numbers,
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    border-radius: var(--nj-radius) !important;
    padding: 0.5rem 1rem !important;
    border: 1px solid var(--nj-border) !important;
    background: white !important;
    color: var(--nj-text) !important;
}

.ast-pagination .page-numbers.current,
.ast-pagination .page-numbers:hover,
.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li span.current {
    background: var(--nj-primary) !important;
    color: white !important;
    border-color: var(--nj-primary) !important;
}

/* ========================================
   Sidebar Widgets
   ======================================== */
.widget {
    background: white;
    padding: 1.5rem;
    border-radius: var(--nj-radius-lg);
    border: 1px solid var(--nj-border);
    margin-bottom: 1.5rem;
}

.widget-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--nj-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--nj-primary-light);
}

/* ========================================
   Images
   ======================================== */
.wp-block-image img,
.entry-content img:not(.avatar),
.post-thumbnail img {
    border-radius: var(--nj-radius-lg);
}

/* ========================================
   Blockquotes / Testimonials
   ======================================== */
blockquote,
.wp-block-quote {
    background: var(--nj-bg);
    border-left: 4px solid var(--nj-primary);
    padding: 1.5rem 2rem;
    border-radius: 0 var(--nj-radius-lg) var(--nj-radius-lg) 0;
    font-style: italic;
    color: var(--nj-text);
    margin: 1.5rem 0;
}

blockquote cite,
.wp-block-quote cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 600;
    color: var(--nj-text-light);
}

/* ========================================
   Tables
   ======================================== */
table {
    border-collapse: collapse;
    width: 100%;
    border-radius: var(--nj-radius);
    overflow: hidden;
    margin: 1.5rem 0;
}

th {
    background: var(--nj-dark);
    color: white;
    font-weight: 600;
    text-align: left;
    padding: 1rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--nj-border);
}

tr:nth-child(even) {
    background: var(--nj-bg);
}

/* ========================================
   Lists
   ======================================== */
.entry-content ul:not(.wp-block-gallery),
.entry-content ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.entry-content li {
    margin-bottom: 0.5rem;
    color: var(--nj-text-light);
}

/* ========================================
   Utility Classes
   ======================================== */
.nj-gradient-text {
    background: linear-gradient(135deg, var(--nj-primary) 0%, var(--nj-pink) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nj-section {
    padding: var(--nj-section-padding) 0;
}

.nj-card {
    background: white;
    border-radius: var(--nj-radius-lg);
    border: 1px solid var(--nj-border);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.nj-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--nj-shadow-lg);
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    .ast-separate-container .ast-article-single .entry-content,
    .widget {
        padding: 1.25rem;
    }

    .ast-page-builder-template .entry-header,
    .ast-archive-description,
    .ast-separate-container .ast-article-single .entry-header {
        padding: 2rem 1rem;
        margin: -1.25em -1.25em 1.5em -1.25em;
    }

    h1, .entry-title {
        font-size: 1.75rem;
    }
}
