:root {
    --bg: #f3efe8;
    --surface: #fffdfa;
    --surface-strong: #1f1f21;
    --surface-soft: #ece6de;
    --text: #222124;
    --text-muted: #5f5a56;
    --line: rgba(34, 33, 36, 0.1);
    --brand: #a73435;
    --brand-dark: #812728;
    --accent: #b88a58;
    --white: #ffffff;
    --danger: #a62f2f;
    --success: #256c47;
    --shadow: 0 20px 50px rgba(20, 17, 15, 0.12);
    --radius: 24px;
    --radius-sm: 16px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(167, 52, 53, 0.08), transparent 28%),
        linear-gradient(180deg, #faf7f2 0%, #f0ebe4 100%);
    color: var(--text);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(calc(100% - 2rem), var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(calc(100% - 2rem), 820px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(16px);
    background: rgba(249, 246, 241, 0.82);
    border-bottom: 1px solid rgba(80, 72, 68, 0.08);
}

.topbar,
.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 84px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.9rem;
}

.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.brand strong,
.brand-admin strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand small,
.brand-admin small {
    color: var(--text-muted);
    font-size: 0.84rem;
}

.nav,
.admin-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav a,
.admin-nav a {
    position: relative;
    font-size: 0.95rem;
}

.nav a::after,
.admin-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -0.4rem;
    width: 100%;
    height: 2px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav a:hover::after,
.nav a.is-active::after,
.admin-nav a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
}

.nav-cta,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 0;
    border-radius: 999px;
    padding: 0.95rem 1.4rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    color: var(--white);
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 35px rgba(167, 52, 53, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.button:hover,
.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(167, 52, 53, 0.3);
}

.button-secondary,
.button-outline-light,
.button-danger {
    background: transparent;
    box-shadow: none;
}

.button-secondary {
    color: var(--text);
    border: 1px solid rgba(34, 33, 36, 0.15);
    background: rgba(255, 255, 255, 0.55);
}

.button-outline-light {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.button-danger {
    color: var(--danger);
    border: 1px solid rgba(166, 47, 47, 0.25);
}

.button-small {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
}

.hero,
.page-hero {
    position: relative;
    overflow: hidden;
}

.hero {
    padding: 4.5rem 0 3.5rem;
}

.hero::before,
.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(24, 23, 25, 0.92) 0%, rgba(24, 23, 25, 0.8) 42%, rgba(24, 23, 25, 0.35) 100%),
        url("../../../images/painel.jpeg") center/cover no-repeat;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(184, 138, 88, 0.18), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(167, 52, 53, 0.26), transparent 28%);
    z-index: -1;
}

.hero-grid,
.split-intro,
.two-column,
.map-layout,
.contact-layout,
.cta-strip-inner {
    display: grid;
    gap: 2rem;
}

.hero-grid {
    grid-template-columns: 1.2fr 0.85fr;
    align-items: center;
}

.hero-copy {
    color: var(--white);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.02;
}

.hero p,
.page-hero p,
.split-intro p,
.service-card p,
.feature-item p,
.gallery-card-body span,
.contact-sidecard p,
.footer-info,
.footer-links,
.service-list-card p {
    color: rgba(255, 255, 255, 0.84);
}

.page-hero-inner {
    padding: 4rem 0;
    color: var(--white);
}

.hero-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.hero-card img {
    border-radius: calc(var(--radius) - 8px);
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: contain;
    margin: 0 auto;
    background: #ffffff;
}

.hero-actions,
.section-actions,
.cta-stack,
.admin-actions,
.admin-shortcuts,
.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.section {
    padding: 5rem 0;
}

.section-muted {
    background: rgba(255, 255, 255, 0.55);
    border-top: 1px solid rgba(34, 33, 36, 0.04);
    border-bottom: 1px solid rgba(34, 33, 36, 0.04);
}

.section-dark,
.site-footer,
.admin-header,
.login-shell {
    background:
        linear-gradient(180deg, rgba(26, 25, 28, 0.98), rgba(22, 21, 24, 0.98)),
        url("../../../images/painel.jpeg") center/cover no-repeat;
    color: var(--white);
}

