/* CSS Document */

/* =========================================
   RESET E FLUIDITÀ GLOBALE (Blocca lo scorrimento orizzontale)
========================================= */
*, *:before, *:after {
    box-sizing: border-box; /* Impedisce a padding e bordi di allargare i DIV oltre il 100% */
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden; /* Evita tassativamente la barra di scorrimento a destra */
    background: #070E1A;
    font-family: system-ui;
    color: white;
}

/* Immagini fluide di default */
img {
    max-width: 100%;
    height: auto;
}

/* HEADER */

.header{
position:absolute;
top:0;
width:100%;
display:flex;
justify-content:space-between;
align-items:center;
padding:20px 4%; /* Utilizza percentuali per non spingere fuori il menu su schermi piccoli */
z-index:10;
}

.logo{
font-size:22px;
font-weight:600;
letter-spacing:2px;
}

.menu a{
color:#A9D2FF;
text-decoration:none;
margin-left:30px;
font-size:14px;
transition:0.3s;
white-space: nowrap;
}

.menu a:hover{
color:white;
}

/* HERO HOME */

.hero{
position:relative;
height:45vh;
width:100%;
overflow:hidden;
background:#070E1A;
}

/* HERO SAGRA CALL */



/* flusso blu */

.hero::before{
content:"";
position:absolute;
top:0;
left:-200%;
width:400%;
height:100%;

background:
linear-gradient(120deg,
transparent 45%,
rgba(120,180,255,0.12) 50%,
transparent 55%);

animation:flow 10s linear infinite;
}

@keyframes flow{

0%{
transform:translateX(0);
}

100%{
transform:translateX(50%);
}

}

/* titolo */

.hero-title{
position:absolute;
left:5%; /* Usiamo percentuali al posto del pixel fisso */
top:45%;
transform:translateY(-50%);
max-width: 90%;
}

.hero-title h1{
margin:0;
font-size:42px;
letter-spacing:3px;
animation:titleGlow 4s ease-in-out infinite;
}

.hero-title p{
margin-top:10px;
color:#7BB8FF;
font-size:16px;
}

/* DISPLAY ORDINE SAGRA CALL */

.hero-sagracall .hero-display{
position:absolute;
left:20%;
top:65%;
transform:translateY(-50%);
text-align:center;
z-index:6;
}

.display-title{
color:#9aa3b2;
font-size:13px;
letter-spacing:3px;
margin-bottom:10px;
}

.display-number{
font-size:120px;
color:#ff4444;
font-weight:700;
font-family:'JetBrains Mono', monospace;
text-shadow:0 0 20px rgba(255,70,70,0.6);
animation:blink 1.5s infinite;
}

@keyframes blink{
0%{opacity:1;}
50%{opacity:0.4;}
100%{opacity:1;}
}

/* EDITOR */

.editor{
position:absolute;
right:12%;
top:35%;
transform:rotate(-25deg);
width:460px;
background:rgba(20,30,50,0.9);
border-radius:10px;
backdrop-filter:blur(6px);
border:1px solid #1E2A44;
box-shadow:
0 15px 35px rgba(0,0,0,0.6),
0 0 40px rgba(0,150,255,0.25);
}

.editor::after{
content:"";
position:absolute;
left:50%;
bottom:-30px;
transform:translateX(-50%);
width:70%;
height:40px;
background:radial-gradient(circle,
rgba(0,150,255,0.45),
rgba(0,150,255,0.1),
transparent);
filter:blur(12px);
}

/* barra editor */

.editor-header{
padding:10px 12px;
border-bottom:1px solid #30363D;
}

.dot{
height:10px;
width:10px;
border-radius:50%;
display:inline-block;
margin-right:6px;
}

