/* ==========================================================================
   Violino Brasileiro — Responsive layer (tablet + mobile)
   The original site is desktop-only: nearly every layout rule lives inside
   `@media (min-width: 920px)`. This file provides the layout for everything
   below that breakpoint.

   Breakpoints
     - base rules here            → phones  (< 600px)
     - min-width: 600px block     → tablets (600px – 919px)
     - the site's own 920px block → desktop (unchanged)
   ========================================================================== */

/* ---- Mobile nav: hidden on desktop, shown by the max-width block below ---- */
.nav-toggle { display: none; }
.nav-overlay { display: none; }

/* ---- Footer credit link (all breakpoints) ---- */
footer p a {
  color: var(--goldYellow);
  text-decoration: underline;
}
footer p a:hover { color: var(--goldYellow_Washed); }

@media screen and (max-width: 919px) {

  /* ---- Kill the "mobile not supported" gate -------------------------------- */
  .container-mobile { display: none !important; }

  html, body {
    overflow-x: hidden;
    overflow-y: auto;
    width: 100%;
  }

  body { font-size: 16px; }

  img { max-width: 100%; height: auto; }

  /* ---- Fluid type -------------------------------------------------------- */
  h1 { font-size: 22px; line-height: 30px; }
  p  { font-size: 17px; line-height: 27px; }

  /* ======================================================================
     HEADER  (shared by #header, #header-light on every page)
     A cream bar with the dark wordmark drawn via CSS background so it works
     no matter which <img> the page ships (some reference a missing file).
     ====================================================================== */
  header,
  #header,
  #header-light {
    position: static;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 16px;
    padding: 18px 20px;
    background-color: var(--goldYellow_Washed);
    z-index: 10;
  }

  #leftContent { flex: 0 0 auto; }

  #leftContent a img { display: none; }

  /* the logo anchor gets the wordmark as a background so it renders the same
     on every page regardless of which <img> that page's markup carries */
  #leftContent a {
    display: block;
    width: 220px;
    max-width: 60vw;
    height: 20px;
    background: url("../assets/logo-desktop-light.svg") left center / contain no-repeat;
  }

  #rightContent {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
  }

  /* the inline nav is replaced by the hamburger + overlay */
  #rightContent > ul { display: none; }

  /* ---- Hamburger button ---- */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
  }
  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--forestGreen);
    border-radius: 2px;
  }
  .nav-toggle:hover span { background-color: var(--goldYellow); }

  /* ---- Full-screen overlay menu ---- */
  .nav-overlay {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--forestGreen_Dark);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-overlay-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--goldYellow_Washed);
    font-family: redonda;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
  }
  .nav-overlay-close:hover { color: var(--goldYellow); }
  .nav-toggle:focus-visible,
  .nav-overlay-close:focus-visible {
    outline: 1px solid var(--goldYellow);
    outline-offset: 2px;
  }

  .nav-overlay-menu ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 0;
    margin: 0;
  }
  .nav-overlay-menu li { margin: 0; padding: 0; }
  .nav-overlay-menu a {
    color: var(--goldYellow_Washed);
    font-family: redonda;
    font-size: 20px;
    letter-spacing: 3px;
    text-transform: uppercase;
  }
  .nav-overlay-menu a:hover { color: var(--goldYellow); }

  body.nav-open { overflow: hidden; }

  /* ======================================================================
     HOME  (index.html)
     ====================================================================== */
  #homeContentContainer { width: 100%; padding-top: 0; }

  .homeContent {
    width: 100%;
    box-sizing: border-box;
    padding: 44px 24px;
  }

  #hc-01 { display: block; }
  #hc-01 > div { padding: 0 0 24px 0; }
  #hc-01 p { max-width: none; padding-bottom: 20px; }

  #hc-01 iframe,
  .homeContent iframe {
    width: 100% !important;
    height: 56.25vw !important;
    max-height: 340px;
    display: block;
  }

  /* section 2 — levels */
  #hc-02 { background-color: var(--light); }
  #hc-02 p { color: var(--forestGreen_Dark); max-width: none; padding-bottom: 24px; }

  #musicpage-link { margin-bottom: 40px; }
  #musicpage-link a,
  #composers-link {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 2px;
  }
  #musicpage-link a { color: var(--forestGreen_Dark); }
  /* #hc-03 has a dark background here — match the desktop gold link colour */
  #composers-link { color: var(--goldYellow); }
  #composers-link:hover { color: var(--goldYellow_Washed); }

  /* horizontal-scroll carousel: the 3 levels sit side by side and swipe.
     Each level is its own <a> (links to music.html?nivel=NN). */
  #music-level {
    display: flex;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  #music-level > a {
    display: block;
    flex: 0 0 58%;
    max-width: 240px;
    color: var(--forestGreen_Dark);
    scroll-snap-align: start;
  }
  #music-level > a > div { text-align: center; }
  #music-level img { width: 100%; max-width: none; padding: 0; }
  #music-level h4 {
    padding-top: 14px;
    font-family: redonda;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
  }
  #music-level p { font-size: 15px; color: var(--forestGreen_Dark); opacity: .8; }

  /* section 3 — composers */
  #hc-03 { background-color: var(--forestGreen); }
  #hc-03 p { color: var(--goldYellow_Washed); max-width: none; padding-bottom: 24px; }
  #hc-03 > div:first-child { padding-bottom: 40px; }

  /* horizontal-scroll carousel: composers sit side by side and swipe */
  #composers a {
    display: flex;
    flex-direction: row;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  #composers a > div {
    flex: 0 0 58%;
    max-width: 240px;
    text-align: center;
    scroll-snap-align: start;
  }
  #composers img { width: 100%; max-width: none; padding: 0; }
  #composers p { font-size: 15px; color: var(--goldYellow_Washed); opacity: .85; padding: 12px 0; }

  /* footer nav block — shared #hc-04 / #mc-04 */
  #hc-04, #mc-04 {
    background-color: var(--forestGreen_Dark);
    display: block;
    box-sizing: border-box;
    padding: 56px 24px;
  }
  #hc-04 ul, #mc-04 ul { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 0; }
  #hc-04 li, #mc-04 li { padding: 0; }
  #hc-04 a, #mc-04 a { font-family: redonda; font-size: 13px; }

  #contato { margin-top: 40px; }
  /* run the two lines together as one sentence so "um email para" doesn't
     get orphaned on its own line */
  #contato p { color: var(--goldYellow_Washed); font-size: 17px; line-height: 24px; padding-top: 4px; }
  #contato p,
  #contato #contato-descricao { display: inline; padding-top: 0; }
  #email { font-family: redonda; color: var(--goldYellow); font-size: 15px; }

  #apoio, #m-apoio {
    border: 0;
    padding: 0;
    margin: 40px 0 0 0;
  }
  #apoio p, #m-apoio p { font-size: 15px; }
  #apoio img, #m-apoio img { width: 140px; }

  footer {
    padding: 24px;
    background-color: #070C0E;
  }
  footer p {
    font-family: redonda;
    font-size: 12px;
    color: var(--goldYellow_Washed);
    opacity: .5;
    letter-spacing: .3px;
  }

  /* ======================================================================
     MUSIC LIST  (music.html)
     ====================================================================== */
  #music-list { padding: 40px 20px 64px; }

  .ListFilterTag {
    padding-bottom: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
  .filterTag { margin: 0; }

  /* The filter JS shows matches by adding `.show`; everything else must be
     hidden by default (the desktop rule that does this is gated at 920px). */
  .music-list-item {
    display: none;
    justify-content: space-between;
    width: 100%;
    box-sizing: border-box;
    padding: 20px 0;
    border-bottom: 1px solid rgba(25, 45, 52, .12);
  }
  /* JS toggles `.show` (display: inline-flex !important) — override it */
  .music-list-item.show {
    display: flex !important;
    flex-direction: column;
    gap: 4px;
  }
  .music-list-item p { color: var(--forestGreen); margin: 0; }
  .ml-left-content { display: block; margin: 0; }
  .ml-left-content .ml-composer {
    padding: 0;
    font-family: garamond-bold;
    font-size: 18px;
    width: auto;
  }
  .ml-left-content p { font-family: garamond; font-size: 18px; }
  .ml-right-content { display: block; padding: 0; }
  .ml-right-content p { font-family: redonda; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; opacity: .6; }

  /* ======================================================================
     COMPOSERS + DEPOIMENTOS  (composers.html, depoiment.html)
     ====================================================================== */
  #composerContentContainer { width: 100%; padding-top: 0; }

  .composerContent {
    padding: 40px 24px 64px;
    margin: 0;
  }

  .composerItem {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid #ccc;
  }
  .composerItem:last-child { border-bottom: 0; }

  .composerImg {
    width: 100%;
    max-width: 240px;
    margin: 0 0 20px 0;
  }
  .composerImg img { width: 100%; }

  .composerDescription { width: 100%; border: 0; }
  .composerDescription h1 {
    font-family: garamond;
    font-size: 22px;
    padding-top: 0;
    color: var(--forestGreen_Dark);
  }
  .composerDescription p {
    font-family: garamond;
    font-size: 16px;
    line-height: 24px;
    padding-top: 16px;
    max-width: none;
    color: var(--forestGreen_Dark);
  }
  .composerDescription .bold { font-family: garamond-bold; }

  #fonte {
    font-family: garamond;
    font-size: 12px;
    padding-top: 4px;
    color: var(--forestGreen_Dark);
    opacity: .7;
  }

  .composerInterview { padding-top: 40px; border-top: 1px solid #ccc; }
  .composerInterview iframe,
  .composerContent iframe {
    width: 100%;
    height: 56.25vw;
    max-height: 420px;
  }

  /* ======================================================================
     ABOUT  (about.html)
     ====================================================================== */
  #aboutContentContainer { width: 100%; padding-top: 0; }

  .aboutContent { padding: 32px 24px 64px; margin: 0; }

  #composerDescription { display: block; }
  #composerDescription h1 { padding-top: 0; margin-bottom: 8px; color: var(--forestGreen_Dark); }

  #aboutParagraph { width: 100%; margin: 0; }
  #aboutParagraph p { color: var(--forestGreen_Dark); font-size: 16px; line-height: 25px; padding-top: 16px; }
  #aboutSpacing { padding-bottom: 32px; }

  .luizFelipe { margin-top: 48px; }

  #portalViolino {
    display: block;
    width: 100%;
    margin-top: 24px;
  }
  #portalViolino #portalContent {
    border: 1px solid #ccc;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 14px;
  }
  #portalContent img { width: 56px; height: fit-content; margin: 0; }
  #portalViolino p { padding-top: 0; color: var(--forestGreen_Dark); font-size: 15px; }
  #portalViolino span { font-family: garamond-bold; }

  .divider { background-color: #ccc; width: 100%; height: 1px; margin: 8px 0; }

  #author { display: block; margin-top: 20px; }
  #authorImage { width: 100%; max-width: 320px; }
  #authorImage img { width: 100%; }
  #authorImage p { padding-top: 10px; color: var(--forestGreen_Dark); font-size: 14px; }

  .aboutLink, .pLink {
    font-family: garamond;
    color: var(--forestGreen);
    text-decoration: underline;
  }
  .pLink { background-color: #FEEBCE; }

  /* ======================================================================
     MUSIC PAGE TEMPLATE  (music-pages/**)
     ====================================================================== */
  .mp-content-container {
    background-color: var(--forestGreen);
    padding: 32px 20px 8px;
  }

  .mp-video-yt-carousel,
  .mp-video-yt-carousel-2nd,
  .mp-video {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .mp-video-yt-carousel-2nd { margin-top: 12px; }

  .video-youtube,
  .video-youtube-full-grid,
  .mp-video iframe {
    flex: 0 0 86%;
    width: 86%;
    height: 52vw;
    max-height: 320px;
    margin: 0;
    scroll-snap-align: start;
  }

  .mp-music-description {
    display: block;
    width: 100%;
    padding: 36px 0 8px;
  }
  .mp-txt-content { width: 100%; }
  .mp-txt-content h1 { color: var(--goldYellow_Washed); }
  .mp-txt-headline { font-size: 16px; line-height: 22px; padding-top: 8px; }
  .mp-txt-moreinfo { padding-top: 24px; font-size: 15px; line-height: 23px; }
  .mp-fonte { font-size: 13px; letter-spacing: .2px; padding-top: 8px; opacity: .8; }

  .mp-cta { display: flex; padding-top: 24px; }
  .button-primary {
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 40px;
    padding: 14px 22px;
    color: var(--goldYellow_Washed);
    font-family: redonda;
    font-size: 13px;
  }
  .button-primary:hover {
    background-color: var(--goldYellow);
    border-color: var(--goldYellow);
    color: var(--forestGreen);
  }

  /* sheet image */
  .mp-sheetimg {
    background-color: var(--goldYellow_Washed);
    text-align: center;
    padding: 40px 20px;
    display: flex;
  }
  .mp-sheetimg-container { background-color: var(--light); width: 100%; padding: 32px 0; }
  .mp-sheetimg img { width: 100%; }

  /* more music carousel */
  .mp-moremusic {
    margin: 40px 20px;
    color: var(--forestGreen);
  }
  .mp-moremusic-border { border-top: 1px solid rgba(25, 45, 52, .1); }
  .mp-moremusic h2 {
    font-family: garamond-bold;
    font-size: 19px;
    line-height: 28px;
    margin: 24px 0;
    color: var(--forestGreen);
  }
  .mp-moremusic-scrollable {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 24px;
    -webkit-overflow-scrolling: touch;
  }
  /* fixed-width cards so the title wraps to the thumb width instead of
     stretching the card past the image */
  .moremusic-card { margin: 0; flex: 0 0 220px; width: 220px; }
  .moremusic-videothumb { width: 100%; margin-bottom: 12px; }
  .moremusic-videothumb img { width: 100%; }
  .moremusic-title { color: var(--forestGreen); font-size: 15px; line-height: 19px; overflow-wrap: break-word; }
  .moremusic-author { color: var(--forestGreen); font-size: 13px; }

  /* music-page footer uses a bare #hc-04 with a nested #apoio */
  .mp-content-container ~ #hc-04 ul { margin-bottom: 24px; }

} /* end max-width: 919px */


/* ==========================================================================
   TABLET  (600px – 919px) — widen gutters, use 2-up grids
   ========================================================================== */
@media screen and (min-width: 600px) and (max-width: 919px) {

  h1 { font-size: 24px; }
  p  { font-size: 18px; line-height: 29px; }

  .homeContent { padding: 64px 8vw; }
  #hc-01 { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; }
  #hc-01 > div { flex: 1 1 300px; padding: 0; }
  #hc-01 iframe,
  .homeContent iframe { max-height: 300px; }

  /* tablet: all 3 levels fit side by side, no scroll */
  #music-level { gap: 4px; overflow-x: visible; }
  #music-level > a { flex: 1 1 0; max-width: none; }
  /* tablet: all composers fit side by side, no scroll */
  #composers a { flex-direction: row; gap: 4px; overflow-x: visible; }
  #composers a > div { flex: 1 1 0; max-width: none; }
  #music-level img, #composers img { width: 100%; max-width: none; }

  #music-list { padding: 56px 8vw 80px; }

  .music-list-item.show { flex-direction: row; }
  .ml-left-content { display: flex; gap: 24px; }
  .ml-left-content .ml-composer { width: 200px; flex: 0 0 200px; }

  .composerContent { padding: 56px 8vw 80px; }
  .composerItem { display: flex; gap: 28px; }
  .composerImg { flex: 0 0 220px; margin-bottom: 0; }

  .aboutContent { padding: 48px 8vw 80px; }

  .mp-content-container { padding: 56px 8vw 8px; }
  .video-youtube,
  .video-youtube-full-grid,
  .mp-video iframe { flex-basis: 60%; width: 60%; height: 34vw; }
  .mp-moremusic { margin: 48px 8vw; }
  .mp-sheetimg { padding: 56px 8vw; }

  /* "Apoio" label keeps a little breathing room on tablet; dropped < 600px */
  #apoio p, #m-apoio p { padding-bottom: 10px; }
}


/* ==========================================================================
   SMALL PHONES  (<= 390px) — footer stacks
   ========================================================================== */
@media screen and (max-width: 390px) {

  /* 1. footer nav links one per line */
  #hc-04 ul,
  #mc-04 ul {
    flex-direction: column;
    gap: 14px;
  }

  /* 2 + 3. credit: name goes under the title, drop the " | " separator */
  footer .footer-sep { display: none; }
  footer .footer-title,
  footer .footer-credit { display: block; }
}


/* ==========================================================================
   SMALL SCREENS (< 900px) — header left gutter next to the logo is 24px.
   Desktop (>= 900px) keeps its original padding (header.css).
   ========================================================================== */
@media screen and (max-width: 899px) {
  header,
  #header,
  #header-light { padding-left: 24px; }
}
