/*
Theme Name: Sash Factory Modern
Theme URI: https://sashfactory.com
Description: A modern, premium theme for Sash Factory - Bespoke Timber Windows & Doors in London
Author: Sash Factory
Author URI: https://sashfactory.com
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: sashfactory-modern
Tags: custom-menu, featured-images, one-column, two-columns
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 8.0
*/

/* ==========================================================================
   CSS Custom Properties (Design Tokens)
   ========================================================================== */

:root {
  /* Colors - Warm cream/ivory with rich charcoal */
  --color-background: #f8f6f3;
  --color-foreground: #2a2520;
  --color-card: #ffffff;
  --color-card-foreground: #2a2520;
  --color-primary: #2a2520;
  --color-primary-foreground: #f8f6f3;
  --color-secondary: #ece8e1;
  --color-secondary-foreground: #2a2520;
  --color-muted: #f0ece6;
  --color-muted-foreground: #6b6560;
  --color-accent: #a67c52;
  --color-accent-foreground: #f8f6f3;
  --color-border: #e2ded6;
  --color-input: #ebe7df;
  
  /* Typography */
  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  --spacing-4xl: 6rem;
  --spacing-5xl: 8rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 300ms ease;
  --transition-slow: 500ms ease;
  
  /* Container */
  --container-max: 80rem;
  --container-padding: 1.5rem;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6,
.font-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.2;
}

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

.text-balance {
  text-wrap: balance;
}

.uppercase {
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.section {
  padding-block: var(--spacing-5xl);
}

.section-sm {
  padding-block: var(--spacing-4xl);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--spacing-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  
  .section {
    padding-block: var(--spacing-4xl);
  }
}

/* Flexbox Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.gap-xl { gap: var(--spacing-xl); }

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(248, 246, 243, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--spacing-md);
}

.site-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--color-foreground);
}

.site-logo img {
  height: 50px;
  width: auto;
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
  gap: var(--spacing-xl);
}

.nav-menu {
  display: flex;
  gap: var(--spacing-xl);
}

.nav-menu a {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(42, 37, 32, 0.8);
  transition: color var(--transition-fast);
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.current {
  color: var(--color-foreground);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-accent);
  transition: width var(--transition-normal);
}

.nav-menu a:hover::after,
.nav-menu a.current::after {
  width: 100%;
}

/* Dropdown Menu */
.nav-item {
  position: relative;
}

.nav-item .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.dropdown a:hover {
  background: var(--color-secondary);
}

.dropdown a::after {
  display: none;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.header-phone {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
  transition: color var(--transition-fast);
}

.header-phone:hover {
  color: var(--color-foreground);
}

.header-phone svg {
  width: 1rem;
  height: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: var(--spacing-sm);
  cursor: pointer;
  color: var(--color-foreground);
}

.mobile-menu-toggle svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (max-width: 1024px) {
  .main-nav,
  .header-phone {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: none;
}

.mobile-menu.active {
  display: block;
}

.mobile-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 37, 32, 0.2);
}

.mobile-menu-content {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: var(--color-background);
  padding: var(--spacing-xl);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
}

.mobile-menu.active .mobile-menu-content {
  transform: translateX(0);
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--spacing-2xl);
}

.mobile-menu-close {
  background: none;
  border: none;
  padding: var(--spacing-sm);
  cursor: pointer;
  color: var(--color-foreground);
}

.mobile-nav a {
  display: block;
  padding: var(--spacing-sm) 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-foreground);
  border-bottom: 1px solid var(--color-border);
}

.mobile-nav .submenu {
  padding-left: var(--spacing-lg);
}

.mobile-nav .submenu a {
  font-weight: 400;
  color: var(--color-muted-foreground);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-primary-foreground);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: #3d3530;
  border-color: #3d3530;
}

.btn-secondary {
  background-color: var(--color-card);
  color: var(--color-foreground);
  border-color: var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-secondary);
}

.btn-accent {
  background-color: var(--color-accent);
  color: var(--color-accent-foreground);
  border-color: var(--color-accent);
}

.btn-accent:hover {
  background-color: #8b6843;
}

