/*
Theme Name: Elsham Properties
Theme URI: https://elshamproperties.com
Description: Institutional Commercial Property Development Theme
Author: Elsham Properties
Version: 1.0.0
License: GPL v2 or later
Text Domain: elsham
*/

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary:           #001e40;
    --primary-mid:       #003366;
    --secondary:         #335cac;
    --accent:            #1a56db;
    --surface:           #f8f9fa;
    --surface-white:     #ffffff;
    --on-surface:        #1b1c1c;
    --text-muted:        #5a6475;
    --border:            rgba(0,0,0,0.08);
    --font:              'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height:        72px;
    --radius:            4px;
    --shadow:            0 2px 16px rgba(0,30,64,0.10);
    --shadow-lg:         0 8px 40px rgba(0,30,64,0.15);
    --transition:        all 0.25s ease;
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font);
    background: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }
input, textarea, select { font-family: var(--font); }

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--primary);
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }
p  { color: var(--text-muted); line-height: 1.7; }

.eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--secondary);
}

/* ============================================
   LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.section {
    padding: 5rem 0;
}
.section--dark {
    background: var(--primary);
    color: white;
}
.section--dark h2,
.section--dark h3,
.section--dark h4 { color: white; }
.section--dark p   { color: rgba(255,255,255,0.75); }

.section--grey {
    background: #f0f2f5;
}

/* ============================================
   NAVIGATION — FULLY CORRECTED
   ============================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    height: var(--nav-height);
    background: rgba(248,249,250,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.site-header.scrolled {
    box-shadow: var(--shadow);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Logo */
.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    flex-shrink: 0;
    z-index: 1001;
}
.site-logo img {
    height: 36px;
    width: auto;
}

/* Desktop nav links — hidden on mobile */
.nav-links {
    display: none;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
}
.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--on-surface);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    transition: var(--transition);
    white-space: nowrap;
    position: relative;
}
.nav-links a:hover {
    color: var(--primary);
    background: rgba(0,30,64,0.05);
}
.nav-links a.current-menu-item,
.nav-links a[aria-current="page"] {
    color: var(--primary);
    font-weight: 600;
}
.nav-links a.current-menu-item::after,
.nav-links a[aria-current="page"]::after {
    content: '';
    position: absolute;
    bottom: -2px; left: 0.75rem; right: 0.75rem;
    height: 2px;
    background: var(--secondary);
    border-radius: 2px;
}

/* CTA Button */
.nav-cta {
    display: none;
    background: var(--primary-mid);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    transition: var(--transition);
    flex-shrink: 0;
}
.nav-cta:hover {
    background: var(--primary) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,30,64,0.25);
}

/* Hamburger button — visible only on mobile */
.nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    padding: 10px;
    z-index: 1001;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

/* Animated hamburger → X */
.nav-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.nav-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu panel */
.nav-mobile {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--surface-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    padding: 1.5rem;
}
.nav-mobile.is-open {
    display: block;
}
.nav-mobile ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}
.nav-mobile ul a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--on-surface);
    border-radius: var(--radius);
    transition: var(--transition);
}
.nav-mobile ul a:hover,
.nav-mobile ul a.current-menu-item {
    background: rgba(0,30,64,0.05);
    color: var(--primary);
    font-weight: 600;
}
.nav-mobile .nav-cta-mobile {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary-mid);
    color: white;
    padding: 0.9rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}
.nav-mobile .nav-cta-mobile:hover {
    background: var(--primary);
}

/* ============================================
   DESKTOP BREAKPOINT — Show inline nav
   ============================================ */
@media (min-width: 900px) {
    .nav-links { display: flex; }
    .nav-cta   { display: inline-flex; align-items: center; }
    .nav-toggle { display: none; }
    .nav-mobile { display: none !important; }
}

/* ============================================
   HERO
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 60%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
    padding-top: var(--nav-height);
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}
.hero-inner {
    position: relative;
    z-index: 1;
    max-width: 800px;
}
.hero-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border-radius: 2px;
    margin-bottom: 1.5rem;
}
.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: clamp(2.25rem, 6vw, 4rem);
}
.hero p {
    color: rgba(255,255,255,0.8);
    font-size: 1.125rem;
    max-width: 560px;
    margin-bottom: 2.5rem;
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary {
    background: white;
    color: var(--primary);
    border-color: white;
}
.btn-primary:hover {
    background: transparent;
    color: white;
}
.btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.5);
}
.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}
.btn-dark {
    background: var(--primary-mid);
    color: white;
    border-color: var(--primary-mid);
}
.btn-dark:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,30,64,0.25);
}

/* ============================================
   STATS BAR
   ============================================ */
.stats-bar {
    background: var(--primary);
    padding: 3rem 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}
@media (min-width: 768px) {
    .stats-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: white;
    line-height: 1;
    letter-spacing: -0.03em;
}
.stat-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255,255,255,0.6);
    margin-top: 0.4rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ============================================
   CARDS
   ============================================ */
.card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .card-grid--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
    .card-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .card-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
    background: var(--surface-white);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.card-body { padding: 1.75rem; }
.card-icon {
    width: 48px; height: 48px;
    background: rgba(51,92,172,0.1);
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 1.25rem;
    color: var(--secondary);
}
.card-body h3 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}
.card-body p {
    font-size: 0.9rem;
    line-height: 1.65;
}

