/* Watford Surveyors - Main Stylesheet */
/* Mobile-first, responsive design optimized for Core Web Vitals */

:root {
    --primary-color: #1a4d7c;
    --secondary-color: #2c6ba0;
    --accent-color: #f39c12;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --success: #27ae60;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

a:hover {
    color: var(--accent-color);
}

a:active {
    opacity: 0.8;
}

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

/* Header & Navigation */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

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

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

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    min-width: 48px;
    min-height: 48px;
    padding: 0.5rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 77, 124, 0.6), rgba(44, 107, 160, 0.5));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    color: var(--white);
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.hero-text p {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    min-height: 48px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    font-size: 1rem;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

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

.btn-primary:hover {
    background-color: #e67e22;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

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

/* Form Container */
.hero-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-hover);
}

.form-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-container h3 {
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Container & Sections */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* Cards */
.card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

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

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Reviews/Testimonials */
.review-card {
    background-color: var(--white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow);
    position: relative;
}

.review-stars {
    color: var(--accent-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.review-text {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.review-author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.review-author-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.review-author-info p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Team Members */
.team-member {
    text-align: center;
}

.team-member-image {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.team-member h3 {
    margin-bottom: 0.5rem;
}

.team-member-role {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.team-member-bio {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

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

.stat-item h3 {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.stat-item p {
    font-size: 1.125rem;
    opacity: 0.95;
}

/* FAQ Section */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border: none;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #e8ecef;
}

.faq-icon {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 1.5rem;
}

.faq-answer p {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Blog */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.blog-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-title a {
    color: var(--primary-color);
}

.blog-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.read-more {
    color: var(--secondary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.75rem;
}

/* Blog Article */
.article-header {
    text-align: center;
    margin-bottom: 3rem;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.article-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.article-content ul,
.article-content ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.article-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section ul a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Badges */
.accreditation-badges {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    padding: 2rem 0;
}

.badge {
    background-color: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

/* Areas List */
.areas-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.area-item {
    background-color: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.area-item:hover {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu li {
        padding: 1rem 0;
        width: 100%;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .grid-4 {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        min-height: 48px;
        padding: 1rem 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .hero-content {
        padding: 2rem 1.5rem;
    }
    
    .mobile-menu-toggle {
        min-width: 48px;
        min-height: 48px;
        padding: 0.5rem;
    }
    
    .nav-menu li a {
        padding: 1rem;
        display: block;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .faq-question {
        padding: 1.25rem;
        min-height: 56px;
    }
    
    .review-card {
        padding: 1.5rem;
    }
    
    .blog-card {
        padding: 1rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 500px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2.5rem 0;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .hero-form,
    .form-container {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mb-3 {
    margin-bottom: 3rem;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-3 {
    margin-top: 3rem;
}

/* Mobile-specific optimizations */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
}

/* Prevent text size adjustment on orientation change */
input,
textarea,
select,
button {
    font-size: 16px;
}

/* Ensure touch-friendly spacing */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    min-height: 48px;
    padding: 12px;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Print Styles */
@media print {
    .header,
    .hero,
    .footer,
    .form-container {
        display: none;
    }
}