
:root{
    --color-bg: black;
    --columns: 8;
    --ms-grid-row: 10;
    --gap: 1rem;
    --padding: 30px; /* change this to move the line */
}

/* Remove z-index and isolation from wrappers */

#nav-container {
    isolation: auto !important;
    z-index: auto !important; /* Move z-index to the actual text instead */
    background: transparent !important;
    transform: none !important; /* Transforms on parents are the #1 killer of blending */
    z-index: 9999;
}

.debug-padding-line {
  position: fixed;
  top: var(--padding, 40px);
  left: var(--padding, 40px);
  right: var(--padding, 40px);
  bottom: var(--padding, 40px);
  border: 1px solid red;
  pointer-events: none; /* Crucial: allows you to click through the line */
  z-index: 9999;        /* Keeps it on top of everything */
  opacity: 0.5;         /* Makes it subtle */
}

.nav {
    font-family: "Libre Franklin", sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;      /* Full screen height */
    width: 110px;       /* Width of the blurred rectangle */
    z-index: 1000;      /* Just below the text (1001) */

       /* THE BACKGROUND EFFECT */
    background: linear-gradient(
        to right, 
        rgba(150, 181, 198, 1) 0%,   /* Your color #96B5C6 with some opacity */
        transparent 100%               /* Fade to nothing */
    );

    /* THE BLUR EFFECT */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    -webkit-mask-image: linear-gradient(to right, black 20%, transparent 100%);
    mask-image: linear-gradient(to right, black 0%, transparent 100%);
    
    /* IMPORTANT: allow clicking through the empty space to the gallery */
    pointer-events: none;
}

.title-menu {
    position: fixed;
    z-index: 1001;
    pointer-events: auto;
    left: 27px;
    top: 9px;

    transform: rotate(90deg);
    transform-origin: left bottom;
    white-space: nowrap;
}

.title-menu h1 {
  cursor: pointer;
  /* IMPEDE QUE O TEXTO SEJA SELECIONÁVEL */
  user-select: none;
  -webkit-user-select: none;
  -ms-user-select: none;
}

body {
    opacity: 0;
    color: #ffffff;
    background: var(--color-bg);
    font-family: "Libre Franklin", sans-serif;
    margin: 0;   /* remove a margem padrão */
    padding: 40px; /* margem nova */
}

.grid {
  display: grid;
  grid-template-columns: repeat(var(--columns), 1fr);
  gap: var(--gap);
  /* outline: 2px solid red /* ref borda */
  z-index: 1000;
}

.span-2 { 
    grid-column: span 2;
}

.span-3 { 
    grid-column: span 3; 
}

.item {
  background: #ddd;
  padding: 1rem;
}

h1 {
    color: black;
    position: static;      /* Stop it from being fixed to the bottom-left */
    transform: none;       /* Remove the -90deg rotation */
    font-size: 17px;       /* Same size as the lang-button */
    font-weight: 700;
    line-height: 1.2;
}

/* BOTÃO PARA TROCAR DE LÍNGUA */
.lang-button {
    position: fixed;   /* stick to viewport */
    bottom: 48px;      /* distance from bottom */
    left: 9px;       /* distance from right */
    z-index: 100;      /* ensure it’s above other content */
    cursor: pointer;   /* optional */
    transform: rotate(90deg);
    pointer-events: auto;

    color: black;
    font-weight: 700;

    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}


h2 {
    display: none;
    color: #333;
    grid-column: 2 / span 4; /* COMEÇA NA COLUNA 2 E DEPOIS OCUPA 4 (SPAN) */
    margin-top: 3rem;
    text-align: center;
    font-size: 2.5rem;
    line-height: 0.3; /* melhor não usar rem para dar sclae com font-size */
}

p {
    font-size: 1.2rem;
    color: #555;
}

