/* Atelier (Pezzi Unici) + News Instagram-like feed */

.atelier-page {
    padding-top: 110px;
    padding-bottom: 5rem;
}

.atelier-hero,
.news-feed-header {
    max-width: 900px;
    margin: 0 auto 3rem;
    padding: 2rem 1.5rem 0;
    text-align: center;
}

.atelier-eyebrow {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--accent-color, #d4af37);
    margin-bottom: 1rem;
}

.atelier-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    color: inherit;
}

.atelier-lead {
    font-size: 1.05rem;
    line-height: 1.8;
    opacity: 0.75;
    max-width: 36rem;
    margin: 0 auto;
}

.atelier-divider {
    width: 60px;
    height: 1px;
    background: var(--accent-color, #d4af37);
    margin: 2.5rem auto 0;
    opacity: 0.6;
}

.atelier-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    max-width: 1100px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

.atelier-tab {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.6rem 0.2rem;
    color: inherit;
    opacity: 0.45;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.atelier-tab:hover,
.atelier-tab.is-active {
    opacity: 1;
    color: var(--accent-color, #d4af37);
    border-bottom-color: var(--accent-color, #d4af37);
}

.atelier-journal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.atelier-featured {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.12);
}

.atelier-featured-media {
    display: block;
    border-radius: 1.5rem;
    overflow: hidden;
    aspect-ratio: 4/5;
    background: rgba(0, 0, 0, 0.15);
}

.atelier-featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}

.atelier-featured-media:hover img {
    transform: scale(1.04);
}

.atelier-featured-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.2;
    margin: 0.75rem 0 1.25rem;
}

.atelier-featured-body h2 a,
.atelier-card-body h3 a {
    text-decoration: none;
    color: inherit;
}

.atelier-featured-body h2 a:hover,
.atelier-card-body h3 a:hover {
    color: var(--accent-color, #d4af37);
}

.atelier-featured-body p {
    opacity: 0.75;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.atelier-meta {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent-color, #d4af37);
}

.atelier-read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-color, #d4af37);
    text-decoration: none;
}

.atelier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem 1.75rem;
}

.atelier-card-media {
    display: block;
    border-radius: 1.25rem;
    overflow: hidden;
    aspect-ratio: 3/4;
    margin-bottom: 1.25rem;
    background: rgba(0, 0, 0, 0.12);
}

.atelier-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.atelier-card:hover .atelier-card-media img {
    transform: scale(1.05);
}

.atelier-card-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    margin: 0.5rem 0 0.75rem;
}

.atelier-card-body p {
    font-size: 0.9rem;
    opacity: 0.65;
    line-height: 1.6;
}

.atelier-placeholder {
    width: 100%;
    height: 100%;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--accent-color, #d4af37);
    opacity: 0.4;
}

.atelier-placeholder.large {
    min-height: 400px;
    font-size: 3rem;
}

.atelier-empty {
    text-align: center;
    padding: 4rem 1rem;
    opacity: 0.7;
}

.atelier-cta,
.atelier-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.5rem;
    padding: 1rem 1.75rem;
    background: var(--accent-color, #d4af37);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    border-radius: 1rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.atelier-btn.secondary {
    background: transparent;
    color: inherit;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.atelier-cta:hover,
.atelier-btn:hover {
    transform: translateY(-2px);
}

.atelier-detail-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.atelier-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.55;
    text-decoration: none;
    color: inherit;
    margin-bottom: 2rem;
}

.atelier-back:hover {
    opacity: 1;
    color: var(--accent-color, #d4af37);
}

.atelier-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: start;
}

.atelier-main-frame {
    position: relative;
    aspect-ratio: 1;
    border-radius: 1.5rem;
    overflow: hidden;
}

