@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
    --primary: #0050B0;
    --secondary: #003F8F;
    --primary-deep: #04336F;
    --accent: #E83A3A;
    --success: #35A852;
    --success-hover: #2D8B45;
    --cream: #FDF6EE;
    --cream-strong: #F5E9D8;
    --surface: #FFFFFF;
    --text: #243141;
    --muted: #5F6B77;
    --border: #C8D8F0;
    --focus: #E83A3A;
    --overlay: rgba(2, 18, 42, 0.42);
    --shadow-soft: 0 4px 24px rgba(0, 47, 102, 0.12);
    --shadow-medium: 0 12px 42px rgba(0, 47, 102, 0.18);
    --radius: 16px;
    --radius-sm: 8px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream);
    color: var(--text);
    font-family: var(--font-body);
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 999;
    background: var(--primary-deep);
    color: var(--surface);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

/* ===== HEADER ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-image: linear-gradient(to right, #0B72E9, var(--primary), var(--secondary), var(--primary-deep));
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 2px 20px rgba(0, 47, 102, 0.2);
}

.site-header {
    max-width: 1200px;
    height: 76px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-header img {
    height: 58px;
    width: auto;
    object-fit: contain;
}

header nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

header nav a {
    color: var(--surface);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 9px 15px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

header nav a:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

header nav a:last-child {
    background: var(--success);
    color: var(--surface);
    padding-inline: 20px;
}

header nav a:last-child:hover {
    background: var(--success-hover);
}

header nav a:focus-visible,
.prev:focus-visible,
.next:focus-visible,
.dots button:focus-visible,
.home-dogs-link:focus-visible,
.home-dog-button:focus-visible,
.home-dogs-control:focus-visible,
.home-dog-dot:focus-visible,
.home-dogs-viewport:focus-visible,
.form-doacao button:focus-visible,
.form-doacao input:focus-visible,
.erro-page a:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

/* ===== HERO SLIDER ===== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 560px;
    overflow: hidden;
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity 0.9s ease, transform 5.5s ease;
    z-index: 0;
}

.slide.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(0, 37, 84, 0.58) 0%, rgba(0, 80, 176, 0.2) 55%, rgba(53, 168, 82, 0.16) 100%),
        var(--overlay);
    z-index: 1;
}

.content {
    position: absolute;
    bottom: 18%;
    left: 9%;
    color: var(--surface);
    max-width: 580px;
    z-index: 2;
    opacity: 0;
    transform: translateY(26px);
    transition: 0.9s ease;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.35);
}

.content h1 {
    font-family: var(--font-display);
    font-size: clamp(2.8rem, 6vw, 5.4rem);
    line-height: 0.96;
    margin-bottom: 16px;
}

.content p {
    max-width: 520px;
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    line-height: 1.55;
    font-weight: 400;
}

.slide.active .content {
    opacity: 1;
    transform: translateY(0);
}

.prev,
.next {
    position: absolute;
    top: 50%;
    z-index: 10;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.18);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--surface);
    font-size: 26px;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    backdrop-filter: blur(6px);
}

.prev {
    left: 32px;
}

.next {
    right: 32px;
}

.prev:hover,
.next:hover {
    background: var(--success);
    border-color: var(--success);
    transform: translateY(-50%) scale(1.08);
}

.dots {
    position: absolute;
    bottom: 32px;
    left: 50%;
    z-index: 10;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.dots button {
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.dots button.active,
.dots button:hover {
    background: var(--success);
    border-color: var(--success);
    transform: scale(1.24);
}

/* ===== QUEM SOMOS ===== */
.quem-somos {
    position: relative;
    padding: 100px 32px;
    background: var(--cream);
}

.quem-somos::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--success), var(--accent), var(--primary));
}

.quem-somos h2,
.nossa-sede h2,
.doacao h2 {
    font-family: var(--font-display);
    font-size: clamp(2.3rem, 4vw, 3.2rem);
    text-align: center;
    margin-bottom: 34px;
}

.quem-somos h2,
.doacao h2 {
    color: var(--primary-deep);
}

.quem-somos h2::after,
.nossa-sede h2::after,
.doacao h2::after {
    content: "";
    display: block;
    width: 66px;
    height: 4px;
    background: var(--success);
    border-radius: 999px;
    margin: 12px auto 0;
}

.quem-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 72px;
    align-items: center;
}

