@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Montserrat:wght@300;400;500;600;700&display=swap');

html {
    scroll-behavior: smooth;
}

body {
    color: #000000;
    background-color: #ffffff; /* Pure white background */
    background-image: 
        url('../assets/lato sx.png'),
        url('../assets/lato dx.png');
    background-repeat: repeat-y, repeat-y; /* Repeat the background image vertically */
    background-position: left top, right bottom; /* Position the background images at the top of the page */
    background-size: auto 10%, auto 10%; /* Set the size of the background images */
    font-family: 'Lora', serif; /* Using Lora as a substitute for MonterChi Serif */
}

/* Responsive background pattern sizes */
@media (max-width: 1200px) {
    body {
        background-size: auto 8%, auto 8%; /* Slightly smaller for medium screens */
    }
}

@media (max-width: 992px) {
    body {
        background-size: auto 6%, auto 6%; /* Smaller for tablets */
    }
}

@media (max-width: 768px) {
    body {
        background-size: auto 5%, auto 5%; /* Even smaller for mobile devices */
    }
}

@media (max-width: 576px) {
    body {
        background-size: auto 4%, auto 4%; /* Smallest size for very small screens */
    }
}

@media (max-width: 480px) {
    body {
        background-size: auto 3%, auto 3%; /* Extra small for very small screens */
        background-attachment: scroll; /* Ensure better performance on small devices */
    }
}

/* For very small screens, we can optionally hide one side pattern to save space */
@media (max-width: 360px) {
    body {
        background-image: url('../assets/lato sx.png'); /* Only keep the left pattern */
        background-size: auto 2.5%; /* Make it even smaller */
        background-repeat: repeat-y;
        background-position: left top;
    }
}

.font-heading {
    font-family: 'Lora', serif !important; /* Using Lora as a substitute for The Seasons */
    font-weight: 600;
}

.font-sans {
    font-family: 'Lora', serif !important; /* Using Lora as a substitute for MonterChi Serif */
}

/* Parallax Effect */
.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    transform: translateZ(0);
    will-change: transform;
}

/* Timeline Styling */
.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 60px;
    padding-right: 20px;
    width: 50%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #707f62; /* Colore chiaro */
    left: -10px;
    top: 20px;
    z-index: 1;
    box-shadow: 0 0 0 5px rgba(112, 127, 98, 0.2);
}

.timeline-item.right {
    margin-left: 50%;
    padding-left: 20px;
    padding-right: 60px;
}

.timeline-item.right::before {
    left: auto;
    right: -10px;
}

.timeline-item .timeline-content {
    width: 45%;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-left: auto;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform: perspective(1000px) rotateY(0deg);
}

.timeline-item.right .timeline-content {
    margin-right: auto;
    margin-left: 0;
}

.timeline-item .timeline-content:hover {
    transform: translateY(-5px) perspective(1000px) rotateY(2deg);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.timeline-item.right .timeline-content:hover {
    transform: translateY(-5px) perspective(1000px) rotateY(-2deg);
}

/* Carousel Styling */
.carousel-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 10px;
}

.carousel-slide img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Form styling */
input, textarea, select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #707f62; /* Colore chiaro */
    box-shadow: 0 0 0 3px rgba(112, 127, 98, 0.2);
    transform: translateY(-2px);
}