.section-heading {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.section-heading h2,
.split-intro h2,
.two-column h2,
.contact-form-card h2,
.contact-sidecard h2,
.admin-heading h1,
.admin-section h1 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.08;
}

.align-left {
    max-width: 680px;
}

.light p {
    color: rgba(255, 255, 255, 0.78);
}

.split-intro {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
}

.card-grid,
.feature-grid,
.gallery-preview-grid,
.stats-grid {
    display: grid;
    gap: 1.2rem;
}

.card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card,
.feature-item,
.gallery-card,
.service-list-card,
.contact-form-card,
.contact-sidecard,
.map-card,
.stat-card,
.admin-table,
.login-card,
.stone-panel,
.empty-state {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(34, 33, 36, 0.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.service-card,
.feature-item,
.gallery-card-body,
.contact-form-card,
.contact-sidecard,
.service-list-card,
.stat-card,
.login-card,
.empty-state {
    padding: 1.5rem;
}

.service-icon,
.service-list-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(167, 52, 53, 0.16), rgba(184, 138, 88, 0.24));
    color: var(--brand-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p,
.feature-item p,
.service-list-card p,
.contact-sidecard p,
.footer-brand p,
.site-footer p,
.contact-sidecard li,
.gallery-caption p,
.gallery-caption small,
.split-intro p,
.two-column p {
    color: var(--text-muted);
}

.feature-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.gallery-preview-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.gallery-card {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.12);
}

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

.gallery-card-body h3 {
    margin: 0.35rem 0 0;
    color: var(--white);
}

.gallery-card-body span {
    color: rgba(255, 255, 255, 0.68);
}

.cta-strip {
    padding-top: 0;
}

.cta-strip-inner {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    background: linear-gradient(145deg, rgba(167, 52, 53, 0.08), rgba(184, 138, 88, 0.14));
    padding: 2rem;
    border: 1px solid rgba(34, 33, 36, 0.08);
    border-radius: var(--radius);
}

.two-column,
.map-layout,
.contact-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stone-panel {
    overflow: hidden;
    display: grid;
    align-items: center;
}

.stone-panel img {
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    margin: 0 auto;
    background: #ffffff;
}

.service-list {
    display: grid;
    gap: 1rem;
}

.service-list-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
}

