/* Profilo */
.img-profilo {
    width: 300px;
    height: 300px;
    object-fit: cover;
}

.img-profilo-back {
    margin: 0 auto;
}

@media (min-width: 992px) {
    .img-profilo-back {
        margin-left: 5vw;
    }
}

.hero-content {
    margin-top: 20px;
}

/* Typewriter */
.typewriter-container {
    min-height: 80px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .typewriter-container {
        justify-content: center;
    }
}

.typewriter-text {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-light);
    border-right: 3px solid var(--accent-color);
    white-space: nowrap;
    overflow: hidden;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .typewriter-text {
        font-size: 1.8rem;
    }
}

/* Animazione cursore */
.typing {
    animation: blink-caret 0.7s step-end infinite;
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--text-important); }
}

/* News Carousel */
.news {
    text-decoration: none;
}

#carouselExampleDark {
    max-width: 900px;
    margin: 0 auto;
}

#carouselExampleDark .carousel-item img {
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
}

@media (max-width: 768px) {
    #carouselExampleDark .carousel-item img {
        height: 250px;
    }
}

.carousel-caption {
    background-color: rgba(255, 255, 255, 0.95);
    width: 80%;
    max-width: 400px;
    border-radius: 10px;
    margin: auto;
    bottom: 20px;
    padding: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.carousel-caption h3, .carousel-caption p {
    color: #333;
    margin-bottom: 5px;
}

/* Carousel controls */
#carouselExampleDark .carousel-control-prev,
#carouselExampleDark .carousel-control-next {
    width: 50px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

#carouselExampleDark .carousel-control-prev {
    left: -20px;
}

#carouselExampleDark .carousel-control-next {
    right: -20px;
}

@media (min-width: 992px) {
    #carouselExampleDark .carousel-control-prev {
        left: -60px;
    }
    #carouselExampleDark .carousel-control-next {
        right: -60px;
    }
}

/* Project Cards Styling */
.project-card .card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    background-color: white;
    display: flex;
    flex-direction: column;
}

.project-card .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.project-card .img-container {
    position: relative;
    width: 100%;
    /* RIPRISTINATO A 100% 
       Questo rende l'immagine quadrata (1:1) e la card più grande 
    */
    padding-top: 100%; 
    overflow: hidden;
    background-color: #f8f9fa;
}

.project-card .card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid #f0f0f0;
}

.project-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.project-card .card-title {
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.project-card .card-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    flex-grow: 1; /* Spinge i bottoni in basso */
}

/* RIPRISTINATO STILE BOTTONI OUTLINE 
   Queste regole sovrascrivono Bootstrap standard solo dentro le card
*/
.project-card .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 4px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    background-color: transparent; /* Sfondo trasparente di base */
}

/* Bottone Details (Primary) */
.project-card .btn-primary {
    color: #0d6efd;
    border: 1px solid #0d6efd;
    background-color: transparent;
}

.project-card .btn-primary:hover {
    background-color: #0d6efd;
    color: white;
}

/* Bottone Code (Success) */
.project-card .btn-success {
    color: #198754;
    border: 1px solid #198754;
    background-color: transparent;
}

.project-card .btn-success:hover {
    background-color: #198754;
    color: white;
}

.portfolio-title {
    margin-bottom: 4rem !important;
}