/*--------------------------------------------------------------
# SuperQuizPatente - Custom overrides & homepage layout
# This file MUST be loaded AFTER styles.css in the <head>
# so these rules win the CSS cascade over the base template.
--------------------------------------------------------------*/


/* === Page structure === */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* === Hero container === */
.containeris {
    display: flex;
    flex-wrap: nowrap;
    width: 100vw;
    padding-top: 90px;
    box-sizing: border-box;
    overflow: hidden;
    align-items: center;
    padding-left: 15%;
    margin-top: 0;
}

/* === Arguments / reasons section === */
.arguments_section {
    display: flex;
    flex-wrap: nowrap;
    width: 100vw;
    box-sizing: border-box;
    padding-top: 10px;
    overflow: hidden;
    align-items: center;
    padding-left: 5%;
    padding-right: 5%;
}

.text-content,
.image-content {
    padding: 20px;
    box-sizing: border-box;
    margin: 0;
}

.text-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100%;
}

.image-content {
    flex: 1;
    padding-right: 15%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-content img {
    max-width: calc(100%);
    height: auto;
}

.btn-get-started {
    margin-right: 20px;
    text-align: center;
    vertical-align: middle;
}

@media (max-width: 1000px) {
    .containeris {
        flex-direction: column;
        height: auto;
        padding-top: 90px;
        align-items: center;
        margin-top: 0;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
    }

    .arguments_section {
        flex-direction: column;
        height: auto;
        padding-top: 10px;
        align-items: center;
        margin-top: 0;
        padding-left: 10px;
        padding-right: 10px;
        padding-bottom: 10px;
    }

    .text-content,
    .image-content {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .image-content {
        padding: 20px;
    }

    .image-content img {
        max-width: calc(100% - 40px);
    }
}

/* === Embedded video wrapper === */
.responsive-video {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
}

.responsive-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* === CTA column-style buttons === */
.full-column-button {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    font-family: inherit;
    text-align: center;
}

.full-column-button a {
    display: block;
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.button-top-text {
    background-color: #45aab8;
    color: white;
}

.button-sub-text {
    background-color: #dff6fa;
    color: #2c5a63;
}

.button-top-text:hover {
    background-color: #3793a0;
}

.button-sub-text:hover {
    background-color: #ccecf2;
}

/* === Expandable "10 reasons" accordion === */
.expandable-container {
    max-width: 600px;
    margin: 5px auto;
    font-family: Arial, sans-serif;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
}

.expandable-header {
    cursor: pointer;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: left;
    font-size: 15px;
    font-weight: regular;
    transition: background 0.3s;
}

.expandable-header:hover {
    background-color: #eaeaea;
}

.arrow {
    transition: transform 0.3s ease;
}

.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.5s ease;
    padding: 0 10px;
}

.expandable-container.active .arrow {
    transform: rotate(180deg);
}

.expandable-container.active .expandable-content {
    max-height: 400px;
    padding: 10px;
}

/* === Article chips / tag links === */
.chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}

.chip {
    display: inline-block;
    padding: 8px 12px;
    background-color: #f0f0f0;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}

.chip:hover {
    background-color: #45aab8;
    color: #fff;
}

/* === Mobile app install banner (top, iOS/Android detection) === */
.app-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #f2f2f2;
    border-bottom: 1px solid #ccc;
    display: flex;
    align-items: center;
    padding: 10px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.app-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-right: 12px;
}

.app-info {
    flex-grow: 1;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.app-subtitle {
    font-size: 13px;
    color: #666;
}

.app-download {
    background-color: #45aab8;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 8px;
    text-decoration: none;
    margin-left: 12px;
    white-space: nowrap;
}

.app-close {
    background: transparent;
    border: none;
    font-size: 18px;
    color: #999;
    margin-left: 10px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

body.with-banner {
    padding-top: 70px;
}

@media (max-width: 400px) {
    .app-subtitle {
        display: none;
    }
}

/* === Generic modal (used for promo popups) === */
.modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.modal.modal--open {
    display: block;
}

body.modal-lock {
    overflow: hidden;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.modal__panel {
    position: relative;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 16px;
}

.modal__content {
    position: relative;
    width: min(900px, 95vw);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    overflow-y: auto;
    text-align: center;
}

.modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f1f1;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.modal__close:hover {
    background: #e0e0e0;
}

.modal__image-wrap {
    max-width: 80vw;
    max-height: 80vh;
    margin: 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
}

.modal__social {
    margin-top: 12px;
}

.modal__facebook-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 12px 18px;
    background: #1877f2;
    color: #ffffff;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
}

.modal__facebook-btn:hover {
    background: #145dbf;
}

.modal__secondary-close {
    margin-top: 10px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.modal__secondary-close:hover {
    background: #f5f5f5;
}

@media (max-width: 480px) {
    .modal__image-wrap {
        max-width: 90vw;
        max-height: 60vh;
    }
    .modal__content {
        padding: 14px;
    }
}

/* === About page (informazioni / about) feature blocks === */
/* Higher-specificity selectors + !important to win over template defaults */
#main .single-page .feature-block {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-bottom: 30px !important;
    align-items: center !important;
}

#main .single-page .feature-block img {
    max-width: 300px !important;
    width: 100% !important;
    height: auto !important;
    border-radius: 10px !important;
    flex: 1 1 300px !important;
    object-fit: cover;
}

#main .single-page .feature-block .feature-text {
    flex: 1 1 300px !important;
    padding: 15px !important;
    font-size: 16px !important;
}

/* Mobile: stack vertically and let image take full width */
@media (max-width: 768px) {
    #main .single-page .feature-block {
        flex-direction: column !important;
    }
    #main .single-page .feature-block img {
        max-width: 100% !important;
    }
}

/* Quiz question image size limit */
.question img {
    max-width: 400px;
    width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 8px;
}