/* Kent Surveyors - Professional Website Styles */

:root {
    --primary-blue: #1e3a8a;
    --secondary-blue: #3b82f6;
    --dark-navy: #0f172a;
    --gold-accent: #d97706;
    --light-gray: #f8fafc;
    --medium-gray: #64748b;
    --white: #ffffff;
    --success-green: #10b981;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-navy);
    background-color: var(--white);
}

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-blue);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--dark-navy);
    font-weight: 500;
    transition: color 0.3s;
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-blue);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

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

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--gold-accent);
    color: var(--white);
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: transform 0.3s, background-color 0.3s;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.cta-button:hover {
    background-color: #b45309;
    transform: translateY(-3px);
}

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

/* Section Styling */
.section {
    margin-bottom: 4rem;
}

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

.section-subtitle {
    font-size: 1.2rem;
    color: var(--medium-gray);
    text-align: center;
    margin-bottom: 3rem;
}

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

.service-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

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

.service-card p {
    color: var(--medium-gray);
    line-height: 1.8;
}

.service-card ul {
    list-style: none;
    margin-top: 1rem;
}

.service-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-card ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
}

/* Contact Form */
.contact-form-wrapper {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.hubspot-form {
    min-height: 400px;
}

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

.review-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 10px;
    border-left: 4px solid var(--gold-accent);
}

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

.review-text {
    font-style: italic;
    color: var(--dark-navy);
    margin-bottom: 1rem;
}

.review-author {
    font-weight: bold;
    color: var(--primary-blue);
}

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

.team-member {
    text-align: center;
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1rem;
}

.team-member h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.team-member .role {
    color: var(--gold-accent);
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.blog-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    border: 2px solid transparent;
    will-change: transform;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(30, 58, 138, 0.2);
    border-color: var(--primary-blue);
}

.blog-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    position: relative;
    will-change: transform;
}

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

.blog-content {
    padding: 1.5rem;
    position: relative;
    z-index: 2;
    background: var(--white);
}

.blog-card h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
}

.blog-card h3::after {
    content: '→';
    position: absolute;
    right: 0;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--gold-accent);
    font-weight: bold;
}

.blog-card:hover h3 {
    color: var(--gold-accent);
    transform: translateX(5px);
}

.blog-card:hover h3::after {
    opacity: 1;
    transform: translateX(0);
}

.blog-excerpt {
    color: var(--medium-gray);
    margin-bottom: 1rem;
    transition: color 0.3s ease;
    line-height: 1.6;
}

.blog-card:hover .blog-excerpt {
    color: var(--dark-gray);
}

.blog-meta {
    color: var(--medium-gray);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.blog-meta::before {
    content: '📖';
    font-size: 1rem;
}

.blog-card:hover .blog-meta {
    color: var(--primary-blue);
    font-weight: 500;
}

/* Staggered animation on page load (Optimized) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card {
    animation: fadeInUp 0.4s ease forwards;
    opacity: 0;
    will-change: opacity, transform;
}

.blog-card:nth-child(1) { animation-delay: 0.05s; }
.blog-card:nth-child(2) { animation-delay: 0.1s; }
.blog-card:nth-child(3) { animation-delay: 0.15s; }
.blog-card:nth-child(4) { animation-delay: 0.2s; }
.blog-card:nth-child(5) { animation-delay: 0.25s; }
.blog-card:nth-child(6) { animation-delay: 0.3s; }
.blog-card:nth-child(7) { animation-delay: 0.35s; }
.blog-card:nth-child(8) { animation-delay: 0.4s; }

/* Blog Badge (Optimized - reduced animation) */
.blog-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--gold-accent), #ea580c);
    color: white;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
    transition: transform 0.3s ease;
    will-change: transform;
}

.blog-card:hover .blog-badge {
    transform: scale(1.08) rotate(-2deg);
}

/* Category-based styling */
.blog-card[data-category="surveys"] .blog-badge {
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}

.blog-card[data-category="legal"] .blog-badge {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

.blog-card[data-category="defects"] .blog-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.blog-card[data-category="specialist"] .blog-badge {
    background: linear-gradient(135deg, #10b981, #059669);
}

.blog-card[data-category="commercial"] .blog-badge {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.blog-card[data-category="market"] .blog-badge {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

/* Interactive image overlay (Removed for performance) */

/* Blog Article */
.blog-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
}

/* Reading Progress Bar */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--gold-accent));
    z-index: 1000;
    transition: width 0.1s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 138, 0.3);
}

/* Table of Contents */
.toc-container {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-left: 4px solid var(--primary-blue);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.toc-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toc-title::before {
    content: '📑';
    font-size: 1.4rem;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 0.8rem;
}

.toc-list a {
    color: var(--dark-gray);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.toc-list a::before {
    content: '→';
    color: var(--primary-blue);
    font-weight: bold;
    transition: transform 0.3s ease;
}

.toc-list a:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.toc-list a:hover::before {
    transform: translateX(5px);
}

/* Interactive Info Boxes */
.info-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 4px solid var(--gold-accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-box::before {
    content: '💡';
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 2rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.info-box-title {
    font-weight: 700;
    color: #92400e;
    margin-bottom: 0.8rem;
    font-size: 1.1rem;
}

/* Warning Boxes */
.warning-box {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-left: 4px solid #dc2626;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.warning-box::before {
    content: '⚠️';
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 2rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Success Boxes */
.success-box {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-left: 4px solid #10b981;
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.success-box::before {
    content: '✅';
    position: absolute;
    top: -15px;
    left: 20px;
    font-size: 2rem;
    background: white;
    padding: 0.5rem;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Interactive Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.comparison-table thead {
    background: linear-gradient(135deg, var(--primary-blue), #1e40af);
    color: white;
}

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

.comparison-table tbody tr {
    background: white;
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:nth-child(even) {
    background: #f9fafb;
}

.comparison-table tbody tr:hover {
    background: #eff6ff;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

/* Interactive Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 4px solid var(--primary-blue);
    position: relative;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(30, 58, 138, 0.15);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--medium-gray);
    font-size: 0.95rem;
}

/* Expandable Sections */
.expandable-section {
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.expandable-header {
    padding: 1.2rem;
    background: linear-gradient(135deg, #f0f9ff, white);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    user-select: none;
}

.expandable-header:hover {
    background: linear-gradient(135deg, #dbeafe, #f0f9ff);
}

.expandable-header h3 {
    margin: 0;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.expand-icon {
    font-size: 1.5rem;
    color: var(--primary-blue);
    transition: transform 0.3s ease;
}

.expandable-section.active .expand-icon {
    transform: rotate(180deg);
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.2rem;
}

.expandable-section.active .expandable-content {
    max-height: 2000px;
    padding: 1.2rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary-blue), #1e40af);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4);
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f9fafb;
    border-radius: 10px;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

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

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

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

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

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

.blog-article p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--dark-navy);
}

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

.blog-article li {
    margin-bottom: 0.75rem;
    line-height: 1.8;
}

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

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

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

.faq-question:hover {
    background: #e2e8f0;
}

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

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

/* Footer */
footer {
    background-color: var(--dark-navy);
    color: var(--white);
    padding: 3rem 2rem;
    margin-top: 4rem;
}

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

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

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

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

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

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

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

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

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

/* Responsive Design */
@media (max-width: 968px) {
    .nav-links {
        position: fixed;
        right: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .services-grid,
    .reviews-grid,
    .team-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 400px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    nav {
        padding: 1rem;
    }
}