/* =====================================================
   RADIO DA GRINGA
   DESKTOP 3 COLUNAS | V3
   Laterais com rolagem normal
   Comunidade e carrossel preservados
   ===================================================== */


/* =====================================================
   DESKTOP
   ===================================================== */

@media (min-width: 901px) {

  body {
    background: radial-gradient(
      ellipse at 52% 0%,
      #49301b 0%,
      #21170f 48%,
      #170f0b 100%
    );

    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important;
  }

  body > .header {
    max-width: 1500px;
    width: calc(100% - 44px);
    margin: 0 auto;
    padding: 16px 0;
    min-height: 78px;
  }

  body > .header .brand img {
    max-height: 62px;
  }


  /* =====================================================
     ESTRUTURA PRINCIPAL
     ===================================================== */

  main#main {
    display: grid;

    grid-template-columns:
      minmax(178px, 220px)
      minmax(0, 1fr)
      minmax(235px, 290px);

    grid-template-rows: auto;

    align-items: start;
    align-content: start;

    gap: 20px;

    max-width: 1500px;
    width: calc(100% - 44px);

    margin: 24px auto 0;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
    overflow-y: visible !important;
  }


  /* OCULTAR ELEMENTOS ANTIGOS */

  main#main > .hero,
  main#main > .home-hub,
  main#main > .closing {
    display: none !important;
  }


  /* =====================================================
     COLUNA ESQUERDA
     ===================================================== */

  main#main > .desktop-sidebar {
    grid-column: 1;
    grid-row: 1;

    position: static !important;

    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;

    align-self: start !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
    overflow-y: visible !important;

    transform: none !important;
  }


  /* =====================================================
     PLAYER CENTRAL
     ===================================================== */

  main#main > #ouvir {
    grid-column: 2;
    grid-row: 1;

    width: 100%;
    max-width: none;
    min-width: 0;

    margin: 0;
    padding: 0;

    position: relative;
    height: auto;
    overflow: visible;
  }


  /* =====================================================
     COLUNA DIREITA - COMUNIDADE
     ===================================================== */

  main#main > .desktop-community {
    grid-column: 3;
    grid-row: 1;

    position: static !important;

    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;

    align-self: start !important;

    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;

    overflow: visible !important;
    overflow-y: visible !important;

    transform: none !important;
  }


  /* =====================================================
     DEMAIS SECOES DA RADIO
     ===================================================== */

  main#main > section:not(#ouvir):not(.hero):not(.home-hub):not(.closing),
  main#main > .desktop-below {
    grid-column: 1 / -1;

    min-width: 0;
    max-width: none;

    width: 100%;
    margin: 0;

    position: relative;
  }

  main#main > #pedir {
    padding-top: 45px;
  }


  /* CHAT ANTIGO OCULTO */

  main#main > #chat {
    display: none !important;
  }


  /* =====================================================
     VISUAL DAS COLUNAS
     ===================================================== */

  .desktop-sidebar,
  .desktop-community {
    border: 1px solid #9f763c60;
    border-radius: 19px;

    background: linear-gradient(
      160deg,
      #322216,
      #231811
    );

    box-shadow: 0 14px 35px #0003;

    padding: 18px;
    box-sizing: border-box;
  }


  .desktop-sidebar h2,
  .desktop-community h2 {
    font-family: 'DM Sans', sans-serif;

    font-size: 17px;
    letter-spacing: 0;

    margin: 0 0 14px;

    color: #f0cb84;
  }


  /* =====================================================
     MENU ESQUERDO
     ===================================================== */

  .desktop-sidebar nav {
    display: grid;
    gap: 5px;
  }

  .desktop-sidebar nav a {
    display: block;

    border-radius: 10px;

    padding: 11px 12px;

    font-size: 13px;

    color: #f2e7d7;

    text-decoration: none;
    cursor: pointer;
  }

  .desktop-sidebar nav a:hover,
  .desktop-sidebar nav a:focus-visible {
    background: #e4b86620;

    color: #ffdc96;

    outline: 1px solid #e4b86655;
  }

  .desktop-sidebar .desktop-tagline {
    font-size: 11px;

    color: #bda992;

    line-height: 1.7;

    border-top: 1px solid #e4b86625;

    margin: 16px 0 0;

    padding-top: 14px;
  }


  /* =====================================================
     COMUNIDADE - LATERAL DIREITA
     ===================================================== */

  .desktop-community p {
    font-size: 12px;

    line-height: 1.7;

    color: #d1bfa8;

    margin: 7px 0 15px;
  }

  .desktop-community .community-preview {
    border: 1px solid #e4b86635;

    background: #e4b8660d;

    border-radius: 13px;

    padding: 14px;

    margin: 12px 0;
  }

  .desktop-community .community-preview strong {
    display: block;

    color: #f2ce87;

    font-size: 14px;
  }

  .desktop-community .community-preview small {
    display: block;

    color: #c9b39a;

    font-size: 11px;

    margin-top: 7px;

    line-height: 1.6;
  }

  .desktop-community .coming-soon {
    display: inline-block;

    border: 1px solid #e4b86666;

    border-radius: 20px;

    padding: 5px 10px;

    font-size: 10px;

    color: #e4b866;

    margin-top: 8px;
  }

  .desktop-community .community-links {
    display: grid;

    gap: 8px;

    margin-top: 14px;
  }

  .desktop-community .community-links a {
    display: block;

    text-align: center;

    padding: 10px;

    border-radius: 10px;

    border: 1px solid #e4b86660;

    color: #f1ce8d;

    text-decoration: none;

    font-size: 12px;
  }

  .desktop-community .community-links a:hover {
    background: #e4b86620;

    color: #ffdc96;
  }


  /* =====================================================
     CARROSSEL DA COMUNIDADE
     ===================================================== */

  .desktop-community .community-members {
    max-width: 100%;
    min-width: 0;

    overflow: hidden;
  }

  .desktop-community .community-carousel {
    width: 100%;
    max-width: 100%;

    overflow: hidden;
  }

  .desktop-community .community-carousel-track {
    display: flex;

    overflow-x: auto;
    overflow-y: hidden;

    max-width: 100%;

    scroll-behavior: smooth;
  }


  /* =====================================================
     PLAYER PRINCIPAL
     ===================================================== */

  #ouvir #radio-player {
    max-width: 100%;
    margin: 0;
  }

  #ouvir .player-card,
  #ouvir .card {
    max-width: 100%;
  }


  /* =====================================================
     PLAYER FLUTUANTE INFERIOR
     ===================================================== */

  .desktop-sticky-player {
    position: fixed;

    left: 50%;
    bottom: 18px;

    transform: translateX(-50%);

    width: min(610px, calc(100% - 40px));

    display: flex;
    align-items: center;

    gap: 14px;

    padding: 10px 15px;

    border: 1px solid #e4b86690;

    border-radius: 18px;

    background: #23180ff5;

    box-shadow: 0 12px 45px #000a;

    z-index: 100;

    color: #f6e8d4;
  }

  .desktop-sticky-player[hidden] {
    display: none !important;
  }

  .desktop-sticky-player .sticky-title {
    flex: 1;
    min-width: 0;
  }

  .desktop-sticky-player strong,
  .desktop-sticky-player small {
    display: block;

    white-space: nowrap;
    overflow: hidden;

    text-overflow: ellipsis;
  }

  .desktop-sticky-player strong {
    font-size: 13px;
  }

  .desktop-sticky-player small {
    font-size: 11px;

    color: #d0b89b;

    margin-top: 3px;
  }

  .desktop-sticky-player button {
    background: #e4b866;

    border: 0;

    color: #21170f;

    border-radius: 50%;

    width: 42px;
    height: 42px;

    font-size: 20px;

    cursor: pointer;
  }

  .desktop-sticky-player a {
    font-size: 12px;

    color: #f0cc86;

    text-decoration: none;
  }
}