.quem-container p {
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.85;
    color: var(--muted);
    font-weight: 300;
}

.quem-container p strong {
    color: var(--success-hover);
    font-weight: 700;
}

.quem-img {
    position: relative;
}

.quem-img::before {
    content: "";
    position: absolute;
    inset: -14px -14px 14px 14px;
    border: 3px solid var(--success);
    border-radius: 28px 6px 28px 6px;
    opacity: 0.35;
    pointer-events: none;
}

.quem-foto {
    display: block;
    width: 100%;
    height: 360px;
    object-fit: cover;
    border-radius: 24px 6px 24px 6px;
    box-shadow: var(--shadow-medium);
}

/* ===== CAES NA HOME ===== */
.home-dogs {
    padding: 92px 32px;
    background: var(--surface);
}

.home-dogs-container {
    max-width: 1100px;
    margin: 0 auto;
}

.home-dogs-heading {
    max-width: 720px;
    margin: 0 auto 34px;
    text-align: center;
}

.home-dogs-heading h2 {
    color: var(--primary-deep);
    font-family: var(--font-display);
    font-size: clamp(2.2rem, 4vw, 3.1rem);
    line-height: 1.1;
    margin-bottom: 16px;
}

.home-dogs-heading h2::after {
    content: "";
    display: block;
    width: 66px;
    height: 4px;
    background: var(--success);
    border-radius: 999px;
    margin: 12px auto 0;
}

.home-dogs-heading p {
    color: var(--muted);
    font-size: 1.06rem;
    line-height: 1.7;
    margin-bottom: 20px;
    font-weight: 300;
}

.home-dogs-link,
.home-dog-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: var(--radius-sm);
    background: var(--success);
    color: var(--surface);
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
}

.home-dogs-link {
    padding: 12px 22px;
}

.home-dog-button {
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
}

.home-dogs-link:hover,
.home-dog-button:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
}

.home-dogs-carousel {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 16px;
    align-items: center;
}

.home-dogs-viewport {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    border-radius: var(--radius);
}

.home-dogs-viewport::-webkit-scrollbar {
    display: none;
}

.home-dogs-track {
    display: flex;
    gap: 20px;
}

.home-dogs-spacer {
    display: none;
    flex: 0 0 0;
}

