@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Roboto+Condensed:wght@400&display=swap');

/* ========================================
   COMMON STYLES (Shared across all pages)
   ======================================== */
   @import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');

   html, body {
     margin: 0;
     padding: 0;
     box-sizing: border-box;
     width: 100vw;
     height: 300vh;
     overflow: hidden;
   }
   
   /* -----------------------BACKGROUND---------------------- */
   
   .box1 {
     background-color: #F3F1E7;
     width: 95%;
     height: 90%;
     overflow: hidden;
     box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.2);
     position: fixed;
   }
   
   .cont1 {
     background-color: white;
     width: 100vw;
     height: 100vh;
     display: flex;
     justify-content: center;
     align-items: center;
     position: relative;
   }
   /* -----------------------TEXT---------------------- */
   
   .box1 h1 {
     font-size: 6.5rem;
     text-align: center;
     margin: 0;
   }
   #split1 {
     opacity: 0;
     padding-top: 120px;
     animation: fadeInUp 0.8s ease-out 0.5s forwards;
     line-height: 90%;
   }
   #vis{
     font-style: italic;
   }
   #traco{
     letter-spacing: -10px;
   }
   
   .box1 h2 {
     font-size: 1.5rem;
     font-family: "Roboto", sans-serif;
     font-weight: 300;
     padding-top: 40px;
     text-transform: uppercase;
     text-align: center;
     margin: 0;
     animation: fadeInUp 0.8s ease-out 0.7s forwards;
     opacity: 0;
   }
   
   @keyframes fadeInUp {
     from {
       opacity: 0 !important;
       transform: translateY(20px);
     }
     to {
       opacity: 1;
       transform: translateY(0);
     }
   }
   
   /* -----------------------IMAGE ROW---------------------- */
   #Preto{
     fill: black;
     
   }
   #PretoCima{
     fill: black;
   }
   #Branco{
     fill: white;
     
   }
   #economiaSvg {
     stroke: white;
     stroke-miterlimit: 10;
     stroke-width: 8px;
   }
   .image-row {
     position: absolute;
     bottom: 2%;
     left: 50%;
     transform: translateX(-50%);
     display: flex;
     gap: 20px;
     align-items: center;
     justify-content: center;
   }
   
   .image-item {
     position: relative;
     display: flex;
     width: 280px;
     height: 280px;
     justify-content: center;
     align-items: center;
     opacity: 0;
     transform: translateY(0);
   }
   
   
   .image-set {
     position: absolute;
     width: 100%;
     height: 100%;
     display: flex;
     justify-content: center;
     transform: scale(0);
     opacity: 0;
   }
   
   .image-item:nth-child(1) {
     animation: fadeHoldSlide 0.55s cubic-bezier(0.4, 0, 0.2, 1) 1.2s forwards;
   }
   
   .image-item:nth-child(2) {
     animation: fadeHoldSlide 0.55s cubic-bezier(0.4, 0, 0.2, 1) 1.4s forwards;
   }
   
   .image-item:nth-child(3) {
     animation: fadeHoldSlide 0.55s cubic-bezier(0.4, 0, 0.2, 1) 1.6s forwards;
   }
   
   .image-item:nth-child(4) {
     animation: fadeHoldSlide 0.55s cubic-bezier(0.4, 0, 0.2, 1) 1.8s forwards;
   }
   
   .image-item:nth-child(1) .set-1 { animation: imageLoop 8s ease-in-out 2s infinite; }
   .image-item:nth-child(1) .set-2 { animation: imageLoop 8s ease-in-out 4s infinite; }
   .image-item:nth-child(1) .set-3 { animation: imageLoop 8s ease-in-out 6s infinite; }
   .image-item:nth-child(1) .set-4 { animation: imageLoop 8s ease-in-out 8s infinite; }
   
   .image-item:nth-child(2) .set-1 { animation: imageLoop 8s ease-in-out 2.2s infinite; }
   .image-item:nth-child(2) .set-2 { animation: imageLoop 8s ease-in-out 4.2s infinite; }
   .image-item:nth-child(2) .set-3 { animation: imageLoop 8s ease-in-out 6.2s infinite; }
   .image-item:nth-child(2) .set-4 { animation: imageLoop 8s ease-in-out 8.2s infinite; }
   
   .image-item:nth-child(3) .set-1 { animation: imageLoop 8s ease-in-out 2.4s infinite; }
   .image-item:nth-child(3) .set-2 { animation: imageLoop 8s ease-in-out 4.4s infinite; }
   .image-item:nth-child(3) .set-3 { animation: imageLoop 8s ease-in-out 6.4s infinite; }
   .image-item:nth-child(3) .set-4 { animation: imageLoop 8s ease-in-out 8.4s infinite; }
   
   .image-item:nth-child(4) .set-1 { animation: imageLoop 8s ease-in-out 2.6s infinite; }
   .image-item:nth-child(4) .set-2 { animation: imageLoop 8s ease-in-out 4.6s infinite; }
   .image-item:nth-child(4) .set-3 { animation: imageLoop 8s ease-in-out 6.6s infinite; }
   .image-item:nth-child(4) .set-4 { animation: imageLoop 8s ease-in-out 8.6s infinite; }
   
   @keyframes imageLoop {
     0% {
       transform: scale(0);
       opacity: 0;
     }
     5% {
       transform: scale(1.1);
       opacity: 1;
     }
     10% {
       transform: scale(1);
       opacity: 1;
     }
     20% {
       transform: scale(1);
       opacity: 1;
     }
     25% {
       transform: scale(0.8);
       opacity: 0.7;
     }
     30% {
       transform: scale(0);
       opacity: 0;
     }
     100% {
       transform: scale(0);
       opacity: 0;
     }
   }
   @keyframes fadeHoldSlide {
     0% {
       opacity: 0;
       transform: translateY(0);
     }
     20% {
       opacity: 0.3;
       transform: translateY(0);
     }
     30% {
       opacity: 1;
       transform: translateY(0);
     }
     70% {
       opacity: 1;
       transform: translateY(-20px);
     }
     100% {
       opacity: 1;
       transform: translateY(-20px);
     }
   }
   
   /* -----------------------SCROLL INDICATOR---------------------- */
   .scroll-indicator {
     position: fixed;
     bottom: 80px;
     right: 5%;
     transform: translateX(-50%);
     z-index: 20;
     opacity: 0;
     animation: fadeIn 1s ease-out 4s forwards;
   }
   
   .scroll-arrow {
     width: 20px;
     height: 20px;
     border: 3px solid #333;
     border-left: none;
     border-top: none;
     transform: rotate(45deg);
     animation: bounce 2s infinite;
   }
   
   @keyframes bounce {
     0%, 20%, 50%, 80%, 100% {
       transform: translateY(0) rotate(45deg);
     }
     40% {
       transform: translateY(-10px) rotate(45deg);
     }
     60% {
       transform: translateY(-5px) rotate(45deg);
     }
   }
   @keyframes fadeIn {
     from {
       opacity: 0;
     }
     to {
       opacity: 1;
     }
   }
   
   /* -----------------------TEXTURA---------------------- */
   .textura {
     position: absolute;
     top: 0;
     left: 0;
     width: 100%;
     height: 100%;
     z-index: -1; 
     overflow: hidden;
   }
   .textura img {
     opacity: 40%;
     width: 100%;
     height: 100%;
     object-fit: cover; 
     object-position: center; 
   }
   /* -----------------------SCROLL INTRO---------------------- */
   .box1 h1,
   .box1 h2 {
     transition: opacity 0.3s ease, transform 0.3s ease;
   }
   #split1,
   #split2,
   #subhead {
     transition: opacity 0.3s ease, transform 0.3s ease;
     will-change: opacity, transform;
   }
   
   .image-row {
     transition: transform 0.4s ease;
     transition: gap 0.3s ease;
   }
   
   
   .image-item {
     transition: width 0.4s ease, height 0.4s ease;
   }
   
   .svg-colored #Preto,
   .svg-colored #PretoCima,
   .svg-colored #Branco {
     fill: #F3F1E7;
   }
   
   .svg-colored #economiaSvg {
     stroke: #F3F1E7;
   }
   
   /* Box background change */
   .box1 {
     transition: background-color 0.5s ease;
   }
   
   .box1.box-colored {
     background-color: #C42E26 !important;
   }
   
   #Preto, #Branco, #PretoCima {
     transition: fill 0.5s ease;
   }
   #economiaSvg {
     transition: stroke 0.5s ease;
   }
   
   .box1 {
     transition: background-color 0.5s ease;
   }
   
   
   
   
   
   
   
   
   
   
   
   
   
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Navigation Menu */
.nav-menu {
    position: absolute;
    top: 37px;
    left: 40px;
    display: flex;
    gap: 1px;
    z-index: 10;
}

