/* Tonbridge Surveyors - Professional Website Styles */

:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.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: var(--secondary-color);
    transition: var(--transition);
}

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

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
}

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

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.9) 0%, rgba(59, 130, 246, 0.8) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    color: var(--white);
    padding-right: 2rem;
}

.hero-text h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-features {
    list-style: none;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero-features li {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.hero-features li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.5rem;
}

/* Hero Contact Form - FIXED POSITIONING */
.hero-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    animation: fadeInRight 0.8s ease 0.3s backwards;
    max-width: 500px;
    margin-top: 2rem; /* Added margin to lower the form */
}

.hero-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

/* HubSpot Form Container */
#hubspot-form-hero,
#hubspot-form-footer {
    min-height: 400px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

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

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

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

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

.btn-accent:hover {
    background: #059669;
    transform: translateY(-2px);
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
}

/* Service Cards - ENHANCED INTERACTIVE DESIGN */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    transform: scaleX(0);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--secondary-color);
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

.service-card:hover .service-icon {
    transform: rotate(5deg) scale(1.1);
}

.service-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.service-features {
    list-style: none;
    margin-bottom: 1.5rem;
}

.service-features li {
    padding: 0.5rem 0;
    color: var(--text-light);
    display: flex;
    align-items: start;
    gap: 0.5rem;
}

.service-features li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    margin-top: 2px;
}

/* Area Cards with Images */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.area-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.area-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.area-card:hover .area-image {
    transform: scale(1.05);
}

.area-content {
    padding: 2rem;
}

.area-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.area-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* Team Cards */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.team-member {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-align: center;
}

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

.team-photo {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

.team-info {
    padding: 2rem;
}

.team-info h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.team-info .role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.team-info p {
    color: var(--text-light);
    text-align: left;
    font-size: 0.95rem;
}

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

.testimonial {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 5rem;
    color: var(--secondary-color);
    opacity: 0.2;
    font-family: Georgia, serif;
}

.stars {
    color: #fbbf24;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.client-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.client-location {
    color: var(--text-light);
    font-size: 0.9rem;
}

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

.blog-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .blog-image {
    transform: scale(1.05);
}

.blog-content {
    padding: 2rem;
}

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

.blog-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

/* Blog Article Page */
.blog-article {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 0;
}

.blog-hero {
    margin-bottom: 3rem;
}

.blog-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.blog-article h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.blog-article h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-article h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-article p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.blog-article ul, .blog-article ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.blog-article li {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Interactive Elements */
.collapsible {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.collapsible-header {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--white);
    transition: var(--transition);
    font-weight: 600;
    color: var(--primary-color);
}

.collapsible-header:hover {
    background: var(--bg-light);
}

.collapsible-icon {
    transition: var(--transition);
    font-size: 1.25rem;
}

.collapsible.active .collapsible-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1.25rem;
}

.collapsible.active .collapsible-content {
    max-height: 1000px;
    padding: 1.25rem;
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table thead {
    background: var(--primary-color);
    color: var(--white);
}

.comparison-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:hover {
    background: var(--bg-light);
}

/* Checklist */
.checklist {
    list-style: none;
    margin: 1.5rem 0;
}

.checklist li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-light);
    border-left: 4px solid var(--accent-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checklist li::before {
    content: '✓';
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.25rem;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
    border-left: 4px solid var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.info-box h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.warning-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.warning-box h4 {
    color: #92400e;
    margin-bottom: 0.75rem;
}

/* FAQ Section */
.faq-section {
    margin: 3rem 0;
}

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

.faq-question {
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

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

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

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

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

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

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.75rem;
}

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

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

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

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text {
        padding-right: 0;
    }
    
    .hero-form {
        margin-top: 0;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .services-grid,
    .areas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-form {
        padding: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

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