/* RESET MINIMO */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: Arial, sans-serif;
	background: #f5f5f5;
	color: #333;
}

.page-wrap {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ========== HEADER ========== */
.top-header {
  width: 100%;
  background: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  height: 104px;
  padding-right: 30px;
  padding-left: 30px;
}

.header-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 4%;
  padding-right: 4%;
}

.logo {
  margin: 31px 0px 31px 0px;
}

.logo img {
	width: 250px;
}

.menu a.btn-home {
	font-size: 15px;
	letter-spacing: 2px;
	color: #333;
	padding: 8px 22px;
	border-radius: 4px;
	text-decoration: none;
}


/* ========== CONTENUTO PRINCIPALE ========== */
main {
	flex: 1;
	width: 1200px;
	max-width: 100%;
	margin: 30px auto 60px auto;
	padding: 0 20px;
}

main h1 {
  font-size: 32px;
  margin-bottom: 20px;
  font-family: Raleway, Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.31;
  letter-spacing: 1px;
  font-style: normal;
  text-align: center;
  color: #333333;
}

main h1::after {
  width: 100%;
  max-width: 206px;
  border-top: solid 2px #004577;
  display: block;
  content: " ";
  margin: auto;
  margin-top: 15px;
  margin-bottom: 30px;
}

.search-box {
	margin-bottom: 20px;
}

.search-box input {
	width: calc(100% - 93px);
	padding: 10px 12px;
	font-size: 16px;
	border: 1px solid #ccc;
	border-radius: 6px;
}
#btnCerca {
    padding: 10px 18px;
    margin-left: 10px;
    background: #0B467A;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1px;
}

#btnCerca:hover {
    background: #083a66;
}

ul.document-list {
	list-style: none;
}

ul.document-list li {
	padding: 12px 14px;
	margin-bottom: 8px;
	border-radius: 6px;
	background: #ffffff;
	border: 1px solid #ddd;
}

/* ========== FOOTER ========== */
.footer {
	background: #242424;
	color: #747474;
	padding: 50px 30px 30px 30px;
	font-size: 14px;
	border-top: 12px solid #3f3f3f;
}

.footer-container {
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-left: 4%;
  padding-right: 4%;
}

.footer-col {
	flex: 1;
}

.footer-logo {
	width: 250px;
	margin-bottom: 20px;
}

.footer p {
	line-height: 1.9;
}

.footer-links {
	list-style: none;
	margin-top: 20px;
}

.footer-links li {
	margin-bottom: 10px;
}

.footer-links a {
	color: #bcbcbc;
	text-decoration: none;
}

.footer-links a:hover {
	color: #ffffff;
	transition: 0.3s;
}

.flag {
	width: 28px;
	margin-bottom: 20px;
}

.right h4 {
	font-size: 14px;
	letter-spacing: 1px;
	margin-bottom: 15px;
	color: #ffffff;
}

.social-icons a {
	font-size: 20px;
	color: #bcbcbc;
	margin-right: 15px;
	text-decoration: none;
}

.social-icons a:hover {
	color: #ffffff;
	transition: 0.3s;
}

/* Riga finale opzionale */
.footer-bottom {
	max-width: 1400px;
	margin: 20px auto 0 auto;
	padding: 0 20px;
	text-align: center;
	color: #888;
	font-size: 12px;
}

/* ========== BOTTONE TORNA SU ========== */
.btn-top {
	position: fixed;
	right: 25px;
	bottom: 25px;
	width: 40px;
	height: 40px;
	border-radius: 4px;
	background: #3c3c3c;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	border: none;
	outline: none;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
	z-index: 1000;
}

.btn-top.visible {
	opacity: 1;
	pointer-events: auto;
}

.btn-top i {
	font-size: 16px;
}



/* TABELLA DOCUMENTI */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 20px;
}

.doc-table thead {
    background: #0B467A;
    color: #fff;
}

.doc-table th {
    padding: 12px;
    font-size: 14px;
    text-align: left;
}

.doc-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}
.doc-table tr:last-child td {
    border-bottom: none;
}

.doc-table tr:hover td {
	background: #f6faff;
}

.doc-table a {
	color: #0B467A;
	font-weight: bold;
	text-decoration: none;
}

.doc-table a:hover {
	text-decoration: underline;
}

.doc-table td.descr {
    line-height: 1.5;
    font-size: 14px;
    white-space: normal;
}


/* link documento */
.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: bold;
    color: #0B467A;
    text-decoration: none;
}

.doc-link:hover {
    text-decoration: underline;
}

.doc-link i {
    color: #d32f2f; /* rosso PDF */
}

/* Stile colonne ordinabili */
.sortable th[data-col] {
    cursor: pointer;
    position: relative;
}

.sortable th[data-col]:after {
    content: "↕";
    font-size: 12px;
    color: #ddd;
    padding-left: 6px;
    width: 18px;
}

.sortable th.asc:after {
    content: "▲";
    color: #fff;
    width: 18px;
}

.sortable th.desc:after {
    content: "▼";
    color: #fff;
    width: 18px;
}


/* ========== RESPONSIVE ========== */
@media (max-width: 1000px) {
	.header-container {
		flex-direction: row;
	}

	.footer-container {
		flex-direction: column;
		text-align: center;
	}

	.footer-col {
		margin-bottom: 25px;
	}

	.social-icons a {
		margin-right: 10px;
	}

	.doc-table thead {
		display: none;
	}

    .doc-table tr {
        display: block;
        margin-bottom: 18px;
        padding: 14px;
        border: 1px solid #ddd;
        border-radius: 6px;
    }

    .doc-table td {
        display: block;
        padding: 6px 0;
    }

    .doc-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #0B467A;
        margin-right: 5px;
        display: block;
        margin-bottom: 4px;
    }
}