.atelier-main-frame img,
.atelier-main-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.atelier-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.atelier-thumb {
    aspect-ratio: 1;
    border-radius: 0.85rem;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.atelier-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.atelier-thumb.is-active {
    border-color: var(--accent-color, #d4af37);
}

.atelier-thumb-video {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
}

.atelier-detail-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    line-height: 1.15;
    margin: 0.75rem 0 1.25rem;
}

.atelier-detail-excerpt {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.15rem, 2.2vw, 1.45rem);
    font-style: italic;
    font-weight: 400;
    line-height: 1.65;
    color: var(--accent-color, #d4af37);
    opacity: 1;
    margin: 0 0 2rem;
    padding: 1.25rem 0 1.25rem 1.25rem;
    border-left: 2px solid var(--accent-color, #d4af37);
    background: transparent;
    quotes: none;
}

.atelier-detail-body {
    margin-bottom: 2rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
}

.atelier-detail-body-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    opacity: 0.45;
    margin: 1.25rem 0 0.85rem;
}

.atelier-detail-body-text {
    font-family: inherit;
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 400;
    line-height: 1.9;
    opacity: 0.72;
    color: inherit;
}

.atelier-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* News Instagram feed */
.news-feed-page {
    padding-top: 110px;
    padding-bottom: 5rem;
}

.stories-rail {
    max-width: 640px;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.stories-track {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0.5rem 0.25rem 1rem;
    scrollbar-width: none;
}

.stories-track::-webkit-scrollbar {
    display: none;
}

.story-bubble {
    flex: 0 0 auto;
    width: 78px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-align: center;
    color: inherit;
}

.story-ring {
    display: block;
    width: 68px;
    height: 68px;
    margin: 0 auto 0.4rem;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, var(--accent-color, #d4af37), #fff3, var(--accent-color, #d4af37));
}

.story-ring img,
.story-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    border: 2px solid #000;
}

.story-label {
    display: block;
    font-size: 0.65rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ig-feed {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.ig-card {
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

.ig-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
}

.ig-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-color, #d4af37);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.ig-author {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
}

.ig-date {
    font-size: 0.65rem;
    opacity: 0.5;
    margin: 0;
}

.ig-type-badge {
    margin-left: auto;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.5;
}

.ig-media {
    position: relative;
    aspect-ratio: 4/5;
    background: #000;
    overflow: hidden;
}

.ig-media[data-video-post="1"] {
    aspect-ratio: 9/16;
    max-height: 70vh;
}

.ig-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.ig-slide.is-active {
    display: block;
}

.ig-slide img,
.ig-slide video,
.ig-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ig-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    cursor: pointer;
    z-index: 2;
}

.ig-nav.prev { left: 0.6rem; }
.ig-nav.next { right: 0.6rem; }

.ig-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 2;
}

.ig-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.ig-dot.is-active {
    background: var(--accent-color, #d4af37);
}

.ig-unmute {
    position: absolute;
    bottom: 0.85rem;
    right: 0.85rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    cursor: pointer;
    z-index: 2;
}

.ig-caption {
    padding: 1rem 1.1rem 1.25rem;
}

.ig-caption h3 {
    font-size: 0.9rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
}

.ig-caption p {
    font-size: 0.85rem;
    line-height: 1.55;
    opacity: 0.8;
    margin: 0 0 0.75rem;
}

.ig-permalink {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--accent-color, #d4af37);
    text-decoration: none;
}

/* Story fullscreen viewer */
.story-viewer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
}

.story-viewer.hidden {
    display: none;
}

.story-viewer-inner {
    position: relative;
    width: min(420px, 100%);
    height: min(780px, 100%);
    background: #111;
}

.story-progress {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    display: flex;
    gap: 4px;
    z-index: 5;
}

.story-bar {
    flex: 1;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px;
    overflow: hidden;
}

.story-bar-fill {
    height: 100%;
    width: 0;
    background: #fff;
}

.story-bar.done .story-bar-fill {
    width: 100%;
}

@keyframes storyFill {
    from { width: 0; }
    to { width: 100%; }
}

.story-close {
    position: absolute;
    top: 1.4rem;
    right: 0.9rem;
    z-index: 6;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
}

.story-content {
    width: 100%;
    height: 100%;
}

.story-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-tap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    background: transparent;
    border: none;
    z-index: 4;
    cursor: pointer;
}

.story-tap.left { left: 0; }
.story-tap.right { right: 0; }

.story-meta {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 1.5rem;
    z-index: 5;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.story-meta strong {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.story-meta p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0;
}

/* Homepage teasers */
.home-teasers {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1.5rem 5rem;
}

.home-teasers-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 2.5rem;
}

.home-teaser-block h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.home-teaser-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.home-teaser-item {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 0.75rem;
    border-radius: 1rem;
    transition: background 0.2s ease;
}

.home-teaser-item:hover {
    background: rgba(212, 175, 55, 0.08);
}

.home-teaser-item img {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 0.85rem;
}

.home-teaser-item h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
}

.home-teaser-item p {
    font-size: 0.8rem;
    opacity: 0.65;
    margin: 0;
}

.home-teaser-link {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent-color, #d4af37);
    text-decoration: none;
}

@media (max-width: 992px) {
    .atelier-featured,
    .atelier-detail-grid,
    .home-teasers-grid {
        grid-template-columns: 1fr;
    }

    .atelier-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .atelier-grid {
        grid-template-columns: 1fr;
    }
}
