/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    overflow-x: hidden;
    max-width: 100vw;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

.container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo img {
    max-height: 50px;
    margin-right: 10px;
}

/* Navigation */
.main-nav {
    position: relative;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: block;
    transition: background-color 0.3s;
    border-radius: 4px;
}

.nav-menu a:hover,
.nav-menu a.active {
    background-color: rgba(255,255,255,0.2);
}

.dropdown {
    position: relative;
}

.dropdown > a span {
    font-size: 0.7rem;
    margin-left: 5px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    list-style: none;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-radius: 4px;
    overflow: hidden;
    z-index: 1000;
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    color: #333;
    padding: 0.75rem 1rem;
    display: block;
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
}

/* Breadcrumb */
.breadcrumb {
    background-color: #e9ecef;
    padding: 0.75rem 0;
    border-bottom: 1px solid #dee2e6;
}

.breadcrumb ul {
    list-style: none;
    display: flex;
    gap: 0.5rem;
}

.breadcrumb li:not(:last-child)::after {
    content: ' / ';
    margin-left: 0.5rem;
    color: #6c757d;
}

.breadcrumb a {
    color: #2a5298;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Layout principale */
.main-content {
    display: grid;
    grid-template-columns: 250px 1fr 250px;
    gap: 2rem;
    padding: 2rem 20px;
    min-height: calc(100vh - 300px);
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.main-content.no-sidebar {
    grid-template-columns: 1fr;
}

.main-content.one-sidebar {
    grid-template-columns: 250px 1fr;
}

/* Sidebar */
.sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    height: fit-content;
}

.sidebar-widget {
    margin-bottom: 2rem;
}

.sidebar-widget:last-child {
    margin-bottom: 0;
}

.sidebar-widget h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 2px solid #2a5298;
    padding-bottom: 0.5rem;
}

.sidebar-content {
    color: #666;
}

/* Stili per i link nella sidebar */
.sidebar .sidebar-content a,
.sidebar-widget .sidebar-content a,
.sidebar-content a {
    color: #1e3c72 !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

.sidebar .sidebar-content a:hover,
.sidebar-widget .sidebar-content a:hover,
.sidebar-content a:hover {
    color: #2a5298 !important;
    border-bottom-color: #2a5298;
}

.sidebar .sidebar-content a:visited,
.sidebar-widget .sidebar-content a:visited,
.sidebar-content a:visited {
    color: #5a7ba8 !important;
}

.sidebar .sidebar-content a:active,
.sidebar-widget .sidebar-content a:active,
.sidebar-content a:active {
    color: #0d1f3d !important;
}

/* Stili per link esterni nella sidebar */
.sidebar .sidebar-content a[href^="http"]:not([href^="http://localhost"]):not([href^="https://localhost"]):not([href*="net-plus.it"])::after,
.sidebar-widget .sidebar-content a[href^="http"]:not([href^="http://localhost"]):not([href^="https://localhost"]):not([href*="net-plus.it"])::after,
.sidebar-content a[href^="http"]:not([href^="http://localhost"]):not([href^="https://localhost"]):not([href*="net-plus.it"])::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
}

/* Limita dimensioni immagini emoji nelle sidebar */
.sidebar-content img[src*="emoji"],
.sidebar-content img[src*="core/emoji"],
.sidebar-content img[alt*="✅"],
.sidebar-content img[alt*="❌"],
.sidebar-content img[alt*="⭐"],
.sidebar-content img[alt*="🔥"] {
    width: 1.2em !important;
    height: 1.2em !important;
    max-width: 1.2em !important;
    max-height: 1.2em !important;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.2em;
    aspect-ratio: 1/1 !important;
}

.sidebar-content ul {
    list-style: none;
    padding-left: 0;
}

.sidebar-content ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.sidebar-content ul li:last-child {
    border-bottom: none;
}