.btn-white {
  background-color: #fff;
  color: #000;
  border-color: #fff;
}

.btn-white:hover {
  background-color: #f0f0f0;
}

.btn-dark {
  background-color: #000;
  color: #fff;
  border-color: #000;
}

.btn-dark:hover {
  background-color: #222;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-foreground);
  border-color: var(--color-border);
}

.btn-outline:hover {
  background-color: var(--color-secondary);
}

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

.btn svg {
  width: 1rem;
  height: 1rem;
  transition: transform var(--transition-fast);
}

.btn:hover svg {
  transform: translateX(4px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-background {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(42, 37, 32, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 42rem;
  padding-block: var(--spacing-5xl);
}

.hero-eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--spacing-md);
}

.hero-title {
  color: #fff;
  margin-bottom: var(--spacing-lg);
  line-height: 1.1;
}

.hero-description {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
  max-width: 36rem;
  margin-bottom: var(--spacing-2xl);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-indicator {
  width: 1.5rem;
  height: 2.5rem;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-full);
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.scroll-indicator span {
  width: 4px;
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-full);
  animation: scroll-bounce 2s infinite;
}

@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(6px); opacity: 0.5; }
}

@media (max-width: 768px) {
  .hero {
    min-height: 90vh;
  }
  
  .hero-content {
    padding-top: 6rem;
  }
}

/* ==========================================================================
   Features Section
   ========================================================================== */

.features-section {
  background: var(--color-background);
  position: relative;
  overflow: hidden;
}

.features-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(128, 128, 128, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(128, 128, 128, 0.03) 1px, transparent 1px);
  background-size: 64px 64px;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
}

/* Featured Card (left side) */
.featured-card {
  position: relative;
}

.featured-card-bg {
  position: absolute;
  inset: -1rem;
  background: rgba(166, 124, 82, 0.05);
  border-radius: var(--radius-2xl);
}

.featured-card-inner {
  position: relative;
  padding: var(--spacing-3xl);
  background: var(--color-card);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(166, 124, 82, 0.2);
}

.featured-card-icon {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
}

.featured-card-icon .icon {
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  background: rgba(166, 124, 82, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-card-icon .icon svg {
  width: 2rem;
  height: 2rem;
  color: var(--color-accent);
}

.featured-card-icon .line {
  height: 1px;
  flex: 1;
  background: rgba(166, 124, 82, 0.2);
}

.featured-card h3 {
  margin-bottom: var(--spacing-lg);
}

.featured-card p {
  font-size: 1.125rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
  margin-bottom: var(--spacing-2xl);
}

.featured-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.stat-item .stat-value {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: var(--spacing-xs);
}

.stat-item .stat-label {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
}

/* Features List (right side) */
.features-header {
  margin-bottom: var(--spacing-2xl);
}

.section-eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: var(--spacing-md);
}

.features-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
}

.feature-item {
  display: flex;
  gap: var(--spacing-lg);
}

.feature-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-lg);
  background: rgba(166, 124, 82, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.feature-item:hover .feature-icon {
  background: rgba(166, 124, 82, 0.1);
}

.feature-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
}

.feature-content {
  padding-top: 0.25rem;
}

.feature-content h4 {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition-fast);
}

.feature-item:hover .feature-content h4 {
  color: var(--color-accent);
}

.feature-content p {
  color: var(--color-muted-foreground);
  line-height: 1.6;
}

/* ==========================================================================
   Products Section
   ========================================================================== */

.products-section {
  background: var(--color-card);
}

.products-header {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-3xl);
}

@media (min-width: 1024px) {
  .products-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.products-header-text {
  max-width: 42rem;
}

.products-header-text h2 {
  margin-bottom: var(--spacing-lg);
}

.products-header-text p {
  font-size: 1.125rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
}

/* Bento Grid */
.products-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
  .products-bento {
    grid-template-columns: 1fr;
  }
}

.product-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-2xl);
  background: var(--color-background);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-normal);
}

.product-card:hover {
  border-color: rgba(166, 124, 82, 0.3);
}

.product-card.featured {
  grid-row: span 2;
}

.product-card-bg {
  position: absolute;
  inset: 0;
}

