/* ---------------------------------- */
/* FONT AND COLOR DEFINITIONS         */
/* ---------------------------------- */

/* Google Fonts import has been removed. */

/* 2. Define Color Variables from Brand Identity */
:root {
    --ottanio: #00728D;
    --grigio-scuro: #4D4E4F;
    --bianco: #FFFFFF;
    --blu-scuro: #183F56;
    --grigio-chiaro: #C8CAD4;
    --celeste: #9CD7F3;
    --testo-base: #444444;
}

/* 3. Apply Typographic Styles with System Fonts */
body {
    /* Using a standard system font stack. The "condensed" look is lost. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--testo-base);
    line-height: 1.7;
}

h1 {
    /* Using Georgia as a beautiful and widely available serif fallback. */
    font-family: Georgia, 'Times New Roman', serif;
}

h2, h5 {
    /* Using the same system font stack for consistency. */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 600;
    color: var(--blu-scuro);
}

/* ---------------------------------- */
/* CUSTOM COMPONENTS                  */
/* ---------------------------------- */

/* Style for the Header (Hero Section) */
.hero-header {
    color: var(--blu-scuro);
}

.hero-header h1 {
    font-size: 3.5rem;
}

.hero-header p {
    color: var(--testo-base);
    font-size: 1.25rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Style for content sections */
.section-highlight {
    background-color: var(--grigio-chiaro);
    padding-top: 3rem;
    padding-bottom: 5rem;
}

.section-default {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* Style for publication lists */
.publication-list .list-group-item {
    border: 0;
    border-left: 4px solid var(--grigio-chiaro);
    padding: 1rem 1.5rem;
    margin-bottom: 0.75rem;
    background-color: #f8f9fa;
    transition: border-left-color 0.3s ease;
}

.publication-list .list-group-item:hover {
    border-left-color: var(--ottanio);
}

/* Style for custom buttons */
.btn-custom {
    background-color: var(--ottanio);
    color: var(--bianco);
    border: 2px solid var(--ottanio);
    /* The font is inherited from the body now */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure buttons don't have underlines */
    display: inline-block; /* Proper button alignment */
    padding: 0.375rem 0.75rem; /* Re-add some padding for button look */
    font-size: 0.875rem; /* Smaller font size for buttons */
    border-radius: 0.25rem; /* Slightly rounded corners */
}

.btn-custom:hover {
    background-color: var(--celeste);
    border-color: var(--celeste);
    color: var(--blu-scuro);
}


        .navbar {
            transition: background-color 0.4s ease, border-color 0.4s ease;
        }

        .navbar .nav-link {
            color: var(--color-blu-scuro);
            font-weight: 600;
            transition: color 0.3s ease;
        }
        .navbar .navbar-toggler-icon {
             background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }

        .navbar-scrolled {
            background-color: rgba(255, 255, 255, 0.85) !important;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border-bottom: 1px solid #e5e5e5;
        }
        .navbar-scrolled .nav-link {
            color: var(--color-blu-scuro);
        }
        .navbar-scrolled .nav-link:hover {
            color: var(--color-ottanio);
        }
        .navbar-scrolled .navbar-toggler-icon {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
        }


 /* NEW: Styles for complex cards (Services page) */
.service-card-link {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    text-decoration: none;
}

.service-icon {
    margin-right: 1.5rem;
    margin-top: 0.25rem;
    color: var(--ottanio);
    flex-shrink: 0;
}

.service-details {
    flex-grow: 1;
}

.service-title {
    font-weight: 700;
    color: var(--blu-scuro);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    transition: color 0.2s ease-in-out;
}

.service-description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--grigio-scuro);
}

.card-list .list-group-item:hover .service-title {
    color: var(--ottanio);
}

/* NEW: Styles for the People page cards */
.person-card {
    background-color: var(--bianco);
    border-radius: 15px;
    padding: 2rem 1.5rem;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.person-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
}

.person-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%; /* Makes the photo circular */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border: 4px solid var(--grigio-chiaro);
}

.person-name-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    text-align: center;
}

.person-name {
    margin-bottom: 0.25rem;
    color: var(--blu-scuro);
    font-size: 1.25rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

.person-card:hover .person-name {
    color: var(--ottanio);
}

.person-title {
    color: var(--grigio-scuro);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.person-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.person-card-link:hover {
    text-decoration: none; /* Prevents underline on hover */
}

/* NEW: Styles for the Publications page list */
.publication-list {
    list-style: none;
    counter-reset: publications-counter; /* Creates a custom counter */
    padding-left: 0;
}

.publication-item {
    background: var(--bianco);
    border-radius: 8px;
    padding: 1.5rem 1.5rem 1.5rem 3.5rem; /* Extra left padding for the number */
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    position: relative; /* Needed for positioning the number */
    border-left: 4px solid transparent;
    transition: border-left-color 0.3s ease, transform 0.3s ease;
}

.publication-item:hover {
    border-left-color: var(--ottanio);
    transform: translateX(5px);
}

/* Style for the custom number */
.publication-item::before {
    counter-increment: publications-counter; /* Increment the counter */
    content: counter(publications-counter); /* Display the counter number */
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--ottanio);
    color: var(--bianco);
    font-weight: bold;
    height: 30px;
    width: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    left: -15px; /* Position it halfway over the edge */
}

.pub-details {
    display: flex;
    flex-direction: column;
}

.pub-title {
    font-size: 1.2rem;
    color: var(--blu-scuro);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.pub-authors {
    font-size: 0.95rem;
    color: var(--grigio-scuro);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.pub-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on small screens */
    gap: 1rem;
}

.pub-journal {
    font-size: 1rem;
    color: var(--testo-base);
}

.mt-5 {
  margin-top: 5.5rem !important;
}

/* NEW: Styles for the Profile page */
.profile-sidebar-card {
    background: var(--bianco);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-align: center;
    position: sticky; /* Makes the card stick on scroll */
    top: 2rem; /* The space from the top it will stick to */
}

.profile-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--bianco);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-top: -5rem; /* Pulls the photo up to overlap the card top */
    margin-bottom: 1rem;
}