/* Content Area */
.content-area {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.content-area h1 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.content-area h2 {
    color: #2a5298;
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.content-area p {
    margin-bottom: 1rem;
    color: #555;
}

/* Stili per i link nel content-area */
.content-area a {
    color: #1e3c72 !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

.content-area a:hover {
    color: #2a5298 !important;
    border-bottom-color: #2a5298;
}

.content-area a:visited {
    color: #5a7ba8 !important;
}

.content-area a:active {
    color: #0d1f3d !important;
}

/* Stili per link esterni nel content-area */
.content-area a[href^="http"]:not([href^="http://localhost"]):not([href^="https://localhost"]):not([href*="net-plus.it"])::after {
    content: " ↗";
    font-size: 0.8em;
    opacity: 0.7;
}

/* Stili per link email */
.content-area a[href^="mailto:"] {
    color: #1e3c72 !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.content-area a[href^="mailto:"]:hover {
    color: #2a5298 !important;
    border-bottom-color: #2a5298;
}

/* Progetti Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.project-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-card-link:hover .project-card {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.project-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.project-card-content {
    padding: 1rem;
}

.project-card h3 {
    color: #1e3c72;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.project-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.project-version-small {
    color: #2a5298;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

/* Navigazione progetti */
.projects-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    align-items: center;
}

.nav-arrow {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav-arrow:hover:not(:disabled) {
    background: linear-gradient(135deg, #2a5298 0%, #1e3c72 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.nav-arrow:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-arrow span {
    font-size: 1.2rem;
    font-weight: bold;
}

.projects-navigation .loading {
    color: #666;
    font-style: italic;
}

.project-version-small strong {
    color: #1e3c72;
}

/* Pagina dettaglio progetto */
.project-detail {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.project-image {
    margin-bottom: 2rem;
    text-align: center;
}

.project-image img {
    max-width: 600px;
    width: 100%;
    max-height: 350px;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 auto;
    display: block;
}

.project-description {
    margin: 2rem 0 0.5rem 0;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    overflow-x: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Gestione span con stili inline nella descrizione progetto */
.project-description span {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    display: inline;
    max-width: 100% !important;
    white-space: normal !important;
}

/* Forza word-wrap su tutti gli elementi inline nella descrizione */
.project-description * {
    max-width: 100%;
    box-sizing: border-box;
}

.project-description *[style] {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    max-width: 100% !important;
    white-space: normal !important;
}

/* Riduci margine top delle FAQ quando sono dopo la descrizione progetto */
.project-description + .faq-section {
    margin-top: 0;
}

/* Limita dimensioni immagini emoji */
.project-description img[src*="emoji"],
.project-description img[src*="core/emoji"],
.project-description img[alt*="✅"],
.project-description img[alt*="❌"],
.project-description img[alt*="⭐"],
.project-description img[alt*="🔥"] {
    width: 1.2em !important;
    height: 1.2em !important;
    max-width: 1.2em !important;
    max-height: 1.2em !important;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.2em;
    aspect-ratio: 1/1 !important;
}

.project-description h1,
.project-description h2,
.project-description h3,
.project-description h4 {
    color: #1e3c72;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.project-description p {
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.project-description ul,
.project-description ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.project-description li {
    margin-bottom: 0.5rem;
}

.project-description section {
    margin: 2rem 0;
    padding: 1.5rem 0;
}

.project-description section h2 {
    margin-top: 0;
    margin-bottom: 1rem;
    color: #1e3c72;
}

.project-description code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    display: inline-block;
    max-width: 100%;
}

/* Gestione code con stili inline */
.project-description code[style] {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: pre-wrap !important;
    max-width: 100% !important;
}

.project-description a {
    color: #2a5298;
    text-decoration: underline;
}

.project-description a:hover {
    color: #1e3c72;
}

/* Stili per pulsanti nella descrizione progetto */
.project-description .project-button,
.content-area .project-button {
    display: inline-flex !important;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: #4a69bd;
    color: white !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: all 0.3s ease;
    margin: 0.5rem 0.5rem 0.5rem 0;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.project-description .project-button .button-icon,
.content-area .project-button .button-icon {
    font-size: 1.1rem;
    display: inline-flex;
    align-items: center;
    opacity: 0.9;
}

.project-description .project-button .button-text,
.content-area .project-button .button-text {
    font-weight: 600;
}

/* Colori pulsanti */
.project-description .project-button-blue,
.content-area .project-button-blue {
    background: #4a69bd !important;
}

.project-description .project-button-blue:hover,
.content-area .project-button-blue:hover {
    background: #3d5aa8 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(74, 105, 189, 0.3);
}

.project-description .project-button-red,
.content-area .project-button-red {
    background: #e74c3c !important;
}

.project-description .project-button-red:hover,
.content-area .project-button-red:hover {
    background: #c0392b !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.project-description .project-button-green,
.content-area .project-button-green {
    background: #27ae60 !important;
}

.project-description .project-button-green:hover,
.content-area .project-button-green:hover {
    background: #229954 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.project-description .project-button-orange,
.content-area .project-button-orange {
    background: #f39c12 !important;
}

.project-description .project-button-orange:hover,
.content-area .project-button-orange:hover {
    background: #e67e22 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.3);
}

.project-description .project-button:hover,
.content-area .project-button:hover {
    color: white !important;
    text-decoration: none !important;
}

.project-description .project-button:visited,
.content-area .project-button:visited {
    color: white !important;
}

.project-description table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.project-description table td,
.project-description table th {
    padding: 0.5rem;
    border: 1px solid #ddd;
}

.project-description table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.project-description blockquote {
    border-left: 4px solid #2a5298;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #666;
}

.project-version {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #2a5298;
    margin-top: 2rem;
    font-size: 1rem;
    color: #333;
}

/* FAQ Section Styles */
.faq-section {
    background: #f5f7fa;
    padding: 40px 20px;
    margin: 40px 0;
    border-radius: 8px;
}

.faq-section .container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1e3a5f;
    font-size: 1.8rem;
    margin-top: 0;
}

.project-detail .faq-section {
    margin-top: 0;
    margin-bottom: 40px;
}

.faq-section > .container > p {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
}

/* FAQ Accordion Styles */
.faq-accordion {
    max-width: 900px;
    margin: 0 auto;
}

.faq-accordion-item {
    margin-bottom: 15px;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    border: 1px solid #e0e0e0;
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 20px 25px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    color: #1e3a5f;
    position: relative;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-question:focus {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

.faq-question-text {
    flex: 1;
    padding-right: 20px;
    line-height: 1.5;
}

/* Stili per H2 dentro il button FAQ */
.faq-question h2.faq-question-text {
    margin: 0;
    padding: 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: #1e3c72;
    display: block;
    text-align: left;
    line-height: 1.4;
    flex: 1;
    padding-right: 20px;
}

.faq-icon {
    font-size: 24px;
    font-weight: bold;
    color: #2563eb;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f0f4ff;
}

.faq-question[aria-expanded="true"] .faq-icon {
    background-color: #2563eb;
    color: white;
    transform: rotate(0deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background-color: #fafbfc;
}

.faq-answer.active {
    max-height: 2000px;
    padding: 0 25px 25px 25px;
}

.faq-answer-content {
    padding-top: 20px;
    color: #555;
    line-height: 1.8;
    overflow-x: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    -webkit-overflow-scrolling: touch;
}

/* Stili legacy per compatibilità (mantenuti per eventuali FAQ non accordion) */
.faq-item {
    margin-bottom: 25px;
    background: white;
    padding: 25px;
    border-radius: 6px;
    border-left: 4px solid #2563eb;
}

.faq-item h3 {
    margin-top: 0;
    color: #1e3a5f;
    font-size: 18px;
}

.faq-item p {
    color: #555;
    line-height: 1.6;
}

.faq-item ol,
.faq-item ul {
    color: #555;
    line-height: 1.8;
    margin-left: 20px;
    margin-top: 10px;
}

.faq-item li {
    margin-bottom: 0.5rem;
}

.faq-item code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.faq-item strong {
    color: #1e3a5f;
    font-weight: 600;
}

.faq-answer-content p {
    margin-bottom: 1rem;
}

.faq-answer-content ul,
.faq-answer-content ol {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
}

.faq-answer-content a {
    color: #2a5298;
    text-decoration: underline;
}

.faq-answer-content a:hover {
    color: #1e3c72;
}

.faq-answer-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.faq-answer-content strong {
    color: #1e3a5f;
    font-weight: 600;
}

/* Stili per tabelle nelle FAQ */
.faq-answer-content table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    font-size: 14px;
    min-width: 100%;
    display: table;
}

.faq-answer-content table tr {
    border-bottom: 1px solid #e5e7eb;
}

.faq-answer-content table tr:first-child {
    background: #f0f9ff;
    border-bottom: 2px solid #e5e7eb;
}

.faq-answer-content table tr:nth-child(even) {
    background: #f9fafb;
}

.faq-answer-content table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #1e3a5f;
}

.faq-answer-content table td {
    padding: 12px;
    color: #555;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Stili per celle con testo "risparmio" (verde) - se presente inline style, verrà sovrascritto */
.faq-answer-content table td[style*="#059669"] {
    color: #059669 !important;
    font-weight: 600;
}

/* Stili legacy per compatibilità */
.faq-answer p {
    margin-bottom: 1rem;
}

.faq-answer ul,
.faq-answer ol {
    margin-left: 20px;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.faq-answer a {
    color: #2a5298;
    text-decoration: underline;
}

.faq-answer a:hover {
    color: #1e3c72;
}

.faq-answer code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    color: #d63384;
}

/* Footer */
.main-footer {
    background: white;
    color: #333;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: #666;
}

/* Stili per i link nel footer - usa lo stesso stile della sidebar */
.footer-copyright .footer-links a,
.footer-links a {
    color: #1e3c72 !important;
    text-decoration: none !important;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
    display: inline-block;
}

.footer-copyright .footer-links a:hover,
.footer-links a:hover {
    color: #2a5298 !important;
    border-bottom-color: #2a5298;
}

.footer-copyright .footer-links a:visited,
.footer-links a:visited {
    color: #5a7ba8 !important;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.footer-social a.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    color: #666;
    border: none;
    padding: 0;
}

.footer-social a.social-icon:hover {
    background-color: #e0e0e0;
    color: #333;
    transform: translateY(-2px);
}

.footer-social a.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Form */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2a5298;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #1e3c72;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

/* Alert Messages */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 200px 1fr;
    }
    
    .sidebar-right {
        display: none;
    }
    
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: #1e3c72;
        flex-direction: column;
        min-width: 200px;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        border-radius: 4px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .dropdown-menu {
        position: static;
        background: rgba(255,255,255,0.1);
        margin-top: 0.5rem;
    }
    
    .dropdown-menu a {
        color: white !important;
    }
    
    .dropdown-menu a:hover {
        background-color: rgba(255,255,255,0.2) !important;
        color: white !important;
    }
    
    .container {
        padding: 0;
    }
    
    .main-content {
        grid-template-columns: 1fr;
        padding: 1rem 0;
        gap: 1rem;
    }
    
    .content-area {
        border-radius: 0;
        padding: 1.5rem 1rem;
        overflow-x: hidden;
        max-width: 100%;
    }
    
    .project-detail {
        overflow-x: hidden;
        max-width: 100%;
        padding: 1.5rem 1rem;
    }
    
    .sidebar {
        margin-bottom: 0;
        border-radius: 0;
        padding: 1.5rem 1rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin: 1.5rem 0;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    /* Ottimizzazioni project-description per tablet */
    .project-description {
        overflow-x: hidden;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .project-description code {
        font-size: 0.88em;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: pre-wrap !important;
    }
    
    /* Ottimizzazioni tabelle FAQ per tablet */
    .faq-answer-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .faq-answer-content table {
        font-size: 13px;
    }
    
    .faq-answer-content table th,
    .faq-answer-content table td {
        padding: 10px 8px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0;
    }
    
    .main-content {
        padding: 0.5rem 0;
    }
    
    .content-area {
        padding: 1rem 0.75rem;
    }
    
    .sidebar {
        padding: 1rem 0.75rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        margin: 1rem 0;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    /* Ottimizzazioni project-description per mobile */
    .project-description {
        overflow-x: hidden !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    .project-description * {
        max-width: 100% !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }
    
    .project-description span {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        display: inline !important;
        max-width: 100% !important;
        white-space: normal !important;
    }
    
    .project-description code {
        font-size: 0.85em !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        white-space: pre-wrap !important;
        max-width: 100% !important;
        display: inline-block !important;
    }
    
    .project-description p {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    .project-description h1,
    .project-description h2,
    .project-description h3,
    .project-description h4 {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        font-size: clamp(1.2rem, 4vw, 1.8rem) !important;
    }
    
    .project-description ul,
    .project-description ol {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        margin-left: 1rem !important;
    }
    
    .project-description li {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
    }
    
    /* Ottimizzazioni tabelle FAQ per mobile */
    .faq-answer-content {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        max-width: 100%;
    }
    
    /* Wrapper per tabelle nelle FAQ - permette scroll orizzontale se necessario */
    .faq-answer-content table {
        font-size: 12px;
        width: 100%;
        min-width: 300px; /* Larghezza minima per mantenere leggibilità */
        table-layout: auto;
        display: table;
    }
    
    .faq-answer-content table th,
    .faq-answer-content table td {
        padding: 8px 6px;
        font-size: 12px;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
    }
    
    /* Prima colonna più stretta su mobile */
    .faq-answer-content table th:first-child,
    .faq-answer-content table td:first-child {
        min-width: 100px;
        max-width: 35%;
    }
    
    /* Ultime due colonne si dividono lo spazio rimanente */
    .faq-answer-content table th:nth-child(2),
    .faq-answer-content table td:nth-child(2),
    .faq-answer-content table th:nth-child(3),
    .faq-answer-content table td:nth-child(3) {
        min-width: 80px;
    }
    
    .faq-answer-content code {
        font-size: 0.85em;
        word-wrap: break-word;
        overflow-wrap: break-word;
        display: inline-block;
        max-width: 100%;
    }
}

