:root {
    --color-van: #1a1bad;
    --purple: #6C5CE7;
    --purple-light: #EEEDFE;
    --purple-dark: #3C3489;
    --dark: #2D3436;
    --gray: #636E72;
    --light: #DFE6E9;
    --bg: #F8F9FA;
    --white: #FFFFFF;
    --border: #E2E8F0;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.1);

    --font-heading: 'Inter', sans-serif;
    --font-body: 'Montserrat', sans-serif;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    /* background: #F1F3F7; */
    color: var(--dark);
    min-height: 100vh;
  }
  /* HEADER */
  .site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
  }
  .site-header-inner {
    max-width: 1300px;
    margin: 0 auto;
    /* display: flex; */
    align-items: center;
    /* justify-content: space-between; */
    height: 90px;
    padding-top: 7px;
  }
  /* .logo-area { display: flex; align-items: center; gap: 10px; } */
  .logo-area { display: flex; justify-content: space-between; align-items: center; }
  .logo-area a {text-align: right; text-decoration: none;
    color: var(--color-van, #1a1bad);
    font-weight: bold;
    transition: color 0.3s ease;}
  .logo-dot {
    width: 32px; height: 32px;
    background: var(--purple);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
  }
  .logo-dot i { color: #fff; font-size: 17px; }
  .logo-text { font-size: 15px; font-weight: 600; color: var(--dark); }
  .logo-sub { font-size: 12px; color: var(--gray); margin-top: 1px; }
  /* MAIN LAYOUT */
  .main { 
    max-width: 1300px; 
    margin: 0 auto; 
    /* padding: 2rem; */
    padding-bottom: 20px;
  }

  img{
    width: 100%;
    max-width: 170px;
    height: auto;
  }

  /* PAGE TITLE */
  .page-title-block { margin-bottom: 1.75rem; padding: 0 1.5rem; text-align: center; }
  .page-title-block h1 { font-size: 2.5rem; font-weight: 600; color: var(--color-van); font-family: var(--font-heading);    
    padding-top: 20px;
    margin-bottom: 20px;
    line-height: 1.1;
    font-weight: 600;
  }
  .page-title-block p { font-size: 14px; color: var(--gray); margin: 10px; font-weight: bold; font-size: 1.1rem;}
  /* TABS - OLD */
  /* .tabs-wrap {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
  }
  .tabs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    padding: 8px 12px 0;
    gap: 4px;
  }
  .tb {
    font-size: 12px;
    font-weight: 500;
    padding: 7px 14px;
    border: none;
    background: transparent;
    color: var(--gray);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    font-family: inherit;
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
  }
  .tb:hover { color: var(--dark); background: rgba(108,92,231,0.05); }
  .tb.on { color: var(--purple); border-bottom: 2px solid var(--purple); background: var(--white); } */

  /* NOVO: GRID DE BOTÕES DE TEMPLATE */
  .template-grid-container {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    /*margin-bottom: 1.75rem;  Espaço entre a grade e o painel de detalhes */
  }
  .template-grid-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* 3 colunas em telas grandes, ajusta para menores */
    gap: 12px;
    padding: 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    max-width: 80%;
    margin: 0 auto;
    border-radius: 25px;
  }
  .template-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 15px 10px;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    min-height: 90px; /* Altura mínima para uniformidade */
    box-shadow: var(--shadow); /* Efeito de relevo */
    position: relative;
    top: 0;
    left: 0;
  }
  .template-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
  }
  .template-button.on {
    transform: translateY(0);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.1); /* Efeito de "pressionado" */
    border: 1px solid rgba(0,0,0,0.1);
  }
  .template-button-number {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.7;
  }
  .template-button-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 3px;
  }
  .template-button-subtitle {
    font-size: 11px;
    opacity: 0.8;
  }

  /* Cores para as linhas de botões */
  .btn-row-0 { 
    /* background: #5A5DE2; */
    /* background: #7679E9; */
    background: #9497F0;
    /* border: 2px solid #1f22ed; */
    border: 2px solid #2e33c0;
    color: #000;

    box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-1 { 
    /* background: #7679E9; */
    /* background: #9497F0; */
    background: #B2B4F6;
    /* border: 2px solid #2e33c0; */
    border: 2px solid #7679d8;
    color: #000;
    box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-2 { 
    /* background: #9497F0; */
    /* background: #B2B4F6; */
    background: #c8caf2;
    /* border: 2px solid #5357ce; */
    border: 2px solid #9d9ed1;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }

  .btn-row-3 { 
    /* background: #B2B4F6; */
    background: #dcdef8;
    border: 2px solid #c4c4df;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-4 { 
    background: #CC842A;
    border: 2px solid #a86718;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-5 { 
    background: #D89A4D;
    border: 2px solid #d7831c;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }

  .btn-row-6 { 
    background: #E4B26E;
    border: 2px solid #cb913f;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }

  .btn-row-7 { 
    background: #F0C693;
    border: 2px solid #dc9d51;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-8 { 
    background: #A3AFBF;
    border: 2px solid #7d838a;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }

  .btn-row-9 { 
    background: #BAC3D1;
    border: 2px solid #93969c;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-10 { 
    background: #D1D7E1;
    border: 2px solid #adaeb0;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }
  .btn-row-11 { 
    background: #E6EBF2;
    border: 2px solid #c5c7c9;
    color: #000;
        box-shadow:
    0 6px 18px rgba(0,0,0,.10),
    0 2px 5px rgba(0,0,0,.05);
    transition:
        all .25s ease;
  }

  .btn-row-0:hover, .btn-row-1:hover, .btn-row-2:hover, .btn-row-3:hover, .btn-row-4:hover, .btn-row-5:hover, .btn-row-6:hover, .btn-row-7:hover, .btn-row-8:hover, .btn-row-9:hover, .btn-row-10:hover, .btn-row-11:hover {
    transform:translateY(-4px);
    box-shadow:
        0 12px 26px rgba(0,0,0,.18),
        0 5px 10px rgba(0,0,0,.08);
    background: #D1D7E180;
    border: 1px solid #b0b2b5;
  }

  /* PANELS */
  #panels { padding: 1.5rem;}
  .pnl { display: none; padding: 0; } /* Removido padding para o grid de botões */
  .pnl.on { display: block; }
  /* TEMPLATE GRID */
  .tgrid {
    display: grid;
    /* grid-template-columns: 240px 1fr;
    gap: 1.75rem; */
    grid-template-columns: 300px 1fr;
    gap: 1.3rem;
    align-items: start;
  }
  /* SIDEBAR */
  .sidebar { display: flex; flex-direction: column; gap: 12px;}
  /* THUMBNAIL */
  .thumb {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--bg);
  }
  .thumb-inner {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 14px; gap: 7px;
    position: relative;
  }
  .th-tag {
    font-size: 8px; font-weight: 700;
    letter-spacing: 0.5px; text-transform: uppercase;
    text-align: center; line-height: 1.35;
  }
  .th-fmt { font-size: 7px; text-align: center; }
  .th-cards {
    display: flex; gap: 3px;
    position: absolute; bottom: 8px; left: 8px; right: 8px;
  }
  .th-card {
    flex: 1; background: rgba(255,255,255,0.95);
    border-radius: 2px; padding: 3px;
    display: flex; flex-direction: column; gap: 2px;
    border: 0.5px solid rgba(0,0,0,0.07);
  }
  .th-line { height: 2px; border-radius: 1px; background: #DFE6E9; }
  .th-line2 { height: 2px; border-radius: 1px; background: #DFE6E9; width: 60%; }
  /* LINK BUTTONS */
  .links-wrap { display: flex; flex-direction: column; gap: 6px; }
  .lbtn {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 500; color: var(--purple);
    border: 1px solid var(--purple-mid);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    background: var(--purple-light);
    text-decoration: none;
    transition: background 0.15s;
    font-family: inherit;
  }
  .lbtn:hover { background: #CECBF6; }
  .lbtn i { font-size: 15px; }
  /* FORMAT TAG */
  .fmt-tag {
    font-size: 11px; color: var(--gray);
    display: flex; align-items: center; gap: 5px;
    padding: 6px 10px;
    background: var(--bg); border-radius: var(--radius-sm);
    border: 1px solid var(--border);
  }
  .fmt-tag i { font-size: 13px; }
  /* CONTENT */
  .tinfo { display: flex; flex-direction: column; gap: 1rem; }
  .badge {
    display: inline-block; font-size: 11px; font-weight: 500;
    padding: 3px 11px; border-radius: 20px;
    background: var(--purple-light); color: var(--purple-dark);
    margin-bottom: 6px;
  }
  .tname { font-size: 18px; font-weight: 600; color: var(--dark); line-height: 1.35; }
  /* SECTIONS */
  .sec {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
  }
  .slbl {
    font-size: .75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.7px;
    color: var(--gray); margin-bottom: 10px;
    display: flex; align-items: center; gap: 6px;
  }
  .slbl i { font-size: 14px; }
  .sec p, .sec li { font-size: 13.5px; color: var(--dark); line-height: 1.7; }
  .sec ul { padding-left: 1rem; }
  .sec li { margin-bottom: 4px; }
  /* SPECS GRID */
  .sgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; font-size: .8rem;}
  .sr { display: flex; flex-direction: column; gap: 2px; }
  .sl { font-size: 11px; color: var(--gray); }
  .sv { font-size: 13px; font-weight: 500; color: var(--dark); }
  /* STEPS */
  .slist { list-style: none; padding: 0; }
  .slist li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
  .snum {
    width: 21px; height: 21px; border-radius: 50%;
    background: var(--purple-light); color: var(--purple-dark);
    font-size: 11px; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 2px;
  }
  .slist p { font-size: 13.5px; line-height: 1.6; }

  /* NOVO: Estilos para o botão "Como usar os Templates Canva" */
  .canva-help-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin-top: 15px;
    background-color: var(--purple);
    color: var(--white);
    border: none;
    border-radius: var(--radius-md);
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: var(--shadow);
    box-shadow: var( --shadow-lg);
  }
  .canva-help-button:hover {
    background-color: var(--purple-dark);
    transform: translateY(-1px);
  }
  .canva-help-button i {
    font-size: 16px;
  }

  /* NOVO: Estilos para o Modal */
  .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  .modal-overlay.is-visible {
    opacity: 1;
    visibility: visible;
  }
  .modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
  }
  .modal-overlay.is-visible .modal-content {
    transform: translateY(0);
  }
  .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
  }
  .modal-header h2 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--purple-dark);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .modal-header h2 i {
    font-size: 1.5em;
    color: var(--purple);
  }
  .modal-close {
    background: none;
    border: none;
    font-size: 1.8em;
    color: var(--gray);
    cursor: pointer;
    line-height: 1;
    padding: 0;
  }
  .modal-close:hover {
    color: var(--dark);
  }
  .modal-body {
    padding: 1.5rem;
    font-size: 14px;
    color: var(--dark);
    line-height: 1.6;
  }
  .modal-body p {
    margin-bottom: 1rem;
  }
  .modal-body strong {
    font-weight: 600;
  }
  .modal-steps {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
  }
  .modal-steps li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 10px;
  }
  .step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--purple-light);
    color: var(--purple-dark);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 2px;
  }
  .modal-steps p {
    margin: 0;
    line-height: 1.5;
  }
  .modal-tip {
    background: var(--purple-light);
    border-left: 4px solid var(--purple);
    padding: 10px 15px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--purple-dark);
    font-size: 13px;
    margin-top: 1.5rem;
  }
  .modal-tip i {
    font-size: 1.2em;
    color: var(--purple);
  }
  .modal-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    text-align: right;
    background: var(--bg);
    border-bottom-left-radius: var(--radius-lg);
    border-bottom-right-radius: var(--radius-lg);
  }
  .close-button {
    background-color: var(--purple);
    color: var(--white);
    padding: 8px 18px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
  }
  .close-button:hover {
    background-color: var(--purple-dark);
  }

  /* ######## FIM ESTILO MODAL  ############ */

      /* ══ RODAPÉ ══ */
      footer {
        color: #fff;
        font-family: var(--font-body);
        padding-bottom: 6px;
        margin: 0 auto;
        max-width: 1300px;
        width: 100%;
      }

      .main-footer {
        display: flex;
        background-color: var(--color-van);
        color: var(--sidebar-text);
        /* padding: 0 20px; */
        padding: 0px 20px 10px 20px;
        font-size: 0.9em;
        border-radius: 17px;
        /* min-height: 201.42px; */
      }

      .footer-container {
        /* width: 84%; */
        width: 100%;
        max-width: 1200px;
        padding: 0 20px;
        box-sizing: border-box;
      }

      .logo-footer {
        margin-top: 15px;
        display: flex;
        justify-content: left;
      }

      .logo-footer img {
        max-width: 7rem;
        height: auto;
        filter: brightness(0) invert(1);
        margin-bottom: 10px;
      }

      .footer-info {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .line2Footer {
        display: flex;
        gap: 18px;
        font-size: 1.3rem;
      }

      .line2Footer a {
        color: #fff;
        text-decoration: none;
        transition: color 0.2s;
        font-size: 1.4rem;
      }

      .line2Footer a:hover {
        color: var(--color-van);
      }

      .line3Footer {
        text-align: left;
        margin-top: -7px;
        margin-bottom: 2px;
      }

      .line3Footer p {
        font-size: 0.9rem;
        color: #fff;
        margin: 5px 0;
      }

      .footer-nav {
        display: grid;
        min-width: fit-content;
        align-content: center;
        line-height: 1.4;
        text-align: left;
        margin-top: 16px;
      }

      .footer-nav h4 {
        font-family: var(--font-body);
        font-size: 1.1em;
        font-weight: 700;
        color: #fff;
        margin-bottom: 16px;
      }

      .footer-nav a {
        font-size: 0.9rem;
        color: #fff;
        text-decoration: none;
        transition: color 0.2s;
        margin: 0 10px 8px 0;
      }

      .footer-nav a:hover {
        color: #fff;
      }

      .copyright {
        text-align: center;
        padding: 14px 24px;
        font-size: 0.8rem;
        color: #666;
      }

      .pergFreq {font-size: .7rem;}

      /* ####################### */

.back-to-top {
    position: fixed;
    top: 50%;                       
    transform: translateY(-50%);
    right: 20px;
    z-index: 999;
    width: 42px;
    height: 42px;
    background-color: #5f6162;
    color: #fff;
    text-align: center;
    line-height: 38px;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease, background-color 0.3s ease;
    -webkit-transform: translateZ(0);
}
.back-to-top .fa {
    font-size: 22px;
    vertical-align: middle;
}
.back-to-top:hover {
    background-color: #AD0505;
    color: #fff;
    opacity: 1;
}
.back-to-top.show {
    opacity: 1;
    visibility: visible;
    /* transform: translateY(0); */
    transform: translateY(-50%);
}

/* Tooltip */
.back-to-top::before {
    content: "Voltar ao topo";
    position: absolute;
    bottom: 55px;
    right: 0;
    background-color: #5f6162;
    color: #fff;
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}
.back-to-top::after {
    content: "";
    position: absolute;
    bottom: 48px;
    right: 15px;
    border-width: 7px 7px 0 7px;
    border-style: solid;
    border-color: #5f6162 transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}
.back-to-top:hover::before,
.back-to-top:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 480px) {
    .back-to-top { display: none; }
}


  /* RESPONSIVE */
  @media (max-width: 720px) {
    .tgrid { grid-template-columns: 1fr; }
    .main { padding: 1rem; }
    /* .tabs-bar { padding: 6px 8px 0; } */ /* OLD */
    /* .tb { font-size: 11px; padding: 6px 10px; } */ /* OLD */

    .template-grid-buttons {
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* 2 colunas em telas médias */
      gap: 10px;
      padding: 1rem;
    }
    .template-button {
      min-height: 80px;
      padding: 12px 8px;
    }
    .template-button-name { font-size: 13px; }
    .template-button-subtitle { font-size: 10px; }

    .canva-help-button {
      width: 100%;
      justify-content: center;
      margin-top: 20px;
    }
    .modal-content {
      width: 95%;
      margin: 0 10px;
    }
    .modal-header h2 {
      font-size: 1.1em;
    }
    .modal-body {
      padding: 1rem;
      font-size: 13px;
    }
    .modal-steps li {
      gap: 8px;
    }
    .step-num {
      width: 22px;
      height: 22px;
      font-size: 11px;
    }
    .modal-tip {
      font-size: 12px;
    }
  }

  @media (max-width: 480px) {
    .template-grid-buttons {
      grid-template-columns: 1fr;
      gap: 8px;
      padding: 0.75rem;
    }
    .template-button {
      min-height: 70px;
      padding: 10px 6px;
    }
    .template-button-name { font-size: 12px; }
    .template-button-subtitle { font-size: 9px; }
  }