h1{
    font-size: 28px;
    margin: -10px -2% 10px 0;
    width: 100%;
    max-width: 1000px;
    text-align: left;
}

form{
    display: flex;
    flex-direction: column;
    padding: 20px;
    width: 90%;
    max-width: 450px;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    gap: 12px;
}

form input{
    width: 92%;
    border: 0;
    padding: 13px 18px;
    font-weight: 600;
    color: #573cf9;
    border: transparent solid 2px;
    font-size: 14px;
    box-sizing: border-box;

    -webkit-appearance: none;
    appearance: none;
}

form input::placeholder{
    opacity: 0.55;
    font-weight: normal;
}

form input:focus::placeholder{
    opacity: 0.85;
}

form input:focus{
    outline: none;
    border-color: #573cf9;
}

#saznaj{
    padding: 15px 45px;
    width: 100%;
    cursor: pointer;
    border: transparent 2px solid;
}

#saznaj:hover{
    background-color: #bfc3ff;
    color: #573cf9;
    border-color: #573cf9;
}

#disclaimer{
    font-size: 11px;
    width: 75%;
    padding: 0 15px;
    padding-top: 10px;
    text-align: left;
    border-top: #573cf9 1px solid;
    font-weight: normal;
}

strong{
    font-weight: normal;
}

#form-result{
    display: none;
    margin-top:1rem; 
    padding:1rem; 
    background-color: #d1fae5;
    color: #065f46;
}

#phone-preview{
    text-align: center;
    font-weight: bold;
    margin-top: 30px;
}

#phone-preview img {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.segmented-control {
    display: inline-flex;
    overflow: hidden;
    background-color: #ffa127cc;
}

.segment {
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    opacity: 0.5;
    font-weight: normal;
    border: solid 2px transparent;
    white-space: nowrap;
    font-size: clamp(12px, 3.8vw, 18px);
}

.segment:hover {
    background-color: rgba(255,255,255,0.15);
}

/* Visual disabled style (very important for UX) */
.segmented-control.age-group {
    overflow: hidden;
    transition: all 0.15s ease-in-out;   /* all = max-height + opacity */
    max-height: 200px;                /* make this comfortably bigger than needed */
    opacity: 1;
}

.segmented-control.age-group.disabled {
    max-height: 0;
    opacity: 0;                       /* full fade = cleaner look */
    pointer-events: none;
    user-select: none;
    margin-bottom: -10px;
}

/* Selected state – this creates the yellow pill effect */
input[type="radio"]:checked + .segment {
    opacity: 1;
    font-weight: bold;
    border-color: #573cf9 ;
    background-color: #bfc3ff;
}

/* Hide the actual radio circles */
input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Wrapper to control show/hide and centering */
#age-wrapper {
    width: 100%;
    overflow: hidden;
    transition: all 0.25s ease-in-out;
    max-height: 200px;          /* large enough when visible */
    opacity: 1;
    margin: 0;                  /* reset if needed */
}

/* Hidden state – when pravna osoba is selected */
#age-wrapper.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

/* The age input itself – make it noticeably wider */
.age-input {
    width: 72%;
}


.after-form-panel{
    padding: 15px 3%;
    gap:15px;
}

.after-form-panel img{
    width: 20%;
}

.after-form-panel p{
    width: 80%;
}

.section-introduction{
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

/* ── Features Section ── */
.features-section {
    background: white;
    padding: 100px 20px;
    text-align: center;
}

.features-intro {
    max-width: 620px;
    margin: 0 auto 56px;
    position: relative;
}

.features-title {
    font-size: 2.4rem;
    font-weight: 900;
    color: #573cf9;
    margin-bottom: 28px;
    line-height: 1.15;
    position: relative;
    display: inline-block;
}

.features-title::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 50%;
    transform: translateX(-50%);
    width: 52px;
    height: 4px;
    background: #ffbc27;
    border-radius: 2px;
}

