/*
Theme Name: Palazzolo Digital Festival
Author: AI
Description: Theme for Palazzolo Digital Festival
Version: 10.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700;800&family=Work+Sans:wght@300;400;600;700&display=swap');

:root {
    --primary: #3a0ca3;
    --secondary: #4cc9f0;
    --accent: #560bad;
    --bg-main: #f7f5fa;
    --text-main: #1a1a2e;
    --border: #4cc9f0;
    --white: #ffffff;
    --text-muted: #4a4a68;
    
    --container-width: 1280px;
    --content-width: 800px;
    --transition: all 0.3s ease;
    --radius: 0px;

    --section-pad: clamp(4rem, 10vw, 8rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Work Sans', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, .logo, .btn-arc {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(1.8rem, 8vw, 6rem); margin-bottom: 2rem; word-break: break-word; }
h2 { font-size: clamp(1.6rem, 5vw, 3rem); margin-bottom: 4rem; word-break: break-word; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }
a { text-decoration: none; color: inherit; transition: var(--transition); }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 2.5rem; }

/* Visual (V-C): Thin divider lines 1px between elements */
.divider-line {
    width: 100%;
    height: 1px;
    background: var(--border);
    opacity: 0.3;
}

/* Decor (D-B): Horizontal accent lines between sections */
section {
    border-bottom: 2px solid var(--accent);
}

/* Axis 1: N-C Hamburger Always */
.site-header {
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--bg-main);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header-inner {
    width: 100%;
    display: flex;
    justify-content: center; /* Logo center */
    align-items: center;
    position: relative;
}

.logo {
    display: inline-flex;
    align-items: center;
    font-size: 1.8rem;
    color: var(--primary);
    text-transform: uppercase;
}
.logo span { color: var(--secondary); font-weight: 300; }

.main-nav { display: none; } /* Hidden by default for overlay */

.nav-toggle { 
    display: flex; flex-direction: column; gap: 5px; cursor: pointer; z-index: 10001; 
    position: fixed; right: 2.5rem; top: 25px; /* Fixed hamburger */
    background: transparent; border: none;
}
.nav-toggle span { width: 30px; height: 2px; background: var(--primary); transition: 0.3s; }

body.menu-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

body.menu-open .main-nav { 
    display: flex; position: fixed; inset: 0; background: var(--bg-main); 
    z-index: 10000; align-items: center; justify-content: center;
}
body.menu-open .main-nav ul { flex-direction: column; text-align: center; gap: 2.5rem; list-style: none; }
body.menu-open .main-nav a { font-size: 2rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--primary); text-transform: uppercase; }
body.menu-open .main-nav a:hover { color: var(--secondary); }

/* Axis 2: H-E Compact Hero */
.hero-arc {
    height: 40vh;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    padding: 0 2rem;
    background: var(--bg-main);
    margin-top: 80px; /* header offset */
}
.hero-content { max-width: 900px; z-index: 1; }

.btn-arc {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: var(--white);
    border: 1px solid var(--primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.btn-arc:hover { background: var(--secondary); border-color: var(--secondary); color: var(--text-main); }

/* Features (F-D): Single text block manifesto */
.features-section { padding: var(--section-pad) 0; text-align: center; }
.manifesto-block { max-width: 800px; margin: 0 auto; font-size: 1.5rem; line-height: 1.8; color: var(--text-main); font-weight: 300; }

/* Unique Block (U-D): Photo strip */
.showcase-arc { padding: 4rem 0; overflow: hidden; background: var(--primary); color: var(--white); border-bottom: none; }
.strip-container { display: flex; gap: 1rem; animation: scrollStrip 30s linear infinite; width: fit-content; }
.strip-item { width: 300px; height: 200px; flex-shrink: 0; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(100%); transition: filter 0.3s; }
.strip-item:hover img { filter: grayscale(0%); }

@keyframes scrollStrip {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Cards (C-F): Timeline & Grid: 3x3 */
.posts-section { padding: var(--section-pad) 0; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }

.post-card-arc { 
    position: relative;
    padding-left: 2rem;
    border-left: 2px solid var(--border);
    transition: var(--transition);
}
.post-card-arc::before {
    content: '';
    position: absolute;
    top: 0; left: -7px;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--accent);
}
.post-card-arc:hover { transform: translateX(10px); border-color: var(--primary); }
.post-card-arc .thumb { height: 200px; display: block; margin-bottom: 1.5rem; overflow: hidden; }
.post-card-arc .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-arc .meta-tag { font-size: 0.8rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; display: block; text-transform: uppercase; }
.post-card-arc h3 { font-size: 1.4rem; color: var(--text-main); margin-bottom: 1rem; }
.post-card-arc p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; }
.btn-read { font-weight: 800; font-size: 0.85rem; color: var(--primary); text-transform: uppercase; }
.btn-read:hover { color: var(--secondary); }

/* Footer (FT-B): Two-column */
.site-footer { background: var(--bg-main); color: var(--text-main); padding: 4rem 0; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
.footer-logo { font-size: 2rem; color: var(--primary); margin-bottom: 1rem; }
.footer-logo span { color: var(--secondary); }
.footer-desc { color: var(--text-muted); max-width: 400px; }

.footer-nav ul { list-style: none; display: flex; flex-direction: column; gap: 1rem; align-items: flex-end; }
.footer-nav a { font-family: 'Space Grotesk', sans-serif; font-weight: 700; text-transform: uppercase; color: var(--text-main); }
.footer-nav a:hover { color: var(--primary); }

.footer-bottom { border-top: 1px solid var(--border); margin-top: 3rem; padding-top: 2rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); }

.pagination { display: flex; justify-content: center; gap: 1rem; margin: 4rem 0; }
.pagination .page-numbers { 
    padding: 0.5rem 1rem; border: 1px solid var(--border); background: var(--bg-main); color: var(--text-main); font-weight: 600;
}
.pagination .page-numbers.current { background: var(--primary); color: var(--white); border-color: var(--primary); }

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-nav ul { align-items: center; }
    .posts-grid { grid-template-columns: 1fr; }
}

/* RULE 21 FIX */
.post-card-arc {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.post-card-arc .thumb {
    display: block !important;
    height: clamp(180px, 25vw, 300px) !important;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.post-card-arc .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.post-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}
.post-card-content h3 {
    flex-grow: 1 !important;
}
.btn-read, .read-more-link {
    margin-top: auto !important;
}