.profile-name {
    font-size: 2rem;
    color: var(--blu-scuro);
    margin-bottom: 0.5rem;
}

.profile-title {
    font-size: 1.1rem;
    color: var(--testo-base);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.profile-country {
    font-size: 1rem;
    color: var(--grigio-scuro);
    margin-bottom: 1.5rem;
}

.profile-contact-info {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.profile-contact-info a {
    color: var(--ottanio);
    text-decoration: none;
}
.profile-contact-info a:hover {
    text-decoration: underline;
}

.profile-social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--grigio-chiaro);
    color: var(--blu-scuro);
    margin: 0 0.25rem;
    font-size: 1.2rem;
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.profile-social-links a:hover {
    background-color: var(--ottanio);
    color: var(--bianco);
}

/* Styles for Bootstrap Tabs */
.profile-tabs {
    border-bottom: 2px solid var(--grigio-chiaro);
}

.profile-tabs .nav-link {
    color: var(--grigio-scuro);
    font-weight: 600;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.25rem;
}

.profile-tabs .nav-link.active,
.profile-tabs .nav-link:hover {
    color: var(--ottanio);
    border-bottom: 2px solid var(--ottanio);
    background: none;
}

.profile-tab-content {
    background: var(--bianco);
    padding: 2rem;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

.cv-section {
    margin-bottom: 2rem;
}

.cv-section h4 {
    color: var(--blu-scuro);
    border-bottom: 2px solid var(--grigio-chiaro);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.cv-list {
    list-style-type: none;
    padding-left: 0;
}

.cv-list li {
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}
.cv-list li:last-child {
    border-bottom: none;
}

.construction-icon {
    color: var(--grigio-chiaro);
}

.section-fullscreen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.section-default {
    padding-top: 3rem;
    padding-bottom: 5rem;
}

/* NEW: Styles for the Job Description Page */

/* Custom Accordion Styles */
.accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 8px !important; /* Use important to override Bootstrap */
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.accordion-header {
    border-radius: 8px !important;
}

.accordion-button {
    font-weight: 600;
    color: var(--blu-scuro);
    border-radius: 8px !important;
}

.accordion-button:not(.collapsed) {
    background-color: var(--celeste);
    color: var(--blu-scuro);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(0, 114, 141, 0.25); /* Ottanio color focus ring */
}

.accordion-body {
    font-size: 1rem;
    line-height: 1.7;
}

/* Custom list style with icons */
.styled-list {
    list-style: none;
    padding-left: 0;
}

.styled-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.styled-list li::before {
    content: '\f00c'; /* Font Awesome check icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 5px;
    color: var(--ottanio);
}

/* "How to Apply" Card */
.apply-card {
    background-color: var(--grigio-chiaro);
    border: 1px solid #d4d6de;
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
}

.apply-card h4 {
    color: var(--blu-scuro);
    font-weight: 700;
}

.apply-card hr {
    border-top: 1px solid #b7bac4;
}

.apply-card a {
    color: #fff;
    font-weight: bold;
}

/* NEW: Styles for the Research Page Cards */

.research-card {
    background-color: var(--bianco);
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* Optional: Use this to alternate background colors if you wish */
/* Just add class="research-card alt-bg" to the div in your HTML */
.research-card.alt-bg {
    background-color: #f8f9fa; /* A very light grey */
}

.research-card h2 {
    color: var(--ottanio); /* Use the accent color for topic titles */
}

/* New, compact style for publication lists on the research page */
.publication-snippet-list {
    list-style: none;
    padding-left: 0;
}

.publication-snippet-list li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.publication-snippet-list li::before {
    content: '\f15c'; /* Font Awesome file-alt icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ottanio);
    font-size: 1.1rem;
}

.publication-snippet-list li a {
    font-weight: bold;
    text-decoration: none;
    color: var(--blu-scuro);
    margin-left: 0.5rem;
}

.publication-snippet-list li a:hover {
    text-decoration: underline;
    color: var(--ottanio);
}

/* NEW: Styles for the About Us Focus Cards */
.focus-card {
    background-color: var(--bianco);
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    padding: 2.5rem 2rem;
    text-align: center;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.focus-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.focus-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--ottanio);
    color: var(--bianco);
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.focus-title {
    font-size: 1.3rem;
    color: var(--blu-scuro);
    font-weight: 700;
    margin-bottom: 1rem;
}

.focus-text {
    font-size: 1rem;
    color: var(--grigio-scuro);
    line-height: 1.6;
}