/* Calmer Dog Training - modern stylesheet */
:root {
    --navy: #364b6d;
    --navy-dark: #26354f;
    --navy-light: #4a6490;
    --sand: #f6f3ee;
    --paper: #ffffff;
    --ink: #1f2937;
    --muted: #5b6676;
    --accent: #e08a2c;
    --accent-dark: #c2741f;
    --line: #e3dfd7;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(38, 53, 79, 0.12);
    --max: 1120px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--ink);
    background: var(--sand);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--navy-light);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--accent-dark);
}

h1,
h2,
h3 {
    font-family: "Merriweather", Georgia, serif;
    color: var(--navy);
    line-height: 1.25;
}

.container {
    width: min(var(--max), 100% - 40px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
    background: #fff;
    color: var(--navy);
    padding: 8px 14px;
    border-radius: 8px;
    z-index: 200;
}

.skip-link:focus {
    left: 8px;
}

/* ---------- Top bar ---------- */
.topbar {
    background: var(--navy-dark);
    color: #dbe3f0;
    font-size: 0.95rem;
}

.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 8px 0;
    flex-wrap: wrap;
}

.topbar a {
    color: #ffffff;
    text-decoration: none;
}

.topbar a:hover {
    color: #ffd9a8;
}

.topbar-contact {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.social {
    display: flex;
    gap: 10px;
}

.social a {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    transition: background-color 0.2s, transform 0.2s;
}

.social a:hover {
    background: var(--accent);
    transform: translateY(-2px);
    color: #fff;
}

/* ---------- Header / nav ---------- */
.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 0;
}

.brand img {
    height: 64px;
    width: auto;
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.main-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    padding: 9px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.98rem;
    transition: background-color 0.2s;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.14);
}

.main-nav a[aria-current="page"] {
    background: var(--accent);
    color: #fff;
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: clamp(360px, 55vh, 560px);
    display: flex;
    align-items: center;
    color: #fff;
    background: #26354f url("../images/banner.jpg") center 30% / cover no-repeat;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(38, 53, 79, 0.88) 0%, rgba(38, 53, 79, 0.55) 55%, rgba(38, 53, 79, 0.15) 100%);
}

.hero .container {
    position: relative;
    padding: 56px 0;
}

.hero h1 {
    color: #fff;
    font-size: clamp(2rem, 4.6vw, 3.3rem);
    margin: 0 0 14px;
    max-width: 640px;
}

.hero p {
    max-width: 560px;
    font-size: 1.2rem;
    margin: 0 0 26px;
    color: #eef2f8;
}

.hero-badges {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: 30px;
}

.hero-badges img {
    height: 70px;
    width: auto;
    background: #fff;
    border-radius: 12px;
    padding: 6px 10px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    padding: 13px 28px;
    border-radius: 999px;
    border: 2px solid var(--accent);
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn:hover,
.btn:focus-visible {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.btn-outline {
    background: transparent;
    border-color: #fff;
}

.btn-outline:hover {
    background: #fff;
    border-color: #fff;
    color: var(--navy);
}

.btn-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

/* ---------- Sections ---------- */
.section {
    padding: 64px 0;
}

.section-title {
    text-align: center;
    margin: 0 0 8px;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
    margin: 14px auto 0;
}

.section-lead {
    text-align: center;
    color: var(--muted);
    max-width: 720px;
    margin: 18px auto 40px;
}

/* ---------- Service cards ---------- */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 22px;
}

.card {
    background: var(--paper);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s, box-shadow 0.25s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(38, 53, 79, 0.2);
    color: inherit;
}

.card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.card-body {
    padding: 18px 20px 22px;
}

.card h3 {
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.98rem;
}

.card .more {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent-dark);
    font-weight: 700;
}

/* ---------- Info strip ---------- */
.strip {
    background: var(--navy);
    color: #fff;
    text-align: center;
    padding: 46px 0;
}

