:root {
    --bg: #f8f4ec;
    --bg-alt: #fff;
    --ink: #12283c;
    --brand: #123a5a;
    --accent: #df8a6f;
    --card: #ffffff;
    --line: #dfd3bf;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--ink);
    background: var(--bg-alt);
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    background: #fff;
    border-bottom: 1px solid #ece4d8;
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.2rem;
    padding: 1.1rem 0;
}

.brand {
    color: var(--brand);
    font-weight: 700;
    text-decoration: none;
}

nav a {
    margin-left: 0.8rem;
    color: var(--ink);
    text-decoration: none;
    font-size: 0.95rem;
}

.page-home .site-header {
    border-bottom: 0;
}

.page-home {
    --bg-alt: #efe7d8;
    background: var(--bg-alt);
}

.page-home.page-internal {
    --bg-alt: #fff;
    background: #fff;
}

.atividades-page {
    padding: 2.2rem 0 3rem;
    background: var(--bg-alt);
}

.atividades-wrap {
    max-width: 900px;
}

.sobre-livro-page {
    padding: 2.2rem 0 3rem;
    background: var(--bg-alt);
}

.sobre-livro-wrap {
    max-width: 900px;
}

.sobre-livro-wrap::after {
    content: "";
    display: table;
    clear: both;
}

.sobre-livro-wrap h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #17354f;
    line-height: 1.1;
}

.sobre-livro-wrap p {
    margin: 0.85rem 0 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.sobre-livro-cover {
    float: right;
    width: min(32vw, 280px);
    max-width: 100%;
    margin: 0.4rem 0 1rem 2rem;
    border-radius: 18px;
    display: block;
}

.sobre-livro-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.3rem;
}

@media (max-width: 760px) {
    .sobre-livro-cover {
        float: none;
        width: min(78vw, 320px);
        margin: 1rem auto 1.2rem;
    }
}

.sobre-autora-page {
    padding: 2.2rem 0 3rem;
    background: var(--bg-alt);
}

.sobre-autora-wrap {
    max-width: 900px;
}

.sobre-autora-wrap::after {
    content: "";
    display: table;
    clear: both;
}

.sobre-autora-wrap h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #17354f;
    line-height: 1.1;
}

.sobre-autora-wrap p {
    margin: 0.85rem 0 0;
    font-size: 1.1rem;
    line-height: 1.5;
}

.sobre-autora-photo {
    float: right;
    width: min(32vw, 280px);
    max-width: 100%;
    margin: 0.4rem 0 1rem 2rem;
    border-radius: 18px;
    display: block;
}

.author-subtitle {
    color: #7b4b3e;
    font-family: "Cookie", cursive;
    font-size: 1.8rem;
    margin-top: 0.2rem !important;
}

@media (max-width: 760px) {
    .sobre-autora-photo {
        float: none;
        width: min(78vw, 320px);
        margin: 1rem auto 1.2rem;
    }
}

.atividades-wrap h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    color: #17354f;
}

.atividades-wrap p {
    margin: 0.8rem 0 1.4rem;
    font-size: 1.1rem;
}

.atividades-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.atividade-item {
    border: 0;
    border-radius: 16px;
    padding: 1rem 1rem 0.8rem;
    background: #fff;
}

.atividade-item h3 {
    margin: 0 0 0.4rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.3rem;
}

.atividade-item hr {
    border: 0;
    border-top: 1px solid #e6d9c6;
    margin: 0.45rem 0 0.65rem;
}

.atividade-item p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
}

.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.thumbnail-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    font-size: 0.9rem;
    font-family: inherit;
}

.thumbnail-item img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.05);
}

.thumbnail-item span {
    font-weight: 500;
    text-align: center;
    color: #17354f;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-logo {
    width: 100px;
    height: auto;
    margin-bottom: 1rem;
}

.modal-message {
    font-size: 1.1rem;
    color: #17354f;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.modal-input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    font-size: 1rem;
    margin-bottom: 1rem;
    box-sizing: border-box;
    font-family: inherit;
}

.modal-input:focus {
    outline: none;
    border-color: #123a5a;
    box-shadow: 0 0 0 3px rgba(18, 58, 90, 0.1);
}