.product-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-card-bg img {
  transform: scale(1.05);
}

.product-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42, 37, 32, 0.9), rgba(42, 37, 32, 0.4) 50%, transparent);
}

.product-card-content {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--spacing-2xl);
  min-height: 300px;
}

.product-card.featured .product-card-content {
  padding: var(--spacing-2xl) var(--spacing-2xl);
  min-height: 600px;
}

.product-card-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-full);
  backdrop-filter: blur(4px);
  margin-bottom: var(--spacing-md);
  width: fit-content;
}

.product-card h3 {
  color: #fff;
  margin-bottom: var(--spacing-sm);
  transition: color var(--transition-fast);
}

.product-card.featured h3 {
  font-size: clamp(2rem, 4vw, 3rem);
}

.product-card:hover h3 {
  color: var(--color-accent);
}

.product-card p {
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.product-card .link {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  color: #fff;
  font-weight: 500;
  font-size: 0.875rem;
}

.product-card.featured .link {
  font-size: 1rem;
}

.product-card .link svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform var(--transition-fast);
}

.product-card:hover .link svg {
  transform: translateX(8px);
}

/* ==========================================================================
   Process Section
   ========================================================================== */

.process-section {
  background: var(--color-background);
}

.process-header {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
  margin-bottom: var(--spacing-4xl);
}

.process-header h2 {
  margin-bottom: var(--spacing-lg);
}

.process-header p {
  font-size: 1.125rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-xl);
}

@media (max-width: 1024px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .process-steps {
    grid-template-columns: 1fr;
  }
}

.process-step {
  position: relative;
  text-align: center;
  padding: var(--spacing-2xl);
}

.process-step-number {
  font-family: var(--font-serif);
  font-size: 4rem;
  color: rgba(166, 124, 82, 0.15);
  line-height: 1;
  margin-bottom: var(--spacing-md);
}

.process-step h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-sm);
}

.process-step p {
  color: var(--color-muted-foreground);
  font-size: 0.9375rem;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */

.testimonials-section {
  background: var(--color-secondary);
  position: relative;
  overflow: hidden;
}

.testimonials-section::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 33%;
  height: 100%;
  background: linear-gradient(to left, rgba(166, 124, 82, 0.05), transparent);
}

.testimonials-header {
  max-width: 48rem;
  margin-bottom: var(--spacing-4xl);
}

.testimonials-header h2 {
  margin-bottom: var(--spacing-lg);
}

.testimonials-header p {
  font-size: 1.125rem;
  color: var(--color-muted-foreground);
  line-height: 1.7;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-xl);
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .testimonials-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
}

.testimonial-card {
  position: relative;
  padding: var(--spacing-2xl);
  background: var(--color-card);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition-normal);
}

.testimonial-card:hover {
  border-color: rgba(166, 124, 82, 0.3);
}

.testimonial-quote {
  position: absolute;
  top: -0.5rem;
  left: -0.5rem;
  width: 4rem;
  height: 4rem;
  border-radius: var(--radius-full);
  background: rgba(166, 124, 82, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.testimonial-card:hover .testimonial-quote {
  opacity: 1;
}

.testimonial-quote svg {
  width: 2rem;
  height: 2rem;
  color: var(--color-accent);
}

.testimonial-stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: var(--spacing-lg);
}

.testimonial-stars svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
  fill: var(--color-accent);
}

.testimonial-content {
  flex: 1;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  margin-bottom: var(--spacing-xl);
}

.testimonial-author {
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-border);
}

.testimonial-author-name {
  font-weight: 600;
  font-size: 1.125rem;
  margin-bottom: var(--spacing-xs);
}

.testimonial-author-role {
  font-size: 0.875rem;
  color: var(--color-muted-foreground);
}

/* ==========================================================================
   CTA Section
   ========================================================================== */

.cta-section {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
}

.cta-content {
  text-align: center;
  max-width: 48rem;
  margin-inline: auto;
}

.cta-content h2 {
  color: inherit;
  margin-bottom: var(--spacing-lg);
}