.red{background:#ff5f56;}
.yellow{background:#ffbd2e;}
.green{background:#27c93f;}

/* codice */

.code{
font-family:"JetBrains Mono", monospace;
font-size:14px;
padding:18px;
height:130px;
overflow:hidden;
line-height:1.6;
}

.code-inner{
animation:scrollcode 12s linear infinite;
}

@keyframes scrollcode{
from{transform:translateY(0);}
to{transform:translateY(-130px);}
}

/* syntax highlighting */

.keyword{ color:#C792EA; }
.class{ color:#82AAFF; }
.function{ color:#4FC1FF; }
.string{ color:#C3E88D; }
.comment{ color:#637777; }
.variable{ color:#F78C6C; }

/* LOGO SAGRA CALL */

.hero-sagracall .sagracall-hero-logo{
position:absolute;
right:10%;
top:25%;
z-index:4;
}

.sagracall-hero-logo img{
width:420px;
transform:rotate(-8deg);
filter:drop-shadow(0 20px 40px rgba(0,0,0,0.6));
transition:0.3s;
}

.sagracall-hero-logo img:hover{
transform:rotate(-4deg) scale(1.05);
}

/* SEZIONE SAGRA CALL HOME */

.sagracall,
.keystate {
    text-align: center;
    margin-top: 80px;
    padding: 0 20px; /* Evita che i box tocchino il bordo dello schermo */
}
.gateview {
    text-align: center;
    margin-top: 80px;
    padding: 0 20px;
}

.sagracall h2{
font-size:30px;
color:#7BB8FF;
margin-bottom:40px;
}

.sagracall-box{
background:#0F1B2D;
border:1px solid #1E2A44;
border-radius:10px;
padding:40px;
max-width:900px;
margin:auto;
width: 100%;
}

.sagra-desc{
color:#A9D2FF;
margin-bottom:40px;
font-size:16px;
}

.sagra-features{
display:flex;
justify-content:space-between;
gap:20px;
width: 100%;
}

.feature{
flex:1;
background:#0B1424;
border:1px solid #1E2A44;
border-radius:8px;
padding:20px;
}

.feature h4{
color:#7BB8FF;
margin-top:0;
}

.feature p{
color:#7A93C8;
font-size:14px;
}

/* PAGINA PROGETTO */

.project-page{
max-width:1000px;
margin:auto;
padding:120px 4% 80px 4%;
}

.project-intro{
font-size:18px;
color:#A9D2FF;
margin-bottom:60px;
}

.project-section{
margin-bottom:50px;
}

.project-section h2{
color:#7BB8FF;
margin-bottom:15px;
}

.project-section p{
color:#B7C7E6;
line-height:1.6;
}

.project-section ul{
color:#9FB4E3;
padding-left:20px;
}

/* DOWNLOAD */

.project-download{
max-width:1000px;
margin:auto;
padding:60px 4% 80px 4%;
}

.project-download h2{
color:#7BB8FF;
margin-bottom:30px;
}

.download-box{
display:flex;
gap:40px;
width: 100%;
}

.download-item{
flex:1;
background:#0F1B2D;
border:1px solid #1E2A44;
border-radius:10px;
padding:25px;
}

.download-item h3{
margin-top:0;
color:#A9D2FF;
}

.download-item p{
color:#8FA8D8;
font-size:14px;
margin-bottom:20px;
}

.download-btn{
display:inline-block;
padding:10px 18px;
background:#1E90FF;
color:white;
text-decoration:none;
border-radius:6px;
font-size:14px;
transition:0.3s;
}

.download-btn:hover{
background:#3BA3FF;
}

/* FOOTER */

.footer{
background:#0B1424;
border-top:1px solid #1E2A44;
padding:40px 4%;
width: 100%;
}

.footer-container{
display:flex;
justify-content:space-between;
max-width:1200px;
margin:auto;
gap: 20px;
width: 100%;
}

.footer-col{
flex: 1; /* Rende le colonne del footer elastiche */
min-width: 200px;
}

.footer-col h3{
margin-bottom:15px;
font-size:16px;
color:#7BB8FF;
}

.footer-col p,
.footer-col a{
font-size:14px;
color:#A9D2FF;
text-decoration:none;
display:block;
margin-bottom:8px;
}

.footer-col a:hover{
color:white;
}

.footer-bottom{
text-align:center;
margin-top:30px;
font-size:13px;
color:#6B88B6;
}
/* HERO GATEVIEW */

.hero-gateview .hero-display{
position:absolute;
left:20%;
top:65%;
transform:translateY(-50%);
text-align:center;
z-index:6;
}

.hero-gateview .display-title{
color:#7BB8FF;
font-size:13px;
letter-spacing:3px;
margin-bottom:10px;
}

.hero-gateview .display-number{
font-size:80px;
color:#00E0FF;
font-weight:700;
font-family:'JetBrains Mono', monospace;
text-shadow:0 0 20px rgba(0,224,255,0.6);
animation:pulseGate 2s infinite;
}

@keyframes pulseGate{
0%{opacity:1;}
50%{opacity:0.6;}
100%{opacity:1;}
}

/* LOGO GATEVIEW */

.hero-gateview .sagracall-hero-logo{
position:absolute;
right:10%;
top:25%;
z-index:4;
}

.hero-gateview .sagracall-hero-logo img{
width:420px;
transform:rotate(-5deg);
filter:drop-shadow(0 20px 40px rgba(0,0,0,0.6));
transition:0.3s;
}

.hero-gateview .sagracall-hero-logo img:hover{
transform:rotate(-2deg) scale(1.05);
}

/* CONSOLE */

.console{
font-family:"JetBrains Mono", monospace;
}

.console-title{
color:#7BB8FF;
margin-bottom:10px;
font-size:14px;
}

.console-body{
background:#060C18;
border:1px solid #1E2A44;
border-radius:6px;
padding:10px;
font-size:12px;
color:#A9D2FF;
line-height:1.6;
}

.console-ready{
color:#7CFFB2;
}

@keyframes titleGlow{

0%{
text-shadow:
0 0 5px rgba(120,180,255,0.2);
}

50%{
text-shadow:
0 0 15px rgba(120,180,255,0.9),
0 0 30px rgba(120,180,255,0.5);
}

100%{
text-shadow:
0 0 5px rgba(120,180,255,0.2);
}

}

/* DEMO SAGRA CALL */

.sagracall-demo{
padding:100px 4%;
text-align:center;
}

.sagracall-demo h2{
color:#7BB8FF;
margin-bottom:60px;
font-size:32px;
}

.demo-container{
display:flex;
align-items:center;
justify-content:center;
gap:40px;
max-width:1200px;
margin:auto;
width: 100%;
}

.demo-box{
flex:1;
background:#0F1B2D;
border:1px solid #1E2A44;
border-radius:10px;
padding:25px;
}

.demo-box img{
width:100%;
border-radius:6px;
margin-bottom:20px;
box-shadow:0 10px 30px rgba(0,0,0,0.5);
}

.demo-box h3{
color:#A9D2FF;
margin-bottom:10px;
}

.demo-box p{
color:#8FA8D8;
font-size:14px;
}

.demo-arrow{
font-size:40px;
color:#7BB8FF;
}

/* OPINIONI */

.opinioni-colonna{
max-width:800px;
margin:40px auto;
padding:20px;
background:#0F1B2D;
border:1px solid #1E2A44;
border-radius:10px;
width: 100%;
}

.opinion{
background:#081425;
border:1px solid #1E2A44;
padding:12px;
margin-bottom:12px;
border-radius:6px;
}

.opinion b{
color:#7BB8FF;
}

.opinion p{
margin:6px 0;
color:#B7C7E6;
}

.opinion small{
color:#7A93C8;
}

.opinioni{
max-width:800px;
margin:40px auto;
width: 100%;
}

.opinioni input,
.opinioni textarea{
width:100%;
padding:10px;
margin-bottom:10px;
background:#081425;
border:1px solid #1E2A44;
color:white;
border-radius:6px;
}

.opinioni button{
padding:10px 20px;
background:#1E90FF;
border:none;
color:white;
border-radius:6px;
cursor:pointer;
}

.opinioni button:hover{
background:#3BA3FF;
}

.keystate {
    padding-bottom: 40px;
    width: 100%;
}

.visite-box{
display:flex;
gap:40px;
background:white;
color:#000;
padding:20px;
border-radius:8px;
margin-bottom:30px;
font-size:18px;
justify-content:center;
width: 100%;
}

.columns{
display:flex;
gap:20px;
align-items:flex-start;
width: 100%;
}

.col{
flex:1;
background:#0b1a2b;
padding:20px;
border-radius:8px;
}

.box{
background:white;
color:#000;
padding:15px;
border-radius:6px;
margin-bottom:15px;
}

.item{
background:#1e88e5;
padding:6px;
margin-bottom:5px;
border-radius:4px;
font-size:13px;
}

.comment{
background:#eee;
color:#000;
padding:6px;
margin-bottom:5px;
border-radius:4px;
font-size:13px;
}

.installazioni{
margin-top:10px;
width: 100%;
}

.row{
display:flex;
justify-content:space-between;
align-items:center;
background:#1e88e5;
margin-bottom:5px;
border-radius:5px;
padding:6px 10px;
font-size:12px;
gap:10px;
width: 100%;
}

.row span{
white-space:nowrap;
}

.row .id{
flex:2;
font-weight:bold;
overflow:hidden;
text-overflow:ellipsis;
}

.row span:not(.id):not(.action){
flex:1;
text-align:center;
}

.row .action{
flex:0.5;
text-align:right;
}

.row .action a{
color:red;
text-decoration:none;
font-weight:bold;
}
.display-title{
color:#9aa3b2;
font-size:13px;
letter-spacing:3px;
margin-bottom:10px;
}

.hero-gateview .display-number{
font-size:90px;
}

.hero-gateview .display-title{
font-size:36px;
letter-spacing:4px;
font-weight:700;
color:#A9D2FF;
opacity:0.9;
}

.hero-gateview .hero-display{
position:absolute;
left:20%;
top:65%;
transform:translateY(-50%);
display:flex;
align-items:center;
gap:20px;
z-index:6;
}
.hero-gateview .display-title,
.hero-gateview .display-number{
line-height:1;
}

/* HERO GRID */

.hero-gateview::after{
content:"";
position:absolute;
inset:0;

background-image:
linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

background-size:40px 40px;

pointer-events:none;
}

/* BADGE TECNICI */

.tech-badges{
display:flex;
gap:12px;
margin-top:25px;
margin-bottom:50px;
flex-wrap:wrap;
}

.tech-badges span{
background:#0F1B2D;
border:1px solid #1E2A44;
padding:8px 14px;
border-radius:20px;
font-size:13px;
color:#7BB8FF;
}

/* SCREENSHOT SOFTWARE */

.software-preview{
margin-bottom:80px;
width: 100%;
}

.preview-grid{
display:flex;
gap:30px;
margin-top:40px;
width: 100%;
}
.preview-box{
text-align:center;
}
.software-preview h2{
color:#7BB8FF;
margin-bottom:30px;
text-align:center;
}
.preview-box{
flex:1;
background:#0F1B2D;
border:1px solid #1E2A44;
border-radius:12px;
overflow:hidden;
box-shadow:0 10px 30px rgba(0,0,0,0.4);
}

.preview-box img{
width:100%;
display:block;
}

.preview-box h3{
padding:20px 20px 10px 20px;
color:#A9D2FF;
margin:0;
}

.preview-box p{
padding:0 20px 20px 20px;
color:#8FA8D8;
}

/* GATEVIEW HOME */

.gateview .sagracall-box{
border:1px solid #2A5EFF;
box-shadow:0 0 30px rgba(0,120,255,0.15);
}

/* =========================================
   HERO GRID GATEVIEW
========================================= */

.hero-gateview::after{
content:"";
position:absolute;
inset:0;

background-image:
linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

background-size:40px 40px;

pointer-events:none;
}

/* =========================================
   BADGE TECNICI
========================================= */

.tech-badges{
display:flex;
gap:12px;
margin-top:25px;
margin-bottom:50px;
flex-wrap:wrap;
}

.tech-badges span{
background:#0F1B2D;
border:1px solid #1E2A44;
padding:8px 14px;
border-radius:20px;
font-size:13px;
color:#7BB8FF;

box-shadow:
0 0 10px rgba(0,120,255,0.08);
}

/* =========================================
   SOFTWARE PREVIEW
========================================= */

.software-preview{
margin-bottom:80px;
}

.software-preview h2{
color:#7BB8FF;
margin-bottom:30px;
}

.preview-grid{
display:flex;
gap:30px;
justify-content:center;
align-items:stretch;
}

.preview-box{
flex:1;
background:#0F1B2D;
border:1px solid #1E2A44;
border-radius:12px;
overflow:hidden;

box-shadow:
0 10px 30px rgba(0,0,0,0.45);

transition:0.3s;
}

.preview-box:hover{
transform:translateY(-4px);

box-shadow:
0 20px 40px rgba(0,0,0,0.55),
0 0 20px rgba(0,120,255,0.12);
}

.preview-box img{
width:100%;
display:block;
transition:0.3s;
}

.preview-box img:hover{
transform:scale(1.02);
}

.preview-box h3{
padding:20px 20px 10px 20px;
margin:0;
color:#A9D2FF;
font-size:20px;
}

.preview-box p{
padding:0 20px 20px 20px;
margin:0;
color:#8FA8D8;
line-height:1.6;
}

/* =========================================
   GATEVIEW HOME
========================================= */

.gateview .sagracall-box{
border:1px solid #2A5EFF;

box-shadow:
0 0 30px rgba(0,120,255,0.15);
}

/* =========================================
   HERO DISPLAY GATEVIEW
========================================= */

.hero-gateview .hero-display{
position:absolute;
left:20%;
top:65%;
transform:translateY(-50%);

display:flex;
align-items:center;
gap:20px;

z-index:6;
}

.hero-gateview .display-title{
font-size:36px;
letter-spacing:4px;
font-weight:700;
color:#A9D2FF;
opacity:0.9;
line-height:1;
}

.hero-gateview .display-number{
font-size:90px;
line-height:1;
}

/* =========================================
   HERO KEYSTATE
========================================= */

.hero-keystate::after{
content:"";
position:absolute;
inset:0;

background-image:
linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);

background-size:40px 40px;

pointer-events:none;
}

/* =========================================
   LOGO KEYSTATE
========================================= */

.hero-keystate .keystate-hero-logo{
position:absolute;

right:11%;
top:22%;

z-index:5;
}

.hero-keystate .keystate-hero-logo img{

width:340px;

transform:rotate(-6deg);

filter:
drop-shadow(0 20px 40px rgba(0,0,0,0.6));

transition:0.3s;
}

.hero-keystate .keystate-hero-logo img:hover{

transform:
rotate(-3deg)
scale(1.05);

}

/* =========================================
   HERO TITLE KEYSTATE
========================================= */

.hero-keystate .hero-title{
position:absolute;
left:5%;
top:45%;
transform:translateY(-50%);
z-index:6;
}

/* =========================================
   EDITOR KEYSTATE
========================================= */

.hero-keystate .editor{
position:absolute;

right:12%;
top:35%;

transform:rotate(-25deg);

width:460px;

z-index:3;
}

/* --- Stile Dropdown Menu AMX --- */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 230px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.1);
    z-index: 999;
    top: 100%;
    left: 0;
    margin-top: 0;
    padding-top: 5px;
    border-radius: 4px;
    border: 1px solid #eee;
}
.dropdown-content a {
    color: #333333 !important;
    padding: 12px 16px !important;
    text-decoration: none;
    display: block !important;
    font-size: 0.85em;
    text-align: left;
    border-bottom: none;
    margin: 0 !important;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: #000000 !important;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Layout tabelle e liste dentro le Guide --- */
.guide-detail table th {
    background-color: #f8f9fa;
    font-weight: 500;
}
.guide-detail table th, .guide-detail table td {
    border: 1px solid #eee;
    font-size: 0.9em;
}
.guide-detail code {
    background-color: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9em;
    color: #c7254e;
}

/* =========================================
   RESPONSIVE COMPLETO (Sistemato per non rompere i box del backup)
========================================= */
@media(max-width:1024px){

.header {
    padding: 20px 5%;
}

.preview-grid, .sagra-features, .download-box, .demo-container, .columns, .footer-container {
    flex-direction: column !important;
    width: 100% !important;
}

.footer-col, .feature, .download-item, .preview-box, .col {
    width: 100% !important;
    margin-bottom: 20px;
}

.hero-title {
    left: 5% !important;
    width: 90%;
}

.editor, .keystate-hero-logo, .sagracall-hero-logo {
    display: none !important; /* Rimuove le sovrapposizioni grafiche su tablet e mobile */
}

.hero-gateview .hero-display, .hero-sagracall .hero-display {
    left: 5% !important;
    top: 75% !important;
}

.hero-gateview .display-title {
    font-size: 22px;
}

.hero-gateview .display-number {
    font-size: 50px;
}

.demo-arrow {
    transform: rotate(90deg); /* Ruota la freccia verso il basso su mobile */
    margin: 10px 0;
}
}

@media(max-width: 600px) {
    .header {
        position: relative;
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 20px;
    }
    .menu {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
    }
    .menu a {
        margin: 0 10px;
    }
}