/*
Theme Name: Astra Child - BC Safaris
Theme URI: https://bcsafaris.africa
Description: Child theme for BC Safaris website, built on Astra.
Author: BC Safaris
Author URI: https://bcsafaris.africa
Template: astra
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
*/

/* ==========================================================================
   BC SAFARIS CUSTOM STYLES
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. HEADER STYLING - Hide text title, show logo only
   -------------------------------------------------------------------------- */

/* Hide the site title text completely - NUCLEAR OPTION */
.ast-site-title-wrap,
.ast-site-title-wrap *,
.site-branding .ast-site-title-wrap,
span.site-title,
.site-title,
.site-branding .site-title,
.ast-site-identity .site-title,
.site-branding > div:not(.site-logo-img),
.ast-site-identity > div > .ast-site-title-wrap {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Keep only the logo visible */
.site-branding .site-logo-img,
.site-branding .custom-logo-link {
    display: inline-block !important;
    visibility: visible !important;
    position: relative !important;
    left: auto !important;
    width: auto !important;
    height: auto !important;
}

/* Hide tagline too */
.site-description,
.ast-site-description {
    display: none !important;
}

/* Style the header nicely */
.ast-primary-header-bar {
    padding: 12px 0;
}

/* Logo sizing - make it a good size */
.site-logo-img img,
.custom-logo-link img,
.custom-logo,
.ast-site-identity img {
    max-height: 70px !important;
    width: auto !important;
}

/* Navigation styling */
.main-header-menu > .menu-item > a {
    font-family: 'Lato', sans-serif !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    color: #2F3A28 !important;
    padding: 10px 20px !important;
    text-transform: none !important;
}

.main-header-menu > .menu-item > a:hover,
.main-header-menu > .menu-item.current-menu-item > a {
    color: #4F5D3A !important;
}

/* Ensure header layout is clean */
.site-branding.ast-site-identity {
    display: flex;
    align-items: center;
}

/* Make sure logo link only contains the image */
.site-branding .site-logo-img {
    display: inline-block;
}

/* Mobile menu button styling */
.ast-mobile-menu-trigger {
    color: #2F3A28;
}

.ast-mobile-menu-trigger:hover {
    color: #4F5D3A;
}

/* Header container - better spacing */
.ast-builder-grid-row {
    align-items: center;
}

/* --------------------------------------------------------------------------
   1. ELEMENTOR TEXT RENDERING FIX
   Prevents "scribbled/overlapping" text in Elementor widgets
   -------------------------------------------------------------------------- */

.elementor-widget-text-editor,
.elementor-widget-text-editor *,
.elementor-widget-heading,
.elementor-widget-heading * {
    -webkit-text-stroke: 0 !important;
    text-stroke: 0 !important;
    text-shadow: none !important;
    filter: none !important;
    transform: none !important;
}

.elementor-widget-text-editor,
.elementor-widget-text-editor * {
    line-height: 1.6 !important;
}

.elementor-widget-heading,
.elementor-widget-heading * {
    line-height: 1.3 !important;
}

/* Additional fix for any animation-related rendering issues */
.elementor-widget-text-editor p,
.elementor-widget-heading .elementor-heading-title {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* --------------------------------------------------------------------------
   2. TYPOGRAPHY REFINEMENTS
   -------------------------------------------------------------------------- */

/* Ensure Libre Baskerville loads correctly for headings */
h1, h2, h3, h4, h5, h6,
.entry-title,
.elementor-heading-title {
    font-family: 'Libre Baskerville', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    color: #2F3A28;
}

/* Body text */
body,
p,
.elementor-widget-text-editor {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    color: #4A463F;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   3. BUTTON STYLES
   -------------------------------------------------------------------------- */

/* Primary Button */
.elementor-button,
.wp-block-button__link,
.wpforms-submit {
    font-family: 'Lato', sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 18px 32px !important;
    border-radius: 4px !important;
    transition: all 0.3s ease !important;
}

/* Ensure button hover states work correctly */
.elementor-button:hover,
.elementor-button:focus {
    opacity: 1 !important;
}

/* --------------------------------------------------------------------------
   4. EQUAL WIDTH COLUMNS FIX
   Ensures Safari Types cards are equal width
   -------------------------------------------------------------------------- */

/* Flexbox fix for equal columns */
.elementor-section .elementor-container {
    align-items: stretch;
}

.elementor-col-33 {
    flex: 1 1 0 !important;
}

/* Alternative if using Elementor containers */
.e-con.e-con-full.elementor-element > .e-con-inner > .e-con {
    flex: 1 1 0;
}

/* --------------------------------------------------------------------------
   5. CARD STYLING
   -------------------------------------------------------------------------- */

.bcs-card,
.elementor-column.bcs-card-column .elementor-widget-wrap {
    background: #FFFFFF;
    border-radius: 8px;
    padding: 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    height: 100%;
    transition: box-shadow 0.3s ease;
}

.bcs-card:hover,
.elementor-column.bcs-card-column .elementor-widget-wrap:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   6. FORM STYLING (WPForms)
   -------------------------------------------------------------------------- */

.wpforms-container .wpforms-field input[type="text"],
.wpforms-container .wpforms-field input[type="email"],
.wpforms-container .wpforms-field textarea,
.wpforms-container .wpforms-field select {
    background: #FFFFFF;
    border: 1px solid #C2B280;
    border-radius: 4px;
    padding: 14px 16px;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    color: #4A463F;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.wpforms-container .wpforms-field input:focus,
.wpforms-container .wpforms-field textarea:focus,
.wpforms-container .wpforms-field select:focus {
    border-color: #4F5D3A;
    outline: none;
    box-shadow: 0 0 0 2px rgba(79, 93, 58, 0.2);
}

.wpforms-container .wpforms-field-label {
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #2F3A28;
    margin-bottom: 8px;
}

.wpforms-container .wpforms-submit-container button {
    background-color: #4F5D3A !important;
    color: #FFFFFF !important;
    font-family: 'Lato', sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    padding: 18px 32px !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer;
    transition: background-color 0.3s ease !important;
}

.wpforms-container .wpforms-submit-container button:hover {
    background-color: #C2B280 !important;
}

/* --------------------------------------------------------------------------
   7. LINK STYLES
   -------------------------------------------------------------------------- */

a {
    color: #4F5D3A;
    transition: color 0.3s ease;
}

a:hover,
a:focus {
    color: #2F3A28;
}

/* Links in content */
.elementor-widget-text-editor a,
.entry-content a {
    text-decoration: underline;
}

.elementor-widget-text-editor a:hover,
.entry-content a:hover {
    color: #2F3A28;
}

/* --------------------------------------------------------------------------
   8. ACCESSIBILITY IMPROVEMENTS
   -------------------------------------------------------------------------- */

/* Focus states */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus,
.elementor-button:focus {
    outline: 2px solid #C2B280;
    outline-offset: 2px;
}

/* Skip link (if needed) */
.skip-link {
    position: absolute;
    left: -9999px;
    z-index: 999999;
    padding: 1em;
    background: #4F5D3A;
    color: #FFFFFF;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* --------------------------------------------------------------------------
   9. RESPONSIVE ADJUSTMENTS
   -------------------------------------------------------------------------- */

/* Tablet */
@media (max-width: 1024px) {
    .elementor-widget-heading .elementor-heading-title {
        line-height: 1.25 !important;
    }
}

/* Mobile */
@media (max-width: 767px) {
    /* Ensure stacked columns on mobile */
    .elementor-col-33 {
        width: 100% !important;
        margin-bottom: 24px;
    }
    
    /* Reduce section padding on mobile */
    .elementor-section {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    /* Full-width buttons on mobile */
    .elementor-button {
        width: 100%;
        text-align: center;
    }
}

/* --------------------------------------------------------------------------
   10. UTILITY CLASSES
   -------------------------------------------------------------------------- */

/* Hide visually but keep accessible to screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Background color utilities */
.bg-primary { background-color: #4F5D3A !important; }
.bg-secondary { background-color: #2F3A28 !important; }
.bg-accent { background-color: #C2B280 !important; }
.bg-light { background-color: #F7F5EF !important; }
.bg-white { background-color: #FFFFFF !important; }

/* Text color utilities */
.text-primary { color: #4F5D3A !important; }
.text-secondary { color: #2F3A28 !important; }
.text-body { color: #4A463F !important; }
.text-accent { color: #C2B280 !important; }
.text-white { color: #FFFFFF !important; }

/* --------------------------------------------------------------------------
   11. CONTACT FORM ENHANCEMENTS
   -------------------------------------------------------------------------- */

/* Contact page form container */
.contact-form-container,
.wpforms-container-full {
    background: #F7F5EF;
    padding: 40px;
    border-radius: 8px;
}

@media (max-width: 767px) {
    .contact-form-container,
    .wpforms-container-full {
        padding: 24px 20px;
    }
}

/* Field spacing */
.wpforms-field {
    margin-bottom: 20px;
}

/* Dropdown styling */
.wpforms-container .wpforms-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A463F' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Checkbox styling */
.wpforms-field-checkbox input[type="checkbox"],
.wpforms-field-gdpr-checkbox input[type="checkbox"] {
    accent-color: #4F5D3A;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
}

.wpforms-field-checkbox label,
.wpforms-field-gdpr-checkbox label {
    font-size: 14px;
    line-height: 1.6;
    color: #4A463F;
    display: inline;
}

/* Consent checkbox - make it stand out */
.wpforms-field-checkbox:last-of-type {
    background: #FFFFFF;
    padding: 16px;
    border-radius: 4px;
    border: 1px solid #C2B280;
    margin-top: 24px;
}

/* Required field indicator */
.wpforms-required-label {
    color: #8B4513;
    font-weight: 600;
}

/* Error messages */
.wpforms-error,
.wpforms-field-label-error {
    color: #8B4513;
    font-size: 14px;
    margin-top: 4px;
}

.wpforms-field.wpforms-has-error input,
.wpforms-field.wpforms-has-error textarea,
.wpforms-field.wpforms-has-error select {
    border-color: #8B4513;
}

/* Success/Confirmation message */
.wpforms-confirmation-container-full {
    background: #F7F5EF;
    border-left: 4px solid #4F5D3A;
    padding: 32px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

.wpforms-confirmation-container-full h3 {
    color: #2F3A28;
    margin-bottom: 16px;
}

.wpforms-confirmation-container-full p {
    color: #4A463F;
    margin-bottom: 12px;
}

/* Phone/WhatsApp field placeholder */
.wpforms-field-phone input::placeholder {
    color: #999;
    font-style: italic;
}

/* Number field - remove spinners */
.wpforms-field-number input::-webkit-outer-spin-button,
.wpforms-field-number input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wpforms-field-number input[type=number] {
    -moz-appearance: textfield;
}

/* Form description text */
.wpforms-field-description {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    font-style: italic;
}

/* Submit button full width on mobile */
@media (max-width: 767px) {
    .wpforms-submit-container {
        text-align: center;
    }
    
    .wpforms-container .wpforms-submit-container button {
        width: 100%;
    }
}

/* Loading spinner on submit */
.wpforms-submit-spinner {
    margin-left: 10px;
}

/* Textarea min height */
.wpforms-container .wpforms-field textarea {
    min-height: 150px;
    resize: vertical;
}
