/*
Theme Name:  Open Door Property Management Services
Theme URI:   https://opendoorpm.com
Author:      Open Door PM Dev Team
Author URI:  https://opendoorpm.com
Description: A custom, high-performance WordPress theme for Open Door Property Management Services. Built with Forest Green and Copper/Ochre branding, Buildium API integration, and a React-powered property search.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: open-door-pm
Tags: property-management, custom, responsive, accessibility-ready
*/

/* ============================================================
   GOOGLE FONTS IMPORT
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================================ */
:root {
  /* Brand Colors: Strict B&W with targeted Accent */
  --color-primary:        #000000;
  --color-primary-dark:   #000000;
  --color-primary-light:  #333333;
  --color-accent:         #FF6600; /* The requested Orange highlight */
  --color-accent-dark:    #E66000;
  --color-accent-light:   #FF8533;

  /* Neutrals */
  --color-bg:             #FFFFFF;
  --color-bg-off:         #F9F9F9;
  --color-bg-dark:        #000000;
  --color-text:           #000000;
  --color-text-light:     #FFFFFF;
  --color-muted:          #666666;
  --color-border:         #000000;
  --color-overlay:        rgba(0, 0, 0, 0.6);

  /* Typography: Ultra-Modern 'Outfit' */
  --font-body:            'Outfit', system-ui, sans-serif;
  --font-heading:         'Outfit', sans-serif;
  --font-size-xs:         0.75rem;
  --font-size-sm:         0.875rem;
  --font-size-base:       1rem;
  --font-size-md:         1.125rem;
  --font-size-lg:         1.25rem;
  --font-size-xl:         1.5rem;
  --font-size-2xl:        2rem;
  --font-size-3xl:        2.5rem;
  --font-size-4xl:        3.25rem;
  --font-size-5xl:        4rem;
  --line-height-tight:    1.2;
  --line-height-snug:     1.4;
  --line-height-base:     1.65;

  /* Spacing */
  --space-1:   0.25rem;
  --space-2:   0.5rem;
  --space-3:   0.75rem;
  --space-4:   1rem;
  --space-5:   1.25rem;
  --space-6:   1.5rem;
  --space-8:   2rem;
  --space-10:  2.5rem;
  --space-12:  3rem;
  --space-16:  4rem;
  --space-20:  5rem;
  --space-24:  6rem;
  --space-32:  8rem;

  /* Layout */
  --container-max:   1280px;
  --container-px:    2rem;
  --grid-gap:        40px;

  /* Sharp Corners for Premium Look */
  --radius-sm:   0;
  --radius-md:   0;
  --radius-lg:   0;
  --radius-xl:   0;
  --radius-full: 0;

  /* Shadows: Subtle for depth, or none for flat B&W */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
  --shadow-md:  0 10px 30px rgba(0,0,0,.05);
  --shadow-lg:  0 20px 50px rgba(0,0,0,.1);
  --shadow-xl:  0 30px 60px rgba(0,0,0,.15);
  --shadow-dark: 0 10px 40px rgba(0,0,0,.3);
  --shadow-accent: 0 8px 32px rgba(255,107,0,.2);

  /* Transitions */
  --transition-fast:   0.2s ease;
  --transition-base:   0.3s ease;
  --transition-slow:   0.5s ease;

  /* Z-index */
  --z-below:    -1;
  --z-base:      1;
  --z-dropdown: 100;
  --z-sticky:   1000;
  --z-modal:    2000;
  --z-toast:    3000;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: var(--line-height-base);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
ul, ol { list-style: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: var(--radius-sm); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--line-height-tight);
  color: var(--color-text);
  font-weight: 700;
}
h1 { font-size: clamp(2.25rem, 5vw, var(--font-size-5xl)); }
h2 { font-size: clamp(1.75rem, 4vw, var(--font-size-3xl)); }
h3 { font-size: clamp(1.25rem, 3vw, var(--font-size-xl)); }
h4 { font-size: var(--font-size-lg); font-family: var(--font-body); font-weight: 600; }
h5 { font-size: var(--font-size-md); font-family: var(--font-body); font-weight: 600; }
p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

