:root {
    --gold: #c5a059;
    --dark-gold: #a67c37;
    --off-white: #fdfaf6;
    --charcoal: #2d3436;
}

body {
    font-family: 'Cormorant Garamond', serif;
    background-color: #d1d1d1; /* The "table" background */
    color: var(--charcoal);
    overflow-x: hidden;
    background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 86c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zm76-26c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448-1 1 1zm-11 30c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448-1 1 1zm-45-40c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448-1 1 1zm12-24c.552 0 1-.448 1-1s-.448-1-1-1-1 .448-1 1 .448-1 1 1z' fill='%23c5a059' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Centered Paper Wrapper for Laptop Zoom Out */
.main-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--off-white);
    box-shadow: 0 0 80px rgba(0,0,0,0.2);
    min-height: 100vh;
}

@media (min-width: 1024px) {
    body { padding: 60px 0; }
}

.newspaper-font { font-family: 'UnifrakturMaguntia', serif; }

.gold-border {
    border: 2px solid var(--gold);
    position: relative;
}
.gold-border::after {
    content: '';
    position: absolute;
    top: 6px; left: 6px; right: 6px; bottom: 6px;
    border: 1px solid var(--gold);
    pointer-events: none;
    transition: border-color 0.3s ease;
}
.gold-border:hover::after {
    border-color: white;
}

.nav-link {
    transition: all 0.3s ease;
    position: relative;
    font-weight: 500;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0; width: 0; height: 1px;
    background-color: var(--charcoal);
    transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.tab-content {
    display: none;
    animation: fadeIn 0.6s ease-out;
}
.tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}
.ornament::before, .ornament::after {
    content: "";
    height: 1px; width: 60px;
    background: var(--gold);
    margin: 0 15px;
}

.lang-btn {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    padding: 6px 12px;
    border: 1px solid var(--gold);
    cursor: pointer;
    transition: 0.3s;
    background: rgba(255,255,255,0.9);
    font-weight: 700;
}
.lang-btn.active {
    background-color: var(--gold);
    color: white;
}

[lang-content] { display: none; }
body.lang-en [lang-content="en"] { display: inline; }
body.lang-es [lang-content="es"] { display: inline; }
body.lang-it [lang-content="it"] { display: inline; }

body.lang-en div[lang-content="en"], body.lang-en p[lang-content="en"], body.lang-en section[lang-content="en"] { display: block; }
body.lang-es div[lang-content="es"], body.lang-es p[lang-content="es"], body.lang-es section[lang-content="es"] { display: block; }
body.lang-it div[lang-content="it"], body.lang-it p[lang-content="it"], body.lang-it section[lang-content="it"] { display: block; }

.first-letter-cap::first-letter {
    font-size: 4.5rem;
    line-height: 0.8;
    padding-top: 0.3rem;
    margin-right: 0.5rem;
    float: left;
    font-weight: 500;
    color: var(--gold);
}
@media (min-width: 768px) {
    .first-letter-cap::first-letter {
        font-size: 5.5rem;
        margin-right: 0.8rem;
        line-height: 0.7;
        padding-top: 0.6rem;
    }
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.gallery-item {
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.see-more-btn {
    display: inline-block;
    padding: 14px 40px;
    border: 2px solid var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 700;
    background: white;
    color: var(--charcoal);
    cursor: pointer;
    transition: all 0.3s;
}
.see-more-btn:hover {
    background: var(--gold);
    color: white;
}

.book-wrapper {
    width: 100%;
    background: white;
}

.book-content-area {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
}

@media (min-width: 1024px) {
    .book-content-area { min-height: 600px; }
}

.book-slide {
    grid-area: 1 / 1 / 2 / 2;
    display: flex;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
    background: white;
    height: 100%;
}

.book-slide.active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.book-image-pane { width: 45%; height: auto; }
.book-image-pane img { width: 100%; height: 100%; object-fit: cover; }

.book-text-pane {
    width: 55%;
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-text-pane p { font-size: 1.25rem; line-height: 1.6; }

@media (max-width: 768px) {
    .book-slide { flex-direction: column !important; }
    .book-image-pane, .book-text-pane { width: 100%; }
    .book-image-pane { height: 280px; }
    .book-text-pane { padding: 2rem 1rem; text-align: left; align-items: flex-start; }
    .book-text-pane p { font-size: 1.15rem; }
}