.home-nav {
    padding: 1.2rem 0 0.8rem;
}

.brand-home img {
    width: 140px;
    height: auto;
    display: block;
}

.home-menu {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.home-menu a {
    margin: 0;
    font-size: 0.95rem;
    color: #172f43;
}

.header-cta {
    color: #fff;
    background: #163d5f;
    border-radius: 999px;
    padding: 0.72rem 1.25rem;
    text-decoration: none;
    font-size: 0.9rem;
}

.hero-faithful {
    padding: 0.5rem 0 0;
    background: #fff;
    position: relative;
    z-index: 2;
}

.hero-layout {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 1rem;
    align-items: end;
}

.hero-copy {
    position: relative;
    padding-bottom: 0.8rem;
}

.eyebrow {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #2e6051;
    margin-top: 0;
    margin-bottom: 1rem;
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.5rem, 4.2vw, 4rem);
    line-height: 1.04;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
}

.hero-copy h1 span {
    color: #2e614f;
}

.hero-copy h1 em {
    color: #d7846d;
    font-style: normal;
}

.hero-subtext {
    margin: 1.2rem 0 0;
    max-width: 530px;
    font-size: 1.25rem;
    color: #273f52;
    line-height: 1.45;
}

.faithful-actions {
    margin-top: 1.6rem;
}

.hero-plant {
    position: absolute;
    left: -26px;
    bottom: 2px;
    width: 42px;
}

.hero-stars {
    position: absolute;
    right: 22px;
    top: 28px;
    width: 26px;
}

.hero-visual {
    display: flex;
    justify-content: flex-end;
    overflow: visible;
}

.hero-visual img {
    width: min(100%, 640px);
    height: auto;
    display: block;
    margin-bottom: 0;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--brand);
    border-radius: 999px;
    padding: 0.72rem 1.4rem;
    text-decoration: none;
    color: var(--brand);
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-outline {
    border-color: #51657a;
    color: #244157;
    background: #fff;
}

.reading-section {
    background: var(--bg-alt);
    margin-top: -32px;
    padding: calc(2.6rem + 32px) 0 1.4rem;
    position: relative;
    z-index: 1;
}

.reading-grid {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr;
    gap: 2rem;
    align-items: center;
}

.reading-copy {
    position: relative;
    padding-left: 0.3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reading-bird {
    width: 240px;
    height: auto;
    margin-top: 1.4rem;
    display: block;
}

.reading-icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: #d8795d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.reading-copy h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2rem, 3vw, 3.2rem);
    margin: 0;
    line-height: 1.05;
}

.reading-copy p {
    font-size: 1.2rem;
    margin-top: 1rem;
    line-height: 1.45;
}

.scribble {
    display: inline-block;
    margin-top: 1.2rem;
    font-family: "Cookie", cursive;
    font-size: 1.8rem;
    color: #7f4033;
}

.reading-video {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #b9ac9c;
    height: 80vh;
    max-height: 80vh;
}

.reading-video img,
.reading-video video {
    width: 100%;
    height: 100%;
    display: block;
    filter: saturate(0.85) contrast(0.92);
    object-fit: cover;
}

.reading-stars {
    position: absolute;
    right: 12px;
    top: 50%;
    width: 26px;
    transform: translateY(-50%);
}

.extras-section {
    background: var(--bg-alt);
    padding: 0 0 1.8rem;
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 1rem;
}

.mini-feature {
    background: transparent;
    border-left: 1px solid #d8c9b3;
    padding: 0.4rem 0.9rem;
    text-align: center;
}

.mini-feature-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.mini-feature:first-child {
    border-left: none;
}

.mini-feature-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    margin-left: auto;
    margin-right: auto;
}

.mini-feature-icon img {
    width: 58px;
    height: 58px;
    display: block;
}

.mini-feature h4 {
    margin: 0 0 0.45rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.7rem;
    font-weight: 500;
}

.mini-feature p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.35;
}

.author-section {
    background: #f3e8d7;
    padding: 0;
    border-top: 1px solid #ead8bd;
    border-bottom: 1px solid #ead8bd;
}

.author-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 0;
}

