/* =============================================
	Italian Weekly v4 — Frontend Styles
============================================= */

/* --- City card --- */
.iw-city-card {
    border-radius: 16px;
    overflow: hidden;
    border: none;
    background: #fff;
    max-width: 100%;
    box-shadow: 0 2px 16px rgba(0,0,0,0.10);
}
.iw-city-img {
    height: 280px;
    background-color: #6b7c93;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem 1.5rem;
}
.iw-city-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 35%, rgba(0,0,0,0.62) 100%);
}
.iw-city-label {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    color: #fff;
}
.iw-city-pre {
    font-size: 11px;
    opacity: .9;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}
.iw-city-pre::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    opacity: .85;
}
.iw-city-name {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.5px;
}
.iw-city-footer {
    padding: .75rem 1.25rem;
    border-top: 1px solid rgba(0,0,0,.06);
}

.iw-open-modal {
    background: none;
    border: none;
    color: #444;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
    transition: color .15s;
}
.iw-open-modal:hover { color: #000; }
.iw-arrow { font-size: 18px; line-height: 1; color: #888; }

/* --- Word card --- */
.iw-word-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
}
.iw-word-label    { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: .5px; }
.iw-word-main     { font-size: 32px; font-weight: 600; color: #5b50cc; line-height: 1.2; }
.iw-word-phonetic { font-size: 14px; color: #888; font-style: italic; }
.iw-word-desc     { font-size: 14px; color: #555; margin: 6px 0 0; line-height: 1.6; }

/* --- Audio player --- */
.iw-audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 4px;
}
.iw-play-btn {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: #5b50cc;
    border: none; color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; flex-shrink: 0;
    transition: background .15s, transform .1s;
}



.iw-play-btn:hover  { background: #3c348f; }
.iw-play-btn:active { transform: scale(.95); }
.iw-play-btn.iw-playing { background: #2e7d32; }
.iw-audio-label { font-size: 13px; color: #555; }

/* --- Modal overlay --- */

.modal.modal--city {
    max-width: 1200px;
	min-height: 80vh;
}

.iw-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.iw-modal-overlay.iw-open { display: flex; }

.iw-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 80px rgba(0,0,0,.30);
    overflow: hidden;
}

/* --- Modal header --- */
.iw-modal-header {
    height: 200px;
    background-color: #6b7c93;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem 1.5rem;
    flex-shrink: 0;
}
.iw-modal-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,.05) 0%, rgba(0,0,0,.65) 100%);
}
.iw-modal-header-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    color: #fff;
}
.iw-modal-pre {
    font-size: 11px;
    opacity: .85;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 500;
}
.iw-modal-pre::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    opacity: .85;
}
.iw-modal-city { font-size: 26px; font-weight: 700; letter-spacing: -.3px; }
.iw-modal-close {
    position: absolute;
    top: .875rem; right: .875rem;
    z-index: 3;
    background: rgba(255,255,255,.18);
    border: none; color: #fff;
    width: 32px; height: 32px;
    border-radius: 50%;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
    backdrop-filter: blur(4px);
}
.iw-modal-close:hover { background: rgba(255,255,255,.32); }

/* --- Tab row (7 tabs, always one line) --- */
.iw-tab-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    padding: 1rem 1rem 0;
    flex-shrink: 0;
}

.iw-tab {
    padding: 7px 4px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,.1);
    background: #f5f5f5;
    color: #888;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
    transition: all .15s;
    position: relative;
    line-height: 1.3;
}
.iw-tab-label {   
	font-size: 13px;
    font-weight: 700;
}

.iw-tab-unlocked {
    background: #fff;
    border-color: rgba(0,0,0,.12);
    color: #444;
    cursor: pointer;
}
.iw-tab-unlocked:hover { background: #f0eeff; border-color: #afa9ec; color: #3c348f; }

.iw-tab-today {
    background: #EEEDFE;
    border-color: #AFA9EC;
    color: #3C3489;
    font-weight: 600;
}
.iw-tab-today:hover { background: #e0defe; }

.iw-tab-active {
    background: #EEEDFE !important;
    border-color: #AFA9EC !important;
    color: #3C3489 !important;
    font-weight: 600;
}

.iw-tab-locked {
opacity: .4;
cursor: not-allowed;
}

.iw-tab-dot {
width: 5px; height: 5px;
border-radius: 50%;
background: #5b50cc;
display: block;
}

.iw-tab-cur-num {
font-size: 10px;
font-weight: 700;
color: #5b50cc;
line-height: 1;
}
.iw-tab-today .iw-tab-cur-num  { color: #3C3489; }
.iw-tab-active .iw-tab-cur-num { color: #3C3489; }
.iw-tab-lock { font-size: 11px; line-height: 1; }

/* --- Modal body / panels --- */
.iw-modal-body {
padding: 1rem;
overflow-y: auto;
flex: 1;
}

.iw-tab-panel[hidden] { display: none; }

.iw-today-banner { margin-bottom: 10px; }
.iw-today-pill {
background: #EEEDFE;
color: #3C3489;
font-size: 11px;
font-weight: 600;
padding: 3px 12px;
border-radius: 10px;
display: inline-block;
}

.iw-panel-content {
font-size: 14px;
line-height: 1.7;
color: #333;
}
.iw-panel-content p            { margin: 0 0 .75rem; }
.iw-panel-content p:last-child { margin-bottom: 0; }
.iw-panel-content ul,
.iw-panel-content ol           { padding-left: 1.4rem; margin: 0 0 .75rem; }
.iw-panel-content li           { margin-bottom: 5px; }
.iw-panel-content img          { max-width: 100%; border-radius: 8px; height: auto; display: block; margin: .75rem 0; }
.iw-panel-content figure       { margin: .75rem 0; }
.iw-panel-content figcaption   { font-size: 12px; color: #888; text-align: center; margin-top: 4px; }
.iw-panel-content h2           { font-size: 16px; font-weight: 600; margin: 1rem 0 .5rem; }
.iw-panel-content h3           { font-size: 14px; font-weight: 600; margin: .75rem 0 .4rem; }

/* Video embed — responsive 16:9 */
.iw-panel-content .wp-block-embed__wrapper,
.iw-panel-content .wp-video {
position: relative;
padding-top: 56.25%;
margin: .75rem 0;
}
.iw-panel-content .wp-block-embed__wrapper iframe,
.iw-panel-content .wp-video video {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
border-radius: 8px;
}

.iw-no-content { color: #888; font-size: 14px; font-style: italic; }