/*
 Theme Name:   Astra Child — Technofy Zone
 Theme URI:    https://technofyzone.com
 Description:  Technofy Zone custom child theme — Arabic + English bilingual
 Author:       Technofy Zone
 Author URI:   https://technofyzone.com
 Template:     astra
 Version:      1.0.0
 Text Domain:  astra-child
*/

/* =====================================================
   1. ARABIC TYPOGRAPHY — Cairo & Tajawal
   ===================================================== */
:root {
    --tfz-font-ar:   'Cairo', 'Tajawal', Tahoma, 'Segoe UI', Arial, sans-serif;
    --tfz-font-en:   'Inter', 'Albert Sans', system-ui, sans-serif;
    --tfz-blue:      #1e3a5f;
    --tfz-accent:    #2563eb;
    --tfz-teal:      #0d9488;
    --tfz-gold:      #d97706;
    --tfz-green:     #16a34a;
    --tfz-light-bg:  #f8fafc;
    --tfz-border:    #e2e8f0;
    --tfz-text:      #1e293b;
    --tfz-muted:     #64748b;
}

/* Primary font stack — Arabic first */
body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button {
    font-family: var(--tfz-font-ar) !important;
    color: var(--tfz-text);
}

h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title,
.entry-title a {
    font-family: var(--tfz-font-ar) !important;
    color: var(--tfz-blue) !important;
    line-height: 1.4 !important;
}

/* =====================================================
   2. COLORS — Deep Blue + Teal Accent
   ===================================================== */
a {
    color: var(--tfz-accent);
}
a:hover, a:focus {
    color: var(--tfz-teal);
}

/* Primary buttons */
.ast-button,
.wp-block-button .wp-block-button__link,
button,
input[type="submit"],
input[type="button"],
.woocommerce-js a.button,
.woocommerce button.button,
.tutor-btn-primary {
    background-color: var(--tfz-accent) !important;
    border-color: var(--tfz-accent) !important;
    color: #ffffff !important;
    font-family: var(--tfz-font-ar) !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
    transition: background 0.2s ease, transform 0.15s ease !important;
}

.ast-button:hover,
.wp-block-button .wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover,
.woocommerce button.button:hover,
.tutor-btn-primary:hover {
    background-color: var(--tfz-blue) !important;
    border-color: var(--tfz-blue) !important;
    transform: translateY(-2px) !important;
}

/* =====================================================
   3. HEADER IMPROVEMENTS
   ===================================================== */
#masthead,
.ast-desktop .main-header-bar {
    background-color: var(--tfz-blue) !important;
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.25);
}

/* Nav links */
.main-navigation a,
.ast-nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-family: var(--tfz-font-ar) !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    transition: color 0.2s ease !important;
}

.main-navigation a:hover,
.ast-nav-link:hover {
    color: #fff !important;
}

/* Logo max-width override */
.ast-site-identity img,
header .custom-logo-link img {
    max-width: 180px !important;
    width: auto !important;
}

/* =====================================================
   4. HOMEPAGE HERO — If using Elementor full-width
   ===================================================== */
.elementor-section.elementor-section-full_width .elementor-container {
    max-width: 100%;
}

/* =====================================================
   5. COURSE CARDS — Tutor LMS
   ===================================================== */
.tutor-course-grid-item,
.tutor-course-loop-item,
.tutor-course-card {
    border-radius: 14px !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
    border: 1px solid var(--tfz-border) !important;
    transition: transform 0.25s ease, box-shadow 0.25s ease !important;
    overflow: hidden;
    background: #fff;
}

.tutor-course-grid-item:hover,
.tutor-course-loop-item:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.14) !important;
}

/* Course thumbnail */
.tutor-course-thumbnail img {
    object-fit: cover;
    aspect-ratio: 16/9;
    width: 100%;
    transition: transform 0.4s ease;
}

.tutor-course-grid-item:hover .tutor-course-thumbnail img {
    transform: scale(1.05);
}

/* Course price badge */
.tutor-course-price,
.tutor-price {
    font-weight: 700 !important;
    font-size: 18px !important;
    color: var(--tfz-blue) !important;
}