.author-left {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: visible;
}

.author-left img {
    height: 100%;
    width: auto;
    max-width: 100%;
    display: block;
    object-fit: contain;
    object-position: center bottom;
}

.author-right {
    height: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
}

.author-right img {
    width: auto;
    max-width: 80%;
    max-height: 80%;
    margin-top: auto;
    margin-left: auto;
    display: block;
}

.author-copy {
    padding: 1.4rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.author-copy h2 {
    margin: 0.25rem 0 0;
    font-size: 3rem;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
}

.author-copy .author-role {
    margin: 0.2rem 0 0.9rem;
    color: #7b4b3e;
    font-family: "Cookie", cursive;
    font-size: 1.8rem;
}

.author-copy p {
    font-size: 1.12rem;
    line-height: 1.42;
    margin-top: 0;
}

.btn.coral {
    border: 0;
    background: #d87b60;
    color: #fff;
    margin-top: 0;
}

.books-strip {
    background: #fff;
    padding: 1.2rem 0 0.9rem;
}

.books-strip h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2.1rem;
    margin: 0 0 0.7rem;
}

.books-and-news {
    display: grid;
    grid-template-columns: 1.45fr 0.55fr;
    gap: 1.1rem;
    align-items: stretch;
}

.strip-books {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 1fr;
    gap: 0.7rem;
}

.book-mock {
    color: #1f2c37;
    font-family: Georgia, "Times New Roman", serif;
    padding: 0.65rem;
    font-size: 1.06rem;
    line-height: 1.26;
    display: flex;
    align-items: flex-end;
}

.book-mock.real-book {
    padding: 0;
    overflow: hidden;
    min-height: auto;
    box-shadow: 0 2px 8px rgba(47, 29, 15, 0.12);
}

