/* ==========================================================================
   AziendeInTasca
   ========================================================================== */
/* Stile per lo Skip Link di Accessibilità WCAG (Versione Definitiva) */
.skip-link {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link:focus,
.skip-link:focus-visible {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    padding: 15px 25px;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: #0d6efd;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    z-index: 99999;
}

/* Classe per nascondere elementi visivamente ma mantenerli per screen reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
/* === Reset e Stili Globali === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 112.5%;
}

body {
    background-color: #d8e8f5;
    color: #303030;
    font-family: "Arial", "Verdana", "Tahoma", sans-serif;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 10px;
    text-align: left; /* Fix Firefox mobile: previene text-justify ereditato */
}

/* === Fix Firefox Mobile - Tabelle === */
table {
    table-layout: fixed;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* === Layout Principale === */
#wrapper {
    width: 100%;
    max-width: 960px;
    background: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

header, #container, footer {
    padding: 20px 30px;
}

/* === Header === */
header {
    text-align: center;
    padding-bottom: 0;
    margin-bottom: 20px;
}

header img {
    max-width: 100%;
    height: auto;
    display: block;
    /* Centratura loghi più stretti del contenitore (es. loghi custom scheda azienda):
       img block non si centra col text-align del genitore — fix 24/07/2026,
       doc: /docs/file-md/assets/20260724-fix-centratura-logo-header.md */
    margin-left: auto;
    margin-right: auto;
}

/* === Navigazione (Menu) === */
nav {
    width: 100%;
    background: #343a40;
    padding: 5px 0;
}

/* Spazio sotto il menu principale */
nav[role="navigation"] {
    margin-bottom: 20px;
}

nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap; /* Per andare a capo su schermi piccoli */
}

nav a {
    display: block;
    padding: 15px 25px;
    color: #fff;
    font-size: 1.1em;
    text-transform: uppercase;
    text-decoration: none;
}

nav a:hover, nav a:focus {
    background: #007bff;
    color: #fff;
}

/* === Contenuto Principale === */
#content {
    padding: 20px 0;
}

h1 {
    font-size: 2.2em;
    font-weight: bold;
    text-align: center;
    color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */
    margin-bottom: 25px;
}

.post .entry-title {
    font-weight: bold;
    font-size: 1.8em;
    margin-bottom: 15px;
    color: #343a40;
}

p {
    margin-bottom: 1.5em;
}

strong {
    font-weight: bold;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 30px 0;
}

a {
    color: #3e75b9;
    text-decoration: none;
}

a:hover, a:focus {
    color: #416695;
    text-decoration: underline;
}

/* === Navigazione (Menu) Migliorato === */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

nav li {
    position: relative;
}

nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    color: #fff;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
}

nav a:hover, nav a:focus {
    background: #005faa; /* WCAG fix: da #007bff - contrasto 5.2:1 con testo bianco */
    color: #fff;
}

nav a.active {
    background: #004a94; /* WCAG fix: da #007bff - contrasto 7.0:1 con testo bianco */
    font-weight: bold;
}

nav .nav-separator {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.3);
    margin: 0 10px;
}

nav .nav-cta {
    background: #28a745;
    border-radius: 20px;
    padding: 10px 20px;
}

nav .nav-cta:hover {
    background: #218838;
}

nav .nav-cta-user {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 10px 20px;
}

nav .nav-cta-user:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* === Breadcrumbs === */
.breadcrumbs {
    padding: 8px 0;
    margin-bottom: 20px;
    background: transparent;
}

.breadcrumbs ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    font-size: 13px;
    align-items: center;
}

.breadcrumbs li {
    display: inline-flex;
    align-items: center;
    color: #6c757d;
}

.breadcrumbs a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumbs a:hover {
    color: #007bff;
}

.breadcrumbs a:focus-visible {
    outline: 2px solid #007bff;
    outline-offset: 2px;
    border-radius: 2px;
}

.breadcrumbs [aria-current="page"] {
    color: #212529;
    font-weight: 500;
}

/* Nasconde il separatore generato da breadcrumbs.php (già presente nel markup) */
.breadcrumbs li span[aria-hidden="true"] {
    margin: 0 4px;
    color: #adb5bd;
}

/* === Footer === */
footer {
    background: #343a40;
    color: #fff;
    text-align: center;
    font-size: 0.9em;
}

footer .footer-container {
    max-width: 960px;
    margin: 0 auto;
}

footer section,
footer address {
    margin-bottom: 2em;
}