.nav-item {
    width: 90px;
    height: 20px;
    background-color: #000;
    border: 2px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    text-decoration: none;
}

.nav-item span {
    color: #fff;
    font-size: 1.15rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 200;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.nav-item:hover {
    width: 250px;
    height: 40px;
    transform: translateY(-20px);
    cursor: pointer;
}

.nav-item:hover span {
    opacity: 1;
}

.nav-item img {
    height: 16px;
    width: auto;
    opacity: 0;
    transition: opacity 0.2s ease;
    margin-right: 15px;
}

.nav-item:hover img {
    opacity: 1;
}

/* Container */
.container {
    width: calc(100% - 80px);
    height: calc(100% - 105px);
    margin: 60px 40px 40px 40px;
    background-color: #F3F1E7;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: 15% 60% 20%;
    gap: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Helper classes for grid columns */
.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* Footer Text */
.footer-text {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-family: 'Roboto', sans-serif;
    font-size: 15px;
    z-index: 5;
    letter-spacing: 1px;
}

.footer-text .semibold {
    font-weight: 600;
}

.footer-text .semibold-italic {
    font-weight: 600;
    font-style: italic;
}


/* ========================================
   GRID-LAYOUT.HTML SPECIFIC STYLES
   ======================================== */

/* Example styling for content */
.content-box {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 20px;
}

/* Title Box */
.title-box {
    position: absolute;
    top: 50px;
    left: 8px;
    font-family: georgia, serif;
    font-weight: 700;
    font-size: 3rem;
    color: #C42E26;
    transform: rotate(-3.20deg);
    z-index: 15;
}

/* White Box with Stats */
.white-box {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background-color 0.4s ease;
}

.white-box.stat-hover {
    background-color: transparent;
    box-shadow: none;
    border: 2px solid transparent;
    border-image-source: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Crect x='1' y='1' width='58' height='58' fill='none' stroke='%23C42E26' stroke-width='2' stroke-dasharray='16 10'/%3E%3C/svg%3E");
    border-image-slice: 2;
    border-image-repeat: round;
}

.white-box.stat-hover .number,
.white-box.stat-hover .label {
    color: #C42E26;
}

.white-box .number {
    font-family: georgia, serif;
    font-weight: 700;
    font-size: 2rem;
    color: #B2B2B2;
    transition: color 0.4s ease;
}

.white-box .label {
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #B2B2B2;
    transition: color 0.4s ease;
}

.label {
    margin-top: 5px;
}

.stats-container {
    display: flex;
    justify-content: space-evenly;
    width: 100%;
    align-items: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Icon Toggle Buttons */
.icon-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    border: 3px solid #fff;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 24px;
    width: 24px;
    background-color: #fff;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.toggle-icon {
    position: absolute;
    top: 48%;
    transform: translateY(-50%);
    height: 11px;
    width: auto;
    transition: all 0.3s ease;
    z-index: 1;
    pointer-events: none;
    filter: brightness(0) saturate(100%) invert(72%) sepia(0%) saturate(0%) hue-rotate(194deg) brightness(95%) contrast(86%);
}

.toggle-icon.icon-person {
    height: 16px;
    right: 8px;
}

.toggle-icon.icon-volume {
    right: 4px;
}

input:checked + .toggle-slider {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

input:checked + .toggle-slider .toggle-icon {
    filter: none;
}

input:checked + .toggle-slider:before {
    transform: translateX(30px);
}

.toggle-slider:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

/* News Sidebar */
.news-sidebar {
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.news-sidebar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-60%);
    height: 73%;
    width: 1px;
    background-color: rgba(178, 178, 178, 0.4);
}

.news-articles-container {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.news-articles-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.news-button {
    width: 100%;
    height: 40px;
    background-color: #000;
    color: #fff;
    border: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 15px;
    transition: background-color 0.1s ease;
}

.news-button:hover {
    background-color: #C42E26;
}

.news-article {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #E0E0E0;
    cursor: pointer;
    position: relative;
}

.news-article:last-child {
    border-bottom: none;
}

.news-title {
    font-family: georgia, serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #000;
    margin-bottom: 8px;
    line-height: 1.3;
}

.news-description {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 200;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Tooltip for Full Article */
.news-tooltip {
    display: none;
    position: fixed;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    padding: 20px;
    max-width: 500px;
    z-index: 1000;
    border-radius: 4px;
}

.news-article:hover .news-tooltip {
    display: block;
}

.tooltip-timestamp {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 0.85rem;
    color: #B2B2B2;
    margin-bottom: 8px;
}

.tooltip-title {
    font-family: georgia, serif;
    font-weight: 700;
    font-size: 1rem;
    color: #000;
    margin-bottom: 10px;
    line-height: 1.3;
}

.tooltip-description {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 300;
    font-size: 0.85rem;
    color: #333;
    line-height: 1.5;
}

/* Nested Grid */
.nested-grid {
    display: grid;
    grid-template-columns: repeat(24, 1fr);
    gap: 12px;
    height: 100%;
}

.nested-col {
    background-color: rgba(0, 0, 0, 0.2);
}

/* Composition Container */
.composition-container {
    padding: 0;
    height: 100%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Timeline */
.timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 20px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-image: linear-gradient(to right, #B2B2B2 40%, transparent 40%);
    background-size: 20px 2px;
    background-repeat: repeat-x;
}

.timeline-arrow {
    cursor: pointer;
    height: 20px;
    width: auto;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.timeline-arrow:hover {
    transform: scale(1.2);
}

.timeline-years {
    display: flex;
    flex: 1;
    justify-content: space-between;
    overflow: visible;
    align-items: center;
    padding: 0 10px;
}

.year {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 400;
    font-size: 1.2rem;
    color: #B2B2B2;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.year:hover {
    color: #C42E26;
    transform: scale(1.2);
}

.year.selected {
    color: #C42E26;
    transform: scale(1.2);
}


/* ========================================
   CATEGORIAS.HTML SPECIFIC STYLES
   ======================================== */

/* Adjust container grid rows for categorias page */
body:has(.timeline-categories) .container {
    grid-template-rows: 12% 71% 17%;
}

/* Category header box - first row */
.category-header-box {
    background-color: transparent;
    border: 2px solid #fff;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#categoryTitle {
    font-family: georgia, serif;
    font-weight: 700;
    color: #C42E26;
    font-size: clamp(2rem, 7vh, 10rem);
    margin: 0;
    line-height: 1;
}

.title-divider {
    width: 2px;
    height: 100%;
    background-color: #fff;
    margin: 0 30px;
}

.category-description {
    font-family: 'Roboto', sans-serif;
    color: #C42E26;
    font-size: 0.9rem;
    font-weight: 300;
    margin: 0;
    line-height: 1.4;
}

/* Category showcase - second row */
.category-showcase {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    overflow: hidden;
    position: relative;
}

#categoryImage {
    height: 90%;
    width: auto;
    object-fit: contain;
    margin-left: 20px;
    margin-bottom: 20px;
}

#categoryImage[src*="sociedade.png"],
#categoryImage[src*="mundo.png"] {
    height: 100%;
}

.category-svgs {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 70%;
    margin-bottom: 100px;
}

.svg-top,
.svg-middle,
.svg-bottom {
    width: auto;
    height: auto;
}

.svg-top {
    align-self: flex-start;
}

.svg-middle {
    align-self: center;
}

.svg-bottom {
    align-self: flex-end;
}

/* White background for news sidebar in categorias page */
body:has(.timeline-categories) .news-sidebar {
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Categories Timeline */
.timeline-categories-container {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.timeline-categories-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: calc(-1 * (100% / 10));
    right: calc(-1 * (100% / 10));
    height: 2px;
    background-image: linear-gradient(to right, #B2B2B2 40%, transparent 40%);
    background-size: 20px 2px;
    background-repeat: repeat-x;
}

.timeline-categories {
    display: flex;
    flex: 1;
    justify-content: space-between;
    overflow: visible;
    align-items: center;
    padding: 0 80px;
    padding-bottom: 20px;
}

.timeline-categories .year {
    font-size: 1.1rem;
    text-transform: uppercase;
}