.cta-content p {
  font-size: 1.125rem;
  opacity: 0.8;
  line-height: 1.7;
  margin-bottom: var(--spacing-2xl);
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--spacing-md);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  padding-top: var(--spacing-4xl);
  padding-bottom: var(--spacing-2xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-3xl);
}

@media (max-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand {
  max-width: 20rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
}

.footer-logo img {
  height: 50px;
  width: auto;
  filter: brightness(0) invert(1);
}

.footer-description {
  font-size: 0.875rem;
  opacity: 0.7;
  line-height: 1.7;
  margin-bottom: var(--spacing-lg);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-contact a,
.footer-contact span {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-sm);
  font-size: 0.875rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer-contact a:hover {
  opacity: 1;
}

.footer-contact svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
}

.footer-column h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.footer-links a {
  font-size: 0.875rem;
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.footer-links a:hover {
  opacity: 1;
}

/* Accreditations */
.footer-accreditations {
  margin-bottom: var(--spacing-2xl);
  padding-bottom: var(--spacing-2xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-accreditations h4 {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--spacing-lg);
  text-align: center;
}

.accreditations-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-xl);
}

.accreditations-logos a {
  opacity: 0.7;
  transition: opacity var(--transition-fast);
}

.accreditations-logos a:hover {
  opacity: 1;
}

.accreditations-logos img {
  height: 40px;
  width: auto;
  filter: brightness(0) invert(1);
}

/* Footer Bottom */
.footer-bottom {
  text-align: center;
  padding-top: var(--spacing-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
  font-size: 0.75rem;
  opacity: 0.5;
}

/* ==========================================================================
   Page Templates
   ========================================================================== */

.page-header {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  padding-top: calc(80px + var(--spacing-4xl));
  padding-bottom: var(--spacing-4xl);
  text-align: center;
}

.page-header h1 {
  margin-bottom: var(--spacing-md);
}

.page-header .breadcrumb {
  font-size: 0.875rem;
  opacity: 0.7;
}

.page-header .breadcrumb a {
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}

.page-header .breadcrumb a:hover {
  opacity: 1;
}

.page-header .breadcrumb .separator {
  margin-inline: var(--spacing-sm);
}

.page-content {
  padding-block: var(--spacing-4xl);
}

.page-content.bg-alt {
  background: var(--color-card);
}

/* ==========================================================================
   Portfolio
   ========================================================================== */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
}

@media (max-width: 1024px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  aspect-ratio: 4 / 3;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(42, 37, 32, 0.9), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-item-overlay {
  opacity: 1;
}

.portfolio-item-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-lg);
  transform: translateY(1rem);
  opacity: 0;
  transition: all var(--transition-normal);
}

.portfolio-item:hover .portfolio-item-content {
  transform: translateY(0);
  opacity: 1;
}

.portfolio-item h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

.portfolio-item p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
}

/* ==========================================================================
   Contact Form
   ========================================================================== */

.contact-section {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--spacing-3xl);
}

@media (max-width: 1024px) {
  .contact-section {
    grid-template-columns: 1fr;
  }
}

.contact-info h3 {
  margin-bottom: var(--spacing-lg);
}

.contact-info p {
  color: var(--color-muted-foreground);
  line-height: 1.7;
  margin-bottom: var(--spacing-2xl);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}

.contact-detail-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  background: rgba(166, 124, 82, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-detail-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  color: var(--color-accent);
}

.contact-detail-content h4 {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: var(--spacing-xs);
}

.contact-detail-content a,
.contact-detail-content p {
  color: var(--color-muted-foreground);
  font-size: 0.9375rem;
}

.contact-detail-content a:hover {
  color: var(--color-accent);
}

