/* === AETHER TECH VARIABLES === */
:root {
    --base-deep: #020409;
    --base-panel: #0a0d17;
    --tech-cyan: #00e5ff;
    --tech-cyan-dim: rgba(0, 229, 255, 0.15);
    --tech-purple: #8a2be2;
    --tech-purple-dim: rgba(138, 43, 226, 0.2);
    --tech-magenta: #bb00ff;
    --tech-orange: #ff9f1c;
    
    --text-main: #ffffff;
    --text-light: #abb5c2;
    --border-color: rgba(0, 229, 255, 0.15);
    --card-bg: #0a0d17;
    --code-bg: #03050a;
}

html {
    scroll-behavior: smooth;
}

/* === SCROLLBAR FUTURISTICA === */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--base-deep); }
::-webkit-scrollbar-thumb { background: var(--tech-purple); border-radius: 4px; border: 1px solid var(--base-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--tech-cyan); }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-light);
    background-color: var(--base-deep);
    background-image: radial-gradient(circle at 10% 20%, var(--base-deep) 0%, var(--base-panel) 70%);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-wrap: break-word; 
}

/* Typography & Elements */
h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: 1px;
}

h1 {
    font-size: 2.5rem;
    margin-top: 0;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--tech-purple-dim);
    padding-bottom: 1rem;
    text-shadow: 0 0 15px var(--tech-purple-dim);
}

h2 {
    font-size: 1.75rem;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--tech-cyan);
    text-shadow: 0 0 8px var(--tech-cyan-dim);
}

h3 {
    font-size: 1.25rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

p, li {
    margin-top: 0;
    margin-bottom: 1.25rem;
    color: var(--text-light);
}

a {
    color: var(--tech-cyan);
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    text-shadow: 0 0 8px var(--tech-cyan);
}

/* Responsive Layout */
.guide-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar Navigation */
.guide-sidebar {
    width: 300px;
    background-color: rgba(10, 13, 23, 0.95);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--tech-purple-dim);
    box-shadow: 5px 0 20px rgba(0,0,0,0.5);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    overflow-y: auto;
    padding: 2rem 1.5rem;
    box-sizing: border-box;
    z-index: 100;
    transition: transform 0.3s ease;
}

.guide-sidebar h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--text-main);
    font-weight: 900;
    letter-spacing: 2px;
    border-bottom: none;
    text-shadow: none;
}

.guide-sidebar h2 span {
    color: var(--tech-cyan);
    text-shadow: 0 0 10px var(--tech-cyan-dim);
}

.guide-sidebar .subtitle {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--tech-purple);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2.5rem;
}

.nav-group {
    margin-bottom: 2rem;
}

.nav-group-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--tech-magenta);
    margin-bottom: 0.75rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(187, 0, 255, 0.2);
    padding-bottom: 0.5rem;
}

.guide-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-nav li {
    margin-bottom: 0.25rem;
}

