/*
Theme Name: Consigli Tributari Basic
Theme URI: https://www.consiglitributari.it/
Author: Bizmate (recreated from Joomla "basic" template by Netshine)
Author URI: https://www.bizmate.biz/
Description: Clean, table-less WordPress recreation of the classic Consigli Tributari Joomla "basic" template. Brand palette (#2627A6 / #000099), header logo, accessibility font-size controls (A+ / A- / RESET), optional left & right widget areas, Consigli Tributari footer. Keeps "Consigli Tributari" branding. Safe child-style fallback ready.
Version: 1.0.0
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: consiglitributari-basic
Tags: blog, custom-menu, custom-logo, one-column, two-columns, three-columns, left-sidebar, right-sidebar, accessibility-ready, translation-ready
*/

/* -------------------------------------------------------------------------
   Reset / base
   ---------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-size: 80%;                /* match original Joomla "basic" base; JS still scales 60-100% */
    font-family: Arial, Helvetica, sans-serif;
    text-align: left;
    color: #000000;
    background: #ffffff;
    line-height: 1.5;
}

img { border: 0; max-width: 100%; height: auto; }
input, textarea, select, button { font: inherit; }

a { color: #000099; }
a:hover, a:focus { color: #2627A6; }

td { text-align: left; }

/* -------------------------------------------------------------------------
   Layout
   ---------------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.header {
    background-color: #ffffff;
    background-position: left;
    background-repeat: no-repeat;
    padding: 5px;
    min-height: 85px;
    color: #000099;
    font-size: 2em;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.header .site-logo { max-height: 80px; width: auto; }
.header .site-title a { color: #000099; text-decoration: none; }
.header .user2 { float: right; }

.user3 { text-align: center; clear: both; margin: 8px 0; }

.topbar {
    margin-top: 5px;
    margin-bottom: 5px;
    padding: 5px;
    background-color: #EBF7FF;
    border: solid 1px #0000ff;
    clear: both;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
.topbar .accessibility { float: right; }
.topbar .pathway { font-size: 0.9em; }

/* main + sidebars */
.site-main { overflow: hidden; }

.mainbody { margin: 0; }
.mainbody-wide { margin: 0; }

.has-left .mainbody  { margin-left: 165px; }
.has-right .mainbody { margin-right: 165px; }
.has-left.has-right .mainbody { margin-left: 165px; margin-right: 165px; }

/* responsive: stack sidebars on small screens */
@media (max-width: 768px) {
    .left, .right { float: none; width: auto; margin: 5px 0; }
    .has-left .mainbody, .has-right .mainbody,
    .has-left.has-right .mainbody { margin-left: 0; margin-right: 0; }
}

.left {
    float: left;
    border: solid 1px #0000ff;
    padding: 5px;
    background-color: #EBF7FF;
    width: 145px;
    margin-right: 5px;
}
.right {
    float: right;
    border: solid 1px #0000ff;
    padding: 5px;
    background-color: #EBF7FF;
    width: 145px;
}

.banner { width: 468px; max-width: 100%; margin-left: auto; margin-right: auto; }

.footer {
    margin-top: 5px;
    border: solid 1px #0000ff;
    padding: 5px;
    clear: both;
}

/* -------------------------------------------------------------------------
   Accessibility font-size controls
   ---------------------------------------------------------------------- */
.accessibility .font-size-button a,
.accessibility .font-size-button button {
    display: inline-block;
    border: 1px solid #000000;
    margin: 1px;
    padding: 1px 6px;
    color: #000000;
    background: #ffffff;
    text-decoration: none;
    font-size: 0.8em;
    cursor: pointer;
}

/* -------------------------------------------------------------------------
   Content
   ---------------------------------------------------------------------- */
.contentheading,
.entry-title,
h1, h2, h3 { color: #000099; }
.entry-title { font-size: 1.4em; font-weight: bold; }
.contentheading { font-size: 1.2em; font-weight: bold; }

.small, .createdate, .modifydate, .entry-meta, .entry-footer {
    font-size: 0.8em;
    color: #999999;
}

article, .post, .page { margin-bottom: 1.5em; }

.wp-caption, .mosimage_caption {
    background-color: #eeeeee;
    border: solid 1px #999999;
    font-size: 0.9em;
    font-weight: bold;
    margin: 3px;
    padding: 3px;
    max-width: 100%;
}
.wp-caption-text, .mosimage_caption { margin: 0; padding: 1px 3px; }

.alignleft { float: left; margin: 0 12px 8px 0; }
.alignright { float: right; margin: 0 0 8px 12px; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignnone { float: none; }

.sticky { border: 1px solid #D3EDFE; padding: 8px; }

.gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.gallery-item { flex: 1 1 150px; }

/* -------------------------------------------------------------------------
   Menus (Joomla ul.menu -> WP menu)
   ---------------------------------------------------------------------- */
ul.menu, ul.mainlevel,
.widget ul, .wp-block-categories-list, .wp-block-latest-posts {
    list-style: none;
    margin: 0;
    padding: 0;
}

ul.menu > li,
ul.mainlevel > li,
a.mainlevel, a.mainlevel:link, a.mainlevel:visited {
    display: block;
    text-decoration: none;
    background-color: #D3EDFE;
    padding: 2px;
    color: #000099;
    border: solid 1px #2627A6;
    white-space: nowrap;
    margin-top: 3px;
}
ul.menu > li > a, a.mainlevel { display: block; padding: 2px; color: #000099; }

ul.menu > li:hover, ul.menu > li > a:hover,
ul.menu .current-menu-item, ul.menu .current-menu-item > a,
a.mainlevel:hover, .active_menu, .active_menu:hover, #active_menu, #active_menu:hover {
    background-color: #2627A6;
    color: #ffffff;
}
ul.menu .current-menu-item > a,
#active_menu { background-color: #ffffff; color: #000099; }

ul.menu-top, ul.menu-top li { list-style: none; }
ul.menu-top { display: inline; font: small-caps 12px arial; padding: 0; }
ul.menu-top li { display: inline; padding: 0 10px; margin: 0 3px; border: 1px solid #000; font: small-caps 900 12px arial; }

/* WP primary menu rendered in sidebars */
ul.menu li ul, .widget ul ul { padding-left: 12px; }

/* -------------------------------------------------------------------------
   Widgets / moduletable
   ---------------------------------------------------------------------- */
table.moduletable { margin-bottom: 20px; }
.widget { margin-bottom: 20px; }
.widgettitle, .widget-title { font-size: 1em; font-weight: bold; color: #000099; }

ul.latestnews { list-style: none; padding: 0; margin: 0; }
ul.latestnews li { list-style: none outside url('images/euro_sign_15px.gif'); padding-bottom: 5px; }
.latestnews { text-transform: lowercase; padding-bottom: 5px; }

/* -------------------------------------------------------------------------
   Inputs (Joomla inputbox)
   ---------------------------------------------------------------------- */
.input { border: none; }
.inputbox, input[type="text"], input[type="search"], input[type="email"], textarea, select {
    color: #781351;
    background: #fee3ad;
    border: 1px solid #781351;
    padding: 3px;
}
button, input[type="submit"], input[type="button"], .wp-block-button__link {
    background: #2627A6; color: #ffffff; border: 1px solid #000099; padding: 4px 10px; cursor: pointer;
}
button:hover, input[type="submit"]:hover { background: #000099; }

/* -------------------------------------------------------------------------
   Pagination / nav
   ---------------------------------------------------------------------- */
.navigation, .posts-navigation, .post-navigation, .page-numbers { margin: 1em 0; }
.page-numbers a, .nav-links a { color: #000099; }

/* -------------------------------------------------------------------------
   Comments
   ---------------------------------------------------------------------- */
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; }
.bypostauthor { border-left: 3px solid #2627A6; padding-left: 8px; }

/* -------------------------------------------------------------------------
   Footer copyright (Joomla "copyright")
   ---------------------------------------------------------------------- */
.copyright {
    margin-left: auto;
    margin-right: auto;
    width: 350px;
    max-width: 100%;
    text-align: center;
    font-size: 0.8em;
    color: #999999;
}
.copyright a, .copyright a:visited { color: #999999; }

/* -------------------------------------------------------------------------
   Accessibility helpers
   ---------------------------------------------------------------------- */
.screen-reader-text {
    border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
    height: 1px; margin: -1px; overflow: hidden; padding: 0;
    position: absolute; width: 1px; word-wrap: normal;
}
.screen-reader-text:focus {
    background: #ffffff; clip: auto; clip-path: none; color: #000099;
    display: block; height: auto; left: 5px; top: 5px; width: auto; z-index: 100000; padding: 8px;
}

/* -------------------------------------------------------------------------
   Block editor niceties
   ---------------------------------------------------------------------- */
.wp-block-quote { border-left: 4px solid #2627A6; padding-left: 12px; }
.has-text-align-center { text-align: center; }
.has-text-align-right { text-align: right; }
.has-text-align-left { text-align: left; }
