/* ============================================================
   PETLINK - index.css
   Layout totalmente responsivo (desktop → 250px)
   ============================================================ */

/* ---------- Reset e Estilos Globais ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* Evita zoom automático em inputs no iOS */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #121416;
    color: #E2E2E5;
    line-height: 1.5;
    overflow-x: hidden;
    min-width: 250px; /* Largura mínima de suporte */
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 48px;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

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

/* ---------- Header ---------- */
.main-header {
    padding: 24px 0;
    border-bottom: 1px solid rgba(65, 71, 83, 0.1);
    position: relative;
    z-index: 10;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo h1 {
    color: #A9C7FF;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    white-space: nowrap;
}

.logo img {
    height: 40px;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.main-nav ul {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    justify-content: center;
}

.main-nav a {
    color: #C1C6D5;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.main-nav a:hover {
    color: #A9C7FF;
}

.main-nav a.active {
    color: #A9C7FF;
    font-weight: 700;
}

.admin-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-info img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info span {
    color: #C1C6D5;
    font-size: 12px;
    font-weight: 500;
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    height: 600px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(18, 20, 22, 0.98) 0%, rgba(18, 20, 22, 0.85) 35%, rgba(18, 20, 22, 0.4) 70%, transparent 100%);
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 500px;
    width: 100%;
    padding-left: 0;
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    color: #E2E2E5;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-content .highlight {
    color: #4D96FF;
    display: block;
}

.hero-content p {
    color: #C1C6D5;
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 450px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #4D96FF;
    color: #002E61;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

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

.btn-icon {
    font-size: 16px;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
    background-color: #1A1C1E;
    padding: 24px 0;
    border-top: 1px solid rgba(65, 71, 83, 0.1);
    border-bottom: 1px solid rgba(65, 71, 83, 0.1);
}

.stats-bar .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 144px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    color: #A9C7FF;
    font-size: 32px;
    font-weight: 700;
    white-space: nowrap;
}

.stat-label {
    color: #C1C6D5;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    white-space: nowrap;
}

.divider {
    width: 1px;
    height: 48px;
    background: rgba(65, 71, 83, 0.2);
}

/* ---------- How It Works ---------- */
.how-it-works {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.title-underline {
    width: 96px;
    height: 4px;
    background: #4D96FF;
    border-radius: 999px;
    margin: 0 auto;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.step-card {
    background: #1E2022;
    padding: 32px;
    border-radius: 12px;
    border: 1px solid rgba(65, 71, 83, 0.1);
}

.icon-wrapper {
    width: 64px;
    height: 64px;
    max-width: 100%;
    background: rgba(77, 150, 255, 0.1);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    flex-shrink: 0;
}

.icon-wrapper img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.step-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.step-card p {
    color: #C1C6D5;
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---------- Pets Gallery ---------- */
.pets-gallery {
    padding: 80px 0;
}

.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    gap: 16px;
    flex-wrap: wrap;
}

.section-title-left {
    min-width: 0;
    flex: 1;
}

.section-title-left h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-title-left p {
    color: #C1C6D5;
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.view-all {
    color: #A9C7FF;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.pets-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.pet-card {
    background: #1E2022;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(65, 71, 83, 0.1);
    min-width: 0;
}

.pet-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-fit: contain; /* Garante que a imagem caiba sem cortar */
    background: #1E2022;
}

.pet-info {
    padding: 20px;
}

.pet-info h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.pet-meta {
    color: #C1C6D5;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    white-space: nowrap;
}

.pet-location {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #C1C6D5;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
    min-width: 0;
}

.pet-location img {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    object-fit: contain;
}

.pet-location span {
    overflow-wrap: anywhere;
    white-space: normal;
}

.btn-details {
    color: #4D96FF;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

/* ---------- Footer ---------- */
.main-footer {
    background-color: #1A1C1E;
    padding: 60px 0 32px;
    border-top: 1px solid rgba(65, 71, 83, 0.1);
}

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

.footer-brand {
    max-width: 320px;
    flex: 1;
    min-width: 0;
}

.footer-brand h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-brand p {
    color: #C1C6D5;
    font-size: 16px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.footer-links {
    display: flex;
    gap: 80px;
    flex-wrap: wrap;
}

.link-group h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 16px;
}

.link-group ul li {
    margin-bottom: 12px;
}

.link-group a {
    color: #C1C6D5;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(65, 71, 83, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-bottom p {
    color: #C1C6D5;
    font-size: 12px;
    font-weight: 500;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #C1C6D5;
    font-size: 12px;
    font-weight: 500;
    flex-shrink: 0;
}

.security-badge img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}


/* ============================================================
   MEDIA QUERIES — Responsividade por largura
   ============================================================ */

/* ---------- Até 1024px (tablets em paisagem / laptops pequenos) ---------- */
@media (max-width: 1024px) {
    .container {
        padding: 0 32px;
    }

    .main-nav ul {
        gap: 24px;
    }

    .hero {
        height: 520px;
    }

    .stats-bar .container {
        gap: 72px;
    }
}

/* ---------- Até 768px (tablets em retrato) ---------- */
@media (max-width: 768px) {
    .container {
        padding: 0 24px;
    }

    /* Header: navegação vai para a linha de baixo, centralizada */
    .main-header .container {
        flex-direction: column;
        gap: 16px;
    }

    .main-header {
        padding: 20px 0;
    }

    .main-nav ul {
        gap: 16px 20px;
    }

    /* Hero: reduz altura e centraliza conteúdo */
    .hero {
        height: 480px;
    }

    .hero-content h1 {
        font-size: 44px;
    }

    .hero-content p {
        font-size: 15px;
        max-width: 100%;
    }

    /* Stats: um por linha para caber em telas estreitas */
    .stats-bar .container {
        gap: 28px;
        padding: 0 16px;
    }

    .stats-bar {
        padding: 32px 0;
    }

    .stat-item {
        width: 100%;
    }

    .stat-number {
        font-size: 28px;
    }

    .divider {
        display: none;
    }

    .stat-item + .stat-item {
        border-top: 1px solid rgba(65, 71, 83, 0.2);
        padding-top: 24px;
    }

    .stat-item:first-child {
        border-top: none;
        padding-top: 0;
    }

    /* Steps: 3 colunas → 2 → 1 */
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Pets: 4 colunas → 2 */
    .pets-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Footer: empilha em coluna */
    .footer-top {
        flex-direction: column;
        gap: 32px;
        margin-bottom: 32px;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-links {
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ---------- Até 576px (celulares) ---------- */
@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .main-nav ul {
        gap: 12px 16px;
    }

    .main-nav a {
        font-size: 13px;
    }

    .user-info img {
        width: 28px;
        height: 28px;
    }

    /* Hero: compacto e totalmente centralizado */
    .hero {
        height: 440px;
    }

    .hero-overlay {
        background: rgba(18, 20, 22, 0.9);
        text-align: center;
    }

    .hero-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-content h1 {
        font-size: 36px;
        margin-bottom: 16px;
    }

    .hero-content p {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .how-it-works {
        padding: 56px 0;
    }

    .section-title {
        margin-bottom: 32px;
    }

    .section-title h2 {
        font-size: 26px;
    }

    /* Steps: 2 colunas → 1 */
    .steps-grid {
        grid-template-columns: 1fr;
    }

    .step-card {
        padding: 24px;
    }

    .icon-wrapper {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .icon-wrapper img {
        width: 28px;
        height: 28px;
    }

    .step-card h3 {
        font-size: 18px;
    }

    .step-card p {
        font-size: 15px;
    }

    /* Pets */
    .pets-gallery {
        padding: 56px 0;
    }

    .gallery-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 32px;
    }

    .section-title-left h2 {
        font-size: 26px;
    }

    .section-title-left p {
        font-size: 14px;
    }

    .pet-thumb {
        height: 170px;
    }

    .pet-info {
        padding: 16px;
    }

    .pet-info h3 {
        font-size: 18px;
    }

    .footer-links {
        gap: 32px;
    }

    .main-footer {
        padding: 48px 0 24px;
    }
}

/* ---------- Até 480px (celulares pequenos) ---------- */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .logo h1 {
        font-size: 18px;
    }

    .main-nav ul {
        gap: 10px 14px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .hero {
        height: 420px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .btn-primary {
        padding: 10px 20px;
        font-size: 13px;
    }

    .stats-bar .container {
        padding: 0 8px;
    }

    .stat-number {
        font-size: 24px;
    }

    .stat-label {
        font-size: 12px;
    }

    .section-title h2 {
        font-size: 24px;
    }

    /* Pets: 2 colunas → 1 para não espremer os cards */
    .pets-grid {
        grid-template-columns: 1fr;
    }

    .pet-thumb {
        height: 220px;
    }

    .footer-brand p {
        font-size: 14px;
    }
}

/* ---------- Até 380px (celulares ultra compactos) ---------- */
@media (max-width: 380px) {
    .container {
        padding: 0 12px;
    }

    .logo h1 {
        font-size: 16px;
    }

    .main-nav ul {
        gap: 8px 12px;
    }

    .main-nav a {
        font-size: 11px;
    }

    .hero {
        height: 400px;
    }

    .hero-content h1 {
        font-size: 28px;
        margin-bottom: 14px;
    }

    .hero-content p {
        font-size: 13px;
        margin-bottom: 18px;
    }

    .btn-primary {
        padding: 10px 16px;
        font-size: 12px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 11px;
    }

    .how-it-works,
    .pets-gallery {
        padding: 40px 0;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .section-title-left h2 {
        font-size: 22px;
    }

    .section-title-left p {
        font-size: 13px;
    }

    .step-card {
        padding: 20px;
    }

    .icon-wrapper {
        width: 48px;
        height: 48px;
        margin-bottom: 14px;
    }

    .icon-wrapper img {
        width: 24px;
        height: 24px;
    }

    .step-card h3 {
        font-size: 17px;
        margin-bottom: 12px;
    }

    .step-card p {
        font-size: 14px;
    }

    .pet-thumb {
        height: 200px;
    }

    .pet-info {
        padding: 14px;
    }

    .pet-info h3 {
        font-size: 17px;
    }

    .pet-meta {
        font-size: 13px;
    }

    .pet-location {
        font-size: 13px;
        margin-bottom: 16px;
    }

    .footer-links {
        gap: 24px;
    }
}

/* ---------- Até 320px (iPhone SE / telas mínimas) ---------- */
@media (max-width: 320px) {
    .container {
        padding: 0 10px;
    }

    .logo h1 {
        font-size: 15px;
    }

    .main-header {
        padding: 14px 0;
    }

    .main-nav ul {
        gap: 6px 10px;
    }

    .main-nav a {
        font-size: 11px;
    }

    .user-info img {
        width: 24px;
        height: 24px;
    }

    .hero {
        height: 380px;
    }

    .hero-content h1 {
        font-size: 26px;
        margin-bottom: 12px;
    }

    .hero-content p {
        font-size: 13px;
        margin-bottom: 16px;
        line-height: 1.5;
    }

    .btn-primary {
        padding: 10px 14px;
        font-size: 12px;
        gap: 6px;
    }

    .btn-icon {
        font-size: 14px;
    }

    .stats-bar {
        padding: 24px 0;
    }

    .stat-number {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .stat-item + .stat-item {
        padding-top: 20px;
    }

    .how-it-works,
    .pets-gallery {
        padding: 32px 0;
    }

    .section-title {
        margin-bottom: 24px;
    }

    .section-title h2 {
        font-size: 20px;
    }

    .section-title-left h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .gallery-header {
        margin-bottom: 24px;
    }

    .step-card {
        padding: 16px;
    }

    .icon-wrapper {
        width: 44px;
        height: 44px;
        margin-bottom: 12px;
    }

    .icon-wrapper img {
        width: 22px;
        height: 22px;
    }

    .step-card h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .step-card p {
        font-size: 13px;
        line-height: 1.45;
    }

    .pet-thumb {
        height: 180px;
    }

    .pet-info {
        padding: 12px;
    }

    .pet-info h3 {
        font-size: 16px;
    }

    .pet-meta {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .pet-location {
        font-size: 12px;
        margin-bottom: 14px;
    }

    .btn-details {
        font-size: 13px;
    }

    .main-footer {
        padding: 36px 0 20px;
    }

    .footer-top {
        margin-bottom: 24px;
        gap: 24px;
    }

    .footer-brand p {
        font-size: 13px;
    }

    .link-group h4 {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .link-group ul li {
        margin-bottom: 10px;
    }

    .link-group a {
        font-size: 11px;
    }

    .footer-bottom {
        padding-top: 24px;
        gap: 10px;
    }

    .footer-bottom p {
        font-size: 11px;
    }

    .security-badge {
        font-size: 11px;
    }
}

/* ---------- Até 250px (largura mínima exigida) ---------- */
@media (max-width: 250px) {
    .container {
        padding: 0 8px;
    }

    body {
        font-size: 13px;
    }

    .logo h1 {
        font-size: 13px;
    }

    .main-header {
        padding: 12px 0;
    }

    /* Navegação empilhada verticalmente para caber */
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .main-nav a {
        font-size: 12px;
    }

    .admin-section {
        align-items: center;
        width: 100%;
    }

    .user-info img {
        width: 24px;
        height: 24px;
    }

    /* Hero: bem compacto, texto empilhado em várias linhas */
    .hero {
        height: 360px;
    }

    .hero-content h1 {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 10px;
    }

    .hero-content p {
        font-size: 12px;
        line-height: 1.45;
        margin-bottom: 14px;
    }

    .btn-primary {
        padding: 8px 12px;
        font-size: 11px;
        gap: 4px;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    /* Stats: um por linha, texto em 2 linhas se necessário */
    .stats-bar {
        padding: 20px 0;
    }

    .stat-number {
        font-size: 18px;
    }

    .stat-label {
        font-size: 9px;
        letter-spacing: 0.4px;
        white-space: normal;
        text-transform: none;
    }

    .stat-item + .stat-item {
        padding-top: 16px;
    }

    /* Steps: cards mais compactos */
    .how-it-works,
    .pets-gallery {
        padding: 24px 0;
    }

    .section-title {
        margin-bottom: 20px;
    }

    .section-title h2 {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .title-underline {
        width: 72px;
        height: 3px;
    }

    .step-card {
        padding: 14px;
    }

    .icon-wrapper {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }

    .icon-wrapper img {
        width: 20px;
        height: 20px;
    }

    .step-card h3 {
        font-size: 15px;
        margin-bottom: 8px;
    }

    .step-card p {
        font-size: 12px;
        line-height: 1.4;
    }

    .steps-grid {
        gap: 12px;
    }

    /* Galeria: cards compactos */
    .gallery-header {
        margin-bottom: 20px;
    }

    .section-title-left h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .section-title-left p {
        font-size: 12px;
    }

    .pets-grid {
        gap: 12px;
    }

    .pet-thumb {
        height: 160px;
    }

    .pet-info {
        padding: 10px;
    }

    .pet-info h3 {
        font-size: 15px;
    }

    .pet-meta {
        font-size: 11px;
        margin-bottom: 8px;
    }

    .pet-location {
        font-size: 11px;
        gap: 6px;
        margin-bottom: 12px;
    }

    .pet-location img {
        width: 12px;
        height: 12px;
    }

    .btn-details {
        font-size: 12px;
    }

    /* Footer: tudo em uma coluna, compacto */
    .main-footer {
        padding: 28px 0 16px;
    }

    .footer-top {
        margin-bottom: 20px;
        gap: 20px;
    }

    .footer-brand p {
        font-size: 12px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }

    .link-group h4 {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .link-group ul li {
        margin-bottom: 8px;
    }

    .link-group a {
        font-size: 11px;
    }

    .footer-bottom {
        padding-top: 20px;
        gap: 8px;
    }

    .footer-bottom p {
        font-size: 10px;
    }

    .security-badge {
        font-size: 10px;
        gap: 6px;
    }

    .security-badge img {
        width: 12px;
        height: 12px;
    }
}