.features-subtitle {
    font-size: 1.05rem;
    color: #5a5270;
    line-height: 1.65;
    font-weight: 400;
    margin: 0;
    margin-top: 8px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: white;
    border-radius: 22px;
    padding: 36px 24px 32px;
    text-align: center;
    box-shadow: 0 4px 28px rgba(87,60,249,0.11), 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(87,60,249,0.18);
}

.feature-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #ffbc27;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
    flex-shrink: 0;
}

.feature-title {
    font-size: 1rem;
    font-weight: 800;
    color: #573cf9;
    margin: 0;
}

.feature-desc {
    font-size: 0.82rem;
    color: #5a5270;
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
}

@media (max-width: 860px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .features-title {
        font-size: 1.9rem;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
    .features-section {
        padding: 64px 16px;
    }
}

h2{
    margin-bottom: 20px;
}

.service-panel{
    width: 90%;
    margin: 0 auto;
    max-width: 300px;
    padding: 20px 5%;
    font-weight: bold;
}

.service-panel-center{
    align-items: center;
    justify-content: center;
    text-align: center;
}

.service-panel-left{
    justify-content: left;
    text-align: left;
    gap: 20px;
}

.service-panel img{
    width: 50px;
    height: 50px;
    background-color: #8D6FBF;
}

.service-panel-collection{
    margin-bottom: 30px;
}

/* USERS */

.profile-info{
    display: flex;
    flex-direction: row;
    justify-content: left;
    align-items: start;
    gap: 0px;
}

.profile-info > img{
    border-radius: 50%;
    width: 70px;
    height: 70px;
    border: 2px solid #573cf9;
    margin-top: -10px;    
}

.user-info{
    display: flex;
    flex-direction: column;
    justify-content: left;
    align-items: start;
    width: 70%;
}

.user-info img{
    background-color: transparent;
    max-width: none;
    max-height: 20px;
    width: 50%;
}

.user-review{
    font-weight: normal;
}


/* QUESTIONS */
.question {
    cursor: pointer;
    overflow: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.answer {
    margin-top: 20px;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: normal;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

details[open]{
    background-color: white;
    color: #573cf9;
}

details[open] .answer {
    max-height: 500px; /* Adjust based on your content */
    opacity: 1;
    margin-bottom: 10px; /* Add some space at the bottom */
}

details summary {
    list-style: none;
    outline: none;
    position: relative;
    padding-right: 30px;
    display: flex;
    align-items: center;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

/* Add arrow icon */
details summary::after {
    content: '▶';
    position: absolute;
    right: 10px;
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    transform: rotate(90deg);
}

details[open] summary::after {
    transform: rotate(-90deg);
}

.post-card {
    gap: 30px;
    padding-top: -50px;
    border: transparent 1px solid;
    pointer-events: all;
}

.post-card *{
    margin-bottom: 20px;
    pointer-events: all;
    cursor: pointer;
    max-width: 370px;
    max-height: 450px;
}

.read-more{
    font-weight: bold;
    font-size: 20px;
    border-right: transparent 10px solid;
}

.post-card:hover{
    box-shadow: #c9c9c9 0px 5px 10px;
    border: #573cf9 1px solid;
}

.post-card:hover .read-more{
    border-right-color: #573cf9;
    padding-right: 10px;
}

/* ===== QUOTE CARD (AS Direct / Generali) ===== */

#quote-result {
    margin-top: 1rem;
}

.quote-card {
    padding: 1.5rem;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

/* Loading state */
.quote-loading {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.quote-spinner {
    width: 36px;
    height: 36px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffbc27;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success state */
.quote-success {
    background: #fff;
    color: #573cf9;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.quote-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quote-provider {
    font-size: 1.1rem;
    font-weight: 800;
    color: #573cf9;
}

.quote-type {
    font-size: 0.85rem;
    font-weight: normal;
    color: #666;
}

.quote-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.quote-amount {
    font-size: 2.2rem;
    font-weight: 900;
    color: #573cf9;
}

.quote-period {
    font-size: 0.9rem;
    font-weight: normal;
    color: #888;
}

.quote-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.quote-btn {
    display: block;
    padding: 12px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    transition: opacity 0.2s;
}

.quote-btn:hover {
    opacity: 0.85;
}

.quote-btn-primary {
    background: #573cf9;
    color: #fff;
}

.quote-btn-secondary {
    background: transparent;
    color: #573cf9;
    border: 2px solid #573cf9;
}

.quote-disclaimer {
    font-size: 0.72rem;
    font-weight: normal;
    color: #999;
    margin: 0;
}

/* Error state */
.quote-error {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 1rem;
}

.quote-error p {
    margin: 0;
    font-weight: normal;
}

/* Desktop tweaks */
@media (min-width: 768px) {
    .quote-actions {
        flex-direction: row;
        justify-content: center;
        max-width: none;
    }

    .quote-btn {
        padding: 12px 28px;
    }
}

/* ===== END QUOTE CARD ===== */

@media (min-width: 768px) {

    #title-segment{
        min-height: 400px;
        padding-top: 50px;
        padding-bottom: 40px;
    }

    h1{
        font-size: 40px;
        max-width: 500px;
        margin-top: 20px;
    }

    form{
        max-height: none;
        margin: 0;
        margin-left: 5%;
    }

    .service-panel{
        padding: 40px;
    }

    .service-panel-center{
        width: 24%;
        max-width: none;
    }

    .service-panel-left{
        width: 32%;
        max-width: none;
        margin: 0;
    }

    form input{
        width: 100%;
        font-size: 15px;
    }

    #phone-preview {
        justify-content: center;
        align-items: center;
        gap: 40px;
    }

    #phone-dialogue{
        font-size: 24px;
        text-align: center;
        max-width: 380px;
        margin: 0 0 0 40px;
    }

    #disclaimer{
        border: none;
        padding-top: 0;
    }

    
    #saznaj{
        width: 70%;
        padding: 15px 10px;
    }
}

/* ── Vrste auto osiguranja ── */
.vao-section {
    background: #573cf9;
    padding: 72px 5% 80px;
    text-align: center;
}

.vao-intro {
    max-width: 640px;
    margin: 0 auto 8px;
}

.vao-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #ffbc27;
    margin-bottom: 14px;
}

