/* ---------- Base ---------- */

* {
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    text-align: center;
}

/* Make sure fixed footer doesn't cover content */
main {
    max-width: 900px;
    margin: 20px auto;
    background: white;
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);

    /* reserve space for fixed footer */
    margin-bottom: 80px;
}


/* ---------- Header ---------- */

header {
    background-color: #333;
    color: white;
    padding: 22px 16px 18px;
}

header h1 {
    margin: 0 0 12px 0;
    font-size: 2rem;
}


/* Profile image + toggle button row */

.profile-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin: 10px 0 14px;
}

/* Only target the profile photo */
.profile-container img {
    width: 170px;
    height: 170px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

/* Language toggle button */
.profile-container button {
    margin: 0;
    padding: 10px 16px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
}

.profile-container button:hover {
    background-color: #0056b3;
}


/* ---------- Nav ---------- */

nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

nav ul li {
    display: inline-block;
    margin: 0 10px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 18px;
}

nav ul li a:hover {
    text-decoration: underline;
}


/* ---------- Sections ---------- */

section {
    margin: 26px 0;
}

/* Left-aligned text inside centered page */
.left-section {
    text-align: left;
}


/* ---------- About image ---------- */

.about-photo-right {
    float: right;
    width: 200px;
    max-width: 40%;
    margin: 0 0 14px 18px;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}

.about-photo-right img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

/* Ensure text wraps nicely */
.about-text {
    overflow: hidden;
}


/* ---------- Tutoring ---------- */

#tutoring,
#tutoraggio {
    border-top: 1px solid #ddd;
    padding-top: 26px;
}

.tutoring-intro {
    font-size: 1.05rem;
    line-height: 1.6;
}

.tutoring-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.italian-tutoring-grid {
    grid-template-columns: repeat(2, 1fr);
}

.tutoring-card {
    background-color: #f8f8f8;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 18px;
}

.tutoring-card h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.08rem;
}

.tutoring-card ul {
    margin: 0;
    padding-left: 20px;
}

.tutoring-card li {
    margin-bottom: 7px;
    line-height: 1.35;
}

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

.tutoring-note {
    margin-top: 20px;
    font-weight: 500;
}

.tutoring-note a {
    color: #007bff;
    text-decoration: none;
}

.tutoring-note a:hover {
    text-decoration: underline;
}


/* ---------- Buttons ---------- */

button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 8px;
}

button:hover {
    background-color: #0056b3;
}


/* ---------- Footer ---------- */

footer {
    background-color: #333;
    color: white;
    padding: 10px;
    position: fixed;
    bottom: 0;
    width: 100%;
    left: 0;
}


/* ---------- Contact / CV Links ---------- */

#contact a,
#contatti a {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

#contact a:hover,
#contatti a:hover {
    text-decoration: underline;
}


/* ---------- Responsive ---------- */

@media (max-width: 768px) {

    main {
        margin: 12px;
        padding: 18px;
    }

    .about-photo-right {
        float: none;
        width: 240px;
        max-width: 90%;
        margin: 12px auto;
    }

    .tutoring-grid,
    .italian-tutoring-grid {
        grid-template-columns: 1fr;
    }

    nav ul li {
        margin: 5px 7px;
    }

    nav ul li a {
        font-size: 16px;
    }
}
