/*
Theme Name: Castrum Serravalle
Theme URI: https://castrumdiserravalle.com 
Author: zadù
Description: Tema personalizzato per il sito Castrum Serravalle. Block theme leggero, pronto per l'editor a blocchi di WordPress.
Tested up to: 6.8
Requires PHP: 8.3
Version: 1.0.0
Tags: full-site-editing, block-patterns, custom-colors, custom-menu, custom-logo, editor-style, featured-images, wide-blocks, blog
Text Domain: wpa-theme
Domain Path: /languages
*/
/*--------------------------------------------------------------
  >>> TABLE OF CONTENTS:
  ----------------------------------------------------------------

  	0. 	CSS Reset
  	1. 	Document Setup
  	2. 	Element Base
  	3. 	Helper Classes
  	4. 	Site Header
  	5. 	Menu Modal
  	6. 	Search Modal
  	7. 	Page Templates
  		a. 	Template: Cover Template
  		c. 	Template: Full Width
  	8.  Post: Archive
  	9.  Post: Single
  	10. Blocks
  	11. Entry Content
  	12. Comments
  	13. Site Pagination
  	14. Error 404
  	15. Widgets
  	16. Site Footer
  	17. Media Queries

  ----------------------------------------------------------------------------- */


/* -------------------------------------------------------------------------- */


/*	0. CSS Reset
  /* -------------------------------------------------------------------------- */


/* =WordPress Core
-------------------------------------------------------------- */

.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    /* Image does not overflow the content area */
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

.wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    margin: 0;
    padding: 0 4px 5px;
}


/* Text meant only for screen readers. */

.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 !important;
    width: 1px;
    word-wrap: normal !important;
    /* Many screen reader and browser combinations announce broken words as they would appear visually. */
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
    /* Above WP toolbar. */
}

.nav a:focus {
    border: 1px solid #fff;
    background: #fff;
    color: #000;
}

.menu-item-has-children:focus-within>.sub-menu {
    display: block;
}


/* Focus visibile su logo */

.logo:focus,
.logo:focus-visible,
.logo-mobile:focus,
.logo-mobile:focus-visible {
    outline: 3px solid #ff4081;
    /* colore acceso (rosa in stile brand) */
    outline-offset: 4px;
    /* distanza dal bordo */
    border-radius: 4px;
    /* bordi leggermente arrotondati */
    transition: outline 0.2s ease-in-out;
}

#right-menu-button:focus,
#right-menu-button:focus-visible {
    outline: 3px solid #ff4081;
    /* colore evidenziato (puoi cambiarlo con il brand) */
    outline-offset: 4px;
    /* distanza dal pulsante */
    border-radius: 6px;
    /* leggero highlight */
    transition: outline 0.2s ease, background-color 0.2s ease;
}

a:focus,
a:focus-visible {
    outline: 3px solid #ffcc00;
    /* colore giallo accessibile */
    outline-offset: 4px;
    /* spazio tra bordo e pulsante */
    border-radius: 6px;
    /* angoli morbidi */
    box-shadow: 0 0 6px rgba(255, 204, 0, 0.7);
    /* alone di luce */
    background-color: rgba(255, 204, 0, 0.15);
    /* highlight leggero */
    transition: outline 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    color: #25252d;
}
/* Focus visibile sul bottone menu per accessibilità da tastiera */
#nav-toggle:focus,
#nav-toggle:focus-visible {
    outline: 3px solid #ff4081; /* Il tuo colore brandizzato */
    outline-offset: 4px; /* Crea un po' di spazio tra il bordo e il pulsante */
    border-radius: 6px; /* Ammorbidisce gli angoli del riquadro */
    background-color: rgba(255, 64, 129, 0.05); /* Un leggerissimo sfondo per enfatizzare il focus */
    transition: outline 0.2s ease, background-color 0.2s ease;
}