/* 
   Project: Premier London Residential Builders
   Theme: Luxury, Trust, Craftsmanship
*/

:root {
    /* Color Palette - Premium & Trustworthy */
    --color-primary: #1A2A3A;
    /* Deep Navy - Authority, Professionalism */
    --color-secondary: #C5A059;
    /* Muted Gold/Bronze - Luxury, Accent */
    --color-text-dark: #121212;
    /* Nearly Black - Headings */
    --color-text-body: #4A4A4A;
    /* Soft Grey - Reading */
    --color-bg-light: #F9F9F9;
    /* Off-white - Backgrounds */
    --color-bg-white: #FFFFFF;
    /* Pure White - Cards */
    --color-border: #E0E0E0;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    /* Classic, Elegant */
    --font-body: 'Inter', sans-serif;
    /* Clean, Modern, Legible */

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

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

body {
    font-family: var(--font-body), system-ui, -apple-system, sans-serif;
    color: var(--color-text-body);
    line-height: 1.6;
    background-color: var(--color-bg-white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    /* Ensure overflow hidden works */
}

html {
    overflow-x: hidden;
    width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.75rem;
}

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

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

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-lg) 0;
}

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

.text-primary {
    color: var(--color-primary);
}

.text-gold {
    color: var(--color-secondary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    border: none;
    border-radius: 0;
    /* Sharp edges for premium feel */
    transition: var(--transition-medium);
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
}

/* .btn.btn-primary:hover removed as per request */
.btn.btn-primary:hover {
    /* No change on hover */
    background-color: var(--color-primary);
    transform: none;
    color: #ffffff;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

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

/* Header & Nav */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--color-text-dark);
}

.nav-links a:hover {
    color: var(--color-secondary);
}

/* Mobile Menu Toggle - Hide by default on desktop */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--color-primary);
    cursor: pointer;
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
}

/* Article Links - Make them visible! */
.article-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-color: var(--color-secondary);
    text-underline-offset: 3px;
    font-weight: 500;
}

.article-content a:hover {
    color: var(--color-secondary);
    background-color: rgba(197, 160, 89, 0.1);
}

/* Hero Section */
.hero {
    height: 85vh;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    color: white;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-subtitle {
    display: block;
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-style: italic;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.hero h1 {
    color: white;
    font-size: 4rem;
    margin-bottom: 2rem;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 3rem 2rem;
    border: 1px solid var(--color-border);
    transition: var(--transition-medium);
}

.service-card:hover {
    border-color: var(--color-secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.service-icon {
    font-size: 2rem;
    color: var(--color-secondary);
    margin-bottom: 1.5rem;
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: white;
    padding: 5rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-column h4 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.footer-links li {
    list-style: none;
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: #a0aec0;
}

.footer-links a:hover {
    color: var(--color-secondary);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* Portfolio Styles (Shared) */
.project-card {
    background: #fff;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.project-info {
    padding: 1.5rem;
}

.project-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}


/* Responsive Design & Mobile Optimization */
@media (max-width: 1024px) {
    .container {
        width: 95%;
    }

    h1 {
        font-size: 2.5rem;
    }

    .hero {
        height: 60vh;
    }

    .logo img {
        height: 50px !important;
    }
}


@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    h1 {
        font-size: 1.35rem;
    }

    /* Brief Req: Reduce hero heading font size on devices < 375px */
    @media (max-width: 375px) {
        h1 {
            font-size: 1.125rem;
        }
    }

    h2 {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    /* Navigation - Mobile (Brief Priority 1) */
    .nav-container {
        position: relative;
    }

    .nav-links {
        display: none !important;
        /* Hidden by default on mobile, toggled by JS */
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        padding: 0;
        /* Removing padding wrapper to allow full width links */
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        text-align: left;
        /* Better for list view */
        border-top: 1px solid #eee;
        z-index: 999;
    }

    .nav-links.active {
        display: flex !important;
    }

    .nav-links li {
        width: 100%;
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 16px 24px;
        /* Brief Spec */
        font-size: 18px;
        /* Brief Spec */
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        /* Brief Spec (adapted for light theme) */
        width: 100%;
    }

    .mobile-menu-toggle {
        display: block !important;
        /* Force show toggle on mobile */
        background: none;
        border: none;
        font-size: 24px;
        /* Brief Spec */
        color: var(--color-primary);
        cursor: pointer;
        padding: 12px;
        /* Ensure 44x44px touch target (24 + 12 + 12 = 48px) */
        min-width: 44px;
        min-height: 44px;
    }

    /* Hero */
    .hero {
        height: auto;
        min-height: 50vh;
        padding: 4rem 0;
        /* Add top/bottom padding for safety */
        text-align: center;
    }

    .hero-content {
        padding: 0 16px;
        /* Brief Spec: 16px padding */
    }

    .hero-cta {
        display: flex;
        flex-direction: column;
        /* Stack by default on mobile */
        gap: 12px;
        /* Brief Spec: 12px minimum spacing */
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        margin-left: 0 !important;
        min-height: 44px;
        /* Brief Spec: Minimum height */
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Brief Req: Stack CTA buttons vertically on very small screens (< 360px) 
       (Already handled above by column layout, but ensuring safety) */
    @media (max-width: 360px) {
        .hero-cta {
            width: 100%;
        }
    }

    /* Contact Form Layout */
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Services / Sections */
    .section {
        padding: 3rem 0;
    }

    .container {
        padding-left: 16px;
        /* Brief Spec: Consistent padding */
        padding-right: 16px;
        /* Brief Spec: Consistent padding */
    }

    /* Article specific adjustments */
    .article-header h1 {
        font-size: 1.8rem;
    }
}