/* Swindon Surveyors - Main Stylesheet */
/* Modern, responsive design optimized for all devices */

:root {
    --primary-color: #1a365d;
    --secondary-color: #2c5282;
    --accent-color: #d4a574;
    --text-dark: #1a202c;
    --text-light: #718096;
    --background-light: #f7fafc;
    --white: #ffffff;
    --success-color: #48bb78;
    --transition: all 0.3s ease;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

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

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

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

p {
    margin-bottom: 1.25rem;
    color: var(--text-dark);
    font-size: 1.0625rem;
}

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

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

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

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

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

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

.logo span {
    color: var(--accent-color);
}

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

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

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

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

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.85) 0%, rgba(44, 82, 130, 0.85) 100%);
}

/* Hero Background Image */
.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Hero Overlay for Better Text Readability */
.hero:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 54, 93, 0.75) 0%, rgba(44, 82, 130, 0.7) 100%);
    z-index: 1;
}

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

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

.hero-text {
    color: var(--white);
}

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

.hero-text p {
    color: rgba(255,255,255,0.95);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-badges {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
}

.cta-button {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.125rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    background: #c89355;
}

.hero-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.hero-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Container & Layout */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section {
    padding: 3rem 0;
}

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

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

.section-header p {
    font-size: 1.125rem;
    color: var(--text-light);
}

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

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

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

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

/* Cards */
.card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

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

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

.card-content {
    padding: 2rem;
}

.card-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

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

.card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.card-button:hover {
    gap: 1rem;
}

/* Services Section */
.service-card {
    background: var(--background-light);
    padding: 2.5rem;
    border-radius: 15px;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.service-card:hover {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-size: 1.75rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    margin: 1.5rem 0;
}

.service-card ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-light);
}

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

/* Testimonials */
.testimonial-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    position: relative;
}

.testimonial-card:before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-size: 5rem;
    color: var(--accent-color);
    opacity: 0.2;
    line-height: 1;
}

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

.testimonial-text {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: bold;
    font-size: 1.25rem;
}

.author-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

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

/* Team Section */
.team-member {
    text-align: center;
    padding: 1.5rem;
}

.team-photo {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    object-fit: cover;
    border: 5px solid var(--background-light);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

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

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

.faq-item {
    background: var(--white);
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.faq-question {
    padding: 1.5rem;
    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(--background-light);
}

.faq-toggle {
    font-size: 1.5rem;
    transition: var(--transition);
}

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

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

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
}

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

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

.area-tag {
    background: var(--background-light);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    transition: var(--transition);
}

.area-tag:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

/* Contact Form */
.contact-section {
    background: var(--background-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: start;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-light);
    margin: 0;
}

.form-container {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

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

.blog-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

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

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

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

.blog-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

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

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

/* Blog Article Page */
.article-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
}

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

.article-content img {
    width: 100%;
    border-radius: 15px;
    margin: 1.5rem 0;
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    font-weight: 600;
}

.back-to-blog:hover {
    gap: 1rem;
}

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

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

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

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

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 2rem;
}

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

.stat-label {
    font-size: 1.125rem;
    color: var(--text-light);
}

/* Process Timeline */
.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: var(--accent-color);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
}

.timeline-item:nth-child(even) .timeline-content {
    grid-column: 2;
}

.timeline-item:nth-child(even) .timeline-number {
    grid-column: 1;
    grid-row: 1;
}

.timeline-number {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: bold;
    position: relative;
    z-index: 2;
    margin: 0 auto;
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

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

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

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

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

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

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

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .timeline:before {
        left: 30px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 80px;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: 1;
    }
    
    .timeline-number {
        position: absolute;
        left: 0;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .header-container {
        padding: 1rem;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem;
    }
    
    nav a {
        display: block;
        padding: 1rem;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .hero:before {
        background-position: center;
        background-size: cover;
    }
    
    .hero-content {
        padding: 2rem 1rem;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-badges {
        gap: 0.75rem;
    }
    
    .badge {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .container {
        padding: 2rem 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .hero-form {
        padding: 1.5rem;
    }
    
    .card-content,
    .service-card,
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .areas-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

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