.wrapper{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.header{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding:5px 20px;
    background-color: #17203D;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    flex: 1;
    width: 92em;
    font-family: 'Open Sans', sans-serif;
}

.intro_container{
    display: flex;
    justify-items: center;
    flex-grow: 1;
    width: 50vw;
}

.button{
    display: flex;
    flex-direction: column;
    margin: 10px;
}

.button {
  background-color: #17203D;
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #233673;
}

.intro{
    display: flex;
    flex-direction: column;
    width: 60vw;
    padding: 25px 15px;
    margin: 10px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-family: 'Open Sans', sans-serif;
    word-break: break-word;
    white-space: normal;
}

.personal_data{
    display: flex;
}

.content{
    display: flex;
    flex-direction: row;
    flex: 2 auto;
}

.contacts_container{
    display: flex;
    flex-direction: column;
}

.resutl{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

text{
    display: flex;
    flex-direction: column;
    display: flex;
    flex: 3;
    font-family: 'Open Sans', sans-serif;
}

.bc_ad{
    display: flex;

}

.image_container{
    display: flex;
    flex: 1;
    align-items: stretch;
}

.index_image{
    display: flex;
    width: 90%;
    height: s;
}

.image, .image2{
    width: 100%;
    height: s;
}
.image2{
    width: 30em;
}

.form{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-items: center;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin:10px;
}

.data{
    display: flex;
    flex-direction:row;
    align-items: center;
    justify-items: center;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin:10px;
}

.propic{
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.label{
    display: flex;
    flex-direction: column;
    justify-content: center;
    justify-items: center;
}

.options{
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.option{
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    margin: 10%;
}

.propic_image{
    border-radius: 50%;
}

table {
      width: 100%;
      border-collapse: collapse;
      margin: 20px 0;
      font-size: 18px;
      text-align: left;
    }

    th, td {
      padding: 12px;
      border: 1px solid #ddd;
    }

    th {
      background-color: #f4f4f4;
      font-weight: bold;
    }

    tr:nth-child(even) {
      background-color: #f9f9f9;
    }

    tr:hover {
      background-color: #f1f1f1;
    }

.footer{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 18px 20px;
    background-color: #17203D;
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    flex: 1;
    width: 92em;
    font-family: 'Open Sans', sans-serif;
    flex-shrink: 0; 
}

/* === Mobile Friendly Enhancements === */

/* Base fix: prevenzione overflow */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    max-width: 100%;
}

/* Responsive styles */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        padding: 10px;
    }

    h1, h2, h3 {
        font-size: 1.5em;
        text-align: center;
    }

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

    .container, .content, .main, .form, .box {
        width: 100% !important;
        padding: 10px !important;
        margin: 0 auto !important;
        display: block !important;
    }

    nav, header, footer {
        flex-direction: column !important;
        align-items: center !important;
        width: 100% !important;
    }

    .button, button, input[type="submit"] {
        width: 100% !important;
        font-size: 1em !important;
    }

    table {
        width: 100% !important;
        display: block !important;
        overflow-x: auto !important;
    }

    td, th {
        font-size: 0.9em !important;
        word-wrap: break-word !important;
    }

    .horizontal-boxes {
        display: flex;
        flex-direction: column !important;
        gap: 10px;
    }
}

/* Desktop (default) horizontal layout for specific containers */
.horizontal-boxes {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px;
}
@media(max-width: 640px){
  table, table td, table tr, table th { display: block; text-align: left; } 
  table th, table td { margin: 0; padding-left: 25px;  }
  table td  { margin-left: 40px;list-style: square; display: list-item; padding-left: 0; }
  table thead { display: none; }
}