.contact-form {
  background: var(--color-card);
  padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

@media (max-width: 640px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.form-group {
  margin-bottom: var(--spacing-md);
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--spacing-sm);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

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

/* Contact Form 7 Overrides */
.wpcf7-form-control-wrap {
  display: block;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-background);
  font-size: 1rem;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(166, 124, 82, 0.1);
}

.wpcf7-form input[type="submit"] {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-xl);
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.wpcf7-form input[type="submit"]:hover {
  background: #3d3530;
}

/* ==========================================================================
   WordPress Core Styles
   ========================================================================== */

.alignnone {
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 0;
}

.aligncenter,
div.aligncenter {
  display: block;
  margin: var(--spacing-md) auto;
}

.alignright {
  float: right;
  margin: var(--spacing-md) 0 var(--spacing-md) var(--spacing-lg);
}

.alignleft {
  float: left;
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 0;
}

a img.alignright {
  float: right;
  margin: var(--spacing-md) 0 var(--spacing-md) var(--spacing-lg);
}

a img.alignnone {
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 0;
}

a img.alignleft {
  float: left;
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 0;
}

a img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  background: var(--color-secondary);
  border: 1px solid var(--color-border);
  max-width: 100%;
  padding: var(--spacing-md);
  text-align: center;
  border-radius: var(--radius-lg);
}

.wp-caption.alignnone {
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 0;
}

.wp-caption.alignleft {
  margin: var(--spacing-md) var(--spacing-lg) var(--spacing-md) 0;
}

.wp-caption.alignright {
  margin: var(--spacing-md) 0 var(--spacing-md) var(--spacing-lg);
}

.wp-caption img {
  border: 0 none;
  height: auto;
  margin: 0;
  max-width: 100%;
  padding: 0;
  width: auto;
}

.wp-caption p.wp-caption-text {
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
  padding: var(--spacing-sm) 0 0;
  color: var(--color-muted-foreground);
}

.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;
}

.screen-reader-text:focus {
  background-color: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
  clip: auto !important;
  clip-path: none;
  color: var(--color-foreground);
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: var(--spacing-md);
  line-height: normal;
  padding: var(--spacing-md) var(--spacing-lg);
  text-decoration: none;
  top: var(--spacing-md);
  width: auto;
  z-index: 100000;
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--color-muted-foreground); }
.text-accent { color: var(--color-accent); }

.bg-primary { background: var(--color-primary); color: var(--color-primary-foreground); }
.bg-secondary { background: var(--color-secondary); }
.bg-card { background: var(--color-card); }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.relative { position: relative; }
.overflow-hidden { overflow: hidden; }

.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;
}

/* ==========================================================================
   Dropdown Menu Fixes - Nested Submenus
   ========================================================================== */

/* Reset dropdown positioning */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-menu > li {
  position: relative;
}

.nav-menu li {
  list-style: none;
}

/* First level dropdown */
.nav-menu > li > .dropdown,
.nav-menu > li > ul {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  z-index: 1000;
}

.nav-menu > li:hover > .dropdown,
.nav-menu > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown items */
.nav-menu .dropdown li,
.nav-menu ul li {
  margin: 0;
  padding: 0;
}

.nav-menu .dropdown > li > a,
.nav-menu > li > ul > li > a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--color-foreground);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-menu .dropdown > li > a:hover,
.nav-menu > li > ul > li > a:hover {
  background: var(--color-secondary);
}

.nav-menu .dropdown > li > a::after,
.nav-menu > li > ul > li > a::after {
  display: none;
}

/* Nested submenu (second level) */
.nav-menu .dropdown li ul,
.nav-menu > li > ul > li > ul {
  position: absolute;
  top: 0;
  left: 100%;
  min-width: 220px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  z-index: 1001;
}

.nav-menu .dropdown li:hover > ul,
.nav-menu > li > ul > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* WordPress default menu classes support */
.nav-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  z-index: 1000;
  list-style: none;
  margin: 0;
}

.nav-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  transform: translateX(10px);
}

.nav-menu li:hover > .sub-menu .sub-menu {
  transform: translateX(0);
}

.nav-menu .sub-menu li a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: var(--color-foreground);
  border-radius: var(--radius-md);
  transition: background 0.2s ease;
  white-space: nowrap;
}

.nav-menu .sub-menu li a:hover {
  background: var(--color-secondary);
}

.nav-menu .sub-menu li a::after {
  display: none !important;
  width: 0 !important;
}

/* Menu item with children indicator */
.nav-menu .sub-menu li.menu-item-has-children > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-menu .sub-menu li.menu-item-has-children > a::after {
  content: "›" !important;
  display: inline-block !important;
  width: auto !important;
  background: none !important;
  font-size: 1.25rem;
  margin-left: 0.5rem;
}

