/*
Theme Name: Remark DMC - Marketing & Betting
Author: Remark Media Group
Description: Un portale informativo dedicato al mondo del marketing e della comunicazione. Strategie innovative e soluzioni pratiche per la visibilità aziendale.
Version: 1.3.0
*/

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

:root {
    --primary: #064e3b; /* Deep Emerald */
    --secondary: #ecfdf5; /* Soft Mint */
    --accent: #d97706; /* Amber */
    --text-main: #1e293b; /* Slate */
    --text-muted: #64748b;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --white: #ffffff;
    --border: rgba(6, 78, 59, 0.06);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    
    --sidebar-width: 280px;
    --container-width: 1400px;
    --content-width: 900px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);

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

* { 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: 'Inter', sans-serif;
    line-height: 1.75;
}

/* Axis 7: V-A Minimalist, Soft Shadows */
h1, h2, h3, .logo-text {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    line-height: 1.1;
    color: var(--primary);
    overflow-wrap: break-word;
    word-break: break-word;
}

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

.mono { font-family: 'Inter', sans-serif; text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; color: var(--accent); font-weight: 700; }

img { max-width: 100%; height: auto; display: block; filter: saturate(0.9); transition: var(--transition); }

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

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

/* Axis 1: N-B Fixed Sidebar Left */
.site-wrapper {
    display: flex;
    min-height: 100vh;
}

.site-header {
    width: var(--sidebar-width);
    background: var(--primary);
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: column;
}

.header-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.logo {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--white);
    text-decoration: none;
    margin-bottom: 5rem;
    display: block;
    white-space: nowrap; /* Rule 134 */
}
.logo span { color: var(--accent); display: block; font-size: 0.7rem; font-family: 'Inter'; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; margin-top: 5px; }

.main-nav { flex-grow: 1; }
.main-nav ul { list-style: none; }
.main-nav li { margin-bottom: 2rem; }
.main-nav a {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}
.main-nav a:hover { color: var(--accent); transform: translateX(5px); }
.main-nav .current-menu-item a { color: var(--white); }

.nav-toggle { display: none; } /* Hamburger only on mobile */

.site-main {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
}

/* Axis 2: H-B Split-screen Hero */
.hero-marketing {
    background: var(--secondary);
    min-height: 90vh;
    display: flex;
}
.hero-split { display: grid; grid-template-columns: 1.2fr 1fr; width: 100%; }
.hero-text { padding: clamp(2rem, 8vw, 6rem); display: flex; flex-direction: column; justify-content: center; }
.hero-image { overflow: hidden; position: relative; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; filter: none; }

.btn-remark {
    display: inline-block;
    padding: 1.2rem 3.5rem;
    background: var(--primary);
    color: var(--white);
    font-weight: 700;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(6, 78, 59, 0.15);
}
.btn-remark:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 15px 40px rgba(217, 119, 6, 0.2); }

/* Axis 3: F-B Feature Cards Grid */
.marketing-features { padding: var(--section-pad) 0; background: var(--bg-alt); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3rem; }
.feature-card {
    background: var(--white);
    padding: 3.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.feature-card:hover { transform: translateY(-10px); }
.feature-card h3 { color: var(--primary); margin-bottom: 1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* Axis 5: U-A Expert Quote */
.expert-quote {
    padding: var(--section-pad) 0;
    background: var(--white);
    text-align: center;
}
.quote-container { max-width: 800px; margin: 0 auto; }
.quote-text { font-family: 'Playfair Display'; font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--primary); margin-bottom: 3rem; font-style: italic; }
.quote-author { display: flex; align-items: center; justify-content: center; gap: 1.5rem; }
.author-info { text-align: left; }
.author-info strong { display: block; font-size: 1.1rem; }
.author-info span { color: var(--accent); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; }

/* Axis 4 & 20: C-A Vertical Cards in 3x3 Grid */
.posts-section { padding: var(--section-pad) 0; background: var(--white); }
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3.5rem;
    margin-bottom: 6rem;
}