footer h2 {
    color: #fff;
    font-size: 1.3em;
    margin-bottom: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

footer address {
    font-style: normal;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

footer a:hover, 
footer a:focus { 
    color: #adb5bd; 
}

footer p { 
    margin-bottom: 0.8em;
    line-height: 1.6;
}

footer .cookie-notice {
    font-size: 0.8em;
    color: rgba(255,255,255,0.7);
    margin-top: 1em;
    margin-bottom: 1em;
}

footer .copyright,
footer .copyright-notice {
    margin-bottom: 0.5em;
}

footer nav {
    background: transparent;
    padding: 0;
    margin-top: 1em;
}

footer .policy-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin: 0;
}



footer .policy-links a {
    font-size: 0.9em;
}

/* === Pulsante WhatsApp Footer === */
footer .footer__whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1em;
    line-height: 1.2;
}

footer .footer__whatsapp-btn:hover,
footer .footer__whatsapp-btn:focus {
    background: #128c7e;
    color: #fff;
    text-decoration: none;
}

footer .footer__whatsapp-btn:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

footer .footer__whatsapp-btn .fa-whatsapp {
    font-size: 1.3em;
}

footer .footer__whatsapp-notice {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    max-width: 500px;
    margin: 8px auto 18px;
}

/* === Pulsanti CTA === */
.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin: 30px 0;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1em;
}

.btn-primary {
    background: #004a94; /* WCAG fix: da #007bff - contrasto 7.0:1 con bianco */
    color: #fff;
}

.btn-primary:hover {
    background: #003d7a;
}

.btn-secondary {
    background: #28a745;
    color: #fff;
}

.btn-secondary:hover {
    background: #218838;
}


/* ==========================================================================
   STILI AGGIUNTIVI PER PAGINE "VANTAGGI" e "OPPORTUNITA'"
   ========================================================================== */

/* Stili per la pagina La Tua Opportunità */
#opportunita-page h1, #opportunita-page h2, #opportunita-page h3, #opportunita-page h4 {
    color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}
#opportunita-page h1 { font-size: 2.3em; text-align: center; border-bottom: 2px solid #e9ecef; padding-bottom: 1rem; margin-top: 0; }
#opportunita-page h2 { font-size: 1.8em; border-bottom: 2px solid #e9ecef; padding-bottom: 0.6rem; text-align: center; }
#opportunita-page h3 { font-size: 1.4em; border-bottom: 1px dashed #dee2e6; padding-bottom: 0.4rem; }
#opportunita-page p > strong, #opportunita-page ul > li > strong { color: #D8A400; font-weight: 700; }
#opportunita-page blockquote {
    border-left: 4px solid #007bff; padding: 1rem 1.5rem; margin: 1.5rem 0;
    font-style: italic; color: #555; background-color: #f8f9fa; border-radius: 0 8px 8px 0;
}
#opportunita-page table {
    width: 100%; border-collapse: collapse; margin: 2rem 0;
}
#opportunita-page th, #opportunita-page td { padding: 0.9rem 1rem; text-align: left; border: 1px solid #dee2e6; }
#opportunita-page th { background-color: #b0c4de; color: #0056b3; font-weight: 700; }
#opportunita-page tbody tr:nth-child(even) { background-color: #e9ecef; }
#opportunita-page ul { margin-left: 1.5em; }