/* =====================================================
   TABLETS
   ===================================================== */

@media (min-width: 651px) and (max-width: 900px) {

  main#main {
    display: grid;

    grid-template-columns:
      minmax(0, 1fr) 250px;

    gap: 16px;

    width: calc(100% - 30px);

    margin: 18px auto;

    height: auto !important;
    overflow: visible !important;
  }

  main#main > .hero,
  main#main > .home-hub,
  main#main > .closing {
    display: none !important;
  }

  main#main > .desktop-sidebar {
    grid-column: 1 / -1;
    grid-row: 1;

    position: static !important;

    height: auto !important;
    overflow: visible !important;
  }

  main#main > .desktop-sidebar nav {
    display: flex;

    flex-wrap: wrap;

    gap: 6px;
  }

  main#main > .desktop-sidebar nav a {
    padding: 7px 10px;
  }

  main#main > #ouvir {
    grid-column: 1;
    grid-row: 2;

    max-width: none;

    width: 100%;

    padding: 0;
  }

  main#main > .desktop-community {
    grid-column: 2;
    grid-row: 2;

    position: static !important;

    height: auto !important;
    overflow: visible !important;
  }

  main#main > section:not(#ouvir):not(.hero):not(.home-hub):not(.closing) {
    grid-column: 1 / -1;
  }

  main#main > #chat {
    display: none !important;
  }

  .desktop-sidebar,
  .desktop-community {
    border: 1px solid #9f763c60;

    border-radius: 16px;

    background: #2b1e14;

    padding: 15px;
  }

  .desktop-sidebar h2,
  .desktop-community h2 {
    font-size: 17px;

    color: #e4b866;

    margin: 0 0 10px;
  }

  .desktop-sidebar nav a {
    color: #f4e7d6;

    text-decoration: none;

    font-size: 12px;
  }

  .desktop-community p,
  .desktop-community small {
    font-size: 12px;

    color: #d4bfa7;

    line-height: 1.6;
  }

  .desktop-community .community-preview {
    padding: 10px;

    border: 1px solid #e4b86655;

    border-radius: 10px;

    margin: 12px 0;
  }

  .desktop-community strong {
    display: block;

    color: #e4b866;
  }

  .desktop-community .coming-soon {
    color: #e4b866;

    font-size: 11px;
  }

  .desktop-community .community-links {
    display: grid;
    gap: 8px;
  }

  .desktop-community .community-links a {
    color: #e4b866;

    font-size: 12px;
  }

  .desktop-sticky-player {
    display: none !important;
  }
}