/* Portfolio card */
.portfolio-card .card-image {
    height: 220px;
    background: #c8d4e3;
    overflow: hidden;
    position: relative;
}
.portfolio-card .card-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.portfolio-card:hover .card-image img {
    transform: scale(1.04);
}
.portfolio-card .card-tag {
    position: absolute;
    top: 1rem; left: 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 2px;
}
.portfolio-meta {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 1.75rem;
    border-top: 1px solid var(--border);
}
.meta-item { font-size: 0.8rem; }
.meta-item span:first-child {
    display: block;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem;
    margin-bottom: 0.2rem;
}
.meta-item span:last-child {
    font-weight: 700;
    color: var(--primary);
}

/* ============================================
   SECTION HEADER
   ============================================ */
.section-header {
    margin-bottom: 3.5rem;
}
.section-header.centered {
    text-align: center;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}
.section-header h2 { margin: 0.5rem 0 1rem; }
.section-header p { font-size: 1rem; }

/* ============================================
   TWO-COLUMN LAYOUT
   ============================================ */
.two-col {
    display: grid;
    gap: 4rem;
    align-items: center;
}
@media (min-width: 900px) {
    .two-col { grid-template-columns: 1fr 1fr; }
    .two-col.reverse .two-col-content { order: 1; }
    .two-col.reverse .two-col-media  { order: 0; }
}
.two-col-media {
    background: #c8d4e3;
    border-radius: 6px;
    overflow: hidden;
    aspect-ratio: 4/3;
}
.two-col-media img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================
   METHOD / PILLARS
   ============================================ */
.pillars {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}
@media (min-width: 768px) {
    .pillars { grid-template-columns: repeat(3, 1fr); }
}
.pillar {
    padding: 2rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background: rgba(255,255,255,0.05);
}
.pillar-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: rgba(255,255,255,0.2);
    line-height: 1;
    margin-bottom: 1rem;
    letter-spacing: -0.04em;
}
.pillar h3 { color: white; margin-bottom: 0.75rem; }
.pillar p  { color: rgba(255,255,255,0.7); font-size: 0.9rem; }

/* ============================================
   CTA BAND
   ============================================ */
.cta-band {
    background: linear-gradient(135deg, var(--primary-mid), var(--primary));
    padding: 5rem 0;
    text-align: center;
}
.cta-band h2 { color: white; margin-bottom: 1rem; }
.cta-band p  { color: rgba(255,255,255,0.75); max-width: 520px; margin: 0 auto 2.5rem; }

/* ============================================
   FORM
   ============================================ */
.form-group {
    margin-bottom: 1.25rem;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.4rem;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #d0d5e0;
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--on-surface);
    background: white;
    transition: var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(51,92,172,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-submit {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary-mid);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
}
.form-submit:hover {
    background: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,30,64,0.2);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: var(--primary);
    color: white;
    padding: 4rem 0 2rem;
}
.footer-grid {
    display: grid;
    gap: 3rem;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-brand p {
    color: rgba(255,255,255,0.65);
    font-size: 0.9rem;
    margin-top: 1rem;
    max-width: 280px;
    line-height: 1.6;
}
.footer-col h4 {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.footer-col ul li { margin-bottom: 0.6rem; }
.footer-col ul li a {
    color: rgba(255,255,255,0.65);
    font-size: 0.875rem;
    transition: var(--transition);
}
.footer-col ul li a:hover { color: white; }
.footer-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.footer-bottom p {
    color: rgba(255,255,255,0.45);
    font-size: 0.8rem;
}

/* ============================================
   PAGE HERO (interior pages)
   ============================================ */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-mid) 100%);
    padding: calc(var(--nav-height) + 4rem) 0 4rem;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.04)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
}
.page-hero-inner { position: relative; z-index: 1; }
.page-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.35rem 0.9rem;
    border-radius: 2px;
    margin-bottom: 1.25rem;
}
.page-hero h1 { color: white; font-size: clamp(2rem, 5vw, 3.5rem); }

/* ============================================
   TEAM
   ============================================ */
.team-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.team-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    text-align: center;
    padding-bottom: 1.5rem;
}
.team-photo {
    height: 200px;
    background: #c8d4e3;
    margin-bottom: 1.25rem;
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-card h3 { font-size: 1rem; margin-bottom: 0.25rem; }
.team-card .role {
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
    display: grid;
    gap: 4rem;
    grid-template-columns: 1fr;
}
@media (min-width: 900px) {
    .contact-grid { grid-template-columns: 1fr 1.4fr; }
}
.contact-info h3 { margin-bottom: 1rem; }
.contact-detail {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}
.contact-detail-icon {
    width: 40px; height: 40px;
    background: rgba(51,92,172,0.1);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
    color: var(--secondary);
}
.contact-detail-text span:first-child {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.2rem;
}
.contact-detail-text span:last-child {
    font-weight: 600;
    color: var(--primary);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-white  { color: white !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-4 { margin-bottom: 2rem; }
.visually-hidden {
    position: absolute;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
}

/* ============================================
   WORDPRESS CORE COMPATIBILITY
   ============================================ */
.wp-block-image { margin: 1.5rem 0; }
.aligncenter { text-align: center; }
.alignleft  { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }
.wp-caption  { max-width: 100%; }
.site-main { padding-top: var(--nav-height); }

/* ============================================
   NOTIFICATION
   ============================================ */
.notification {
    position: fixed;
    bottom: 1.5rem; right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 320px;
}
.notification.show {
    transform: translateY(0);
    opacity: 1;
}
.notification.success {
    background: #1a7a4a;
    color: white;
}
.notification.error {
    background: #ba1a1a;
    color: white;
}

/* ============================================
   RESPONSIVE TWEAKS
   ============================================ */
@media (max-width: 599px) {
    .section { padding: 3.5rem 0; }
    .hero { min-height: 90vh; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .btn { width: 100%; justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
}
