/* My Topographic Surveyor UK - Main Stylesheet */
/* Mobile-First Responsive Design */

:root {
    --primary-color: #1a5490;
    --secondary-color: #e67e22;
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --white: #ffffff;
    --success: #27ae60;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    font-size: 16px;
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}

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

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

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

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

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

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

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

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

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    background-image: url('../images/hero-survey-action.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-color);
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 84, 144, 0.75), rgba(230, 126, 34, 0.70));
    z-index: 2;
    pointer-events: none;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
    position: relative;
    z-index: 10;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.hero-text p {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.7;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.hero-feature {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.hero-feature:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 1);
}

.hero-feature i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    display: block;
}

.hero-feature h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--primary-color);
    font-weight: 700;
}

.hero-feature p {
    color: var(--text-color);
    font-size: 0.95rem;
    margin: 0;
    opacity: 0.9;
}

/* Contact Form */
.hero-form,
.contact-form-wrapper {
    background: var(--white);
    padding: 35px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 100;
    isolation: isolate;
}

.hero-form h3,
.contact-form-wrapper h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    z-index: 101;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
    font-size: 1rem;
    min-height: 48px;
    min-width: 120px;
    text-decoration: none;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4);
}

.btn-primary:hover {
    background: #d35400;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(230, 126, 34, 0.5);
}

.btn-secondary {
    background: var(--primary-color);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(26, 84, 144, 0.4);
}

.btn-secondary:hover {
    background: #154069;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(26, 84, 144, 0.5);
}

/* HubSpot Form Styling */
.hero-form .hs-form,
.contact-form-wrapper .hs-form {
    position: relative;
    z-index: 101;
}

.hero-form .hs-form-field,
.contact-form-wrapper .hs-form-field {
    margin-bottom: 20px;
    position: relative;
    z-index: 102;
}

.hero-form .hs-form-field label,
.contact-form-wrapper .hs-form-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    z-index: 103;
}

.hero-form .hs-input,
.contact-form-wrapper .hs-input {
    width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #ddd !important;
    border-radius: 6px !important;
    font-size: 1rem !important;
    transition: all 0.3s ease !important;
    background: #fff !important;
    color: var(--text-color) !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    position: relative !important;
    z-index: 104 !important;
}

.hero-form .hs-input:focus,
.contact-form-wrapper .hs-input:focus {
    border-color: var(--primary-color) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(26, 84, 144, 0.1) !important;
}

.hero-form textarea.hs-input,
.contact-form-wrapper textarea.hs-input {
    min-height: 120px !important;
    resize: vertical !important;
}

.hero-form .hs-button,
.contact-form-wrapper .hs-button {
    background: var(--secondary-color) !important;
    color: white !important;
    padding: 15px 35px !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
    min-height: 50px !important;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.4) !important;
    position: relative !important;
    z-index: 105 !important;
}

.hero-form .hs-button:hover,
.contact-form-wrapper .hs-button:hover {
    background: #d35400 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(230, 126, 34, 0.5) !important;
}

.hero-form .hs-error-msgs,
.contact-form-wrapper .hs-error-msgs {
    list-style: none;
    padding: 0;
    margin: 5px 0 0 0;
}

.hero-form .hs-error-msg,
.contact-form-wrapper .hs-error-msg {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .hero-form,
    .contact-form-wrapper {
        padding: 25px;
    }
    
    .hero-form .hs-input,
    .contact-form-wrapper .hs-input {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 16px !important;
        min-height: 50px !important;
    }
    
    .hero-form .hs-button,
    .contact-form-wrapper .hs-button {
        padding: 18px 25px !important;
        min-height: 54px !important;
        font-size: 1.1rem !important;
    }
}

/* Ensure all form elements are interactive */
.hero-form *,
.contact-form-wrapper * {
    pointer-events: auto;
}

.hero-form input,
.hero-form select,
.hero-form textarea,
.hero-form button,
.contact-form-wrapper input,
.contact-form-wrapper select,
.contact-form-wrapper textarea,
.contact-form-wrapper button {
    pointer-events: auto !important;
    position: relative !important;
    z-index: 110 !important;
}

/* Sections */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

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

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.service-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.service-card p {
    color: #666;
    margin-bottom: 20px;
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.team-member {
    text-align: center;
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin: 0 auto 20px;
    object-fit: cover;
    border: 5px solid var(--secondary-color);
}

.team-member h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.team-member .role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.team-member p {
    color: #666;
    font-size: 0.95rem;
}

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

.review-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.2;
}

.stars {
    color: #f39c12;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.review-text {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.reviewer-name {
    color: var(--primary-color);
    font-weight: 600;
}

.reviewer-location {
    color: #999;
    font-size: 0.9rem;
}

/* Areas Covered */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.area-card {
    background: var(--light-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.area-card:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.05);
}

.area-card i {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.blog-card {
    background: var(--white);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

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

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

.blog-content {
    padding: 25px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    color: #999;
    font-size: 0.9rem;
}

.blog-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.blog-content p {
    color: #666;
    margin-bottom: 20px;
}

/* Blog Article Page */
.article-header {
    background: linear-gradient(135deg, rgba(26, 84, 144, 0.85), rgba(230, 126, 34, 0.75)), url('../images/hero-survey-action.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    padding: 80px 0 50px;
    text-align: center;
    position: relative;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

/* Page-specific hero backgrounds */
.hero-about {
    background-image: url('../images/team-member-1.jpg');
}

.hero-services {
    background-image: url('../images/equipment-showcase.jpg');
}

.hero-areas {
    background-image: url('../images/aerial-property-view.jpg');
}

.hero-contact {
    background-image: url('../images/boundary-survey.jpg');
}

.hero-blog {
    background-image: url('../images/survey-drawing.jpg');
}

.hero-blog-article {
    background-image: url('../images/architect-review.jpg');
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
}

.article-content img {
    margin: 30px 0;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.article-content h2 {
    color: var(--primary-color);
    margin: 40px 0 20px;
    font-size: 2rem;
}

.article-content h3 {
    color: var(--dark-color);
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 20px 0 20px 40px;
}

.article-content li {
    margin-bottom: 10px;
}

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

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

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
    transition: background 0.3s ease;
}

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

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

.faq-answer.active {
    padding: 20px;
    max-height: 1000px;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

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

.footer-section ul li {
    margin-bottom: 10px;
}

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

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

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

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .hero {
        min-height: 500px;
        padding: 40px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 40px 0;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
        text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.5);
    }
    
    .hero-text p {
        font-size: 1rem;
        text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .hero-feature {
        padding: 20px;
    }
    
    .hero-form {
        padding: 25px 20px;
    }
    
    .hero-form h3 {
        font-size: 1.4rem;
    }
    
    .article-header {
        padding: 60px 0 30px;
    }
    
    .article-header h1 {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
    }
    
    /* Areas page images responsive */
    section img {
        width: 100% !important;
        height: auto !important;
    }
}

@media (max-width: 768px) {
    /* Make two-column image grid single column on mobile */
    div[style*="grid-template-columns: 1fr 1fr"] {
        display: block !important;
    }
    
    div[style*="grid-template-columns: 1fr 1fr"] > div {
        margin-bottom: 20px;
    }
}

@media (min-width: 769px) {
    .hero-content {
        grid-template-columns: 1.5fr 1fr;
    }
}

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

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

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
