/*
 * Main stylesheet for the Retaining Walls Perth site
 *
 * The goal of this CSS is to mirror the look and feel of the
 * reference website while using only plain HTML and CSS. No
 * JavaScript or external frameworks are required. Use the CSS
 * variables defined at the top of the file to adjust colours
 * and spacing across the entire site from a single location.
 */

/* Colour palette */
:root {
    --primary-colour: #4a63e7;       /* Blue used for buttons and highlights */
    --primary-dark:  #3946c7;       /* Darker variant for hover states */
    --secondary-colour: #ffffff;    /* White for backgrounds and inverted text */
    --text-colour: #2f3640;         /* Default dark text colour */
    --muted-colour: #626f86;        /* Muted text for descriptions */
    --background-light: #f7f9fc;    /* Light grey background for sections */
    --background-gradient-start: #eef5ff; /* Gradient start for hero */
    --background-gradient-end: #fafcff;   /* Gradient end for hero */
    --accent-colour: #f5f8ff;       /* Soft background for cards */
    --border-colour: #e0e6ef;       /* Borders and separators */
    --footer-background: #081c36;   /* Dark blue for footer */
    --footer-text: #c5d6e5;         /* Light text used in footer */
    --star-colour: #f5c518;         /* Golden yellow for star ratings */
}

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    color: var(--text-colour);
    line-height: 1.6;
    background-color: #fff;
}

a {
    color: var(--text-colour);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--primary-colour);
}

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

/* Reusable container class for consistent widths */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Navigation bar */
.navbar {
    width: 100%;
    background-color: var(--secondary-colour);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    font-size: 1.25rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
}

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

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background: var(--primary-colour);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.call-btn {
    background-color: var(--primary-colour);
    color: var(--secondary-colour);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    white-space: nowrap;
}

.call-btn:hover {
    background-color: var(--primary-dark);
}

/* Hero section */
.hero {
    background: linear-gradient(135deg, var(--background-gradient-start) 0%, var(--background-gradient-end) 100%);
    padding: 4rem 0;
}

.hero-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.hero-text {
    flex: 1 1 450px;
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    font-weight: 800;
}

.hero h1 .highlight {
    color: var(--primary-colour);
}

.hero p {
    color: var(--muted-colour);
    max-width: 500px;
    margin-bottom: 1.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn.primary {
    background-color: var(--primary-colour);
    color: var(--secondary-colour);
    border: 2px solid var(--primary-colour);
}

.btn.primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn.secondary {
    background-color: transparent;
    color: var(--primary-colour);
    border: 2px solid var(--primary-colour);
}

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

.btn.small {
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
}

.btn.large {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

/* Stats row */
.stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat h3 {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-colour);
    font-weight: 700;
}

.stat p {
    margin: 0;
    color: var(--muted-colour);
    font-size: 0.9rem;
}

/* Rating card */
.hero-rating {
    /* Allow the rating container to hold an image with an overlay */
    flex: 1 1 450px;
    max-width: 540px;
    position: relative;
    display: block;
    margin-left: auto;
}

.rating-card {
    background-color: var(--secondary-colour);
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    max-width: 200px;
    position: relative;
}

.rating-card .stars {
    color: var(--star-colour);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.rating-card .rating-score {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hero-rating img.hero-img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
    object-fit: cover;
}

/* Position the rating card over the hero image */
.hero-rating .rating-card {
    position: absolute;
    top: 1rem;
    right: 1rem;
}
.rating-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted-colour);
}

/* Solution section */
.solution {
    background-color: var(--background-light);
    padding: 4rem 0;
    text-align: center;
}

.solution h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.solution p {
    margin-bottom: 2rem;
    color: var(--muted-colour);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.solution-card {
    background-color: var(--secondary-colour);
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.solution-card .icon-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-colour);
    display: inline-block;
    margin-bottom: 1rem;
}

.solution-card h3 {
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.solution-card p {
    color: var(--muted-colour);
    margin-bottom: 1rem;
}

.solution-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.solution-card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-colour);
}

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

/* Process section */
.process {
    padding: 4rem 0;
    text-align: center;
}

.process h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.process p {
    margin-bottom: 2rem;
    color: var(--muted-colour);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.steps {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: space-between;
}

.step {
    flex: 1 1 calc(25% - 2rem);
    min-width: 220px;
    text-align: center;
    padding: 1rem;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-colour);
    color: var(--secondary-colour);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem auto;
    font-size: 1.25rem;
}

.step h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.step p {
    font-size: 0.9rem;
    color: var(--muted-colour);
    margin: 0;
}

