/*!
Theme Name: Giovani Plus
Theme URI: https://giovaniplus.it/
Author: Giovani Plus Ascoli Piceno
Author URI: https://giovaniplus.it/
Description: Tema WordPress per il progetto Giovani Plus Ascoli Piceno. Costruito sulla stessa struttura del tema LAP.
Version: 1.0.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: giovaniplus
Tags: custom-logo, custom-menu, featured-images, translation-ready
*/

:root {
    --orange: #F5A000;
    --crimson: #C2004A;
    --orange-light: #FFF8EC;
    --crimson-light: #FDF0F4;
    --grey-bg: #f8f9fa;
    --text-primary: #202124;
    --text-secondary: #5f6368;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    margin: 0;
    padding: 0;
}
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Navbar */
.navbar {
    background: #fff;
    border-bottom: 1px solid #e8eaed;
    padding: 12px 0;
}
.navbar-brand img {
    height: 56px;
}
@media (max-width: 991px) {
    .navbar-brand img {
        height: 36px;
    }
}
.navbar .nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 6px 20px !important;
    letter-spacing: 0.01em;
    transition: color 0.2s;
    margin: 0 4px;
}
.navbar .nav-link:hover {
    color: var(--text-primary) !important;
}
.navbar .nav-item:last-child .nav-link {
    background: var(--crimson);
    color: #fff !important;
    padding: 8px 22px !important;
    margin-left: 8px;
}
.navbar .nav-item:last-child .nav-link:hover {
    background: #a80040;
    color: #fff !important;
}

/* Hero */
.hero {
    background: var(--crimson);
    color: #fff;
    padding: 100px 0 120px;
}
.hero h1 {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    /*max-width: 600px;*/
}
.hero .lead {
    font-size: 18px;
    line-height: 1.7;
    opacity: 0.88;
    /*max-width: 480px;*/
    margin-top: 28px;
    margin-bottom: 48px;
    font-weight: 400;
}
.btn-hero {
    background: #fff;
    color: var(--crimson);
    font-weight: 600;
    padding: 14px 32px;
    border: none;
    font-size: 15px;
    letter-spacing: 0.01em;
    border-radius: 4px;
    transition: background 0.15s;
}
.btn-hero:hover {
    background: #f1f1f1;
    color: var(--crimson);
}

/* Sezioni */
.section-lg {
    padding: 100px 0;
}

/* Titoli sezione */
.section-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-bottom: 20px;
}
.section-subtitle {
    color: var(--text-secondary);
    font-size: 17px;
    line-height: 1.7;
    /*max-width: 560px;*/
}

.text-orange { color: var(--orange); }
.text-crimson { color: var(--crimson); }
.bg-orange { background-color: var(--orange) !important; }
.bg-crimson { background-color: var(--crimson) !important; }

/* Card servizi */
.card-servizio {
    text-align: center;
    padding: 48px 32px;
    background: var(--grey-bg);
    transition: background 0.2s;
}
.card-servizio:hover {
    background: #f0f0f0;
}

.introsec .icon-wrap,
.card-servizio .icon-wrap {
    font-size: 40px;
    margin-bottom: 28px;
}
.card-servizio h5 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 14px;
}
.card-servizio p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}
.card-servizio .btn-link {
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
}

/* Sezione alternata */
.section-alt {
    background: var(--grey-bg);
}

/* Testo corpo */
.body-text {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
}

article.post a{
    color: var(--crimson);
}

/* InformaGiovani lista */
.ig-list li {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px 24px;
    background: #fff;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.5;
}
.accordion .ig-icon,
.ig-list li .ig-icon {
    font-size: 22px;
    color: var(--orange);
    flex-shrink: 0;
}
.ig-list li .ig-icon {
    margin-top: 2px;
}
.ig-list li strong {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}
.accordion span.ig-desc{
    color: var(--text-secondary);
}
.ig-list li span.ig-desc {
    color: var(--text-secondary);
    font-size: 13px;
}

/* Detail card percorsi */
.detail-card {
    padding: 36px 32px;
    background: #fff;
    border: 1px solid #e8eaed;
    height: 100%;
}
.row .detail-card {
    height: auto;
}
.detail-card h5 {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 22px;
    margin-bottom: 16px;
}
.detail-card p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.7;
}
.detail-card .badge-tag {
    display: inline-block;
    background: var(--orange-light);
    color: var(--orange);
    font-weight: 600;
    padding: 6px 14px;
    font-size: 13px;
    margin-bottom: 20px;
}
.detail-card ul {
    margin-top: 16px;
}
.detail-card ul li {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
    padding-left: 16px;
    position: relative;
}
.detail-card ul li::before {
    display: none;
}

/* Target section */
.target-section {
    background: var(--crimson);
    color: #fff;
    padding: 100px 0;
}
.target-section h2 {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}
.target-section p {
    font-size: 18px;
    line-height: 1.7;
}
.target-section .highlight {
    font-size: 28px;
    font-weight: 700;
}

/* Eventi box */
.eventi-box {
    background: var(--orange);
    color: #fff;
    padding: 56px 40px;
    text-align: center;
}
.eventi-box h4 {
    font-size: 22px;
    font-weight: 600;
}
.eventi-box p {
    font-size: 15px;
    opacity: 0.85;
}

/* Badge eventi */
.badge-evento {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 22px;
    border-radius: 2px;
}