.text-primary  { color: var(--color-primary); }
.text-accent   { color: var(--color-accent); }
.text-muted    { color: var(--color-muted); }
.text-white    { color: #fff; }
.text-center   { text-align: center; }
.text-sm       { font-size: var(--font-size-sm); }
.text-lg       { font-size: var(--font-size-lg); }

.lead { font-size: var(--font-size-md); line-height: var(--line-height-base); color: var(--color-muted); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}
.section { padding-block: var(--space-20); }
.section--sm  { padding-block: var(--space-12); }
.section--lg  { padding-block: var(--space-32); }
.section--dark { background: var(--color-bg-dark); color: var(--color-text-light); }
.section--green { background: var(--color-primary); color: var(--color-text-light); }
.section--off  { background: var(--color-bg-off); }

.grid { display: grid; gap: var(--grid-gap); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.section-header { text-align: center; margin-bottom: var(--space-12); }
.section-header .eyebrow {
  display: inline-block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section-header h2 { margin-bottom: var(--space-4); }
.section-header p { max-width: 600px; margin-inline: auto; color: var(--color-muted); }

/* ============================================================
   BUTTON SYSTEM
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.75em 1.75em;
  border-radius: 999px !important; /* Anti-Gravity Pill Shape */
  font-size: var(--font-size-sm);
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  white-space: nowrap;
  border: none;
}
.btn:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 10px 30px rgba(255, 102, 0, 0.4) !important; /* Signature orange accenting */
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-accent) !important; color: #fff !important; }
.btn-accent {
  background: var(--color-accent);
  color: #fff;
}
.btn-accent:hover { background: var(--color-accent-dark) !important; color: #fff !important; }
.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}
.btn-outline:hover { background: var(--color-accent) !important; border-color: var(--color-accent) !important; color: #fff !important; }
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.6);
}
.btn-outline-white:hover { background: var(--color-accent) !important; border-color: var(--color-accent) !important; color: #fff !important; }
.btn-lg { font-size: var(--font-size-base); padding: 1.1em 2.5em; }
.btn-sm { font-size: var(--font-size-xs); padding: 0.6em 1.25em; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card-body { padding: var(--space-6); }

/* ============================================================
   FORMS BASE
   ============================================================ */
.form-group { margin-bottom: var(--space-5); }
.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-2);
  color: var(--color-text);
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--font-size-base);
  color: var(--color-text);
  background: #fff;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(0,106,66,.12); }