/* Gallery section */
.gallery {
    padding: 4rem 0;
    background-color: var(--background-light);
    text-align: center;
}

.gallery h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.gallery p {
    margin-bottom: 2rem;
    color: var(--muted-colour);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    background-color: var(--secondary-colour);
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.gallery-item h3 {
    font-size: 1.1rem;
    margin: 1rem 1rem 0.5rem;
    font-weight: 600;
    flex: none;
}

.gallery-item p {
    color: var(--muted-colour);
    margin: 0 1rem 1rem;
    font-size: 0.9rem;
    flex: none;
}

/* Experience/why choose us section */
.experience {
    padding: 4rem 0;
    text-align: center;
}

.experience h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.experience p {
    margin-bottom: 2rem;
    color: var(--muted-colour);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.experience-cards {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.experience-cards .card {
    flex: 1 1 calc(33.333% - 2rem);
    min-width: 260px;
    background-color: var(--secondary-colour);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.experience-cards .card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--primary-colour);
}

.experience-cards h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.experience-cards p {
    font-size: 0.9rem;
    color: var(--muted-colour);
    margin: 0;
}

/* Call‑to‑action section */
.cta {
    background-color: var(--accent-colour);
    padding: 4rem 0;
    text-align: center;
}

.cta h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.cta p {
    margin-bottom: 2rem;
    color: var(--muted-colour);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact section */
.contact {
    padding: 4rem 0;
    background-color: var(--background-light);
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

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

.contact-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.contact-info p {
    margin-bottom: 1rem;
    color: var(--muted-colour);
}

.info-box {
    background-color: #fff4d9;
    border: 1px solid #f8d182;
    padding: 1rem;
    border-radius: 8px;
    color: #846229;
}

.info-box strong {
    display: block;
    margin-bottom: 0.5rem;
}

.quote-form {
    flex: 1 1 400px;
    background-color: var(--secondary-colour);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.quote-form .row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.quote-form .field {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.quote-form label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quote-form input,
.quote-form textarea {
    padding: 0.65rem;
    border: 1px solid var(--border-colour);
    border-radius: 6px;
    font-size: 0.95rem;
    outline: none;
    resize: vertical;
}

.quote-form textarea {
    min-height: 120px;
}

.quote-form input:focus,
.quote-form textarea:focus {
    border-color: var(--primary-colour);
    box-shadow: 0 0 0 3px rgba(74, 99, 231, 0.1);
}

.quote-form button {
    display: inline-block;
    margin-top: 1rem;
}

/* Footer */
.footer {
    background-color: var(--footer-background);
    color: var(--footer-text);
    padding: 3rem 0 2rem;
    font-size: 0.9rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
}

.footer-col {
    flex: 1 1 200px;
}

.footer-col h3 {
    color: var(--secondary-colour);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.footer-col h4 {
    color: var(--secondary-colour);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-col ul li a {
    color: var(--footer-text);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-colour);
}

.social-icons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.social-icons img {
    width: 20px;
    height: 20px;
    filter: invert(90%) sepia(6%) saturate(300%) hue-rotate(182deg) brightness(90%) contrast(90%);
    /* This filter recolours the black icons to match the light footer text */
    transition: filter 0.2s ease;
}

.social-icons a:hover img {
    filter: invert(46%) sepia(62%) saturate(4045%) hue-rotate(222deg) brightness(96%) contrast(93%);
}

.contact-list li {
    margin-bottom: 0.5rem;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--footer-text);
}

/* Responsive design */
@media (max-width: 960px) {
    .nav-links {
        display: none; /* hide nav links on small screens */
    }
    .navbar {
        justify-content: space-between;
    }
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-rating {
        width: 100%;
        justify-content: flex-start;
        margin-top: 2rem;
    }
    .solution-card {
        max-width: 100%;
    }
    .steps {
        justify-content: center;
    }
    .step {
        flex: 1 1 calc(50% - 2rem);
        max-width: none;
    }
    .experience-cards .card {
        flex: 1 1 calc(50% - 2rem);
    }
    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }
    .quote-form,
    .contact-info {
        flex: 1 1 100%;
    }
}

@media (max-width: 640px) {
    .step {
        flex: 1 1 100%;
    }
    .experience-cards .card {
        flex: 1 1 100%;
    }
    .gallery-item img {
        height: 150px;
    }
    .hero h1 {
        font-size: 2rem;
    }
    .navbar .brand {
        font-size: 1rem;
    }
    .btn {
        padding: 0.6rem 1rem;
    }
}