/*
Theme Name: PGBB - Purple Green Business Brokers
Theme URI: https://purplegreenbusinessbrokers.com.au/
Author: Daedalus Cyber Solutions
Author URI: https://purplegreen.com.au/
Description: Custom theme for Purple Green Business Brokers - A modern business brokerage website with confidentiality agreement system, listing management, and responsive design.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pgbb
Tags: business, brokerage, custom-post-types, responsive

Purple Green Business Brokers - Selling Business is what we do.
*/

/* === Font Face Declarations === */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./assets/fonts/Poppins-Medium.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('./assets/fonts/Poppins-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('./assets/fonts/Poppins-Bold.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('./assets/fonts/Inter-Regular.woff2') format('woff2');
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('./assets/fonts/Inter-Medium.woff2') format('woff2');
}

/* === CSS Custom Properties === */
:root {
    /* Brand Colors */
    --pgbb-purple: #7B2D8E;
    --pgbb-purple-dark: #5A1D6B;
    --pgbb-purple-light: #9B4DB0;
    --pgbb-purple-bg: #6B1F7E;
    --pgbb-green: #2ECB71;
    --pgbb-green-dark: #25A85D;
    --pgbb-green-light: #5FD99A;

    /* Neutrals */
    --pgbb-white: #FFFFFF;
    --pgbb-off-white: #F8F9FA;
    --pgbb-gray-lightest: #F1F3F5;
    --pgbb-gray-light: #E9ECEF;
    --pgbb-gray: #6B7280;
    --pgbb-gray-dark: #374151;
    --pgbb-dark: #1A1A2E;
    --pgbb-black: #111827;

    /* Typography */
    --font-display: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;

    /* Container */
    --container-max: 1280px;
    --container-padding: 1.5rem;
}

/* === Reset & Base === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pgbb-dark);
    background-color: var(--pgbb-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--pgbb-purple);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--pgbb-purple-dark);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--pgbb-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.375rem); }

p { margin-bottom: var(--space-md); }

ul, ol { padding-left: var(--space-lg); }

/* === Utility Classes === */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
    min-width: 44px;
    text-align: center;
    justify-content: center;
}

.btn-primary {
    background-color: var(--pgbb-green);
    color: var(--pgbb-white);
}

.btn-primary:hover {
    background-color: #34d97d;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--pgbb-white);
}

.btn-secondary {
    background-color: var(--pgbb-purple);
    color: var(--pgbb-white);
}

.btn-secondary:hover {
    background-color: var(--pgbb-purple-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--pgbb-white);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--pgbb-white);
    color: var(--pgbb-white);
}

.btn-outline:hover {
    background-color: var(--pgbb-white);
    color: var(--pgbb-purple);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* === Form Elements === */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 0.875rem;
    margin-bottom: var(--space-xs);
    color: var(--pgbb-gray-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem; /* 16px minimum to prevent iOS zoom */
    line-height: 1.5;
    color: var(--pgbb-dark);
    background-color: var(--pgbb-white);
    border: 1px solid var(--pgbb-gray-light);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 44px;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--pgbb-purple);
    box-shadow: 0 0 0 3px rgba(123, 45, 142, 0.15);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-select {
    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='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-error {
    color: #DC2626;
    font-size: 0.8125rem;
    margin-top: var(--space-xs);
}

.form-required {
    color: #DC2626;
}

/* === Badge === */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.2rem 0.625rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.6875rem;
    letter-spacing: 0.03em;
    border-radius: var(--radius-full);
    line-height: 1.3;
    text-transform: uppercase;
}

.badge-status {
    gap: 0.375rem;
}

.badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.badge-green {
    background-color: var(--pgbb-green);
    color: var(--pgbb-white);
}

.badge-purple {
    background-color: var(--pgbb-purple);
    color: var(--pgbb-white);
}

.badge-outline {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--pgbb-white);
    backdrop-filter: blur(4px);
}

/* === Section Spacing === */
.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    margin-bottom: var(--space-2xl);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--pgbb-gray);
    font-size: 1.0625rem;
}

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-fade-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* === Hover-only styles (exclude touch devices) === */
@media (hover: hover) {
    .hover-lift {
        transition: transform var(--transition-base), box-shadow var(--transition-base);
    }
    .hover-lift:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
    }
}
