* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #e0e0e0;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style-type: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Stile per le slide del portfolio */
.slide {
    background-color: #f8f5e9;
    border-radius: 5px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.slide::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: #333;
    z-index: 2;
    top: 0;
    right: 0;
    clip-path: polygon(100% 0, 0 0, 100% 100%);
}

/* Rimosso il ::after che aveva display: none */

/* Header slide */
.header {
    padding: 60px 40px;
    text-align: center;
}

.header-content {
    position: relative;
}

.cross-pattern {
    margin-bottom: 20px;
    color: #888;
    font-size: 14px;
    letter-spacing: 5px;
}

.crosses {
    margin-bottom: 5px;
}

.cross-pattern.right {
    position: absolute;
    right: 0;
    top: 0;
    text-align: right;
}

.cross-pattern.center {
    text-align: center;
    margin: 0 auto 20px;
}

h1 {
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: 3px;
    margin-bottom: 30px;
}

.year-line {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.year-line span {
    padding: 0 10px;
    font-size: 0.9rem;
}

.year-line hr {
    flex-grow: 1;
    height: 1px;
    background-color: #333;
    border: none;
    max-width: 200px;
}

/* About slide */
.about {
    padding: 40px;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 30px;
}

.browser-window {
    flex: 0 0 250px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.browser-top {
    background-color: #f1f1f1;
    padding: 8px 15px;
    display: flex;
    align-items: center;
}

.browser-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.red { background-color: #ff5f57; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #28ca41; }

.browser-address {
    margin-left: 10px;
    font-size: 12px;
    color: #777;
}

.browser-content {
    height: 300px;
    overflow: hidden;
    background-color: #fff;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-text {
    flex: 1;
    min-width: 300px;
    position: relative;
}

.about-text h2 {
    font-size: 2.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 30px;
    max-width: 500px;
}

.contact h3 {
    font-weight: normal;
    margin-bottom: 10px;
}

.contact hr {
    height: 1px;
    background-color: #333;
    border: none;
    margin-bottom: 15px;
}

.contact-info {
    display: flex;
    gap: 20px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Maps slide */
.maps {
    padding: 40px;
}

.maps-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.maps-header {
    text-align: center;
    margin-bottom: 10px;
}

.maps-header h2 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

.maps-header h2:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #dd8282;
}

.maps-container {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    height: 450px;
    background-color: #f1f1f1;
    border: 5px solid #fff;
}

.maps-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Skills slide */
.skills {
    padding: 40px;
}

.skills-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.skills-header {
    margin-bottom: 20px;
}

.script-text {
    font-family: 'Brush Script MT', cursive;
    color: #dd8282;
    font-weight: normal;
    font-size: 1.8rem;
    line-height: 1;
    margin-bottom: 0;
}

.skills-list {
    flex: 1;
    min-width: 200px;
}

.skills-list ul {
    font-size: 1rem;
}

.skills-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.skills-list li::before {
    content: "•";
    color: #dd8282;
    position: absolute;
    left: 0;
    font-size: 18px;
}

.skills-illustration {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    max-width: 300px;
}

/* Portfolio slides */
.portfolio {
    padding: 40px;
}

.portfolio-header {
    margin-bottom: 30px;
}

/* Stile per l'overlay delle anteprime e grid items */
.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.grid-item:hover img {
    filter: brightness(0.7);
}

/* Tooltip di progetto */
.project-tooltip {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.7));
    color: white;
    padding: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    overflow: hidden;
    max-height: 100%;
}

.show-tooltip {
    top: 0;
    opacity: 1;
}

.project-tooltip h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #fff;
}

.project-tooltip p {
    font-size: 12px;
    margin-bottom: 10px;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tooltip-details {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 8px;
}

.tooltip-view-project {
    background-color: #dd8282;
    color: white;
    text-align: center;
    padding: 5px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tooltip-view-project:hover {
    background-color: #c06a6a;
}

/* Slider e navigazione */
.slider-container {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    background-color: #dd8282;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.slider-arrow:hover {
    background-color: #c06a6a;
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.left-arrow {
    left: -20px;
}

.slider-arrow.right-arrow {
    right: -20px;
}

.slider-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 20px;
}

.slider-dots .dot {
    width: 8px;
    height: 8px;
    background-color: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot.active {
    background-color: #dd8282;
    transform: scale(1.3);
}

/* Portfolio grids */
.portfolio-grid-container {
    position: relative;
    width: 100%;
    padding-bottom: 30px;
}

.portfolio-grid-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    flex: 1;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.grid-container.active {
    visibility: visible;
    opacity: 1;
    position: relative;
}

/* Modal del progetto */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    position: relative;
    background-color: #fff;
    width: 85%;
    max-width: 900px;
    margin: 50px auto;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(50px);
    opacity: 0;
    transition: all 0.4s ease;
}

.show-modal .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 30px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 2;
}

.close-modal:hover {
    color: #dd8282;
}

.modal-body {
    position: relative;
}

.modal-title {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dd8282;
}

.modal-image {
    width: 100%;
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
}

.modal-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.modal-description {
    margin-bottom: 20px;
}

.modal-description p {
    line-height: 1.6;
    color: #555;
}

.modal-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-weight: bold;
    color: #777;
    font-size: 14px;
    margin-bottom: 5px;
}

.detail-value {
    color: #333;
}

/* Thank You slide */
.thank-you {
    padding: 60px 40px;
    text-align: center;
}

.thank-you h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.year-bottom {
    font-size: 0.9rem;
    color: #888;
}

/* Menu di navigazione */
.navbar {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.nav-toggle {
    width: 40px;
    height: 40px;
    background-color: #333;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    position: relative;
    z-index: 102;
}

.nav-toggle span {
    width: 20px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -300px;
    width: 250px;
    height: 100vh;
    background-color: #fff;
    padding: 80px 40px 40px;
    transition: right 0.3s ease;
    z-index: 101;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.nav-menu.active {
    right: 0;
}

.nav-menu li {
    margin-bottom: 15px;
}

.nav-menu a {
    display: block;
    color: #333;
    font-size: 1.2rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #dd8282;
}

/* Media Queries */
@media (min-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-tooltip p {
        -webkit-line-clamp: 2;
    }
}

@media (min-width: 992px) {
    .grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
    
    .modal-details {
        grid-template-columns: 1fr;
    }
    
    .project-tooltip {
        padding: 10px;
    }
    
    .project-tooltip h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .project-tooltip p {
        font-size: 11px;
        -webkit-line-clamp: 2;
    }
    
    .tooltip-details {
        margin-bottom: 5px;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .browser-window {
        flex: none;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .about-text {
        text-align: center;
    }
    
    .cross-pattern.right {
        position: static;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .contact-info {
        flex-direction: column;
        align-items: center;
    }
    
    h1 {
        font-size: 3rem;
    }
    
    .about-text h2, 
    .maps-header h2, 
    .skills h2, 
    .portfolio-header h2, 
    .thank-you h2 {
        font-size: 2rem;
    }
    
    .slider-arrow.left-arrow {
        left: 5px;
    }
    
    .slider-arrow.right-arrow {
        right: 5px;
    }
}