/* Theme Toggle Styles */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    stroke: hsla(0, 0%, 100%, 0.5);
    transition: all 0.3s ease;
}

.theme-toggle:hover svg {
    stroke: #fff;
}

.theme-toggle .moon-icon {
    display: none;
}

/* Light theme styles */
body.light-theme {
    background-color: #c0b6ac;
}

body.light-theme #menu {
    background: #191919;
}

body.light-theme #header.follow {
    background: #272727;
    border-bottom: 1px solid #5f5f5f;
}

body.light-theme .theme-toggle .sun-icon {
    display: none;
}

body.light-theme .theme-toggle .moon-icon {
    display: block;
}

/* Light theme styles for history page */
body.light-theme.history {
    background-color: #c0b6ac;
}

/* Section backgrounds */
body.light-theme.history .section-2 {
    background-color: #c0b6ac;
}

body.light-theme.history .section-3 {
    background-color: #c0b6ac;
}

body.light-theme.history .section-4 {
    background-color: #c0b6ac;
}

body.light-theme.history .section-6 {
    background-color: #c0b6ac;
}

body.light-theme.history .section-3-5 {
    background-color: #c0b6ac;
}

/* Background overlays */
body.light-theme.history .section-2--bg {
    background: linear-gradient(rgba(192, 182, 172, 0.5), rgba(192, 182, 172, 0.5)), url(/assets/img/frontend/storia-bg);
}

body.light-theme.history .section-3--bg {
    background: linear-gradient(rgba(192, 182, 172, 0.5), rgba(192, 182, 172, 0.5)), url(/assets/img/frontend/vendemmia-persone.jpg);
}

body.light-theme.history .section-4--bg {
    background: none !important;
}

.light-theme .big-timeline #next:before, .big-timeline #prev:before {
    color: #333 !important;
}

body.light-theme.history .section-3-5--bg {
    background: linear-gradient(rgba(192, 182, 172, 0.5), rgba(192, 182, 172, 0.5)), url(/assets/img/frontend/pergamena.jpg);
}

/* Text colors */
body.light-theme.history h1.background-text {
    color: rgba(255, 255, 255, 0.1);
}

body.light-theme.history .section-title h2 span {
    color: #8b7355 !important;
}

body.light-theme.history .section-title span:first-child {
    color: #333;
}

body.light-theme.history .section-title span:last-child {
    color: #8b7355;
}

body.light-theme.history .section-title span:last-child:after {
    background-color: #8b7355;
}

body.light-theme.history p {
    color: #333;
}

body.light-theme.history .two-p {
    color: #333;
}

body.light-theme.history .two-p p {
    color: #333;
}

body.light-theme.history .first-p:first-letter {
    color: #8b7355;
}

body.light-theme.history .tullo-title {
    color: #8b7355;
}

body.light-theme.history .row-31-p {
    color: #333;
}

body.light-theme.history .last-p-marco {
    color: #333;
}

body.light-theme.history .c-text {
    color: #333;
}

body.light-theme.history .f-letter {
    color: #333;
}

body.light-theme.history .breaker {
    background: rgba(0, 0, 0, 0.2);
}

/* Bottom titles */
body.light-theme.history .bottom-title {
    color: #8b7355;
}

/* Section 6 specific */
body.light-theme.history .section-6 .section-title {
    color: #333;
}

body.light-theme.history .section-6:before,
body.light-theme.history .section-6:after {
    box-shadow: 0 -5px 35px 5px #c0b6ac;
}

/* Timeline elements */
body.light-theme.history #dates a {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme.history #dates a:hover,
body.light-theme.history #dates a.selected {
    color: #333;
}

body.light-theme.history #dates a.selected {
    border-right: 4px solid #8b7355;
}

body.light-theme.history .pulse-btn {
    background-color: #8b7355;
}

body.light-theme.history .selected-pulse {
    background-color: #8b7355;
}

body.light-theme.history .selected-pulse:after {
    background-color: #8b7355;
}

/* Navigation elements */
body.light-theme.history #indicator .spy-clickable {
    color: rgba(0, 0, 0, 0.5);
}

body.light-theme.history #indicator .spy-clickable:hover,
body.light-theme.history #indicator .spy-clickable.spy-active {
    color: #333;
}

body.light-theme.history #indicator .spy-clickable.spy-active {
    border-right: 4px solid #8b7355;
}


.light-theme .first-section {
    height: 100vh;
}

.light-theme .first-section .section-title {
    color: #333;
}

.light-theme .section-3 .row-1 .img-col:after {
    color: #333;
}


/* Dark theme styles (default) */
body.dark-theme {
    background-color: #1a1a1a;
}

body.dark-theme #menu {
    background: #1a1a1a;
}

body.dark-theme #header.follow {
    background: #1a1a1a;
    border-bottom: 1px solid #5f5f5f;
}

body.dark-theme .theme-toggle .sun-icon {
    display: block;
}

body.dark-theme .theme-toggle .moon-icon {
    display: none;
}

.light-theme .section-3 .row-2 .img-col:after {
    color: #333;
}

.light-theme .big-timeline #next:before, .big-timeline #prev:before{
    color: #333 !important;
}

.light-theme .big-timeline #next:after, .big-timeline #prev:after{
    color: #333 !important;
}

.light-theme img{
    border-radius: 10px !important;
}

/* Responsive adjustments */
@media (max-width: 1199px) {
    .theme-toggle {
        width: 18px;
        height: 18px;
    }

    .theme-toggle svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 767px) {
    .theme-toggle {
        width: 16px;
        height: 16px;
    }

    .theme-toggle svg {
        width: 12px;
        height: 12px;
    }
}
