/* Google Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

/* Color Variables */
:root {
    --accent: #2d6cdf;
    --dark: #222;
    --light: #f9f9f9;
    --card: #fff;
    --border: #eee;
    --text: #1a1a1a;
    --subtle: #555;
    --header-bg: #f4f6fb;
}

/* Reset */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    margin: 0;
    padding: 0;
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
}

/* Links */
a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    color: var(--text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
    position: relative;
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

header h1 a {
    font-size: 1.8rem;
    color: var(--accent);
    font-weight: 700;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

nav li a {
    color: var(--text);
    font-weight: 500;
}

/* Main Container */
.container {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Homepage / Hero */
.hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.hero p {
    font-size: 1.2rem;
    color: var(--subtle);
    margin-bottom: 2rem;
}

/* Sections */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
    font-weight: 600;
    color: var(--dark);
}

/* Blog Post Layout */
.blog-post {
    background: var(--card);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.blog-post header {
    margin-bottom: 1.5rem;
}

.blog-post h1 {
    font-size: 2rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.blog-post .meta {
    font-size: 0.9rem;
    color: #888;
}

.blog-post h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.blog-post h3 {
    font-size: 1.1rem;
    margin-top: 1.5rem;
    color: var(--text);
}

.blog-post ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.blog-post blockquote {
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #eaf5ff;
    border-left: 4px solid var(--accent);
    font-style: italic;
    color: #333;
}

/* Author Box */
.author-box {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ddd;
    font-size: 0.95rem;
    color: #555;
}

/* Footer */
footer {
    background: var(--card);
    color: #666;
    border-top: 1px solid var(--border);
    padding: 2rem 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

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

/* Mobile */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        /* change from flex-start */
        gap: 0.5rem;
        /* tighter spacing */
    }    

    .hero h1 {
    display: none;
  }

    nav ul {
        flex-direction: column;
        width: 100%;
        align-items: center;
        gap: 0.75rem;
    }

    nav li {
        width: auto;
    }

    nav li a {
        display: block;
        text-align: center;
        padding: 0.25rem 0;
    }
}

    .hero h1 {
        font-size: 1.6rem;
    }

    .blog-post h1 {
        font-size: 1.6rem;
    }

    .blog-post h2 {
        font-size: 1.2rem;
    }

    .blog-post h3 {
        font-size: 1.05rem;
    }
}

/* Card Layout */
.card-section {
    margin-bottom: 4rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.card p {
    color: var(--subtle);
    font-size: 0.95rem;
}

.card:hover {
  transform: translateY(-4px);
}

/* Guide Hero Section */
.guides-hero {
    text-align: center;
    margin-bottom: 2.5rem;
}

.guides-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.guides-hero p {
    font-size: 1.1rem;
    color: var(--subtle);
}

/* Guide Search Bar */
.guide-search {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.guide-search input {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Guide Filters */
.guide-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.guide-filters button {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.guide-filters button.active,
.guide-filters button:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

/* Guide Card Grid */
.guide-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Guide Card Style */
.guide-list .card {
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 10px;
    background: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-left 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.guide-list .card h3 {
    margin-bottom: 0.5rem;
    color: var(--dark);
    font-size: 1.15rem;
    font-weight: 600;
}

.guide-list .card p {
    font-size: 0.95rem;
    color: var(--subtle);
}

.guide-list .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--accent);
}

.back-link {
    margin-bottom: 1rem;
}

.back-link a {
    display: inline-block;
    color: var(--accent);
    background: #f0f4ff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.back-link a:hover {
    background: var(--accent);
    color: #fff;
}

.about-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.about-hero h1 {
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.about-hero p {
    font-size: 1.2rem;
    color: var(--subtle);
}

.about-content h2 {
    margin-top: 2rem;
    font-size: 1.4rem;
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
    color: var(--dark);
}

.about-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.about-content li {
    margin-bottom: 0.5rem;
}

.about-content blockquote {
    background: #f0f4ff;
    border-left: 4px solid var(--accent);
    margin: 2rem 0;
    padding: 1rem 1.25rem;
    font-style: italic;
    color: #333;
}

.privacy-policy {
    max-width: 800px;
    margin: 0 auto;
}

.privacy-policy h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.privacy-policy h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--accent);
    padding-left: 0.75rem;
    color: var(--dark);
}

.privacy-policy ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.privacy-policy p {
    margin-bottom: 1rem;
    color: var(--text);
}

.tool-form form {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.tool-form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
}

.tool-form input,
.tool-form select {
    display: block;
    width: 100%;
    padding: 0.6rem;
    font-size: 1rem;
    margin-top: 0.25rem;
    border: 1px solid #ddd;
    border-radius: 6px;
}

.checkbox-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.tool-form button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.results-box {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #eee;
}

.toggle-group {
    margin-bottom: 1.5rem;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.toggle-label small {
    font-weight: normal;
    font-size: 0.9rem;
    color: var(--subtle);
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    vertical-align: middle;
    margin-left: 5px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent);
}

input:checked+.slider:before {
    transform: translateX(24px);
}
.back-link {
    margin-bottom: 1.5rem;
}

.back-link a {
    display: inline-block;
    color: var(--accent);
    background: #f0f4ff;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.back-link a:hover {
    background: var(--accent);
    color: #fff;
}
html {
  overflow-y: scroll;
}

/* Stamp Duty Calculator Specific Styles */
.tool h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.tool p {
    font-size: 1rem;
    color: var(--subtle);
    margin-bottom: 1.5rem;
}

.tool-form {
    background: var(--card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.tool-form .form-group {
    margin-bottom: 1.25rem;
}

.tool-form label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.tool-form input[type="number"] {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.checkbox-group label {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.tool-form .btn {
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--accent);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.tool-form .btn:hover {
    background: #1f57c4;
}

.result {
    background: #f4f6fb;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-top: 2rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark);
}
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 16px;
    text-align: left;
}

.results-table th,
.results-table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
}

.results-table thead {
    background-color: #f4f4f4;
    font-weight: bold;
}

.results-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.results-table tbody tr:last-child td {
    font-weight: bold;
    border-top: 2px solid #333;
    background-color: #eef7ee;
}

#pieChart {
    display: block;
    margin: 30px auto 10px;
    max-width: 400px;
}

.chart-container {
    text-align: center;
    margin-top: 30px;
}

@media screen and (max-width: 768px) {
    .results-table {
        font-size: 14px;
    }
}
.responsive-table {
  overflow-x: auto;
  margin-bottom: 2rem;
}

.responsive-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.responsive-table th,
.responsive-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #ddd;
  text-align: left;
}

.responsive-table th {
  background-color: #f9f9f9;
  font-weight: 600;
}
.faq-item {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background-color: #f9f9f9;
  border-left: 4px solid #007acc;
  border-radius: 4px;
}

.faq-item h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #222;
}

.faq-item p {
  margin: 0;
  color: #555;
}

.btn-primary {
    background-color: #2b6cb0;
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    margin-bottom: 3rem;
    transition: background 0.3s ease;
}

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

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.button {
    background: #0077cc;
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.button:hover {
    background: #005fa3;
}

.form-note {
    font-size: 0.9rem;
    margin-top: 1rem;
    color: #666;
}

#formResponse {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.95rem;
}

/* Default: show nav, hide toggle */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.5rem;
    }

    header h1 {
        font-size: 1.8rem;
        margin: 0;
    }

    .nav-toggle {
        display: block;
        font-size: 2rem;
        background: none;
        border: none;
        color: var(--text);
        cursor: pointer;
        margin-top: 0.25rem;
    }

    .nav-links {
        display: none;
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .nav-links.open {
        display: block;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        padding: 0;
        margin: 0;
        align-items: center;
    }
}

/* DESKTOP: always show nav */
@media (min-width: 769px) {
    .nav-toggle {
        display: none;
    }

    .nav-links {
        display: block !important;
    }
}