/*
Theme Name: Sunshine Wave
Theme URI: https://example.com/sunshine-wave
Author: Sunshine Wave
Author URI: https://example.com
Description: A clean, responsive WordPress theme with optional three-column front page layout, widget areas, and safe support for embedded media/player plugins. Built in English and suitable for general WordPress sites.
Version: 1.1.0
Requires at least: 5.8
Tested up to: 6.5
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: sunshine-wave
Tags: custom-logo, custom-menu, featured-images, responsive-layout, one-column, two-columns, three-columns, blog
*/

:root {
    --sw-color-bg: #f7f8fb;
    --sw-color-surface: #ffffff;
    --sw-color-text: #1f2937;
    --sw-color-muted: #6b7280;
    --sw-color-border: rgba(31, 41, 55, 0.12);
    --sw-color-accent: #ff6e7f;
    --sw-color-accent-2: #ffb86c;
    --sw-color-accent-3: #ff3cac;
    --sw-radius: 16px;
    --sw-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --sw-container: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--sw-color-bg);
    color: var(--sw-color-text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration-color: rgba(255, 110, 127, 0.55);
    text-underline-offset: 0.18em;
}

a:hover,
a:focus {
    color: var(--sw-color-accent);
}

img,
svg,
video,
iframe {
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

.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;
}

.screen-reader-text:focus {
    clip: auto !important;
    clip-path: none;
    display: block;
    height: auto;
    left: 1rem;
    padding: 0.75rem 1rem;
    top: 1rem;
    width: auto;
    z-index: 100000;
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--sw-shadow);
}

.site-header,
.site-footer {
    background: var(--sw-color-surface);
    border-color: var(--sw-color-border);
}

.site-header {
    border-bottom: 1px solid var(--sw-color-border);
}

.site-header__inner,
.site-footer__inner,
.content-area,
.sw-home-layout {
    width: min(calc(100% - 32px), var(--sw-container));
    margin-inline: auto;
}

.site-header__inner {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 0;
}

.site-branding {
    min-width: 180px;
}

.site-title {
    display: inline-block;
    font-size: clamp(1.35rem, 2vw, 1.9rem);
    line-height: 1.1;
    font-weight: 800;
    text-decoration: none;
}

.site-description {
    margin: 4px 0 0;
    color: var(--sw-color-muted);
    font-size: 0.95rem;
}

.custom-logo-link {
    display: inline-flex;
    align-items: center;
}

.custom-logo {
    max-height: 72px;
    width: auto;
}

.primary-navigation {
    flex: 1;
}

.primary-menu,
.footer-menu {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.primary-menu li,
.footer-menu li {
    position: relative;
}

.primary-menu a,
.footer-menu a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 650;
}

.primary-menu a:hover,
.primary-menu a:focus,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
    background: linear-gradient(135deg, var(--sw-color-accent-2), var(--sw-color-accent));
    color: #fff;
}

.primary-menu ul {
    position: absolute;
    left: 0;
    top: 100%;
    z-index: 50;
    display: none;
    min-width: 220px;
    list-style: none;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--sw-color-border);
    border-radius: 14px;
    background: var(--sw-color-surface);
    box-shadow: var(--sw-shadow);
}

.primary-menu li:hover > ul,
.primary-menu li:focus-within > ul {
    display: block;
}

.primary-menu ul a {
    width: 100%;
    border-radius: 10px;
}

.site-main {
    padding: 32px 0;
}

.content-area {
    max-width: var(--sw-container);
}

.entry-content-wrap,
.post-card,
.widget {
    background: var(--sw-color-surface);
    border: 1px solid var(--sw-color-border);
    border-radius: var(--sw-radius);
    box-shadow: var(--sw-shadow);
}

.entry-content-wrap,
.post-card {
    padding: clamp(20px, 4vw, 42px);
}

.entry-title {
    margin: 0 0 16px;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
}

.entry-title a {
    text-decoration: none;
}

.entry-content > *:first-child,
.entry-summary > *:first-child {
    margin-top: 0;
}

.entry-content > *:last-child,
.entry-summary > *:last-child {
    margin-bottom: 0;
}

.post-list {
    display: grid;
    gap: 24px;
}

.post-thumbnail {
    display: block;
    margin: calc(clamp(20px, 4vw, 42px) * -1) calc(clamp(20px, 4vw, 42px) * -1) 24px;
    overflow: hidden;
    border-radius: var(--sw-radius) var(--sw-radius) 0 0;
}

