/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e3a5f;
    --secondary-color: #2c5f8d;
    --accent-color: #d4af37;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --success-color: #28a745;
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

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

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

.section-padding {
    padding: 80px 0;
}

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

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

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-family: 'Playfair Display', serif;
}

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

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

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

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 58, 95, 0.3);
}

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

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

.btn-nav {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 10px 24px;
    border-radius: 6px;
}

.btn-nav:hover {
    background: #c49f2e;
    transform: translateY(-1px);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

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

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

.logo i {
    font-size: 1.6rem;
    color: var(--accent-color);
}

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

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

.nav-menu a:not(.btn-nav):hover,
.nav-menu a.active {
    color: var(--primary-color);
}

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

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    min-width: 48px;
    min-height: 48px;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    overflow: hidden;
}

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

.animated-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%),
        url('../images/weymouth-harbour.jpg') center/cover no-repeat;
    background-blend-mode: overlay;
    animation: backgroundPulse 20s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(30, 58, 95, 0.92) 0%,
        rgba(44, 95, 141, 0.88) 100%
    );
    z-index: 1;
}

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

.hero-content {
    color: white;
}

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

.hero-subtitle {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    color: rgba(255,255,255,0.95);
}

.hero-features {
    display: flex;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.feature-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.15);
    padding: 12px 20px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.feature-badge i {
    color: var(--accent-color);
    font-size: 1.3rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.hero-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    position: sticky;
    top: 100px;
}

.hero-form-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

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

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: white;
    opacity: 0.8;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    border-color: var(--accent-color);
}

.service-card.featured {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.service-card.featured h3,
.service-card.featured p {
    color: white;
}

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

.service-card.featured .service-icon {
    background: rgba(255,255,255,0.2);
}

.service-icon i {
    font-size: 2rem;
    color: white;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 1rem;
}

.service-card.featured .service-link {
    color: white;
}

.service-link:hover {
    gap: 12px;
}

/* Why Choose Section */
.bg-light {
    background: var(--bg-light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.benefit-item {
    text-align: center;
}

.benefit-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.benefit-icon i {
    font-size: 2.2rem;
    color: white;
}

/* Coverage Section */
.coverage-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.coverage-list {
    list-style: none;
    margin: 2rem 0;
}

.coverage-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 1.1rem;
}

.coverage-list i {
    color: var(--success-color);
    font-size: 1.2rem;
}

.coverage-image {
    position: relative;
}

.coverage-image img {
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    width: 100%;
}

.coverage-badge {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.badge-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.badge-text {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
}

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

.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

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

.testimonial-author {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.testimonial-author strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.testimonial-author span {
    font-size: 0.9rem;
    color: var(--text-light);
}

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

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

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

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

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--accent-color);
}

.faq-question[aria-expanded="true"] i {
    transform: rotate(180deg);
}

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

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    line-height: 1.8;
}

/* Contact Form Section */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

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

.contact-form-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.contact-form-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-feature {
    display: flex;
    gap: 1rem;
    align-items: start;
}

.contact-feature i {
    font-size: 2rem;
    color: var(--accent-color);
    margin-top: 5px;
}

.contact-feature strong {
    display: block;
    color: white;
    margin-bottom: 4px;
}

.contact-feature p {
    color: rgba(255,255,255,0.8);
    font-size: 0.95rem;
    margin: 0;
}

.contact-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

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

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h3,
.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
}

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

.footer ul {
    list-style: none;
}

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

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

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

.footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.footer-badge {
    background: var(--accent-color);
    color: var(--primary-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

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

.footer-bottom p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: var(--accent-color);
}

.footer-note {
    font-size: 0.85rem;
    opacity: 0.7;
}

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

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}

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

.blog-content {
    padding: 2rem;
}

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

.blog-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

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

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

.read-more:hover {
    color: var(--secondary-color);
    gap: 12px;
}

/* Blog Article Page */
.article-header {
    text-align: center;
    padding: 120px 0 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.article-header h1 {
    color: white;
    margin-bottom: 1rem;
}

.article-header p {
    color: white;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    color: rgba(255,255,255,0.9);
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 4rem 20px;
}

.article-image {
    width: 100%;
    border-radius: 12px;
    margin: 2rem 0;
}

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

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

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

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

.article-content li {
    margin-bottom: 0.8rem;
    line-height: 1.8;
}

/* Responsive Design */
@media (max-width: 968px) {
    .hero-content-wrapper,
    .coverage-wrapper,
    .contact-form-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero-form-card {
        position: relative;
        top: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .services-grid,
    .benefits-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        flex-direction: column;
        background: white;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        gap: 1rem;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        min-height: 48px; /* Improved touch target */
        padding: 16px 32px; /* Increased padding for better touch */
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Better mobile spacing */
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Improved mobile readability */
    p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Better mobile navigation touch targets */
    .nav-menu li a {
        padding: 12px 16px;
        display: block;
        font-size: 1.1rem;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    /* Mobile-optimized service cards */
    .service-card,
    .benefit-item {
        padding: 2rem 1.5rem;
    }
    
    /* Better mobile forms */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .services-grid,
    .benefits-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-features {
        flex-direction: column;
    }
    
    /* Enhanced mobile typography */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }
    
    /* Mobile-optimized containers */
    .container {
        padding: 0 1rem;
    }
    
    /* Better mobile card spacing */
    .service-card,
    .blog-card,
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile-friendly images */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Mobile button improvements */
    .btn {
        font-size: 1rem;
        padding: 14px 24px;
    }
    
    /* Mobile form improvements */
    .contact-form-wrapper {
        padding: 1.5rem;
    }
    
    /* Better mobile table of contents / FAQ */
    .faq-item h3 {
        font-size: 1.1rem;
        padding-right: 2rem; /* Space for toggle icon */
    }
    
    /* Mobile-optimized footer */
    .footer-section {
        margin-bottom: 2rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }
    
    /* Article improvements for mobile */
    .article-content {
        padding: 2rem 1rem;
    }
    
    .article-content p,
    .article-content li {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    /* Better mobile hero sections */
    .hero-section,
    .article-header {
        padding: 80px 0 40px;
    }
    
    .hero h1,
    .article-header h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }
}

/* Mobile-Specific Enhancements */
@media (max-width: 768px) {
    /* Prevent text size adjustment on orientation change */
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
    
    /* Better tap highlighting */
    * {
        -webkit-tap-highlight-color: rgba(30, 58, 95, 0.1);
    }
    
    /* Smooth scrolling for mobile */
    html {
        scroll-behavior: smooth;
    }
    
    /* Improved link touch targets */
    a {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Footer links optimization */
    .footer-section ul li a {
        padding: 8px 0;
        display: block;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Service links better touch targets */
    .service-link,
    .read-more {
        padding: 12px 16px;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better mobile table layouts */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimize images for mobile */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Better mobile modal/overlay close buttons */
    .close-button,
    .modal-close {
        min-width: 48px;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Mobile Accessibility Improvements */
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* iOS-specific fixes */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari specific styles */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="search"],
    textarea {
        font-size: 16px; /* Prevents zoom on focus */
    }
    
    /* Fix iOS Safari bottom bar issue */
    .hero,
    .article-header {
        min-height: -webkit-fill-available;
    }
}

/* Android-specific optimizations */
@media (max-width: 768px) {
    /* Better tap response on Android */
    button,
    .btn,
    a {
        touch-action: manipulation;
    }
    
    /* Optimize select dropdowns for Android */
    select {
        font-size: 16px;
        padding: 12px;
        min-height: 48px;
    }
}