/*
 * A1 Moving Systems Website Stylesheet
 *
 * This stylesheet defines the styling for the A1 Moving Systems website.
 * Variables control the colour palette for easy customisation. The layout
 * uses a responsive, mobile‑first design.
 */

/* Colour palette */
:root {
    --primary-color: #003366; /* deep navy for header/footer backgrounds */
    --secondary-color: #0070c0; /* mid blue for accents */
    --accent-color: #f79a02; /* warm orange accent */
    --light-color: #ffffff;
    --dark-text: #222222;
    --body-text: #333333;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --card-border: #e0e0e0;
    --footer-bg: #002244;
}

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--body-text);
    background-color: var(--bg-color);
    line-height: 1.6;
}

/* Visually hidden skip link that becomes visible on focus. This improves keyboard
 * accessibility by allowing users to jump straight to the main content. */
.skip-link {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 8px 16px;
    z-index: 1000;
    border-radius: 4px;
    transition: top 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}
.skip-link:focus {
    top: 10px;
}

/* Ensure focus outlines are visible for keyboard users. Avoid removing outlines
 * which would make navigation difficult. */
a:focus,
button:focus {
    outline: 3px dashed var(--accent-color);
    outline-offset: 4px;
}

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

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

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

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.logo img {
    height: 80px;
}

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

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--light-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('../images/hero.png');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    margin-top: 90px; /* offset for fixed header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 700px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.125rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

.primary-btn:hover {
    background-color: #e38800;
}

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

.secondary-btn:hover {
    background-color: #00264d;
}

/* Services Preview */
.services-preview {
    padding: 60px 0;
    background-color: var(--bg-color);
}

.services-preview h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: var(--primary-color);
}

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

.service-card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

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

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

.service-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--body-text);
}

.services-preview .cta {
    text-align: center;
    margin-top: 40px;
}

/* About Section */
.about {
    background-color: var(--light-color);
    padding: 60px 0;
}

.about h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.about p {
    max-width: 800px;
    margin: 0 auto 20px auto;
    font-size: 1rem;
    line-height: 1.6;
}

/* Testimonials */
.testimonials {
    background-color: #eef2f5;
    padding: 60px 0;
}

.testimonials h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.testimonial {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    padding: 25px;
    font-style: italic;
    position: relative;
}

.testimonial span {
    display: block;
    margin-top: 15px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--light-color);
    padding-top: 40px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 30px;
}

.footer-info {
    flex: 1 1 250px;
}

.footer-info p, .footer-info a {
    font-size: 0.9rem;
    color: var(--light-color);
}

.footer-logo {
    height: 60px;
    margin-bottom: 15px;
}

.footer-nav {
    flex: 1 1 150px;
}

.footer-nav h4 {
    margin-bottom: 10px;
    color: var(--light-color);
}

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

.footer-nav ul li {
    margin-bottom: 8px;
}

.footer-nav ul li a {
    color: var(--light-color);
    font-size: 0.9rem;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Sub Hero (for inner pages) */
.sub-hero {
    background-color: #eef2f5;
    padding: 120px 0 60px;
    margin-top: 90px;
    text-align: center;
}

/* Services and Contact Heros with image backgrounds */
.services-hero,
.contact-hero {
    position: relative;
    background-image: url('../images/wrapped-furniture.png');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
}
.services-hero::after,
.contact-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
}
.services-hero h1,
.services-hero p,
.contact-hero h1,
.contact-hero p {
    position: relative;
    z-index: 1;
    color: var(--light-color) !important;
}

/* Packing Section */
.packing-section {
    background-color: var(--light-color);
    padding: 60px 0;
}
.packing-wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}
.packing-image {
    flex: 1 1 400px;
    max-width: 500px;
    border-radius: 8px;
}
.packing-content {
    flex: 1 1 400px;
}
.packing-content h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.packing-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    color: var(--body-text);
}

/* Hero Logo & Sub-hero Logo */
.hero-logo {
    width: 200px;
    margin-bottom: 20px;
}
.sub-hero-logo {
    width: 180px;
    margin: 0 auto 15px;
    display: block;
}

.sub-hero h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.sub-hero p {
    font-size: 1rem;
    color: var(--body-text);
}

/* Services Page */
.services-details {
    padding: 60px 0;
}

.services-details .service-detail {
    margin-bottom: 40px;
}

.services-details .service-detail i {
    font-size: 2.2rem;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.services-details .service-detail h2 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.services-details .service-detail p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--body-text);
    max-width: 800px;
}

.cta-section {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 40px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 25px;
}

.cta-section .primary-btn {
    background-color: var(--accent-color);
    color: var(--light-color);
}

.cta-section .primary-btn:hover {
    background-color: #e38800;
}

/* Contact Page */
.contact-section {
    padding: 60px 0;
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.contact-info, .contact-form {
    flex: 1 1 300px;
}

.contact-info h2, .contact-form h2 {
    margin-bottom: 20px;
    font-size: 1.7rem;
    color: var(--primary-color);
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-info a {
    color: var(--secondary-color);
}

.contact-form form {
    display: flex;
    flex-direction: column;
}

.contact-form label {
    margin-bottom: 5px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.contact-form input,
.contact-form textarea {
    padding: 10px 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    resize: vertical;
}

.contact-form button {
    align-self: flex-start;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    background-color: var(--accent-color);
    color: var(--light-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form button:hover {
    background-color: #e38800;
}

.required {
    color: var(--accent-color);
    margin-left: 2px;
}

/* Promotional Section (Why Choose Us) */
.promo-section {
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 60px 0;
}
.promo-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: center;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
.promo-image {
    flex: 1 1 300px;
    max-width: 400px;
}
.promo-image picture,
.promo-image img {
    width: 100%;
    height: auto;
}
.promo-content {
    flex: 1 1 300px;
}
.promo-content h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}
.promo-content ul {
    list-style: none;
    margin-bottom: 20px;
    padding: 0;
}
.promo-content li {
    margin-bottom: 12px;
    font-size: 1rem;
    padding-left: 34px;
    position: relative;
    line-height: 1.6;
}
.promo-content li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: var(--accent-color);
    font-size: 1.2rem;
}
.promo-content .primary-btn {
    margin-top: 10px;
}

/* Override backgrounds for inner page heros */
.services-hero {
    position: relative;
    background-image: url('../images/wrapped-furniture.png');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
}
.contact-hero {
    position: relative;
    background-image: url('../images/uniform-truck.webp');
    background-size: cover;
    background-position: center;
    color: var(--light-color);
}

/* Dark overlay for inner page heros */
.services-hero::after,
.contact-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
}
.services-hero h1,
.services-hero p,
.contact-hero h1,
.contact-hero p {
    position: relative;
    z-index: 1;
    color: var(--light-color) !important;
}

/* Reduce animations and transitions for users who prefer reduced motion */
@media (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;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-wrapper {
        flex-direction: column;
        align-items: flex-start;
        height: auto;
        padding: 15px 0;
    }
    nav ul {
        flex-direction: column;
        width: 100%;
    }
    nav ul li {
        margin: 10px 0;
    }
    .hero {
        height: 70vh;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 600px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    .about p {
        padding: 0 10px;
    }
    .testimonial {
        padding: 20px;
    }
}