.post-card-remark {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    transition: var(--transition);
}

.post-card-remark .thumb {
    height: clamp(200px, 20vw, 300px);
    overflow: hidden;
    margin-bottom: 2rem;
    border-radius: 8px;
}
.post-card-remark .thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-card-content { flex-grow: 1; display: flex; flex-direction: column; }
.post-card-content h3 { font-size: 1.4rem; margin-bottom: 1.5rem; flex-grow: 1; }
.post-card-content .meta { font-size: 0.8rem; font-weight: 700; color: var(--accent); margin-bottom: 1rem; text-transform: uppercase; }

.btn-read {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-read::after { content: '→'; transition: var(--transition); }
.btn-read:hover::after { transform: translateX(5px); }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 1rem; margin-top: 5rem; }
.pagination .page-numbers {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--primary);
    border-radius: 4px;
}
.pagination span.current { background: var(--primary); color: var(--white); border-color: var(--primary); }

/* Axis 6: FT-B Two-column Footer */
.site-footer {
    background: var(--primary);
    color: rgba(255,255,255,0.8);
    padding: 8rem 0 4rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: clamp(2rem, 5vw, 8rem);
    margin-bottom: 5rem;
}
.footer-logo { 
    font-size: clamp(1.5rem, 5vw, 4rem); 
    color: var(--white); 
    margin-bottom: 2rem; 
    overflow-wrap: anywhere; /* Rule 134 */
}
.footer-logo span { color: var(--accent); }

.footer-nav ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.footer-nav a { font-weight: 600; color: var(--white); }
.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
    padding-top: 3rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

/* Single Content */
.post-main { max-width: var(--content-width); margin: 6rem auto; padding: 0 2rem; }
.post-content { font-size: 1.15rem; line-height: 1.85; color: #334155; }
.post-content h2, .post-content h3 { margin-top: 4.5rem; margin-bottom: 2rem; }
.post-content table { 
    width: 100%; border-collapse: collapse; margin: 4rem 0; 
    border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; 
}
.post-content th { background: var(--secondary); color: var(--primary); padding: 1.5rem; text-align: left; }
.post-content td { padding: 1.5rem; border: 1px solid #e2e8f0; }

/* Rule 43: Sidebar Reset */
@media (max-width: 1024px) {
    .site-wrapper { display: block; }
    .site-header { 
        position: sticky;
        top: 0;
        width: 100%; 
        height: auto; 
        padding: 1.2rem 0; 
        background: var(--primary);
        border-bottom: 1px solid rgba(255,255,255,0.1);
        z-index: 2000;
    }
    .header-inner { flex-direction: row; justify-content: space-between; align-items: center; padding: 0 1.5rem; }
    .logo { margin-bottom: 0; font-size: 1.4rem; z-index: 2100; }
    .logo span { display: inline-block; margin-left: 10px; margin-top: 0; }
    
    .main-nav { 
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--primary);
        z-index: 1900;
        padding: 8rem 2rem;
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.77, 0, 0.175, 1);
        visibility: hidden;
    }
    body.menu-open .main-nav {
        transform: translateY(0);
        visibility: visible;
    }
    .main-nav ul { flex-direction: column; text-align: center; gap: 2.5rem; display: flex; }
    .main-nav li { margin-bottom: 0; }
    .main-nav a { font-size: 1.8rem; color: var(--white); }

    .nav-toggle { 
        display: flex; flex-direction: column; gap: 6px; 
        background: none; border: none; cursor: pointer;
        z-index: 2100;
        padding: 10px;
    }
    .nav-toggle span { width: 28px; height: 2px; background: var(--white); display: block; transition: 0.3s; }
    
    /* Hamburger to X */
    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); }

    .site-main { margin-left: 0 !important; width: 100% !important; }
    
    .hero-split { grid-template-columns: 1fr; }
    .hero-image { height: 400px; order: -1; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .container { padding: 0 1.5rem; }
    .feature-grid { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 4rem; }
    .footer-bottom { flex-direction: column; gap: 2rem; text-align: center; }
}