/* Stili per la pagina Vantaggi (Landing Page) */
.landing-intro { text-align: center; margin-bottom: 30px; }
.landing-intro .subtitle { font-size: 1.3em; color: #555; max-width: 700px; margin: 0 auto; }
.section { padding: 30px 0; }
.section h2 { 
    font-size: 2em; 
    text-align: center; 
    color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */
    margin-bottom: 40px; 
}
.benefits-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.benefit-category { background: #f8f9fa; padding: 25px; border-radius: 8px; border-left: 4px solid #007bff; }
.benefit-category h4 { font-size: 1.4em; color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */ margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.benefits-list { list-style: none; padding: 0; }
.benefits-list li { display: flex; gap: 15px; margin-bottom: 15px; }
.benefits-list .icon { color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */ font-size: 1.1em; margin-top: 4px; }
.benefits-list .text strong { display: block; color: #343a40; }
.benefits-list .text span { font-size: 0.9em; color: #555; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.feature-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; padding: 25px; text-align: center; }
.feature-card .icon { font-size: 2.5em; color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */ margin-bottom: 15px; }
.feature-card h4 { 
    font-size: 1.2em; 
    color: #0056b3;
    margin-bottom: 10px; 
}
.pricing-section { padding: 40px 30px; border-radius: 8px; }
.pricing-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.price-box { text-align: center; border: 1px solid #ccc; padding: 25px; border-radius: 8px; background: #fff; }
.price-period { font-size: 1.1em; font-weight: bold; color: #555; }
.price { font-size: 3.5em; font-weight: bold; color: #007bff; }
.price-note { margin-top: 10px; font-size: 0.9em; background-color: #e9ecef; padding: 10px; border-radius: 5px; }
.testimonial-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.testimonial-card { background: #f8f9fa; padding: 25px; border-radius: 8px; border-left: 4px solid #007bff; }
.testimonial-card p { font-style: italic; margin-bottom: 15px; }
.testimonial-author { display: flex; align-items: center; gap: 10px; }
.author-avatar { width: 45px; height: 45px; background: #007bff; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; }
.author-info strong { display: block; }
.author-info small { color: #555; }
.faq-container details { margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 15px; }
.faq-container summary { font-weight: bold; color: #0056b3; /* WCAG fix: da #3e75b9 (4.2:1) - contrasto 6.4:1 su bianco */ cursor: pointer; font-size: 1.1em; }
.faq-container p { margin-top: 10px; padding-left: 20px; }
.cta-section { background: #343a40; color: #fff; text-align: center; padding: 40px 30px; border-radius: 8px; }
.cta-section h2 { color: #fff; }
.cta-note { font-size: 0.9em; margin-top: 20px; }

.post h1, 
.post h2 {
    color: #0056b3; /* WCAG fix: da #007bff - contrasto 6.4:1 su bianco */
}

.post h3,
.post h4 {
    color: #303030;
}

.story-subtitle {
    text-align: center;
    font-size: 1em;
    color: #555;
    font-weight: bold;
    margin-top: -15px;
}

.final-cta {
    margin-top: 40px;
    padding: 30px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
    text-align: center;
}

.final-cta p {
    font-size: 1.1em;
}

.post p > strong {
    color: #D8A400;
}

.story-header {
    padding: 30px 20px;
    margin-bottom: 25px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 0 8px 8px 0;
}

/* === Menu Mobile Toggle === */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 15px;
    margin: 0 auto;
}

.menu-toggle:focus-visible {
    outline: 3px solid #007bff;
    outline-offset: 2px;
}

.menu-toggle__icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
}

.menu-toggle__icon span {
    display: block;
    height: 3px;
    background: #fff;
    border-radius: 2px;
}

/* Hamburger animazione quando aperto */
.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === Bottone Accedi/Esci rapido (solo mobile) === */
.nav-mobile-bar {
    display: none; /* desktop: invariato, l'hamburger resta nascosto */
}

.nav-quick-auth {
    display: none; /* compare solo dentro la barra mobile */
}

@media (max-width: 768px) {
    .nav-mobile-bar {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .nav-mobile-bar .menu-toggle {
        margin: 0; /* annulla il margin auto su mobile per affiancare il bottone */
    }

    .nav-quick-auth {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #004a94; /* contrasto 7:1 con testo bianco (WCAG) */
        color: #fff;
        font-weight: bold;
        padding: 10px 18px;
        border-radius: 20px;
        text-decoration: none;
        font-size: 1em;
        min-width: 0;
        overflow-wrap: break-word;
    }

    .nav-quick-auth:hover,
    .nav-quick-auth:focus {
        background: #003d7a;
        color: #fff;
    }

    .nav-quick-auth:focus-visible {
        outline: 3px solid #fff;
        outline-offset: 2px;
    }
}

/* === Media Queries === */
@media (max-width: 900px) {
    .features-grid, .testimonial-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    body { padding: 0; }
    #wrapper { border-radius: 0; box-shadow: none; overflow: visible; }
    header, footer { padding-left: 12px; padding-right: 12px; }
    #container, main { padding-left: 12px; padding-right: 12px; } /* Padding mobile bilanciato per leggibilità */
    #content { padding: 0; }
    h1 { font-size: 1.8em; }
    .post .entry-title { font-size: 1.5em; }
    
    /* Menu mobile collassabile */
    .menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    nav[role="navigation"] {
        position: relative;
    }
    
    nav[role="navigation"] ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        padding: 0;
    }
    
    nav[role="navigation"] ul.is-open {
        display: flex;
    }
    
    nav[role="navigation"] li {
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    nav[role="navigation"] li:last-child {
        border-bottom: none;
    }
    
    nav[role="navigation"] a {
        padding: 14px 20px;
        width: 100%;
        text-align: left;
        border-radius: 0;
        min-width: 0; /* Fix Firefox mobile: previene overflow testo menu */
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .benefits-grid, .pricing-grid, .features-grid, .testimonial-grid { grid-template-columns: 1fr; }
    .cta-buttons { flex-direction: column; }
    .btn { width: 100%; max-width: 300px; }
}

@media screen and (max-width: 768px) {
  #opportunita-page table {
    border: 0;
  }
  
  #opportunita-page table thead {
    border: none;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
  }
  
  #opportunita-page table tr {
    display: block;
    margin-bottom: 2em;
    border-bottom: 2px solid #007bff;
  }
  
  #opportunita-page table td {
    display: block;
    text-align: left;
    border-bottom: 1px dotted #ccc;
    padding-top: 10px;
  }
  
  #opportunita-page table td::before {
    content: attr(data-label);
    display: block;
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 5px;
  }

  #opportunita-page table td:last-child {
    border-bottom: 0;
  }
}