.bullet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.bullet-grid div {
    padding: 1rem 1.2rem;
    border-radius: 16px;
    background: rgba(167, 52, 53, 0.08);
    border: 1px solid rgba(167, 52, 53, 0.08);
    font-weight: 700;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.filter-chip {
    border: 1px solid rgba(34, 33, 36, 0.12);
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
    padding: 0.7rem 1rem;
    cursor: pointer;
}

.filter-chip.is-active {
    background: var(--surface-strong);
    color: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
}

.gallery-open {
    padding: 0;
    border: 0;
    width: 100%;
    background: none;
    text-align: left;
    cursor: pointer;
}

.gallery-tile {
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(34, 33, 36, 0.08);
    box-shadow: var(--shadow);
}

.gallery-open img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.gallery-caption {
    padding: 1.2rem;
}

.gallery-category {
    position: absolute;
    margin: 1rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    background: rgba(20, 20, 20, 0.7);
    color: var(--white);
    font-size: 0.78rem;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(10, 10, 10, 0.82);
    z-index: 100;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-content {
    width: min(980px, 100%);
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    display: grid;
}

.lightbox-content img {
    width: auto;
    max-width: 100%;
    max-height: 72vh;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
    background: rgba(34, 33, 36, 0.04);
}

.lightbox-copy {
    padding: 1.2rem 1.4rem 1.5rem;
}

.lightbox-close {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    border: 0;
    border-radius: 999px;
    padding: 0.75rem 1rem;
    cursor: pointer;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.lightbox-prev {
    left: 1.4rem;
}

.lightbox-next {
    right: 1.4rem;
}

.map-card iframe {
    width: 100%;
    min-height: 480px;
    border: 0;
    border-radius: var(--radius);
}

.contact-form,
.admin-form {
    display: grid;
    gap: 1rem;
}

.contact-form label,
.admin-form label {
    display: grid;
    gap: 0.45rem;
    font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid rgba(34, 33, 36, 0.12);
    background: rgba(255, 255, 255, 0.78);
    padding: 0.95rem 1rem;
}

.contact-sidecard ul,
.footer-info,
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0 0 1.4rem;
}

.contact-sidecard li,
.footer-info li,
.footer-links li {
    margin-bottom: 0.7rem;
}

.site-footer {
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.8fr 0.9fr;
    gap: 2rem;
    padding-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-brand img {
    width: 62px;
    height: 62px;
    object-fit: contain;
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.footer-copy {
    padding-top: 1rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

.whatsapp-float {
    position: fixed;
    right: 1.2rem;
    bottom: 1.2rem;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    min-height: 64px;
    padding: 0 1.2rem;
    border-radius: 999px;
    background: #1d9b5a;
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 16px 34px rgba(29, 155, 90, 0.35);
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem;
}

.login-card {
    width: min(480px, 100%);
    text-align: center;
}

.login-card img {
    width: 96px;
    margin: 0 auto 1rem;
}

.admin-layout {
    background: #f5f0e8;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 40;
}

.admin-main {
    padding: 2rem 0 4rem;
}

.admin-section {
    width: min(calc(100% - 2rem), 1180px);
    margin: 0 auto;
}

.admin-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1.5rem;
}

.stat-card strong {
    font-size: 2.8rem;
}

.table-wrap {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(34, 33, 36, 0.08);
    text-align: left;
    vertical-align: middle;
}

.thumb,
.preview-image {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
}

.wide-form {
    max-width: 760px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    justify-content: flex-start;
}

.checkbox-line input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.admin-form label.checkbox-line {
    display: inline-flex;
    grid-template-columns: none;
    font-weight: 700;
}

.alert {
    margin-bottom: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    font-weight: 700;
}

.alert-success {
    background: rgba(37, 108, 71, 0.12);
    color: var(--success);
}

.alert-error {
    background: rgba(166, 47, 47, 0.1);
    color: var(--danger);
}

.empty-state {
    text-align: center;
}

@media (max-width: 980px) {
    .hero-grid,
    .split-intro,
    .two-column,
    .map-layout,
    .contact-layout,
    .cta-strip-inner,
    .service-list-card,
    .footer-grid,
    .footer-bottom {
        grid-template-columns: 1fr;
    }

    .card-grid,
    .feature-grid,
    .gallery-preview-grid,
    .gallery-grid,
    .bullet-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav {
        position: absolute;
        top: 84px;
        left: 1rem;
        right: 1rem;
        padding: 1rem;
        border-radius: 24px;
        background: rgba(255, 253, 250, 0.98);
        border: 1px solid rgba(34, 33, 36, 0.08);
        box-shadow: var(--shadow);
        display: none;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav.is-open {
        display: flex;
    }

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(34, 33, 36, 0.12);
        border-radius: 999px;
        padding: 0.8rem 1rem;
        background: rgba(255, 255, 255, 0.7);
    }

    .hero-card img,
    .stone-panel img {
        max-height: 380px;
    }
}

@media (max-width: 640px) {
    .hero,
    .page-hero-inner,
    .section {
        padding: 3.2rem 0;
    }

    .card-grid,
    .feature-grid,
    .gallery-preview-grid,
    .gallery-grid,
    .bullet-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-actions,
    .section-actions,
    .cta-stack,
    .admin-actions,
    .admin-shortcuts,
    .table-actions,
    .admin-nav,
    .footer-bottom {
        flex-direction: column;
        align-items: stretch;
    }

    .brand strong {
        font-size: 0.95rem;
    }

    .whatsapp-float {
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        text-align: center;
    }

    .hero-card {
        padding: 0.75rem;
    }

    .hero-card img,
    .stone-panel img {
        max-height: 240px;
    }

    .lightbox-nav {
        width: 48px;
        height: 48px;
        font-size: 1.7rem;
    }

    .lightbox-prev {
        left: 0.8rem;
    }

    .lightbox-next {
        right: 0.8rem;
    }
}