/* ==========================================================================
   MENU FIX V2 - Nested Dropdown Submenus
   ========================================================================== */

/* Ensure all list styles are reset */
.nav-menu,
.nav-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Main nav menu - horizontal */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

/* All list items */
.nav-menu li {
  position: relative;
}

/* All links */
.nav-menu a {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(42, 37, 32, 0.8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-menu > li > a {
  padding: 0.5rem 0;
}

.nav-menu a:hover {
  color: var(--color-foreground);
}

/* Hide all nested menus by default */
.nav-menu ul {
  position: absolute;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  z-index: 1000;
}

/* First level dropdown - below parent */
.nav-menu > li > ul {
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
}

/* Show first level on hover */
.nav-menu > li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Nested submenus (2nd, 3rd level) - to the right */
.nav-menu ul ul {
  top: -0.5rem;
  left: 100%;
  margin-left: 0.25rem;
  transform: translateX(10px);
}

/* Show nested on hover */
.nav-menu ul li:hover > ul {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Links inside dropdowns */
.nav-menu ul a {
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-foreground);
  border-radius: 6px;
  white-space: nowrap;
}

.nav-menu ul a:hover {
  background: var(--color-secondary);
}

/* Remove underline effect from dropdown links */
.nav-menu ul a::after {
  display: none !important;
}

/* Arrow indicator for items with children */
.nav-menu li.menu-item-has-children > a,
.nav-menu li.has-dropdown > a {
  position: relative;
}

/* Arrow for dropdown items with children (flyout indicator) */
.nav-menu ul li.menu-item-has-children > a::after,
.nav-menu ul li.has-dropdown > a::after {
  content: "›";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--color-muted-foreground);
}

/* Fallback for when WordPress adds sub-menu class */
.nav-menu .sub-menu {
  position: absolute;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  z-index: 1000;
  list-style: none;
  margin: 0;
}

.nav-menu > li > .sub-menu {
  top: 100%;
  left: 0;
  margin-top: 0.5rem;
}

.nav-menu > li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-menu .sub-menu .sub-menu {
  top: -0.5rem;
  left: 100%;
  margin-left: 0.25rem;
  transform: translateX(10px);
}

.nav-menu .sub-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.nav-menu .sub-menu a {
  display: block;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-foreground);
  border-radius: 6px;
  white-space: nowrap;
}

.nav-menu .sub-menu a:hover {
  background: var(--color-secondary);
}

.nav-menu .sub-menu a::after {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  background: none !important;
}

.nav-menu .sub-menu li.menu-item-has-children > a {
  padding-right: 2rem;
}

.nav-menu .sub-menu li.menu-item-has-children > a::after {
  content: "›" !important;
  display: block !important;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.25rem;
  color: var(--color-muted-foreground);
  width: auto !important;
  height: auto !important;
  background: none !important;
}

/* ==========================================================================
   MENU FIX V3 - Hide nested submenus by default, show only on direct hover
   ========================================================================== */

/* CRITICAL: Hide ALL nested menus by default with high specificity */
.nav-menu ul ul,
.nav-menu .sub-menu .sub-menu,
.nav-menu > li > ul > li > ul,
.nav-menu > li > .sub-menu > li > .sub-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

/* Show nested submenu ONLY when hovering directly on its parent li */
.nav-menu ul li:hover > ul,
.nav-menu .sub-menu li:hover > .sub-menu,
.nav-menu > li > ul > li:hover > ul,
.nav-menu > li > .sub-menu > li:hover > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
  transform: translateX(0);
}

/* Ensure parent hover doesn't affect grandchild menus */
.nav-menu > li:hover > ul > li > ul,
.nav-menu > li:hover > .sub-menu > li > .sub-menu {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none;
}

/* But direct hover on the nested item DOES show its children */
.nav-menu > li:hover > ul > li:hover > ul,
.nav-menu > li:hover > .sub-menu > li:hover > .sub-menu {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto;
}

/* ==========================================================================
   PAGE CONTENT TYPOGRAPHY - Proper styling for page body content
   ========================================================================== */