/* dropdown hidden by default */
.dropdown {
  position: static;
  display: flex;
  flex-direction: row;
  gap: 50px;
  padding: 0;
  margin: 0;
  list-style: none;

  opacity: 0;
  transform: translateX(-10px); /* Subtle slide down instead of right */
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.dropdown.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dropdown a {
  color: inherit;          /* use the same color as the li */
  text-decoration: none;   /* remove underline */
}

.dropdown li a {
    
    color: black !important;   /* Solid black as requested */
    font-weight: 700 !important;
    text-decoration: none;
    font-size: 17px;           /* Match your name's font size */
    white-space: nowrap;       /* Prevent items from wrapping to a new line */
}

.menu-toggle-wrapper {
    display: flex; /* Changed from fixed */
    flex-direction: row;
    align-items: center; 
    gap: 70px;
}

/* Reset the H1 to look like a standard button */
.menu-toggle-wrapper h1 {
  transform-origin: bottom left;
  font-family: "Libre Franklin", sans-serif;  /* Match lang-button weight */
  margin: 0;
  padding: 0;
  cursor: pointer;
  z-index: 10;
}

/* MENU DROP DOWN FIM */

.lang-content { display: none; }
html[lang="pt"] .lang-content.pt { display: inline; }
html[lang="en"] .lang-content.en { display: inline; }

@media (max-width: 768px) {

    .debug-padding-line {
        /* Define smaller gaps for mobile */
        top: 20px !important;
        bottom: 20px !important;
        left: 20px !important;
        right: 20px !important;
        opacity: 0.8; /* Slightly more visible for testing */
    }

    /* 1. Reduce the main navbar container padding */
    .nav {
        padding: 20px 20px !important; /* Shorter top/bottom, match side padding to text */
        z-index: 9999;
    }

    /* 2. Adjust the Title (PEREIRA RUTE) position */
    .title-menu {
        top: 51px !important;   /* Move it closer to the top edge */
        left: 40px !important; /* Keep it aligned with the contact form/lang button */
    }

    /* 3. Adjust the Lang Button (EN | PT) position */
    /* If you feel it's too high up on mobile, you can tweak the bottom value */
    .lang-button {
        bottom: 17px !important; 
        left: 20px !important;
    }

    /* 4. Optional: Adjust the dropdown menu gap */
    .dropdown {
        margin-top: 20px !important;
        margin-right: -5px;
    }
}

/* PÁGINA SOBRE -- --- ---- ----- ------- -------- --------*/

.sobre-page-wrapper {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* Baseado na variável --columns: 8 */
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow: hidden;
}

.sobre-image-column {
    grid-column: 1 / span 4; /* Ocupa exatamente a metade esquerda (colunas 1 a 4) */
    height: 100vh;
    width: 100%;
}

.sobre-image-column img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que preenche toda a altura sem deformar */
    display: block;
}

.sobre-image-column img[src*="rute_2.webp"] {
    display: none;
}

.text-block-column {
    grid-column: 5 / span 3; /* Começa após a metade, ocupando 3 colunas */
    justify-content: flex-start !important;
    padding-top: 15px;
    padding-left: 40px;
    padding-bottom: 35px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centraliza o texto verticalmente se desejado */
    z-index: 2;
    overflow-y: auto;        /* Ativa o scroll vertical apenas nesta coluna */
    scrollbar-width: none;   /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.text-block-column::-webkit-scrollbar {
    display: none;           /* Chrome, Safari, Opera */
}

.text-block-column p,
.cv-item {
    color: #96B5C6;
    font-size: 17px;
    line-height: 1.3;
    font-family: "Libre Franklin", sans-serif;
    text-align: left;
}

.cv-section-title {
    /* A soma da largura do ano + o espaço entre colunas */
    /* Se o cv-year tem 160px e o cv-details tem padding 40px, usamos 200px */
    display: block;
    margin-left: 120px; 
    text-transform: uppercase;
}

.cv-item {
    display: flex;
    margin-bottom: 5px; /* Espaço entre linhas do CV */
}

.cv-year {
    /* 1. CONTROLAR A LARGURA DA COLUNA */
    flex-basis: 120px;    /* Define uma base de 160px para o ano */
    min-width: 120px;     /* Garante que não encolhe menos que isso */
    flex-shrink: 0;       /* Impede o ano de ser "esmagado" pelo texto longo */
    display: inline-block;
}

.cv-details {
    /* 2. CONTROLAR O ESPAÇO ENTRE AS COLUNAS */
    font-size: 17px;
    line-height: 1.3;     /* Melhora a legibilidade de textos longos */
    padding-left: 0px;   /* Aumenta este valor para afastar mais o texto do ano */
    hyphens: none;
}

#contact-form-sheets {
    display: flex;
    flex-direction: column;
    /* This pushes the whole form group to the right */
    align-items: flex-end; 
    gap: 4px; /* The small gap you requested */
    margin-top: 15px;
    width: 100%;
}