.form-control.is-error { border-color: #dc2626; }
textarea.form-control { resize: vertical; min-height: 130px; }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-message { padding: var(--space-4); border-radius: var(--radius-md); font-size: var(--font-size-sm); display: none; }
.form-message.success { display: block; background: #d1fae5; color: #065f46; }
.form-message.error   { display: block; background: #fee2e2; color: #991b1b; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.25em 0.75em;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge-green  { background: #d1fae5; color: var(--color-primary-dark); }
.badge-accent { background: #fde8cc; color: var(--color-accent-dark); }
.badge-gray   { background: var(--color-border); color: var(--color-muted); }

/* ============================================================
   SCROLL REVEAL ANIMATION (HIGH END)
   ============================================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.reveal {
  opacity: 0;
}
.reveal.in-view { 
  animation: fadeInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Stagger Delays */
.delay-100 { animation-delay: 100ms !important; }
.delay-200 { animation-delay: 200ms !important; }
.delay-300 { animation-delay: 300ms !important; }
.delay-400 { animation-delay: 400ms !important; }
.delay-500 { animation-delay: 500ms !important; }
.delay-600 { animation-delay: 600ms !important; }

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  html, body { 
    overflow-x: hidden; 
    width: 100%;
    position: relative;
  }
  
  *, *::before, *::after { 
    box-sizing: border-box !important; 
    max-width: 100vw !important;
  }

  :root { 
    --container-px: 20px; 
    --space-20: 80px; /* Scaling down large sections */
    --space-32: 100px;
  }

  .container {
    padding-inline: var(--container-px) !important;
  }

  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; gap: 40px !important; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding-block: 80px; }
  .section--lg { padding-block: 100px; }
  
  /* Typography Scaling */
  h1 { font-size: 2.5rem !important; }
  h2 { font-size: 2rem !important; }
  h3 { font-size: 1.5rem !important; }
}

@media (max-width: 480px) {
  h1 { font-size: 2rem !important; }
  h2 { font-size: 1.75rem !important; }
  .section { padding-block: 60px; }
}

/* ============================================================
   WORDPRESS ALIGNMENT CLASSES
   ============================================================ */
.wp-block-image.aligncenter img { margin-inline: auto; }
.alignleft  { float: left; margin-right: var(--space-6); margin-bottom: var(--space-4); }
.alignright { float: right; margin-left: var(--space-6); margin-bottom: var(--space-4); }
.aligncenter { text-align: center; }

/* ============================================================
   SCREEN READER ONLY
   ============================================================ */
.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;
}

/* ============================================================
   ADVANCED UI/UX REFINEMENT OVERRIDES
   ============================================================ */

/* 1. Hero Section Overlay */
.hero-overlay {
    background: rgba(0, 0, 0, 0.4) !important;
}

/* 2. Hero Section Alignment (Desktop) */
@media (min-width: 992px) {
    .hero-content {
        margin-inline: auto !important;
        text-align: center !important;
        padding-top: 8vh !important;
    }
    .hero-actions {
        display: flex !important;
        justify-content: center !important;
    }
}

/* Subtle background for sections directly under Glass cards so effect pops */
.user-paths, .services-section, .testimonials-section {
    background: linear-gradient(135deg, #fdfdfd 0%, #ededed 100%) !important;
}

/* 3. Card Styling (Glassmorphism & Border Radius) */
/* Target Cards in "Who We Serve", "What We Do", "Testimonials" */
.path-card, .service-card, .testimonial-card {
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

/* "Who We Serve" - Glassmorphism bend allowed, text explicitly black */
.path-card:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    color: #000000 !important;
}
.path-card:hover *,
.path-card:hover p,
.path-card:hover h3,
.path-card:hover a,
.path-card:hover span,
.path-card:hover .path-links li a {
    color: #000000 !important;
}

/* Property Owner Button explicitly static override */
#path-owner .btn-primary, #path-owner .btn-primary:hover {
    background: #000 !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
}

/* "What We Do" & "Testimonials" - Remove hover effects entirely */
.service-card:hover,
.testimonial-card:hover {
    transform: none !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05) !important;
    background: rgba(255, 255, 255, 0.4) !important;
}

/* 4. Knowledge Base / Blog Section Images */
.blog-card, .blog-card img {
    transition: none !important;
}
.blog-card:hover {
    transform: none !important;
    box-shadow: none !important; /* Reverting hover */
}
.blog-card img, .blog-card:hover img {
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
}