.page-content,
.page-body,
article.page,
article.post,
.entry-content {
  max-width: 800px;
  margin: 0 auto;
}

/* Headings in content */
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6,
.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body h5,
.page-body h6,
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6,
article h1,
article h2,
article h3,
article h4,
article h5,
article h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.3;
  color: var(--color-foreground);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.page-content h1,
.page-body h1,
article h1 {
  font-size: 2.5rem;
  margin-top: 0;
}

.page-content h2,
.page-body h2,
.entry-content h2,
article h2 {
  font-size: 2rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.page-content h2:first-child,
.page-body h2:first-child,
article h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

.page-content h3,
.page-body h3,
.entry-content h3,
article h3 {
  font-size: 1.5rem;
  margin-top: 2rem;
}

.page-content h4,
.page-body h4,
.entry-content h4,
article h4 {
  font-size: 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
}

/* Paragraphs */
.page-content p,
.page-body p,
.entry-content p,
article p {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--color-foreground);
  margin-bottom: 1.5rem;
}

/* Links in content */
.page-content a,
.page-body a,
.entry-content a,
article a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

.page-content a:hover,
.page-body a:hover,
.entry-content a:hover,
article a:hover {
  color: #8b6843;
}

/* Lists */
.page-content ul,
.page-content ol,
.page-body ul,
.page-body ol,
.entry-content ul,
.entry-content ol,
article ul,
article ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.page-content li,
.page-body li,
.entry-content li,
article li {
  font-size: 1.0625rem;
  line-height: 1.8;
  margin-bottom: 0.5rem;
  list-style: disc;
}

.page-content ol li,
.page-body ol li,
.entry-content ol li,
article ol li {
  list-style: decimal;
}

/* Blockquotes */
.page-content blockquote,
.page-body blockquote,
.entry-content blockquote,
article blockquote {
  border-left: 4px solid var(--color-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--color-muted-foreground);
}

/* Images in content */
.page-content img,
.page-body img,
.entry-content img,
article img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
}

/* Strong and emphasis */
.page-content strong,
.page-body strong,
article strong {
  font-weight: 600;
}

.page-content em,
.page-body em,
article em {
  font-style: italic;
}

/* Horizontal rules */
.page-content hr,
.page-body hr,
article hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 2.5rem 0;
}

/* Tables */
.page-content table,
.page-body table,
article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.page-content th,
.page-content td,
.page-body th,
.page-body td,
article th,
article td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  text-align: left;
}

.page-content th,
.page-body th,
article th {
  background: var(--color-secondary);
  font-weight: 600;
}

/* Code */
.page-content code,
.page-body code,
article code {
  background: var(--color-secondary);
  padding: 0.2em 0.4em;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
}