.strip h2 {
    color: #fff;
    margin: 0 0 10px;
}

.strip p {
    margin: 0 0 22px;
    color: #dbe3f0;
}

/* ---------- Page header + content ---------- */
.page-hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: #fff;
    padding: 46px 0;
}

.page-hero h1 {
    color: #fff;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.page-hero p {
    margin: 10px 0 0;
    color: #dbe3f0;
}

.prose-wrap {
    padding: 48px 0 64px;
}

.prose {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(24px, 4vw, 48px);
    max-width: 880px;
    margin-inline: auto;
}

.prose h2,
.prose h3 {
    margin: 1.6em 0 0.5em;
    font-size: 1.3rem;
}

.prose h2:first-child,
.prose h3:first-child {
    margin-top: 0;
}

.prose ul {
    padding-left: 0;
    list-style: none;
}

.prose li {
    position: relative;
    padding-left: 30px;
    margin: 8px 0;
}

.prose li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.8rem;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
}

.callout {
    margin-top: 2em;
    padding: 20px 24px;
    border-left: 5px solid var(--accent);
    background: #fdf6ec;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.callout h3 {
    margin-top: 0;
}

.callout p {
    margin: 0.4em 0 0;
}

.map-wrap {
    margin-top: 28px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-wrap iframe {
    display: block;
    width: 100%;
    min-height: 340px;
    border: 0;
}

/* ---------- Gallery ---------- */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 18px;
}

.gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 32px;
    align-items: start;
}

.contact-card,
.form-card {
    background: var(--paper);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(22px, 3vw, 36px);
}

.contact-card h2,
.form-card h2 {
    margin-top: 0;
    font-size: 1.4rem;
}

.contact-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.contact-list li {
    margin: 14px 0;
}

.contact-list strong {
    display: block;
    color: var(--navy);
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--navy);
}

.field input,
.field textarea {
    width: 100%;
    font: inherit;
    padding: 12px 14px;
    border: 2px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
    min-height: 150px;
    resize: vertical;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--navy-light);
    box-shadow: 0 0 0 4px rgba(74, 100, 144, 0.18);
}

.field .error-msg {
    display: none;
    color: #b42318;
    font-size: 0.9rem;
    margin-top: 5px;
}

.field.has-error input,
.field.has-error textarea {
    border-color: #b42318;
}

.field.has-error .error-msg {
    display: block;
}

.form-status {
    display: none;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
}

.form-status.ok {
    display: block;
    background: #e7f6ec;
    color: #146c2e;
}

.form-status.fail {
    display: block;
    background: #fdecea;
    color: #b42318;
}

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-ghost {
    background: transparent;
    color: var(--navy);
    border-color: var(--line);
}

.btn-ghost:hover {
    background: var(--sand);
    color: var(--navy);
    border-color: var(--navy-light);
    box-shadow: none;
}

.btn[disabled] {
    opacity: 0.6;
    cursor: wait;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--navy-dark);
    color: #cdd7e6;
    padding: 48px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.site-footer h3 {
    color: #fff;
    font-size: 1.05rem;
    margin: 0 0 12px;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffd9a8;
    text-decoration: underline;
}

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

.site-footer li {
    margin: 6px 0;
}

.footer-logo {
    height: 70px;
    width: auto;
    margin-bottom: 12px;
    border-radius: 6px;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 32px;
    padding-top: 18px;
    font-size: 0.9rem;
    text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .nav-toggle {
        display: inline-block;
    }

    .main-nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        background: var(--navy);
        padding: 8px 20px 18px;
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    }

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

    .main-nav ul {
        flex-direction: column;
    }

    .main-nav a {
        border-radius: 10px;
    }

    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero::before {
        background: rgba(38, 53, 79, 0.72);
    }
}

@media (max-width: 560px) {
    .topbar .container {
        justify-content: center;
    }

    .brand img {
        height: 52px;
    }

    .section {
        padding: 44px 0;
    }
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