.guide-nav a {
    color: var(--text-light);
    display: block;
    padding: 0.6rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.guide-nav a:hover {
    color: var(--tech-cyan);
    background-color: rgba(0, 229, 255, 0.05);
    border-color: rgba(0, 229, 255, 0.2);
    text-shadow: 0 0 5px var(--tech-cyan-dim);
}

/* Main Content Area */
.guide-main {
    flex: 1;
    margin-left: 300px;
    padding: 4rem 5rem;
    max-width: 1100px;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Mobile Header */
.mobile-header {
    display: none;
    background-color: rgba(2, 4, 9, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--tech-cyan-dim);
    color: var(--text-main);
    padding: 1rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 200;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

.mobile-header h1 {
    font-size: 1.1rem;
    margin: 0;
    border: none;
    text-shadow: none;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--tech-cyan);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

/* Property Blocks (Aether Cards) */
.rt-property-card {
    background: var(--base-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--tech-magenta);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 5px 15px rgba(0,0,0,0.3);
}

.rt-property-card p {
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.rt-property-card p:last-child { margin-bottom: 0; }

.rt-property-card strong {
    color: var(--text-main);
    letter-spacing: 0.5px;
}

/* Badges / Prop Types */
.prop-type, .prop-type-text, .prop-type-switch, .prop-type-dropdown {
    font-family: monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: bold;
    border: 1px solid;
}

.prop-type { background: rgba(255,255,255,0.05); color: #fff; border-color: rgba(255,255,255,0.2); }
.prop-type-text { background: rgba(0, 229, 255, 0.1); color: var(--tech-cyan); border-color: var(--tech-cyan-dim); }
.prop-type-switch { background: rgba(187, 0, 255, 0.1); color: var(--tech-magenta); border-color: rgba(187, 0, 255, 0.3); }
.prop-type-dropdown { background: rgba(138, 43, 226, 0.1); color: #b388ff; border-color: rgba(138, 43, 226, 0.3); }

/* Images & Media */
.image-container {
    width: 100%;
    max-width: 700px;
    margin: 2.5rem auto;
    position: relative;
    padding: 5px;
    background: linear-gradient(135deg, var(--tech-purple-dim), var(--tech-cyan-dim));
    border-radius: 12px;
}

.cornice-ombra {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

/* Alerts & Callouts (Neon Style) */
.alert {
    padding: 1.25rem 1.5rem;
    border-radius: 6px;
    margin: 2rem 0;
    border-left: 4px solid transparent;
    font-size: 0.95rem;
    background-color: var(--base-panel);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

.alert strong { color: var(--text-main); }

.alert-info {
    border-left-color: var(--tech-cyan);
    border-top: 1px solid var(--tech-cyan-dim);
    border-right: 1px solid var(--tech-cyan-dim);
    border-bottom: 1px solid var(--tech-cyan-dim);
    color: #e0f2fe;
}

.alert-warning {
    border-left-color: var(--tech-orange);
    border-top: 1px solid rgba(255, 159, 28, 0.15);
    border-right: 1px solid rgba(255, 159, 28, 0.15);
    border-bottom: 1px solid rgba(255, 159, 28, 0.15);
    color: #ffedd5;
}

.alert-fix {
    border-left-color: #00ff66;
    border-top: 1px solid rgba(0, 255, 102, 0.15);
    border-right: 1px solid rgba(0, 255, 102, 0.15);
    border-bottom: 1px solid rgba(0, 255, 102, 0.15);
    color: #dcfce7;
}

/* Code Blocks */
pre {
    background-color: #000000;
    border: 1px solid var(--tech-cyan-dim);
    color: var(--tech-cyan);
    padding: 1.25rem;
    border-radius: 6px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    margin: 1.5rem 0;
    box-shadow: inset 0 0 10px rgba(0, 229, 255, 0.05);
}

code {
    font-family: 'Courier New', Courier, monospace;
    background-color: rgba(187, 0, 255, 0.1);
    color: #e2a0ff;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(187, 0, 255, 0.2);
    font-size: 0.9em;
}
pre code { background: transparent; border: none; color: inherit; padding: 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 2rem 0; display: block; overflow-x: auto; }
th, td { padding: 1rem; border-bottom: 1px solid rgba(255,255,255,0.05); text-align: left; }
th { background-color: var(--base-panel); color: var(--tech-cyan); font-family: 'Montserrat', sans-serif; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 1px; }

/* Email Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.template-card {
    background-color: var(--base-panel);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-card:hover {
    transform: translateY(-8px);
    border-color: var(--tech-cyan);
    box-shadow: 0 10px 20px rgba(0, 229, 255, 0.15);
}

.template-thumb {
    height: 200px;
    background-color: #000;
    background-size: cover;
    background-position: top center;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.template-card span {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    display: block;
}

/* Lightbox / Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(2, 4, 9, 0.95);
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center; justify-content: center;
}

.modal.show { display: flex; opacity: 1; }

.modal-content {
    position: relative;
    max-width: 90%; max-height: 90vh;
    background: var(--base-panel);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--tech-cyan-dim);
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.2);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    display: flex; flex-direction: column;
}

.modal.show .modal-content { transform: scale(1); }
.modal-content img { max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: 4px; }

.modal-close {
    position: absolute; top: -50px; right: 0;
    color: var(--text-light); font-size: 3rem; font-weight: 300;
    cursor: pointer; line-height: 1; transition: color 0.3s;
}

.modal-close:hover { color: var(--tech-magenta); text-shadow: 0 0 10px var(--tech-magenta); }

#modalCaption {
    text-align: center; margin-top: 1rem; font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; color: var(--tech-cyan);
}

/* === PAGINATION NAVIGATION (AETHER STYLE) === */
.guide-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* margin-top: 4rem; */
    padding-top: 2rem;
    border-top: 1px solid var(--tech-purple-dim);
}

.page-btn {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    background-color: var(--base-panel);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
    max-width: 48%;
    width: 100%;
}

.page-btn:hover {
    border-color: var(--tech-cyan);
    box-shadow: 0 10px 25px rgba(0, 229, 255, 0.1);
    transform: translateY(-4px);
    background-color: #0d1222;
}

.page-btn-prev {
    align-items: flex-start;
    text-align: left;
}

.page-btn-next {
    align-items: flex-end;
    text-align: right;
    margin-left: auto;
}

.page-btn-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--tech-magenta);
    margin-bottom: 0.5rem;
}

.page-btn-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    color: var(--tech-cyan);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
}

.page-btn:hover .page-btn-title {
    text-shadow: 0 0 10px var(--tech-cyan-dim);
    color: #ffffff;
}

/* Modifica al blocco @media esistente per i dispositivi mobili */
@media (max-width: 768px) {
    .guide-pagination {
        flex-direction: column;
        gap: 1.5rem;
    }
    .page-btn {
        max-width: 100%;
    }
    .page-btn-next {
        margin-left: 0;
    }
}

/* Responsive Breakpoints */
@media (max-width: 992px) {
    .guide-sidebar { transform: translateX(-100%); }
    .guide-sidebar.active { transform: translateX(0); }
    .guide-main { margin-left: 0; padding: 2.5rem; }
    .mobile-header { display: flex; }
}

@media (max-width: 768px) {
    .guide-main { padding: 1.5rem 1rem; }
    h1 { font-size: 2rem; }
    .template-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

        .btn {
            display: inline-block;
            background-color: var(--tech-orange);
            color: var(--base-deep);
            padding: 0.9rem 2.2rem;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: all 0.3s;
            border: none;
            cursor: pointer;
            box-shadow: 0 0 15px var(--tech-orange-dim);
            position: relative;
            overflow: hidden;
        }

        .btn:hover {
            background-color: var(--base-deep);
            color: var(--tech-orange);
            box-shadow: 0 0 25px var(--tech-orange), inset 0 0 10px var(--tech-orange-dim);
            border: 1px solid var(--tech-orange);
        }
        
        /* Bottoni 'alternati' o secondari */
        .btn-alt {
            background-color: transparent;
            color: var(--tech-cyan);
            border: 1px solid var(--tech-cyan);
            box-shadow: 0 0 10px var(--tech-cyan-dim);
        }
        
        .btn-alt:hover {
            background-color: var(--tech-cyan);
            color: var(--base-deep);
            box-shadow: 0 0 20px var(--tech-cyan);
            border: 1px solid var(--tech-cyan);
        }
