/*
Theme Name: ATAX Master Theme
Author: Bright Pink Agency
Author URI: https://brightpinkagency.com/
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
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: atax-master-theme
*/

/* ===================================
   THEME GLOBAL STYLES
   =================================== */

/* ===================================
   GLOBAL OVERFLOW PREVENTION
   =================================== */

/* Prevent horizontal overflow at theme level - but allow admin bar */
html {
  scroll-behavior: smooth;
  max-width: 100vw; /* Ensure viewport width is not exceeded */
}

/* Only apply overflow-x hidden to body, not html */
body {
  overflow-x: hidden; /* Prevent horizontal scroll on body */
  max-width: 100vw; /* Ensure viewport width is not exceeded */
  margin: 0; /* Remove default margins */
  padding: 0; /* Remove default padding */
}

/* ===================================
   WORDPRESS ADMIN BAR FIX
   =================================== */

/* Only fix the overflow issue - let WordPress handle admin bar styling */
#wpadminbar {
  overflow: visible !important; /* Allow admin bar dropdowns to show */
}

/* Fix WordPress site blocks container */
.wp-site-blocks {
  max-width: 100% !important; /* Override any fixed widths */
  width: 100% !important;
  overflow-x: hidden; /* Prevent horizontal overflow */
  box-sizing: border-box;
}

/* Fix WordPress entry content */
.entry-content,
.wp-block-post-content {
  max-width: 100% !important;
  width: 100% !important;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* ===================================
   SMOOTH SCROLL & MOTION
   =================================== */

/* Reduced motion preferences */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ===================================
   GLOBAL TYPOGRAPHY
   =================================== */

/* Global Typography - Using theme font system */
body {
  font-family: var(--wp--preset--font-family--montserrat);
  overflow-wrap: break-word; /* Prevent text overflow */
  word-wrap: break-word; /* Fallback for older browsers */
}

/* Global Typography Utilities */
h1, h2, h3, h4 {
  text-wrap: balance;
  overflow-wrap: break-word;
  word-wrap: break-word;
  max-width: 100%;
}

/* ===================================
   RESPONSIVE FIXES
   =================================== */

/* Ensure all elements are responsive */
* {
  box-sizing: border-box; /* Include padding in width calculations */
}

/* Fix any elements that might cause overflow */
img, video, iframe, object, embed {
  max-width: 100%;
  height: auto;
}

/* Fix table overflow */
table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}

/* Fix form elements */
input, textarea, select, button {
  max-width: 100%;
  box-sizing: border-box;
}
