/*
Theme Name: BMASPACE New Theme
Theme URI: https://bmaspace.com/
Author: UI/UX Expert
Author URI: https://bmaspace.com/
Description: A modern, highly optimized, and SEO-friendly WordPress theme tailored for BMASpace. Features Tailwind CSS, responsive design, and structured data.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: bmaspace
Tags: blog, magazine, two-columns, custom-colors, custom-logo, custom-menu, featured-images, flexible-header, theme-options, translation-ready
*/

/* WordPress Core Alignments */
.alignnone { margin: 5px 20px 20px 0; }
.aligncenter, div.aligncenter { display: block; margin: 5px auto 5px auto; }
.alignright { float: right; margin: 5px 0 20px 20px; }
.alignleft { float: left; margin: 5px 20px 20px 0; }

/* Screen Reader Text for Accessibility (SEO) */
.screen-reader-text {
    border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute !important; width: 1px; word-wrap: normal !important;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* Gutenberg block basic spacing */
.entry-content > * { margin-bottom: 1.5rem; }
.entry-content > *:last-child { margin-bottom: 0; }

/* ==========================================================================
   Google AdSense Responsive Fix & Protections
   ========================================================================== */
ins.adsbygoogle {
    display: block !important;
    min-width: 250px; 
    min-height: 90px; 
    width: 100%;
}

/* 1. PROTECT THE DESIGN: Absolutely forbid Auto Ads from showing in the header/menu */
header ins.adsbygoogle,
nav ins.adsbygoogle,
.bmaspace-desktop-menu ins.adsbygoogle,
.bmaspace-mobile-menu ins.adsbygoogle {
    display: none !important;
    min-height: 0 !important;
    min-width: 0 !important;
    height: 0 !important;
    width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   Dynamic WP Widgets Styling (Nav Menus, Recent Posts, Categories, etc.)
   ========================================================================== */
.widget ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.widget ul li {
    border-bottom: 1px solid #f1f5f9;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    color: #475569;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.widget ul li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.widget ul li a {
    color: #334155;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    flex: 1;
}

.widget ul li a:hover {
    color: var(--color-primary, #1e40af);
    padding-left: 4px;
}

/* Add custom arrow for list widgets */
.widget_nav_menu ul li a::before, 
.widget_categories ul li a::before, 
.widget_pages ul li a::before, 
.widget_meta ul li a::before, 
.widget_recent_entries ul li a::before,
.widget_archive ul li a::before {
    content: "›";
    margin-right: 10px;
    color: var(--color-primary, #1e40af);
    font-weight: bold;
    font-size: 1.25rem;
    line-height: 1;
    transition: transform 0.2s;
}

.widget ul li a:hover::before {
    transform: translateX(4px);
}

/* Style for dropdown widgets */
.widget select {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.6rem 1rem;
    font-size: 0.875rem;
    color: #334155;
    outline: none;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: border-color 0.2s ease;
}

.widget select:focus {
    border-color: var(--color-primary, #1e40af);
}

/* Style for Search Widgets */
.widget_search form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.widget_search input[type="search"],
.widget_search input[type="text"] {
    width: 100%;
    padding: 0.6rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #334155;
    outline: none;
}

.widget_search input[type="submit"] {
    background-color: var(--color-primary, #1e40af);
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    border: none;
    transition: background-color 0.2s ease;
}

.widget_search input[type="submit"]:hover {
    filter: brightness(1.1);
}

.page-numbers.current {
    background-color: #1e40af !important;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}

/* ==========================================================================
   Contact Form 7 Wrapper Styling
   ========================================================================== */

/* Wrapper */
.wpcf7 {
  max-width: 600px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
}

/* Field spacing */
.wpcf7 p {
  margin-bottom: 16px;
}

/* Labels */
.wpcf7 label {
  display: block !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
  color: #374151 !important;
}

/* Inputs, Textarea, Select */
.wpcf7 input,
.wpcf7 textarea,
.wpcf7 select {
  width: 100% !important;
  padding: 10px 12px !important;
  border: 1px solid #d1d5db !important;
  border-radius: 6px !important;
  background: #fff !important;
  font-size: 14px !important;
  color: #111827 !important;
  box-sizing: border-box !important;
  transition: all 0.2s ease !important;
}

/* Focus */
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2) !important;
  outline: none !important;
}

/* Textarea */
.wpcf7 textarea {
  min-height: 120px !important;
  resize: vertical !important;
}

/* Submit button */
.wpcf7 input[type="submit"] {
  background: #2563eb !important;
  color: #fff !important;
  padding: 10px 20px !important;
  border: none !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: background 0.2s ease !important;
}

/* Button hover */
.wpcf7 input[type="submit"]:hover {
  background: #1d4ed8 !important;
}

/* Disabled button */
.wpcf7 input[type="submit"]:disabled {
  background: #9ca3af !important;
  cursor: not-allowed !important;
}

/* Error messages under fields */
.wpcf7-not-valid-tip {
  color: #dc2626 !important;
  font-size: 12px !important;
  margin-top: 4px !important;
}

/* Input error state */
.wpcf7-not-valid {
  border-color: #dc2626 !important;
}

/* Response messages box */
.wpcf7-response-output {
  margin-top: 16px !important;
  padding: 12px !important;
  border-radius: 6px !important;
  font-size: 14px !important;
}

/* Success message */
.wpcf7-mail-sent-ok {
  background: #dcfce7 !important;
  color: #166534 !important;
}

/* Error message box */
.wpcf7-validation-errors,
.wpcf7-acceptance-missing {
  background: #fee2e2 !important;
  color: #991b1b !important;
}

/* Spinner alignment */
.wpcf7-spinner {
  margin-left: 10px !important;
}

/* Checkbox & radio */
.wpcf7 input[type="checkbox"],
.wpcf7 input[type="radio"] {
  width: auto !important;
  margin-right: 6px !important;
}

/* Inline labels for checkbox */
.wpcf7-list-item {
  display: inline-block !important;
  margin-right: 10px !important;
}

/* File input */
.wpcf7 input[type="file"] {
  border: none !important;
}

/* Placeholder color */
.wpcf7 ::placeholder {
  color: #9ca3af !important;
}