/* Button and hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Text shadow */
.text-shadow-sm {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fadeIn {
    animation: fadeIn 1s ease-in-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-slideUp {
    animation: slideUp 0.8s ease-in-out;
}

.animate-fade-in-up {
    animation: fadeInUp 1s forwards;
}

.animate-slide-right {
    opacity: 0;
    animation: slideInRight 1s forwards 0.3s;
}

.animate-slide-left {
    opacity: 0;
    animation: slideInLeft 1s forwards 0.3s;
}

.animate-pulse-slow {
    animation: pulseSlow 3s infinite;
}

.animate-float {
    animation: float 3s infinite;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulseSlow {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Utility classes */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(to right, #707f62, #465b40);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Empty State Styling */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    background-color: rgba(126, 156, 170, 0.05);
    border-radius: 1rem;
    border: 2px dashed rgba(126, 156, 170, 0.2);
    transition: all 0.3s ease;
}

.empty-state-container:hover {
    background-color: rgba(126, 156, 170, 0.1);
    border-color: rgba(126, 156, 170, 0.3);
    transform: translateY(-5px);
}

.empty-state-icon {
    font-size: 3rem;
    color: rgba(126, 156, 170, 0.4);
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.empty-state-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 24rem;
}

.empty-state-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #7E9CAA;
    margin-bottom: 0.5rem;
}

.empty-state-message p {
    color: #666;
    line-height: 1.5;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .timeline-item,
    .timeline-item.right {
        width: 100%;
        margin-left: 0;
        padding-left: 40px;
        padding-right: 0;
    }
    
    .timeline-item::before,
    .timeline-item.right::before {
        left: -10px;
        right: auto;
    }
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .timeline-item::before {
        top: 15px;
    }
}

/* Form Elements */
input:focus, textarea:focus {
    outline: none;
    border-color: #7E9CAA;
    box-shadow: 0 0 0 3px rgba(126, 156, 170, 0.2);
}

button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(126, 156, 170, 0.3);
}

/* Custom Styling */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1H19V19H1V1Z' stroke='%237E9CAA' stroke-opacity='0.1' stroke-width='0.5'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* New Timeline Styles */
.timeline-container {
    position: relative;
    padding-left: 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    left: 25px;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(to bottom, rgba(126, 156, 170, 0.2), rgba(126, 156, 170, 0.8));
    border-radius: 999px;
}

.timeline-card {
    position: relative;
    padding-left: 85px;
    margin-bottom: 60px;
    max-width: 900px;
}

.timeline-card:last-child {
    margin-bottom: 0;
}

.timeline-date {
    position: absolute;
    left: 0;
    top: 0;
    width: 60px;
    height: 80px;
    background-color: #465b40;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    z-index: 1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.date-badge {
    font-weight: bold;
    font-size: 20px;
    line-height: 1;
    margin-bottom: 2px;
}

.date-month {
    font-size: 12px;
    line-height: 1;
    text-transform: uppercase;
    margin-bottom: 0;
}

.date-year {
    font-size: 10px;
    opacity: 0.8;
}

.date-time {
    font-size: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 5px;
    border-radius: 4px;
    margin-top: 2px;
}

.timeline-content-wrapper {
    position: relative;
}

.timeline-content {
    position: relative;
    transform: translateY(0);
    transition: all 0.4s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
}

.timeline-icon {
    transition: all 0.3s ease;
}

.timeline-content:hover .timeline-icon {
    background-color: rgba(126, 156, 170, 0.2);
}

/* Animation classes */
.animate-slide-up {
    animation: slideUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes slideUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .timeline-container::before {
        left: 20px;
    }
    
    .timeline-card {
        padding-left: 70px;
    }
    
    .timeline-date {
        width: 50px;
        height: 80px;
    }
    
    .date-badge {
        font-size: 18px;
    }
    
    .date-month, .date-year, .date-time {
        font-size: 9px;
    }
}

/* Masonry Gallery */
.masonry-gallery {
    columns: 1 200px;
    column-gap: 1.5rem;
    width: 100%;
    padding: 0 1rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateZ(0); /* Force GPU acceleration */
    transition: box-shadow 0.3s ease;
}

.masonry-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 0.75rem;
    transition: transform 0.3s ease;
    backface-visibility: hidden; /* Prevent glitches during animation */
}

.masonry-item:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.masonry-item:hover img {
    transform: scale(1.03);
}

/* Random spacing and sizing for more organic layout */
.masonry-item:nth-child(1) { margin-bottom: 1.25rem; }
.masonry-item:nth-child(2) { margin-bottom: 2rem; }
.masonry-item:nth-child(3) { margin-bottom: 1.75rem; }
.masonry-item:nth-child(4) { margin-bottom: 1.5rem; }
.masonry-item:nth-child(5) { margin-bottom: 2.25rem; }
.masonry-item:nth-child(6) { margin-bottom: 1.35rem; }
.masonry-item:nth-child(7) { margin-bottom: 2.1rem; }
.masonry-item:nth-child(8) { margin-bottom: 1.8rem; }
.masonry-item:nth-child(9) { margin-bottom: 1.65rem; }
.masonry-item:nth-child(10) { margin-bottom: 1.9rem; }

/* Random heights for more variety */
.masonry-item:nth-child(1) img { max-height: 480px; }
.masonry-item:nth-child(2) img { max-height: 320px; }
.masonry-item:nth-child(3) img { max-height: 400px; }
.masonry-item:nth-child(4) img { max-height: 300px; }
.masonry-item:nth-child(5) img { max-height: 450px; }
.masonry-item:nth-child(6) img { max-height: 350px; }
.masonry-item:nth-child(7) img { max-height: 420px; }
.masonry-item:nth-child(8) img { max-height: 280px; }
.masonry-item:nth-child(9) img { max-height: 380px; }
.masonry-item:nth-child(10) img { max-height: 340px; }

@media (min-width: 640px) {
    .masonry-gallery {
        columns: 2;
        column-gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .masonry-gallery {
        columns: 2;
        column-gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .masonry-gallery {
        columns: 3;
        column-gap: 1.5rem;
    }
}

@media (min-width: 1280px) {
    .masonry-gallery {
        columns: 4;
        column-gap: 1.5rem;
    }
}

/* Lightbox styling */
#galleryLightbox {
    backdrop-filter: blur(5px);
}

#lightboxImage {
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-height: 85vh;
}

/* Hero video background */
#home video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    
}

/* For mobile devices, handle video better */
@media (max-width: 768px) {
    #home video {
        object-position: center;
    }
}

/* Upload card styling */
#uploadCard {
    transition: all 0.3s ease;
}

#uploadCard:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#uploadCard svg {
    transition: transform 0.3s ease;
}

#uploadCard:hover svg {
    transform: scale(1.05);
} 