/* Info card */
.info-card {
    padding: 48px 32px;
    background: var(--grey-bg);
}
.info-card .bi {
    font-size: 32px;
    color: var(--orange);
}
.info-card h5 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 4px;
}
.info-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Footer */
footer {
    background: #202124;
    color: #9aa0a6;
    padding: 48px 0;
    font-size: 14px;
}
footer a {
    color: #dadce0!important;
    text-decoration: none;
    transition: color 0.15s;
}
footer a:not(.privacyfooter) {
    font-size: 20px;
}
footer a:hover {
    color: #fff;
}
footer .footer-logo {
    height: 32px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .hero { padding: 64px 0 80px; }
    .hero h1 { font-size: 36px; }
    .hero .lead { font-size: 16px; margin-top: 20px; margin-bottom: 36px; }
    .section-lg { padding: 56px 0; }
    .section-title { font-size: 28px; }
    .target-section { padding: 64px 0; }
    .target-section h2 { font-size: 28px; }
    .target-section .highlight { font-size: 22px; }
    .eventi-box { padding: 32px 20px; }
    .card-servizio { padding: 36px 24px; }
    .detail-card { padding: 24px 20px !important; }
    .row { margin-left: 0; margin-right: 0; }
    .navbar-collapse {
        background: #fff;
        padding: 16px 0;
    }
}

/* ──────────────────────────────────────────────
   Calendario eventi (gcal) — portato dal tema LAP
   con palette crimson/orange di Giovani Plus.
   ────────────────────────────────────────────── */
.gcal {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.gcal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0e0;
}
.gcal-month {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
}
.gcal-nav {
    background: none;
    border: 1px solid #dadce0;
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.gcal-nav:hover { background: #f1f3f4; }

.gcal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    table-layout: fixed;
}
.gcal-wday {
    text-align: center;
    padding: 10px 0;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #70757a;
    border-bottom: 1px solid #e0e0e0;
}
.gcal-wday.gcal-weekend { color: #d93025; }

.gcal-day {
    min-height: 72px;
    padding: 4px 5px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gcal-day:nth-child(7n) { border-right: none; }
.gcal-day.gcal-empty { background: #fafafa; }
.gcal-day.gcal-sat .gcal-num,
.gcal-day.gcal-sun .gcal-num { color: #d93025; }
.gcal-day.gcal-today .gcal-num {
    background: var(--crimson);
    color: #fff;
}
.gcal-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-primary);
}

.gcal-event {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.3;
    cursor: pointer;
    transition: opacity 0.15s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gcal-event:hover { opacity: 0.85; }
.gcal-ev-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Varianti opzionali (parità con il tema LAP) — il JS al momento usa solo
   lo stile di default sovrascritto in assets/css/calendario.css. */
.gcal-ev-workshop                 { background: var(--crimson-light); color: var(--crimson); }
.gcal-ev-workshop .gcal-ev-dot    { background: var(--crimson); }
.gcal-ev-community                { background: var(--orange-light); color: var(--orange); }
.gcal-ev-community .gcal-ev-dot   { background: var(--orange); }

.gcal-popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.gcal-popup-overlay.active { display: flex; }
.gcal-popup {
    background: #fff;
    border-radius: 8px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    animation: gcalPopIn 0.2s ease;
}
@keyframes gcalPopIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}
.gcal-popup-close {
    position: absolute;
    top: 12px; right: 12px;
    background: none; border: none;
    font-size: 1.1rem; color: #9ca3af;
    cursor: pointer;
    width: 32px; height: 32px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.gcal-popup-close:hover { background: #f3f4f6; color: #374151; }
.gcal-popup-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--text-primary);
}
.gcal-popup-detail {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 8px;
}
.gcal-popup-desc {
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 16px;
}
.gcal-popup-detail i { color: var(--orange); font-size: 1rem; }

@media (max-width: 575px) {
    .gcal-day { min-height: 52px; padding: 3px; }
    .gcal-num { width: 22px; height: 22px; font-size: 0.72rem; }
    .gcal-event { font-size: 0.6rem; padding: 1px 4px; }
    .gcal-wday { font-size: 0.62rem; padding: 6px 0; }
}

/* Paginazione (page-news.php / archive) */
.pagination .page-link {
    color: var(--crimson);
    border-color: #e8eaed;
}
.pagination .page-link:hover {
    background-color: var(--crimson-light);
    color: var(--crimson);
    border-color: #e8eaed;
}
.pagination .page-item.active .page-link {
    background-color: var(--crimson);
    border-color: var(--crimson);
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    color: var(--text-secondary);
}

/* WordPress core / accessibility */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}
.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    -webkit-clip-path: none;
    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;
}
.skip-link:focus {
    outline-color: var(--crimson);
}

.formstyle{
    background:#fff;
    padding:40px 36px;
    border:1px solid #e8eaed;
}
@media screen and (max-width: 991px){
    .order-low-0{
        order:0;
    }
    .order-low-1{
        order:1;
    }
    .order-low-2{
        order:2;
    }
    .formstyle{
        padding:1em;
    }
    .modal .detail-card{
        padding-top: 3em!important;
    }
    .centermobile{
        text-align: center;
    }
    .loghifesr img{
        height: 30px!important;
    }
}

.accordion-button{
    padding: 1.5em 1em;
}
.accordion-button:focus{
  box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)!important;
}

.accordion-button:not(.collapsed) {
  color: inherit!important;
  background-color: inherit!important;
  box-shadow: inset 0 calc(-1 * var(--bs-accordion-border-width)) 0 var(--bs-accordion-border-color)!important;
}


label:not(.gdpr) > span{
    color: var(--crimson);
}