#header {
    background: #f9f9f9;
}

/* Same rainbow-stripe line the footer uses at its own top edge
   (style.css `#footer[class*="footer"]:not(.footer-3):before`),
   mirrored here at the bottom of the header. */
#header:after {
    content: '';
    display: block;
    height: 4px;
    width: 100%;
    background: url(../images/rainbowstripe.jpg) repeat-x;
}

/* style.css already puts this same rainbow stripe at the footer's own top edge,
   but as position:absolute — our opaque white .copyright-section background
   (below) paints right over it. Redeclare (same selector, so it actually wins
   the cascade — :not() adds specificity a plain class match doesn't) as a real
   block element, like the header's stripe above, so it pushes the content down
   instead of hiding under it. */
#footer[class*="footer"]:not(.footer-3):before {
    content: '';
    position: static;
    display: block;
    height: 4px;
    width: 100%;
    background: url(../images/rainbowstripe.jpg) repeat-x;
}

/* The theme's own grey separator_stripe.png line at the top of the copyright
   section — redundant now that the rainbow stripe above already marks the
   footer's top edge. */
.copyright-section:before {
    display: none;
}

/* footer_bottom_bg.jpg (the kids-drawing strip below the copyright section)
   has an opaque white backdrop baked into the jpg, which stood out once the
   footer itself stopped being white. footer_bottom_bg.png is the same art
   with that white background keyed out to transparency (see
   scratchpad/make_transparent.php), so it blends onto the footer's own color. */
#footer.footer-2:after {
    background-image: url(../images/footer_bottom_bg.png);
    background-color: #f9f9f9;
}

.hero {
    position: relative;
    padding: 120px 20px;
    text-align: center;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 36px;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 18px;
    margin-bottom: 20px;
}

.hero-note {
    margin-top: 15px;
    font-size: 14px;
    opacity: 0.9;
}


.welcome-col {
    flex: 1;
    display: flex;
}

.welcome-content {
    padding: 30px 30px 0 30px !important;

    display: flex;
    flex-direction: column;
    flex: 1; /* ← ключ */
}

.welcome-content p {
    margin-bottom: 10px;
}

.welcome-item {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
    border-radius: 20px 20px 12px 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: none;
    min-height: 160px;
}

.welcome-title {
    min-height: 48px;
}

.welcome-inner {
    height: 100%;
    display: flex;
}


.welcome-item .welcome-inner {
    transform: none !important;
    transition: none !important;
}

.welcome-item:hover .welcome-inner {
    transform: none !important;
}

.welcome-section {
    display: flex;
    gap: 20px;
    margin-top: -60px;
    position: relative;
    z-index: 5;
}

/* ----------------- кастомные стили ---------------- */
.results-row {
    display: flex;
    flex-wrap: wrap;
}

.result-card {
    border-radius: 18px;
    padding: 30px 20px;
    text-align: center;
    height: 100%;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.result-card-1 {
    background: #5b8def;
}

.result-card-2 {
    background: #8bc34a;
}

.result-card-3 {
    background: #ff9800;
}

.result-card-4 {
    background: #f05a21;
}

.result-icon {
    margin-bottom: 20px;
}

.result-icon span {
    font-size: 42px;
    color: rgba(255,255,255,0.95);
}

.result-card p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 600;
    color: #fff;
}


.quiz-modal{
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;



    overflow-y: auto;

    opacity: 0;
    visibility: hidden;

    transition: opacity .25s ease, visibility .25s ease;
}
.quiz-modal-content{
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.quiz-modal.active{
    opacity: 1;
    visibility: visible;
}

.quiz-modal-overlay{
    position:absolute;
    inset:0;
    background:rgba(0,0,0,.65);
}

.quiz-modal-content{
    position:relative;
    width:90%;
    max-width:600px;
    margin:20px auto;
    background:#fff;
    border-radius:20px;
    padding:40px;
    z-index:2;
}

.quiz-close{
    position:absolute;
    right:15px;
    top:15px;
    border:none;
    background:none;
    font-size:30px;
    cursor:pointer;
}

.quiz-progress{
    height:8px;
    background:#eee;
    border-radius:20px;
    margin:20px 0;
    overflow:hidden;
}

.quiz-progress-bar{
    width:20%;
    height:100%;
    background:#ffb400;
}

.quiz-options{
    margin: 25px 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

@media (max-width: 600px) {
    .quiz-options{
        grid-template-columns: 1fr;
    }
}

.quiz-options label{
    display:block;
    border:1px solid #ddd;
    border-radius:12px;
    padding:15px;
    margin-bottom:10px;
    cursor:pointer;
}

.quiz-options label:hover{
    background:#f8f8f8;
}

.quiz-options label.selected{
    border-color:#ffb400;
    background:#fff7e3;
}

.quiz-options input{
    margin-right:10px;
}

.quiz-hidden{
    opacity:0;
    visibility:hidden;
}
.quiz-modal-content{
    transform: translateY(25px) scale(.98);
    opacity: 0;

    transition: transform .25s ease, opacity .25s ease;
}

.quiz-modal-content{
    position: relative;

    width: 100%;
    max-width: 600px;

    background: #fff;
    border-radius: 20px;
    padding: 40px;

    z-index: 2;
}

.quiz-modal.active .quiz-modal-content{
    transform: translateY(0) scale(1);
    opacity: 1;
}

.quiz-modal-content input[type="text"],
.quiz-modal-content input[type="email"]{
    width: 100%;
    padding: 14px 15px;
    margin-bottom: 10px;

    border: 1px solid #ddd;
    border-radius: 12px;

    font-size: 14px;
    outline: none;
}

.quiz-modal-overlay{
    opacity: 0;
    transition: opacity .25s ease;
}

.quiz-modal.active .quiz-modal-overlay{
    opacity: 1;
}

/* ----------------- кастомные стили ---------------- */
/* Тема выводит футер как position:fixed на десктопе (public/css/responsive.css),
   из-за чего он "выныривает" из-под контента при скролле. Возвращаем обычный поток. */
@media only screen and (min-width: 1281px) {
    #footer[class*="footer"] {
        position: static;
    }
}

/* Тёплый кремовый фон основного контента вместо сплошного белого (тема по
   умолчанию красит body/.wrapper-container/#content в #fff — public/css/style.css). */
body,
.loader,
.wrapper-container,
#content {
    background-color: #fdf7e7;
}

/* #footer.footer-2 itself has background:none (style.css), so it otherwise
   shows the cream .wrapper-container background through the copyright/links
   area above — keep that strip on its original white. */
#footer.footer-2 .copyright-section {
    background-color: #f9f9f9;
}