/* 5. "Where We Serve" Section Background */
.service-areas-section {
    background: linear-gradient(135deg, #FFFFFF 0%, #F3E5AB 100%) !important;
}
.service-areas-section h2, 
.service-areas-section h3, 
.service-areas-section p, 
.service-areas-section .areas-tag-list li {
    color: #000 !important;
}
.service-areas-section .areas-tag-list li {
    border-color: #000 !important;
}

/* ============================================================
   NEW HOME SECTIONS (ABOUT, AWARDS, COMMITMENT)
   ============================================================ */

/* Global Padding for New Sections */
.new-section { padding: 100px 0; }

/* About Introduction Section */
.about-intro-section { background: #FFFFFF; }
.about-intro-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}
.about-intro-col { flex: 1; }
.about-intro-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Awards & Recognition Section */
.awards-section { background: #F7F7F7; }
.awards-grid {
    display: flex;
    align-items: center;
    gap: 60px;
}
.awards-col-text { flex: 0 0 40%; }
.awards-col-logos {
    flex: 0 0 calc(60% - 60px);
    display: flex;
    flex-direction: column;
    gap: 40px;
}
/* Awards: Top Row */
.awards-top-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
}
.award-top-left {
    text-align: center;
    line-height: 1.2;
}
.awards-divider-vertical {
    width: 1px;
    height: 80px;
    background: #ddd;
}
.awards-top-right {
    font-size: 16px;
    line-height: 1.8;
}
.highlight-orange {
    color: #FF6600;
    font-weight: bold;
}
/* Awards: Bottom Row */
.awards-bottom-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.award-badge-container {
    flex: 1;
    display: flex;
    justify-content: center;
}
.badge-placeholder {
    width: 100px;
    height: 100px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    text-transform: uppercase;
    font-weight: bold;
}
.badge-placeholder.inc { border-radius: 4px; }
.badge-divider {
    width: 1px;
    height: 60px;
    background: #ddd;
}

/* Our Commitment Section */
.commitments-section {
    background: #FFFFFF;
    text-align: center;
}
.commitments-header { margin-bottom: 60px; }
.commitments-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}
/* Force 3-over-2 visually on desktop */
.commitment-item {
    width: calc(33.333% - 20px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.commitment-icon {
    width: 70px;
    height: 70px;
    background: #FF6600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #FFFFFF;
}
.commitment-icon svg {
    width: 32px;
    height: 32px;
    stroke: #FFFFFF;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .new-section { padding: 40px 20px !important; }
    
    .about-intro-grid,
    .awards-grid {
        flex-direction: column !important;
        gap: 40px !important;
    }
    .awards-col-text,
    .awards-col-logos {
        flex: 1 1 100% !important;
        width: 100%;
    }
    .awards-top-row, .awards-bottom-row {
        flex-direction: column;
        gap: 20px;
        align-items: center;
        text-align: center;
    }
    .awards-divider-vertical, .badge-divider {
        width: 60px;
        height: 1px;
    }
    
    .commitment-item {
        width: calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .commitment-item {
        width: 100%;
    }
}

/* ============================================================
   FEATURED PROPERTIES
   ============================================================ */
.opm-featured-section {
  background-color: var(--color-bg-off);
}

.opm-featured-header {
  text-align: center;
  margin-bottom: 40px;
}

.opm-featured-title {
  font-size: clamp(1.75rem, 4vw, var(--font-size-3xl));
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.opm-property-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  max-width: 900px; /* Keep it tight for 2 items */
  margin: 0 auto;
}

@media (min-width: 768px) {
  .opm-property-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.opm-property-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
  color: var(--color-text);
  transition: all var(--transition-base);
}

.opm-property-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.opm-property-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  background-color: #f0f0f0;
}

.opm-property-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-grow: 1;
}

.opm-property-address {
  font-size: var(--font-size-lg);
  font-weight: 600;
  line-height: var(--line-height-snug);
  margin: 0;
}

.opm-property-price {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--color-text); /* #1a1a1a is close to var(--color-text) -> #000 */
  margin: 0;
}

.opm-property-footer {
  margin-top: auto;
  padding-top: 20px;
}

.opm-property-btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  background-color: var(--color-primary); /* #000 */
  color: #ffffff;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: background-color var(--transition-base), color var(--transition-base);
}

.opm-property-btn:hover {
  background-color: var(--color-accent); /* #FF6600 */
  color: #ffffff;
}

.opm-view-all-container {
  text-align: center;
  margin-top: 40px;
}

.opm-view-all-link {
  display: inline-block;
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color var(--transition-base), border-bottom-color var(--transition-base);
}

.opm-view-all-link:hover {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
}