.vao-title {
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin: 0 0 14px;
    letter-spacing: -0.025em;
}

.vao-subtitle {
    font-size: 0.93rem;
    color: rgba(191,195,255,0.85);
    line-height: 1.65;
    margin: 0;
    font-weight: 400;
}

.vao-category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffbc27;
    color: #3a2abf;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 100px;
    margin: 28px auto 14px;
}

.vao-grid {
    display: grid;
    gap: 14px;
    max-width: 1000px;
    margin: 0 auto;
}

.vao-grid-2 { grid-template-columns: repeat(2, 1fr); }
.vao-grid-3 { grid-template-columns: repeat(3, 1fr); }

.vao-card {
    background: white;
    border-radius: 20px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    text-align: left;
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    transition: transform 0.2s, box-shadow 0.2s;
    border-top: 3px solid #ffbc27;
}

.vao-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.22);
}

.vao-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.vao-icon-wrap {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #ffbc27;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vao-card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #573cf9;
    margin: 0;
    line-height: 1.25;
}

.vao-card-desc {
    font-size: 0.79rem;
    color: #5a5270;
    line-height: 1.65;
    margin: 0;
    font-weight: 400;
    padding-top: 0;
}

.vao-footer-note {
    max-width: 660px;
    margin: 36px auto 0;
    font-size: 0.82rem;
    color: rgba(191, 195, 255, 0.85);
    line-height: 1.75;
    font-weight: 400;
    background: rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 16px 24px;
    text-align: left;
}

.vao-footer-note strong {
    color: white;
    font-weight: 700;
}

@media (max-width: 767px) {
    .vao-section { padding: 56px 5%; }
    .vao-grid-2,
    .vao-grid-3 { grid-template-columns: 1fr; }
}