.page-content pre,
.page-body pre,
article pre {
  background: var(--color-primary);
  color: var(--color-primary-foreground);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.page-content pre code,
.page-body pre code,
article pre code {
  background: none;
  padding: 0;
}

/* ==========================================================================
   HIDE DUPLICATE PHONE CTA IN MENU
   ========================================================================== */

/* Hide the "Call us" menu item since we have phone in header-actions */
.nav-menu > li > a[href^="tel:"],
.nav-menu > li:last-child a[href*="tel"],
.nav-menu li a[href*="07947356380"] {
  display: none !important;
}

/* Also hide its parent li if empty */
.nav-menu > li:has(> a[href^="tel:"]) {
  display: none !important;
}

/* Fallback for browsers without :has() support */
.nav-menu > li.menu-item:last-child {
  display: none;
}

/* Mobile menu - also hide duplicate phone */
.mobile-nav a[href*="07947356380"] {
  display: none !important;
}

/* ==========================================================================
   FIX ACCREDITATION LOGOS - Remove problematic filter
   ========================================================================== */

/* Remove the brightness/invert filter that's hiding the logos */
.accreditations-logos img,
.footer-accreditations img,
.accreditations-logos a img {
  filter: none !important;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.accreditations-logos a:hover img,
.footer-accreditations a:hover img {
  opacity: 1;
}

/* If logos are dark and need to be light on dark bg, use a softer approach */
.footer-accreditations .accreditations-logos img {
  filter: grayscale(100%) brightness(2) !important;
}

/* ===============================================
   PAGE HERO SECTION - Explicit Colors for Contrast
   =============================================== */

/* Default hero (cream background, dark text) */
.page-hero,
.windows-hero,
.doors-hero,
.contact-page-hero,
.testimonials-hero {
    padding: 6rem 0;
    background-color: #f5f0eb !important;
}
.page-hero .hero-container,
.windows-hero .hero-container,
.doors-hero .hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.page-hero .hero-content,
.windows-hero .hero-content,
.doors-hero .hero-content {
    max-width: 48rem;
}
.page-hero .hero-subtitle,
.windows-hero .hero-subtitle,
.doors-hero .hero-subtitle,
.page-hero p.hero-subtitle,
.windows-hero p.hero-subtitle,
.doors-hero p.hero-subtitle {
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #B87333 !important;
    margin: 0 0 1rem;
}
.page-hero .hero-title,
.windows-hero .hero-title,
.doors-hero .hero-title,
.page-hero h1.hero-title,
.windows-hero h1.hero-title,
.doors-hero h1.hero-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 3rem;
    color: #2C2C2C !important;
    margin: 0 0 1.5rem;
    line-height: 1.1;
}
.page-hero .hero-description,
.windows-hero .hero-description,
.doors-hero .hero-description,
.page-hero p.hero-description,
.windows-hero p.hero-description,
.doors-hero p.hero-description {
    font-size: 1.125rem;
    color: #666666 !important;
    line-height: 1.7;
    margin: 0;
}
@media (max-width: 768px) {
    .page-hero .hero-title,
    .windows-hero .hero-title,
    .doors-hero .hero-title {
        font-size: 2rem;
    }
}

/* Products section explicit colors */
.products-section .product-title {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 2rem;
    color: #2C2C2C !important;
    margin: 0 0 1rem;
}
.products-section .product-description {
    font-size: 1.125rem;
    color: #666666 !important;
    line-height: 1.7;
}
.products-section .product-features li {
    color: #2C2C2C !important;
}

/* CTA sections (dark background, light text) */
.products-cta,
.testimonials-cta-section,
.about-cta {
    padding: 6rem 0;
    background-color: #2C2C2C !important;
}
.products-cta h2,
.products-cta .cta-title,
.testimonials-cta-section h2,
.about-cta h2 {
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 2.25rem;
    color: #ffffff !important;
    margin: 0 0 1rem;
}
.products-cta p,
.products-cta .cta-description,
.testimonials-cta-section p,
.about-cta p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8) !important;
    margin: 0 0 2rem;
}
.products-cta .cta-button,
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background-color: #B87333 !important;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

/* ===============================================
   IMPROVED DROPDOWN MENU - Prevents Disappearing
   =============================================== */

/* First level dropdown */
.main-navigation ul li {
    position: relative;
}
.main-navigation ul li > ul {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 1000;
    padding: 0.5rem 0;
}

/* Keep menu open when hovering - add padding-top for hover bridge */
.main-navigation ul li > ul::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

/* Show first level dropdown on hover */
.main-navigation ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Second level (nested) dropdown - appears to the right */
.main-navigation ul li ul li > ul {
    position: absolute;
    top: -0.5rem;
    left: 100%;
    margin-left: 0;
}

/* Add hover bridge for nested menus */
.main-navigation ul li ul li > ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    width: 15px;
    height: 100%;
    background: transparent;
}

/* Show nested dropdown on hover */
.main-navigation ul li ul li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Menu items styling */
.main-navigation ul li ul li {
    position: relative;
}
.main-navigation ul li ul li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: #2C2C2C;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.9375rem;
    transition: background 0.15s ease, color 0.15s ease;
}
.main-navigation ul li ul li a:hover {
    background: #f5f0eb;
    color: #B87333;
}

/* Items with children - show arrow indicator */
.main-navigation ul li ul li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.5rem;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 4px solid currentColor;
    vertical-align: middle;
}

/* Ensure proper stacking */
.main-navigation ul li:hover {
    z-index: 1001;
}
.main-navigation ul li ul li:hover {
    z-index: 1002;
}
