/*
Theme Name: Pergolaluxe - Outdoor Elegance
Author: Pergolaluxe Media
Description: Un portale dedicato alle pergole di lusso, al relax all'aperto e alla passione per lo sport condivisa con gli amici.
Version: 1.9.0
*/

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Lato:wght@300;400;700&display=swap');

:root {
    --primary: #2c3e50; /* Elegant Slate */
    --secondary: #bdc3c7; /* Silver / Aluminum */
    --accent: #e67e22; /* Warm Cedar / Outdoor warmth */
    --bg-main: #fdfdfd;
    --white: #ffffff;
    --text-main: #34495e;
    --text-muted: #7f8c8d;
    --border: rgba(44, 62, 80, 0.05);
    --shadow: 0 10px 30px rgba(0,0,0,0.05);
    
    --container-width: 1200px;
    --content-width: 850px;
    --transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);

    --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: 'Lato', sans-serif;
    line-height: 1.8;
}

h1, h2, h3, .logo-text, .btn-luxe {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(2.5rem, 8vw, 5rem); color: var(--primary); margin-bottom: 2rem; }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 3rem; text-align: center; font-style: italic; }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); margin-bottom: 1.2rem; color: var(--primary); }

img { max-width: 100%; height: auto; display: block; border-radius: 4px; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

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

/* Axis 1: N-D Centered Header */
.site-header {
    background: var(--white);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
}
.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}
.logo {
    display: block !important;
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    color: #2c3e50 !important;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 2rem;
    text-decoration: none;
}
.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
}
.main-nav { 
    width: 100%; 
    display: flex; 
    justify-content: center; 
}
.main-nav a { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); }
.main-nav a:hover { color: var(--accent); }

.nav-toggle { display: none; }

/* Axis 2: H-D Breakout / Asymmetric Hero */
.hero-luxe {
    position: relative;
    padding: var(--section-pad) 0;
    background: #f9f9f9;
    overflow: hidden;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-image {
    position: relative;
    z-index: 10;
}
.hero-image img {
    width: 120%;
    margin-left: -20%;
    height: 600px;
    object-fit: cover;
    border-radius: 0 100px 100px 0;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
}
.hero-content {
    padding-left: 2rem;
}

.btn-luxe {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: var(--accent);
    color: var(--white);
    font-size: 1rem;
    letter-spacing: 0.1em;
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(230, 126, 34, 0.2);
    margin-top: 2rem;
}
.btn-luxe:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(230, 126, 34, 0.3); }

/* Axis 8: D-A Diagonal Sections */
.diagonal-section {
    position: relative;
    padding: var(--section-pad) 0;
    background: var(--primary);
    color: var(--white);
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    margin: 5rem 0;
}

/* Axis 3: F-C Accordion (Interactive blocks) */
.accordion-container { max-width: 800px; margin: 0 auto; }
.accordion-item { border-bottom: 1px solid rgba(255,255,255,0.1); margin-bottom: 1.5rem; }
.accordion-title { 
    padding: 1.5rem 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    font-family: 'Playfair Display'; font-size: 1.4rem; font-weight: 700;
}
.accordion-content { padding-bottom: 1.5rem; display: none; color: rgba(255,255,255,0.7); font-size: 1.1rem; }
.accordion-item.active .accordion-content { display: block; }

/* Axis 5: U-B Method + Visual */
.method-section { padding: var(--section-pad) 0; background: var(--white); }
.method-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 6rem; align-items: center; }
.method-image img { border-radius: 100px 0 100px 0; }
.method-step { margin-bottom: 3rem; display: flex; gap: 2rem; }
.step-num { font-family: 'Playfair Display'; font-size: 3rem; font-weight: 900; color: var(--accent); opacity: 0.3; line-height: 1; }

/* Axis 4: C-C Overlay Cards & 20: 3x3 Grid */
.posts-section { padding: var(--section-pad) 0; background: var(--bg-main); }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-bottom: 5rem; }

.post-card-luxe { 
    position: relative; height: 450px; border-radius: 8px; overflow: hidden; 
    transition: var(--transition); box-shadow: var(--shadow);
}
.post-card-luxe .thumb { position: absolute; inset: 0; z-index: 1; }
.post-card-luxe .thumb img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.post-card-luxe:hover .thumb img { transform: scale(1.1); }

/* Rule 13: Overlay Protocol */
.post-card-luxe::after {
    content: ''; position: absolute; inset: 0; 
    background: linear-gradient(to top, rgba(44, 62, 80, 0.95) 10%, rgba(44, 62, 80, 0.4) 40%, transparent 90%);
    z-index: 2; opacity: 0.9;
}

.post-card-content { 
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 3; padding: 2.5rem; 
    color: #ffffff !important; text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.post-card-content h3 { color: #ffffff !important; font-size: 1.4rem; margin-bottom: 1rem; }
.post-card-content .meta { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.8; margin-bottom: 0.5rem; }

/* Rule 8: Golden Standard Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 6rem 0; flex-wrap: wrap; }
.pagination .page-numbers { 
    display: flex; align-items: center; justify-content: center; 
    min-width: 50px; height: 50px; padding: 0 10px;
    text-decoration: none; font-weight: 700; border: 1px solid var(--border);
    background: var(--white); color: var(--primary); border-radius: 50%;
    transition: var(--transition);
}
.pagination .page-numbers.current { background: var(--accent); color: var(--white) !important; border-color: var(--accent); }
.pagination .page-numbers.dots { border: none; background: transparent; cursor: default; }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--primary); color: var(--white); }

/* Axis 6: FT-C Three-column Footer */
.site-footer { background: var(--primary); color: var(--white); padding: 8rem 0 4rem; text-align: center; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; margin-bottom: 6rem; text-align: left; }
.footer-logo { font-size: 2rem; font-weight: 900; margin-bottom: 1.5rem; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-logo span { color: var(--accent); }
.footer-desc { color: rgba(255,255,255,0.6); font-size: 0.95rem; }

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1rem; }
.footer-nav a { font-weight: 400; font-size: 0.9rem; text-transform: uppercase; opacity: 0.7; }
.footer-nav a:hover { opacity: 1; color: var(--accent); padding-left: 10px; }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 3rem; display: flex; justify-content: space-between; font-size: 0.8rem; font-weight: 400; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.1em; }

/* Axis 7: V-A Soft Shadows (Applied via classes above) */

/* Rule 47: Footer Protection */
.site-main footer { margin-left: 0; width: 100%; }

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-image img { width: 100%; margin-left: 0; border-radius: 0 0 100px 0; }
    .method-grid { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
}

@media (max-width: 768px) {
    .nav-toggle { 
        display: flex; flex-direction: column; gap: 6px; background: var(--primary); 
        padding: 12px; border: none; cursor: pointer; z-index: 10001; margin-top: 1rem;
    }
    .nav-toggle span { width: 25px; height: 2px; background: var(--white); transition: 0.3s; }
    
    .main-nav { 
        display: block !important; position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
        background: var(--primary); z-index: 10000; padding: 10rem 2rem;
        transform: translateY(-100%); transition: var(--transition); visibility: hidden;
    }
    body.menu-open .main-nav { transform: translateY(0); visibility: visible; }
    .main-nav ul { flex-direction: column; text-align: center; gap: 2.5rem; }
    .main-nav a { font-size: 1.5rem; color: var(--white); }

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

    .posts-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
}