.home-dog-card {
    flex: 0 0 calc((100% - 40px) / 3);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.home-dog-card img {
    display: block;
    width: 100%;
    height: 230px;
    object-fit: cover;
}

.home-dog-card-content {
    padding: 18px;
    text-align: center;
}

.home-dog-card-content h3 {
    color: var(--primary-deep);
    font-size: 1.2rem;
    line-height: 1.25;
    margin-bottom: 12px;
}

.home-dogs-control {
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 50%;
    background: var(--success);
    color: var(--surface);
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.home-dogs-control:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
}

.home-dogs-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.home-dog-dot {
    width: 11px;
    height: 11px;
    padding: 0;
    border: 2px solid var(--success);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.home-dog-dot.active,
.home-dog-dot:hover {
    background: var(--success);
    transform: scale(1.18);
}

/* ===== NOSSA SEDE ===== */
.nossa-sede {
    position: relative;
    padding: 100px 32px;
    overflow: hidden;
    background-image: linear-gradient(to right, #0B72E9, var(--primary), var(--secondary), var(--primary-deep));
}

.nossa-sede::after {
    content: "🐾";
    position: absolute;
    right: 6%;
    bottom: -22px;
    font-size: 12rem;
    opacity: 0.06;
    pointer-events: none;
    user-select: none;
}

.nossa-container {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.nossa-sede h2 {
    color: var(--surface);
}

.descricao {
    font-size: 1.04rem;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.85;
    margin-bottom: 18px;
    font-weight: 300;
}

.descricao strong {
    color: var(--surface);
    font-weight: 700;
}

.info {
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.info-item {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: var(--radius-sm);
    padding: 16px 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.96rem;
    line-height: 1.55;
    text-align: left;
    box-shadow: 0 10px 30px rgba(0, 26, 62, 0.14);
    transition: transform 0.2s ease, background 0.2s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.info-item strong {
    color: var(--surface);
}

.info-item a {
    color: var(--surface);
    font-weight: 700;
}

/* ===== DOAÇÃO ===== */
.doacao {
    padding: 96px 32px;
    background: var(--cream-strong);
    text-align: center;
}

.doacao .container {
    max-width: 700px;
}

.doacao p {
    font-size: 1.04rem;
    line-height: 1.8;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 300;
}

.form-doacao {
    margin: 38px auto 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    max-width: 420px;
}

.form-doacao input {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(0, 80, 176, 0.14);
    background: var(--surface);
    color: var(--text);
    outline: none;
    font: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-doacao input:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 3px rgba(53, 168, 82, 0.16);
}

.form-doacao button {
    width: 100%;
    background: var(--success);
    color: var(--surface);
    border: none;
    padding: 15px 24px;
    font: inherit;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    letter-spacing: 0.02em;
    transition: background 0.2s ease, transform 0.15s ease;
}

.form-doacao button:hover {
    background: var(--success-hover);
    transform: translateY(-2px);
}

.status-doacao {
    min-height: 22px;
    max-width: 520px;
    font-size: 15px;
    line-height: 1.4;
}

.info-doacao {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 12px;
    text-align: left;
}

.info-doacao p {
    margin-bottom: 6px;
    font-size: 0.96rem;
}

.info-doacao p:last-child {
    margin-bottom: 0;
}

.info-doacao strong {
    color: var(--success-hover);
}

.doacao-opcao {
    padding: 24px 26px;
    border-radius: var(--radius);
    border: 2px dashed rgba(53, 168, 82, 0.34);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.doacao-opcao h3 {
    margin-bottom: 14px;
    color: var(--primary-deep);
    font-size: 1.1rem;
    line-height: 1.35;
}

/* ===== 404 ===== */
.erro-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    text-align: center;
    padding: 40px 20px;
    background: var(--cream);
}

.erro-page h1 {
    color: var(--primary-deep);
    font-family: var(--font-display);
    font-size: 42px;
}

.erro-page p {
    color: var(--muted);
    font-size: 18px;
}

.erro-page a {
    background: var(--success);
    color: var(--surface);
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
}

/* ===== RESPONSIVO ===== */
@media (max-width: 900px) {
    .site-header {
        padding: 0 18px;
    }

    header nav {
        gap: 0;
    }

    header nav a {
        font-size: 14px;
        padding: 8px 10px;
    }

    .quem-container {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .quem-img {
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
    }

    .home-dog-card {
        flex-basis: calc((100% - 20px) / 2);
    }

    .info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header {
        min-height: 104px;
        height: auto;
        padding: 10px 14px 12px;
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .site-header img {
        height: 50px;
    }

    header nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    header nav a {
        font-size: 13px;
        padding: 7px 9px;
    }

    .hero {
        min-height: 620px;
    }

    .content {
        left: 6%;
        right: 6%;
        bottom: 16%;
        max-width: none;
    }

    .prev {
        left: 14px;
    }

    .next {
        right: 14px;
    }

    .prev,
    .next {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .quem-somos,
    .home-dogs,
    .nossa-sede,
    .doacao {
        padding: 72px 20px;
    }

    .home-dogs-heading {
        margin-bottom: 26px;
    }

    .home-dogs-carousel {
        --home-dogs-mobile-edge: max(16px, calc((100% - 320px) / 2));
        position: relative;
        display: block;
    }

    .home-dogs-control {
        position: absolute;
        top: 50%;
        z-index: 2;
        width: 40px;
        height: 40px;
        font-size: 20px;
        transform: translateY(-50%);
        box-shadow: 0 8px 22px rgba(0, 47, 102, 0.18);
    }

    .home-dogs-control:hover {
        transform: translateY(-50%);
    }

    .home-dogs-prev {
        left: 8px;
    }

    .home-dogs-next {
        right: 8px;
    }

    .home-dogs-viewport {
        width: 100%;
        scroll-padding-inline: var(--home-dogs-mobile-edge, 16px);
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
    }

    .home-dogs-track {
        gap: 16px;
        padding-inline: 0;
    }

    .home-dog-card {
        flex: 0 0 min(320px, calc(100% - 32px));
        max-width: 320px;
        scroll-snap-align: center;
    }

    .home-dog-card:first-child {
        margin-left: var(--home-dogs-mobile-edge);
    }

    .home-dogs-spacer {
        display: block;
    }

    .home-dog-card img {
        height: 250px;
    }

    .quem-foto {
        height: 280px;
    }

    .info-doacao {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .doacao-opcao {
        padding: 20px;
    }
}