.book-mock.real-book img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.book-mock.b1 { background: linear-gradient(180deg, #213755, #345e7f); color: #fff; }
.book-mock.b2 { background: linear-gradient(180deg, #7aa06a, #b6cd9f); }
.book-mock.b3 { background: linear-gradient(180deg, #d6e3d2, #a5bd99); }
.book-mock.b4 { background: linear-gradient(180deg, #f3dcc2, #f5efdd); }
.book-mock.soon {
    background: #f5ede2;
    color: #3f3a34;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: auto;
    padding: 1rem;
}

.newsletter-card {
    position: relative;
    border-radius: 18px;
    background: linear-gradient(160deg, #163d5f, #0f2d47);
    color: #fff;
    padding: 1.1rem 1rem 1rem;
    overflow: hidden;
}

.newsletter-card h3 {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.25;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 500;
}

.newsletter-card form {
    margin-top: 1rem;
    gap: 0.55rem;
}

.newsletter-card input {
    border: 0;
    border-radius: 999px;
}

.newsletter-card .btn-primary {
    width: fit-content;
    border: 0;
    background: #2f8a63;
}

.newsletter-card img {
    position: absolute;
    right: 0.3rem;
    bottom: -0.1rem;
    width: 88px;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.2rem 0 2.5rem;
}

.escute-page {
    background: var(--bg-alt);
    padding: 0;
}

.escute-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.escute-video {
    height: 100vh;
    width: auto;
    max-width: 100vw;
    display: block;
    background: #000;
}

.site-footer-home {
    background: var(--bg-alt);
    position: relative;
    border-top: 1px solid #e4d7bf;
    padding-bottom: 1.1rem;
}

.footer-home-inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1.2fr;
    gap: 1rem;
    padding-top: 0.9rem;
}

.footer-home-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-home-brand img {
    width: 116px;
    flex-shrink: 0;
}

.footer-home-brand p {
    margin: 0;
}

.footer-home-brand p,
.footer-home-inner a,
.footer-home-inner h4,
.footer-copy {
    font-size: 0.9rem;
}

.footer-home-inner h4 {
    margin: 0 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475a6a;
}

.footer-home-inner a {
    display: block;
    color: #1a3146;
    text-decoration: none;
    margin-bottom: 0.2rem;
}

.footer-copy {
    border-top: 1px solid #e4d7bf;
    margin-top: 0.7rem;
    padding-top: 0.6rem;
    color: #5f6a75;
}

.footer-plant-fixed {
    position: absolute;
    right: 0.5rem;
    bottom: 0;
    width: 56px;
}

.hero-actions {
    display: flex;
    gap: 0.8rem;
}

.block {
    padding: 2.6rem 0;
}

.alt {
    background: var(--bg-alt);
}

.cards,
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.card,
.book-card,
.auth-box,
.squeeze-box {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 1rem;
}

.price {
    color: var(--accent);
    font-weight: 700;
}

.badge {
    display: inline-block;
    background: #e4f1e7;
    color: #2e624f;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
}

.auth-box,
.squeeze-box {
    max-width: 520px;
}

.admin-form,
form {
    display: grid;
    gap: 0.6rem;
}

input,
textarea,
select {
    width: 100%;
    padding: 0.65rem;
    border-radius: 10px;
    border: 1px solid #c7bba8;
    font: inherit;
}

.error {
    color: #9f2b2b;
}

.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.2rem 0 2.5rem;
}

@media (max-width: 1200px) {
    .home-menu {
        gap: 1rem;
    }

    .hero-copy h1 {
        font-size: clamp(2.2rem, 3.8vw, 3.3rem);
    }

    .hero-subtext,
    .reading-copy p,
    .mini-feature p,
    .author-copy p {
        font-size: 1rem;
    }

    .mini-feature h4 {
        font-size: 1.4rem;
    }

    .footer-home-inner {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 980px) {
    .home-nav {
        flex-wrap: wrap;
    }

    .home-menu {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 0.45rem;
        white-space: nowrap;
    }

    .hero-layout,
    .reading-grid,
    .books-and-news,
    .author-grid,
    .extras-grid {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        justify-content: center;
    }

    .hero-visual img {
        margin-bottom: 0;
    }

    .reading-section {
        margin-top: -16px;
        padding-top: calc(2.6rem + 16px);
    }

    .hero-plant {
        display: none;
    }

    .hero-stars,
    .reading-stars {
        display: none;
    }

    .strip-books {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-plant-fixed {
        display: none;
    }
}

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    left: 10px;
    top: 10vh;
    width: 220px;
    height: 90vh;
    background: #fff;
    border: 1px solid #e4d7bf;
    border-radius: 10px;
    padding: 1.5rem 0;
    z-index: 999;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-brand {
    padding: 0 1rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e4d7bf;
}

.sidebar-brand img {
    width: 100%;
    max-width: 120px;
    height: auto;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-link {
    display: block;
    padding: 0.8rem 1.5rem;
    color: #1a3146;
    text-decoration: none;
    font-size: 0.95rem;
    border: none;
    background: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
    width: 100%;
}

.sidebar-link:hover {
    background: #f5ede2;
    color: #123a5a;
    border-left: 3px solid #123a5a;
    padding-left: calc(1.5rem - 3px);
}

.sidebar-link span {
    display: block;
}

.sidebar-logout {
    padding: 0;
    border-top: 1px solid #e4d7bf;
    margin-top: auto;
}

.logout-btn {
    color: #d87b60;
    border-top: none;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.logout-btn:hover {
    background: #ffe4d7;
}

/* Adjust main content when sidebar is present */
.page-admin main,
.page-admin section.block {
    margin-left: 240px;
}

@media (max-width: 640px) {
    .container {
        width: min(1120px, 94%);
    }

    .home-menu {
        gap: 0.8rem;
    }

    .home-menu a {
        font-size: 0.85rem;
    }

    .header-cta {
        width: 100%;
        text-align: center;
    }

    .hero-copy h1 {
        font-size: clamp(1.95rem, 7vw, 2.45rem);
    }

    .hero-subtext {
        margin-top: 0.9rem;
    }

    .hero-visual img {
        margin-bottom: 0;
    }

    .reading-section {
        margin-top: -8px;
        padding-top: calc(2.6rem + 8px);
    }

    .faithful-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .strip-books {
        grid-template-columns: 1fr;
    }

    .footer-home-inner {
        grid-template-columns: 1fr;
    }

    .nav-wrap {
        flex-wrap: wrap;
    }
}