/* =====================================================
   CELULAR - LAYOUT ORIGINAL
   ===================================================== */

@media (max-width: 650px) {

  .desktop-sidebar,
  .desktop-community,
  .desktop-sticky-player {
    display: none !important;
  }
}
/* Reuse the existing right column as the community screen on phones only. */
@media(max-width:650px){
 body[data-route="comunidade-radio"] main>.desktop-community:not([hidden]){display:block!important;width:calc(100% - 36px);max-width:620px;margin:20px auto;padding:18px;border:1px solid var(--line);border-radius:18px;background:var(--panel);min-width:0;box-sizing:border-box}
 body[data-route="comunidade-radio"] .desktop-community h2{font-size:26px}
 body[data-route="comunidade-radio"] .community-preview{margin:18px 0;padding:15px;border:1px solid var(--line);border-radius:14px}
 body[data-route="comunidade-radio"] .community-preview small{display:block;margin:8px 0;color:var(--muted);line-height:1.6}
 body[data-route="comunidade-radio"] .community-links{margin-top:14px}
 main>[data-screen][hidden],.instagram-mobile-invite[hidden]{display:none!important}
 .bottom-nav a{min-width:0;font-size:9px}.bottom-nav a span{flex-shrink:0}
 .request-dedication{margin:18px 0}.request-dedication summary{cursor:pointer;color:var(--gold)}
}

/* Compact desktop community so the next full-width section follows the player. */
@media(min-width:901px){
 main#main>.desktop-community{padding:16px}
 .desktop-community h2{margin-bottom:8px}
 .desktop-community>p{margin:6px 0 8px;line-height:1.5}
 .desktop-community .community-preview{padding:10px;margin:8px 0}
 .desktop-community .community-preview small{margin-top:5px;line-height:1.45}
 .desktop-community>.community-preview:last-child>small{display:none}
 .desktop-community .community-members{margin:10px 0;padding:10px 8px 8px}
 .desktop-community .community-members-title{margin-bottom:6px}
 .desktop-community .community-member-photo{width:54px;height:54px;margin-bottom:5px}
 .desktop-community .community-carousel-track{padding-bottom:4px}
 .desktop-community .community-preview:last-child>.community-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
 .desktop-community .community-preview:last-child>.community-links>.radio-community-button{grid-column:1 / -1;padding:10px 8px;font-size:12px}
 .desktop-community .community-preview:last-child>.community-links>a:not(.radio-community-button){padding:9px 5px;min-width:0;white-space:normal;line-height:1.35;font-size:11px}
 .desktop-community .instagram-group-button{padding:9px 6px}
 main#main>#pedir{padding-top:8px}
}

/* Equal-height desktop side panels, with natural page scrolling. */
@media(min-width:901px){main#main>.desktop-sidebar,main#main>.desktop-community{align-self:stretch!important;height:auto!important}}

/* Match the program banner/card frames without cropping the artwork. */
@media(min-width:901px){
 .schedule-feature{align-items:stretch}
 .schedule-feature>.schedule-photo{height:100%;object-fit:contain;background:var(--panel);align-self:stretch}
 .schedule-feature>.schedule-grid{align-items:stretch;min-width:0}
 .schedule-feature .schedule-card{height:100%;display:flex;flex-direction:column;justify-content:center;padding:20px;min-width:0}
 .schedule-feature .cafe-motion-top{margin-bottom:10px}
 .schedule-feature .cafe-program-label{margin-bottom:8px}
 .schedule-feature .schedule-card h3{margin-bottom:14px}
 .schedule-feature .schedule-card>p{margin:10px 0;line-height:1.7}
 .schedule-feature .cafe-ticker{margin-top:12px}
 .schedule-feature .program-local-time{margin-top:12px;padding-top:12px}
 main#main>.schedule-section{padding-bottom:16px}
 main#main>.partners-section{padding-top:16px}
}
