html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}








/* Variabili CSS */
:root {
    --primary-color: #5e3bee;
    --secondary-color: #e5e7eb;
    --dark-color: #1f2937;
    --light-color: #ffffff;
    --body-bg: #f9f9f9;
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--body-bg);
    color: var(--dark-color);
    line-height: 1.6;
    height: 100vh; /* Altezza viewport completa */
    overflow: hidden; /* Disabilita lo scroll */
    display: flex;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn:hover {
        background-color: #4930ab;
        transform: translateY(-3px);
    }

/* Layout principale */
.app-container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--primary-color);
    color: var(--light-color);
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
}

.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.profile-img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid rgba(255, 255, 255, 0.5);
    background-color: #b0b0b0;
    margin-bottom: 20px;
    object-fit: cover;
}

.profile-name {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 5px;
}

.profile-title {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 20px;
}

.nav-menu {
    margin-top: 40px;
}

.nav-item {
    margin-bottom: 15px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
    color: white;
}

    .nav-link:hover, .nav-link.active {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .nav-link i {
        margin-right: 10px;
        width: 20px;
        text-align: center;
    }

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

    .social-link:hover {
        background-color: rgba(255, 255, 255, 0.4);
        transform: translateY(-3px);
    }

.sidebar-footer {
    font-size: 12px;
    text-align: center;
    opacity: 0.7;
}

/* Contenuto principale */
.main-content {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.content-section {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
}

    .content-section.active {
        opacity: 1;
        visibility: visible;
    }

.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

    .section-title:after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 40px;
        height: 4px;
        background-color: var(--primary-color);
    }

/* Home Section */
.home-section {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    /*background-image: url('/api/placeholder/1000/800');*/
    background-size: cover;
    background-position: center;
    position: relative;
    padding: 0;
}

.home-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.home-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--light-color);
    max-width: 700px;
    padding: 40px;
}

.home-title {
    font-size: 48px;
    margin-bottom: 20px;
}

.home-subtitle {
    font-size: 24px;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.home-text {
    margin-bottom: 40px;
    font-size: 18px;
}

.home-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--light-color);
}

    .btn-secondary:hover {
        background-color: var(--light-color);
        color: var(--dark-color);
    }

/* About Section */
.about-content {
    display: flex;
    gap: 40px;
    margin-top: 20px;
}

.about-image {
    flex: 1;
}

.about-img {
    border-radius: 10px;
    box-shadow: var(--shadow);
    max-height: 450px;
    object-fit: cover;
}

.about-info {
    flex: 1;
}

.about-text {
    margin-bottom: 30px;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    gap: 10px;
}

.info-title {
    font-weight: 600;
}

.skills-list {
    margin-top: 30px;
}

.skill-item {
    margin-bottom: 20px;
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.skill-bar {
    height: 10px;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

.skill-progress {
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 5px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.service-card {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

    .service-card:hover {
        transform: translateY(-10px);
    }

.service-icon {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-title {
    font-size: 20px;
    margin-bottom: 15px;
}

/* Portfolio Section */
.portfolio-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 15px;
    border: 1px solid var(--secondary-color);
    background: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .filter-btn.active, .filter-btn:hover {
        background-color: var(--primary-color);
        color: var(--light-color);
        border-color: var(--primary-color);
    }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.portfolio-item {
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow);
    height: 220px;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(94, 59, 238, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-title {
    color: var(--light-color);
    margin-bottom: 10px;
    text-align: center;
}

.portfolio-category {
    color: var(--secondary-color);
}

.portfolio-link {
    margin-top: 15px;
    color: var(--light-color);
    border: 1px solid var(--light-color);
    padding: 5px 15px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

    .portfolio-link:hover {
        background-color: var(--light-color);
        color: var(--primary-color);
    }

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 20px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.contact-icon {
    width: 45px;
    height: 45px;
    background-color: var(--primary-color);
    color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.contact-detail h4 {
    margin-bottom: 5px;
}

.contact-form {
    background-color: var(--light-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
}

textarea.form-control {
    height: 150px;
    resize: vertical;
}

/* Media queries */
@media screen and (max-width: 991px) {
    .about-content {
        flex-direction: column;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        padding: 20px;
    }

    .profile-section {
        flex-direction: row;
        align-items: center;
        text-align: left;
    }

    .profile-img {
        width: 80px;
        height: 80px;
        margin-bottom: 0;
        margin-right: 20px;
    }

    .nav-menu {
        margin-top: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-item {
        margin-bottom: 0;
    }

    .main-content {
        height: calc(100vh - 200px);
    }

    .sidebar-footer {
        display: none;
    }
}

@media screen and (max-width: 768px) {
    /* Modifiche esistenti... */

    /* Menu pił compatto */
    .sidebar {
        padding: 15px;
    }

    .profile-section {
        margin-bottom: 10px;
    }

    .profile-img {
        width: 60px;
        height: 60px;
        border-width: 3px;
    }

    .profile-name {
        font-size: 18px;
    }

    .profile-title {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .social-links {
        margin-top: 10px;
        gap: 10px;
    }

    .social-link {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .nav-menu {
        margin-top: 10px;
        justify-content: center;
    }

    .nav-link {
        padding: 8px 12px;
        font-size: 14px;
    }

        .nav-link i {
            margin-right: 5px;
        }
}

/* Aggiungere una media query per schermi molto piccoli */
@media screen and (max-width: 480px) {
    .sidebar {
        padding: 10px 5px;
    }

    .nav-menu {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .nav-item {
        flex: 0 0 auto;
    }

    /* Opzionale: mostrare solo le icone in modalitą ultra-compatta */
    .nav-link span {
        display: none;
    }

    .nav-link i {
        margin-right: 0;
        font-size: 16px;
    }

    .main-content {
        height: calc(100vh - 150px);
    }
}

@media screen and (max-width: 576px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
    }

    .profile-img {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .portfolio-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    position: absolute;
    top: 20px;
    right: 20px;
}

@media screen and (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .sidebar {
        position: relative;
    }

    .nav-menu {
        display: none;
        width: 100%;
    }

        .nav-menu.show {
            display: flex;
        }
}


.alert {
    bottom: 60px;
    right: 15px;
    position: absolute;
}