.form-group {
    width: 100%;           /* Allows the input inside to dictate width or fill space */
    display: flex;
    justify-content: flex-end;
}

.contact-box {
    position: relative;
    margin-top: 20px;
    padding-bottom: 40px; /* Espaço extra no fundo para permitir scroll */
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

#contact-form-sheets input, 
#contact-form-sheets textarea {
    background: transparent;
    border: 1px solid #96B5C6;
    color: white;
    padding: 8px;
    font-family: "Libre Franklin", sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    outline: none;
    
    /* ALIGNMENT LOGIC: */
    width: 100%;
    max-width: 400px;      /* Adjust this value to match the width of your 'enviar mensagem' button line */
    text-align: left;     /* Ensures text inside the box is on the left */
    box-sizing: border-box;
}

.contact-form textarea {
    height: 100px;
    resize: none;
}

.contact-form button {
    background: white;
    color: black;
    border: none;
    padding: 10px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.contact-form button:hover {
    opacity: 0.7;
}

#toggle-contact {
    user-select: none; /* Prevents text highlighting when double clicking */
    margin-top: 40px;
    margin-bottom: 20px;
}

#contact-wrapper {
    /* Critical: prevents content from popping in before animation */
    will-change: height, opacity; 
}

#contact-arrow {
    line-height: 1;
    vertical-align: middle;
}

#contact-form-sheets input, 
#contact-form-sheets textarea {
    background: transparent;
    border: 1px solid #96B5C6; /* Match your theme's blue color */
    color: white;
    padding: 8px;
    font-family: "Libre Franklin", sans-serif;
    font-size: 13px;
    text-transform: uppercase;
    outline: none;
    width: 100%;           /* Adjust this if you want the boxes to be narrower than the column */
    max-width: 555px;      /* Limits the width so they look neatly aligned to the right */
    box-sizing: border-box;
}

/* The Send Button */
#submit-btn {
    background: #96B5C6;
    color: black;
    border: none;
    padding: 10px 25px;
    font-family: inherit;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 5px;
    
    /* This ensures the button is also part of the right-alignment */
    align-self: flex-end; 
}

#submit-btn:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {

    body, .sobre-page-wrapper {
        margin: 0 !important;
        padding: 0 !important;
    }

    .sobre-page-wrapper {
        position: relative !important;
        display: flex;
        flex-direction: column;
        padding: 0px !important;  /* Add some breathing room for mobile edges */
        height: auto !important;
    }

    .text-block-column {
        width: 100% !important;
        box-sizing: border-box; /* Ensures padding doesn't add to width */
        padding: 0 20px; /* Gives the text some breathing room from the edge */
        overflow-x: hidden; /* Prevents horizontal scroll */
    }

    .sobre-image-column img[src*="rute_1.webp"] {
        display: none;
    }

    .sobre-image-column {
        position: relative;
        width: 100% !important;
        height: auto !important;     /* Image dictates height */
        margin: 0 !important;
    }

    /* Show the mobile image */
    .sobre-image-column img[src*="rute_2.webp"] {
        display: block;
        width: 100%;
        height: auto;
        margin-bottom: 20px; /* Space between image and text */
    }

    .scroll-container {
        position: relative; /* Adicione isto se não tiver */
        overflow-y: auto;   /* Garante que o scroll aconteça aqui */
        height: 100%;       /* Ou a altura que definiu para a coluna */
    }

    .cv-item {
        display: flex !important;
        flex-direction: row !important; /* Force them to stay on the same line */
        align-items: flex-start;        /* Align them to the top of the line */
        margin-bottom: 8px;
        width: 100%;
    }

    .cv-section-title {
        display: block; /* Allows margin/padding to work correctly */
        padding-left: 0 !important; /* Adjust this to 0 or match your .cv-year padding */
        margin-left: 85px !important;
        text-align: left;
    }

    .cv-details {
        margin-left: -35px;
    }

    .cv-year {
        font-size: 15px;
    }

}

/* PÁGINA PRESS  -- --- ---- ----- ------- -------- --------*/

