/* ==========================================================================
   Sport e andicap Ticino – correzioni al tema originale e responsive
   ========================================================================== */

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
img { max-width: 100%; height: auto; }
.full-width { width: 100%; }
.text-center { text-align: center; }
.naming-spacer { height: 30px; }
a:focus-visible, button:focus-visible { outline: 3px solid #f6b93b; outline-offset: 2px; }

/* ---------------------------------------------------------------- menu */
#main-menu ul.sf-menu { float: right; width: auto; text-align: right; }
#main-menu ul.sf-menu > li { float: left; }
#main-menu ul.sf-menu ul { text-align: left; }
#main-menu ul.sf-menu li.current_page_item > a { color: #f6b93b; }
.sah-menu-toggle { display: none; }

/* --------------------------------------------------------- sottomenu */
#subMenu a.active { text-decoration: underline; }

/* --------------------------------------------------------- contenuti */
.page-content .frame { margin-bottom: 20px; }
.page-content .ce-bodytext ul,
.blog-content ul { margin-left: 20px; list-style: disc; }
.page-content .ce-bodytext ol,
.blog-content ol { margin-left: 20px; list-style: decimal; }
.sah-box { background: #f8f6f2; border-left: 4px solid green; padding: 15px 20px; margin: 10px 0 20px; }
.sah-box dt { font-weight: bold; margin-top: 10px; }
.sah-back { margin: 20px 0; }
.sah-shadow { box-shadow: 3px 3px 3px #666; }
.sah-plugin::after, .page-content::after { content: ""; display: table; clear: both; }

/* ---------------------------------------------- schede delle attività */
.portfolio-thumb { background: #fff; }
.portfolio-thumb .smallImg { background: orange; }
.portfolio-thumb a { display: block; color: inherit; }
.portfolio-thumb h3.widgetfooter { padding-left: 10px !important; box-sizing: border-box; }
.portfolio-thumb h3.widgetfooter span { max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sah-noresults { padding: 20px; background: #fff7e0; border: 1px solid #f6b93b; text-align: center; }
.sah-noresults[hidden] { display: none; }
.riepilogoSelezione .sah-reset { margin-left: 15px; font-size: 13px; color: green; text-decoration: underline; }
.filtercolumn.is-collapsed .option-combo { display: none; }
.filtercolumn .filterheader a::after { content: " ▾"; font-size: 12px; }
.filtercolumn.is-collapsed .filterheader a::after { content: " ▸"; }

/* ------------------------------------------------- griglia sport */
.sah-grid .column.one-fourth:nth-child(4n) { margin-right: 0; }
.sah-grid .column.one-fourth:nth-child(4n+1) { clear: left; }

/* ---------------------------------------------- dettaglio sport */
.sah-sport-media { position: relative; }
.sah-sport-badge { width: 160px; right: 10px; top: 10px; }

/* -------------------------------------------- tabella società */
.sah-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid-view table.items { width: 100%; border-collapse: collapse; }
.grid-view table.items th, .grid-view table.items td { padding: 6px 8px; text-align: left; vertical-align: top; }
.grid-view table.items tr.odd { background: #f8f8f8; }
.grid-view table.items ul { margin: 0; padding-left: 15px; list-style: disc; }
.sort-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline; }
.sort-link.asc::after { content: " ▲"; font-size: 10px; }
.sort-link.desc::after { content: " ▼"; font-size: 10px; }

/* ------------------------------------------------------- mappe */
.sah-map { width: 100%; height: 440px; z-index: 1; }
.sah-map--large { height: 650px; }
.sah-map--single { height: 360px; margin-top: 10px; }
.sah-map-embed { position: relative; padding-top: 62%; }
.sah-map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sah-popup a { font-weight: bold; }
.page-content iframe { max-width: 100%; }

/* ------------------------------------------------- fotogallery */
.sah-gallery ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.sah-gallery img { display: block; width: 100%; }

/* ------------------------------------------------------- news */
.blog-item .date-comment-wrapper { left: 0; }
.sah-sport-media .date-comment-wrapper { left: auto; }
.date-comment-wrapper .date { display: block; background: #4a4a4a; }
.list-view .summary { text-align: right; }
.date-comment-wrapper .date .day, .date-comment-wrapper .date .month-year { color: #fff; }
.date-comment-wrapper .date .month-name { color: yellow; }
.blog-categories { color: #555; }
.blog-content { color: #555; }
.example_c { color: #494949 !important; text-transform: uppercase; text-decoration: none; background: #fff; padding: 10px; border: 1px solid #508000 !important; display: inline-block; transition: all .4s ease 0s; margin: 0 10px 10px 0; }
.example_c:hover { color: #fff !important; background: #f6b93b; }
.pager ul.yiiPager { display: inline; margin: 0; padding: 0; }
.pager ul.yiiPager li { display: inline-block; margin: 0 2px; }
.pager ul.yiiPager li a { display: inline-block; padding: 2px 8px; border: 1px solid #ccc; }
.pager ul.yiiPager li.selected a { background: green; color: #fff; border-color: green; }

/* ------------------------------------------------------ form */
.page-content form .form-group { margin-bottom: 12px; }
.page-content form label { display: block; font-weight: bold; margin-bottom: 4px; }
.page-content form input[type="text"], .page-content form input[type="email"], .page-content form input[type="date"], .page-content form textarea { width: 100%; max-width: 600px; box-sizing: border-box; padding: 8px; border: 1px solid #ccc; }
.page-content form .form-check label, .page-content form .form-check-label { display: inline; font-weight: normal; }
.page-content form button[type="submit"], .page-content form .btn-primary { background: green; color: #fff; border: 0; padding: 10px 25px; font-size: 18px; cursor: pointer; }
.page-content form .error, .page-content form .help-block { color: #c00; }

/* ------------------------------------------------------ footer */
.footer-copyright a.footer-brand { color: yellow; }
.footer-copyright a.footer-private { color: #fff; }

/* ===================================================== RESPONSIVE */
@media only screen and (max-width: 959px) {
  .sah-map--large { height: 500px; }
}

@media only screen and (max-width: 767px) {
  /* il tema originale usava contenitori fissi da 420px / 260px: qui diventano fluidi */
  .container { width: auto !important; max-width: 100%; padding: 0 16px; box-sizing: border-box; }
  .container .container { padding: 0; }
  .content, .sidebar { width: 100% !important; float: none; }
  .sidebar.right-sidebar { margin: 30px 0 0; }
  .column, .column.last { width: 100% !important; margin-right: 0 !important; float: none; }
  .sah-cards .column.one-fourth { width: 100% !important; }
  .sah-grid .column.one-fourth { width: 48% !important; float: left; margin-right: 4% !important; }
  .sah-grid .column.one-fourth:nth-child(2n) { margin-right: 0 !important; }
  .sah-grid .column.one-fourth:nth-child(2n+1) { clear: left; }

  #main-menu { height: auto; }
  #main-menu ul.sf-menu { display: none; float: none; width: 100%; text-align: left; }
  #main-menu.is-open ul.sf-menu { display: block; }
  #main-menu ul.sf-menu > li { float: none; display: block; border-bottom: 1px solid rgba(255,255,255,.15); }
  #main-menu ul.sf-menu ul { position: static !important; display: block !important; visibility: visible !important; width: auto !important; padding-left: 20px; background: transparent; box-shadow: none; }
  #main-menu ul.sf-menu { background: #191919; }
  #main-menu ul.sf-menu li, #main-menu ul.sf-menu li:hover { background: transparent; border-bottom-width: 0; }
  #main-menu ul.sf-menu li { float: none !important; display: block; width: auto !important; clear: both; }
  #main-menu ul.sf-menu ul { float: none !important; margin: 0; }
  #main-menu ul li a, #main-menu ul ul li a { line-height: 44px; display: block; color: #fff !important; background: transparent !important; padding: 0 16px !important; }
  #main-menu ul li a:hover, #main-menu ul li a:focus, #main-menu ul.sf-menu li.current_page_item > a { color: #fde012 !important; background: #262626 !important; }
  .sah-menu-toggle { display: block; width: 100%; margin: 8px 0; padding: 8px 12px; background: #191919; color: #fff; border: 0; font: 20px 'Yanone Kaffeesatz', sans-serif; text-align: left; cursor: pointer; }
  .sah-menu-icon, .sah-menu-icon::before, .sah-menu-icon::after { display: inline-block; width: 22px; height: 2px; background: #fff; position: relative; vertical-align: middle; content: ""; }
  .sah-menu-icon::before { position: absolute; top: -7px; left: 0; }
  .sah-menu-icon::after { position: absolute; top: 7px; left: 0; }
  .mobile-menu { display: none !important; }

  /* logo: da assoluto (sovrapposto al titolo) a blocco centrato sopra il titolo */
  section#main { background: #f8f6f9 !important; }
  .portfolio-container { padding: 0 !important; margin-left: 0 !important; margin-right: 0 !important; }
  .portfolio-container .elemento-filtrabile { margin-left: 0 !important; }
  /* logo: come nel tema originale è lo sfondo della fascia titolo, ma centrato sopra al testo */
  #naming { display: none; }
  section.main-title { background: #999 url(../Theme/skins/inclusioneandicapticino/images/logo_iat_home.png) 50% 0 no-repeat !important; background-size: 180px auto !important; padding-top: 128px !important; }
  .date-comment-wrapper .comment { display: inline-block; vertical-align: top; margin-right: 4px; }
  #main-menu { margin-bottom: 0; }
  .home-services .column { width: 100% !important; }
  section.main-title div.container h1, section.main-title div.container h2, #naming h1 {
    padding: 0 !important; max-height: none !important; white-space: normal; text-align: center;
  }
  section.main-title div.container h1 { font-size: 26px; line-height: 1.2 !important; margin-top: 10px !important; }
  section.main-title div.container h2 { font-size: 18px; line-height: 1.3 !important; padding-bottom: 8px !important; }

  /* filtri: niente altezza fissa e foto di sfondo, colonne impilate e richiudibili */
  #options { height: auto !important; min-height: 0 !important; max-height: none !important; background: none !important; }
  div.filtercolumn { width: 100% !important; min-width: 0 !important; max-width: none !important; height: auto !important; min-height: 0 !important; max-height: none !important; float: none; margin-bottom: 2px !important; }
  div.filtercolumn .option-set { opacity: 1; }
  .riepilogoSelezione .titolo { line-height: 1.8; }
  .sah-sport-badge { position: static; width: auto; }
  .sah-map, .sah-map--large { height: 380px; }
  .date-comment-wrapper { position: static !important; margin-bottom: 10px; }
  .blog-item .blog-content-wrapper { margin-left: 0 !important; }
  .home-services .column { margin-bottom: 10px !important; }
  #subMenu > div > a { display: inline-block; margin-bottom: 6px; }
}

@media only screen and (max-width: 479px) {
  .sah-grid .column.one-fourth { width: 100% !important; margin-right: 0 !important; float: none; }
}