.post-thumbnail img {
    display: block;
    width: 100%;
}

.posts-navigation,
.page-links {
    margin-top: 24px;
}

.sw-home-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    padding: 32px 0;
}

.sw-home-column:empty {
    display: none;
}

.sw-home-column--main:first-child:last-child,
.sw-home-layout:not(:has(.sw-home-column--left)):not(:has(.sw-home-column--right)) .sw-home-column--main {
    grid-column: 1 / -1;
}

.widget {
    padding: 20px;
    margin: 0 0 20px;
}

.widget-title {
    margin: 0 0 12px;
    font-size: 1.15rem;
}

.site-footer {
    margin-top: 32px;
    border-top: 1px solid var(--sw-color-border);
}

.site-footer__inner {
    padding: 28px 0;
    text-align: center;
}

.footer-widgets {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
    text-align: left;
}

.footer-menu {
    justify-content: center;
    margin-bottom: 12px;
}

.site-credit {
    margin: 0;
    color: var(--sw-color-muted);
    font-size: 0.95rem;
}

/* Optional SunshineWave/player plugin compatibility. These styles are safely scoped. */
#swp-layout {
    width: 100%;
    max-width: 1760px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(280px, 520px) minmax(280px, 420px) minmax(280px, 420px);
    gap: 18px;
    align-items: start;
}

#swp-player,
#swp-lyrics-panel,
#swp-list-panel {
    border-radius: var(--sw-radius);
    background: linear-gradient(135deg, var(--sw-color-accent-2), var(--sw-color-accent), var(--sw-color-accent-3));
    color: #fff;
    box-shadow: var(--sw-shadow);
    overflow: hidden;
}

#swp-player {
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

#swp-audio {
    display: none;
}

#swp-top,
#swp-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

#swp-top button,
#swp-top select,
.swp-ctrl-btn,
#swp-shuffle,
#swp-results button,
#swp-playlist button {
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    cursor: pointer;
    padding: 9px 12px;
}

#swp-top button:hover,
#swp-top select:hover,
.swp-ctrl-btn:hover,
#swp-shuffle:hover,
#swp-results button:hover,
#swp-playlist button:hover {
    background: rgba(255, 255, 255, 0.34);
}

#swp-nowplaying {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: clamp(1rem, 2vw, 1.8rem);
    font-weight: 800;
}

#swp-cover {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.12);
}

#swp-cover[src=""],
#swp-cover:not([src]),
.swp-hidden {
    display: none !important;
}

#swp-lyrics-panel,
#swp-list-panel {
    min-height: 640px;
    max-height: 78vh;
}

#swp-lyrics,
#swp-ondemand-panel,
#swp-playlist-panel {
    min-height: 640px;
    max-height: 78vh;
    overflow-y: auto;
    padding: 18px;
    background: rgba(255, 255, 255, 0.15);
}

#swp-lyrics {
    white-space: pre-line;
    font-size: clamp(1.25rem, 2.4vw, 2rem);
    line-height: 1.6;
    text-align: center;
}

#swp-results > div,
#swp-playlist > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
}

.swp-song-title {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 1100px) {
    .site-header__inner,
    .sw-home-layout,
    #swp-layout {
        grid-template-columns: 1fr;
    }

    .site-header__inner {
        display: grid;
        justify-items: start;
    }

    .primary-menu {
        justify-content: flex-start;
    }

    #swp-lyrics-panel,
    #swp-list-panel,
    #swp-lyrics,
    #swp-ondemand-panel,
    #swp-playlist-panel {
        min-height: auto;
        max-height: none;
    }
}

@media (max-width: 640px) {
    .site-header__inner,
    .site-footer__inner,
    .content-area,
    .sw-home-layout {
        width: min(calc(100% - 20px), var(--sw-container));
    }

    .primary-menu,
    .footer-menu,
    #swp-nowplaying {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-menu a,
    .footer-menu a {
        width: 100%;
    }

    .site-main,
    .sw-home-layout {
        padding: 20px 0;
    }
}
/* Scope doar pentru widget Page List */
.widget_pages ul {
    max-height: 300px;     /* înălțimea dorită */
    overflow-y: auto;      /* activează scroll vertical */
    padding-right: 8px;    /* spațiu pentru scrollbar */
}

/* opțional: stil scrollbar modern (Chrome) */
.widget_pages ul::-webkit-scrollbar {
    width: 6px;
}
.widget_pages ul::-webkit-scrollbar-thumb {
    background: #94CE18;
    border-radius: 3px;
}