.press-page-wrapper {
    display: grid;
    grid-template-columns: repeat(8, 1fr); /* 8 columns */
    width: auto;
    
    position: fixed;
    top: -24px;
    right: -24px;
    left: 60px;
    overflow: hidden;
    background: var(--color-bg);
}

/* 1. Position the Text on the Left */
.press-page-wrapper .text-block-column {
    grid-column: 1 / span 5; /* Starts at col 2, ends at col 5 */
    grid-row: 1;            /* Ensure it stays on the first row */
    padding-top: 30px;     /* Space for navigation */
    padding-right: 0px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.press-image-column {
    grid-column: 6 / span 3;
    height: 100vh;
    overflow-y: auto;
    background: #000;
    padding: 90px 60px 40px 30px; /* Space at top for nav */
}

.press-text-content a {
    color: white; /* Matches your theme blue */
    text-decoration: underline;
    transition: opacity 0.2s;
}

.press-text-content a:hover {
    opacity: 0.7;
}

/* 3. Ensure the Image fills its container */
.press-image-column img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important; /* Prevent global limits from interfering */
    object-fit: contain;
    display: block;
    margin-bottom: 30px;
}

.press-image-column .editorial-item {
    background-color: #ffffff; /* Purple for testing */
    border-radius: 4px;       /* Optional */
    object-fit: contain;      /* Ensures the whole transparent image is visible */
    width: 100%;
    margin-bottom: 18px;
    display: block;
}

#press-viewer > :last-child {
    margin-bottom: 75px;
    display: block; /* Ensure it's a block to respect margins */
}

/* 4. Reset specific text colors for this page if needed */
.press-page-wrapper .cv-item {
    color: #96B5C6; /* Keeping your light blue theme */
}

.press-page-wrapper .cv-section-title {
    margin-left: 0 !important; /* Removes the 120px offset used on the Sobre page */
    padding-left: 0;
    text-align: left;
    color: white !important;
}

.press-page-wrapper .cv-item {
    display: flex;
    justify-content: flex-start;
    align-items: baseline;
    gap: 30px; /* Space between the columns */
    margin-bottom: 5px;
    width: 100%;
}

/* Column 1: Details (Title) - Pushed to the Left */
.press-page-wrapper .cv-details {
    flex: 1;            /* Takes up all available space to push others right */
    padding-left: 0;    /* Reset any previous indents */
    text-align: left;
}

/* Column 2: Entity - Middle */
.press-page-wrapper .cv-entity {
    flex-basis: 180px;  /* Fixed width for alignment */
    min-width: 270px;
    color: #96B5C6;
}

/* Column 3: Year - Right */
.press-page-wrapper .cv-year {
    flex-basis: 50px;   /* Fixed width for the year */
    min-width: 50px;
    text-align: right;  /* Align the numbers to the right */
}

.press-image-column::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
}

/* Style the images inside the viewer */
.press-img {
    width: 100%;
    height: auto;
    display: block;
    margin-top:0;
    margin-bottom: 30px; /* Space between images */
}

video.press-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Or 'contain' depending on your video aspect ratio */
    margin-bottom: 30px;
}

/* Hover effect for the clickable list items */
.press-clickable {
    cursor: pointer;
    transition: color 0.3s ease;
}

.press-clickable:hover {
    color: #ffffff !important;
}

.press-text-content {
    margin-top: 20px;         /* Space between the last image and the text */
    margin-bottom: 77px !important; 
    max-width: 100%;          /* Ensure it doesn't overflow the column */
}

.press-text-content p, 
.press-text-content .cv-details {
    color: white;           /* The specific light blue from Sobre page */
    font-size: 17px;          /* Match Sobre font size */
    line-height: 1.2;         /* Match Sobre line height */
    font-family: "Libre Franklin", sans-serif;
    text-align: justify;
    hyphens: auto;
    margin-bottom: 0;
}

.press-text-content p + p {
    text-indent: 40px !important; /* Adjust this value for a larger or smaller indent */
    margin-top: 0;     /* Optional: often indents look better without large gaps between paragraphs */
}

.close-press-btn {
    position: fixed;
    /* Adjust these values to match your specific site margins */
    top: 20px; 
    right: 30px; 
    cursor: pointer;
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    color: white; /* Or match your text color */
}

.close-press-btn.active {
    opacity: 1;
    visibility: visible;
}

.close-press-btn:hover {
    opacity: 0.7;
}