/* PATCH-25 — Responsive enhancements (tablet & smartphone) */
*{ box-sizing:border-box; }
img,video{ max-width:100%; height:auto; }
.card, .press-card, .chat-box, .home-center, .home-grid, .home-3col{ max-width:100%; }
.news-desc, .news-title, p, a, small { overflow-wrap:anywhere; word-break:break-word; }

/* Tablet (<=1024px) */
@media (max-width: 1024px){
  .home-3col{ display:block !important; }
  .home-center{ width:100% !important; margin:0 0 16px 0 !important; }
  .col-left, .col-right, .left, .right, .stack{ width:100% !important; margin:0 0 16px 0 !important; }
  .press-card{ width:100% !important; }
}

/* Small tablet / phone (<=768px) */
@media (max-width: 768px){
  html{ font-size:16px; }
  body{ padding:0 !important; }
  .top img.logo{ height:60px !important; }
  .top img.foto{ height:80px !important; }
  .chat-box{ height:60vh !important; width:100% !important; }
  .btn{ padding:10px 14px !important; }
  .btn-row{ gap:8px !important; }
  .press-card .brand img{ height:22px !important; }
}

/* Phone (<=480px) */
@media (max-width: 480px){
  .chat-box{ height:55vh !important; }
  h1,h2,h3{ line-height:1.2; }
  .news-title{ font-size:0.98rem !important; }
  .news-desc { font-size:0.94rem !important; }
}

/* PATCH-26 — Tablet landscape fix: prevent horizontal cut */
html, body{ max-width:100vw; overflow-x:hidden; }

/* Ensure common wrappers never exceed viewport and keep some side padding */
@media (max-width: 1024px){
  .wrap, .home-3col, .home-center, .home-grid, .col-left, .col-right, .left, .right, .stack{
    max-width:100vw; padding-left:12px; padding-right:12px;
  }
  .card, .press-card{ margin-left:auto; margin-right:auto; }
}

/* Landscape tablets: slightly taller chat box and tighter margins */
@media (orientation: landscape) and (max-width: 1024px){
  .chat-box{ height:70vh !important; }
  .btn-row{ margin-left:auto; margin-right:auto; }
}


/* PATCH-27 — Strong tablet landscape edge fix */
@media (max-width: 1024px){
  :root{ --col-narrow: 100% !important; --col-gap: 16px !important; }
  html, body{ width:100%; max-width:100vw; overflow-x:hidden; }
  body{ padding-left:10px; padding-right:10px; }
  .home-3col, .home-grid, .wrap{ width:100% !important; max-width:100vw !important; margin-left:auto; margin-right:auto; overflow-x:hidden; }
  .home-center, .col-left, .col-right, .left, .right, .stack{ width:100% !important; max-width:100vw !important; }
  .chat-box, .press-card, .card{ width:100% !important; max-width:calc(100vw - 20px) !important; }
}

/* iOS safe areas */
@supports (padding: max(0px)) {
  @media (max-width: 1024px){
    body{ padding-left: max(10px, env(safe-area-inset-left)); padding-right: max(10px, env(safe-area-inset-right)); }
  }
}


/* PATCH-28 — Green style for "Vai alla chat pubblica" button */
.btn.btn-primary{
  background:#d4f7df !important;       /* soft green background */
  border-color:#86efac !important;      /* light green border */
  color:#065f46 !important;             /* dark-emerald text for contrast */
  text-decoration:none !important;
}
.btn.btn-primary:hover{
  background:#c6f3d3 !important;        /* slightly darker on hover */
  border-color:#6ee7b7 !important;
}


/* PATCH-29 — Red style for register button */
.btn-register{
  background:#fca5a5 !important;   /* red-300 */
  border-color:#ef4444 !important;  /* red-500 */
  color:#7f1d1d !important;         /* dark red text */
  text-decoration:none !important;
}
.btn-register:hover{
  background:#f87171 !important;    /* red-400 */
  border-color:#dc2626 !important;  /* red-600 */
}

/* PATCH-29b — Strong specificity for register button */
.btn.btn-register, .btn-register.btn{ 
  background:#fca5a5 !important; 
  border-color:#ef4444 !important; 
  color:#7f1d1d !important; 
}
.btn.btn-register:hover, .btn-register.btn:hover{
  background:#f87171 !important; 
  border-color:#dc2626 !important; 
}

/* PATCH-29B — Strong red for register button and spacing */
.btn-register, .btn.btn-register{
  background:#f87171 !important;   /* red-400 */
  border-color:#ef4444 !important;  /* red-500 */
  color:#7f1d1d !important;         /* readable red text */
}
.btn-register:hover, .btn.btn-register:hover{
  background:#ef4444 !important;    /* red-500 */
  border-color:#dc2626 !important;  /* red-600 */
  color:#fff !important;
}
.mt-2{ margin-top:12px; }

/* PATCH-31 — hide home auth links (fallback) */
.home-auth, .auth-links, .login-links{ display:none !important; }

/* PATCH-31 — Hide auth links on home */
.auth-links, .login-links, .auth, .home-auth-links{
  display:none !important;
}


/* PATCH-36 — Celeste style for register button (overrides previous red) */
.btn-register, .btn.btn-register{
  background:#bae6fd !important;   /* celeste (blue-200) */
  border-color:#60a5fa !important;  /* blue-400 */
  color:#075985 !important;         /* dark cyan text for contrast */
  text-decoration:none !important;
}
.btn-register:hover, .btn.btn-register:hover{
  background:#93c5fd !important;    /* blue-300 */
  border-color:#3b82f6 !important;  /* blue-500 */
  color:#0c4a6e !important;
}