.tutor-course-price .tutor-price-free,
.tutor-price-free {
    color: var(--tfz-green) !important;
    background: #dcfce7;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 13px;
}

/* Course title */
.tutor-course-name,
.tutor-course-name a {
    font-family: var(--tfz-font-ar) !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    color: var(--tfz-blue) !important;
    line-height: 1.4 !important;
}

/* Rating stars */
.tutor-ratings-count {
    color: var(--tfz-gold) !important;
}

/* =====================================================
   6. BLOG / TIPS POSTS
   ===================================================== */
.ast-article-post {
    border-radius: 12px !important;
    overflow: hidden;
    border: 1px solid var(--tfz-border) !important;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.ast-article-post:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.1) !important;
    transform: translateY(-3px);
}

.entry-title {
    font-size: 20px !important;
    font-weight: 700 !important;
}

.entry-title a {
    color: var(--tfz-blue) !important;
}

.entry-title a:hover {
    color: var(--tfz-accent) !important;
}

/* =====================================================
   7. SIDEBAR & WIDGETS
   ===================================================== */
#secondary,
.widget-area {
    background: var(--tfz-light-bg);
    border-radius: 12px;
    padding: 20px;
}

.widget-title,
.widget .wp-block-heading {
    color: var(--tfz-blue) !important;
    font-family: var(--tfz-font-ar) !important;
    font-weight: 700 !important;
    border-bottom: 3px solid var(--tfz-accent);
    padding-bottom: 8px;
    margin-bottom: 16px !important;
}

/* =====================================================
   8. FOOTER IMPROVEMENTS
   ===================================================== */
.site-footer,
#colophon {
    background-color: var(--tfz-blue) !important;
    color: rgba(255,255,255,0.85) !important;
}

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

.site-footer a:hover,
#colophon a:hover {
    color: #fff !important;
}

.ast-footer-copyright {
    color: rgba(255,255,255,0.6) !important;
    font-size: 13px !important;
}

/* =====================================================
   9. FORMS — WooCommerce + SureForms
   ===================================================== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    border-radius: 8px !important;
    border: 1.5px solid var(--tfz-border) !important;
    font-family: var(--tfz-font-ar) !important;
    padding: 12px 16px !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
    border-color: var(--tfz-accent) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
    outline: none !important;
}

/* =====================================================
   10. WOOCOMMERCE CHECKOUT
   ===================================================== */
.woocommerce-checkout .woocommerce-form-login-toggle,
.woocommerce-checkout .woocommerce-info {
    border-color: var(--tfz-accent) !important;
    background: #eff6ff;
}

.woocommerce-checkout #place_order,
.woocommerce .checkout-button {
    background: var(--tfz-green) !important;
    border-color: var(--tfz-green) !important;
    font-size: 18px !important;
    padding: 18px 40px !important;
}

/* =====================================================
   11. ADMIN BAR RTL FIX
   ===================================================== */
#wpadminbar {
    direction: ltr !important;
}

/* =====================================================
   12. MOBILE RESPONSIVE
   ===================================================== */
@media (max-width: 768px) {
    h1, .entry-title { font-size: 26px !important; }
    h2 { font-size: 22px !important; }

    .tutor-course-grid-item,
    .tutor-course-loop-item {
        margin-bottom: 20px;
    }

    .ast-article-post {
        margin-bottom: 16px;
    }

    /* Stack header on mobile */
    .ast-mobile-header-bar {
        background: var(--tfz-blue) !important;
    }

    .ast-mobile-menu-trigger-minimal .ast-icon,
    .ast-mobile-menu-trigger-minimal {
        color: #fff !important;
    }
}

@media (max-width: 480px) {
    h1, .entry-title { font-size: 22px !important; }
}

/* =====================================================
   13. ACCESSIBILITY & FOCUS STATES
   ===================================================== */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid var(--tfz-accent) !important;
    outline-offset: 2px !important;
}

/* =====================================================
   14. PRINT STYLES
   ===================================================== */
@media print {
    #masthead, #colophon, .site-footer, .sidebar, #secondary { display: none !important; }
    body { font-size: 12pt; font-family: var(--tfz-font-ar); }
}
