/* Modern Progress Bar - v4 */
.progress-container {
    max-width: 768px;
    margin: 0 auto 1rem auto;
}

.progress-wrapper {
    position: relative;
    width: 100%;
    height: 3rem;
    background-color: #5aa3b9; /* SOS light blue background (tom del) */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.progress-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 1.5rem;
    z-index: 3;
    color: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.progress-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.progress-center {
    font-size: 0.95rem;
    font-weight: 700;
}

.progress-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.progress-left i,
.progress-right i {
    font-size: 1rem;
}

.progress-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%; /* Start med 0% bredd istället för scaleX */
    background: #1c325d; /* SOS dark blue for progress (fylld del) */
    z-index: 2;
    pointer-events: none;
    transition: width 2s ease-out; /* Animera width istället för transform */
}

/* Animation for progress bar */
@keyframes expandProgress {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

.progress-overlay.animate {
    animation: expandProgress 3s ease forwards;
}/* MODERN PHP CAMPAIGN STYLES */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Font declarations from original */
@font-face {
    font-family: "Proxima Nova";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url('https://www.sos-barnebyer.no/content/themes/sos-theme/assets/fonts/proxima-nova/ProximaNova-Reg.woff2') format('woff2');
    font-stretch: normal;
}

@font-face {
    font-family: "Proxima Nova";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('https://www.sos-barnebyer.no/content/themes/sos-theme/assets/fonts/proxima-nova/ProximaNova-Sbold.woff2') format('woff2');
    font-stretch: normal;
}

@font-face {
    font-family: "Proxima Nova";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('https://www.sos-barnebyer.no/content/themes/sos-theme/assets/fonts/proxima-nova/ProximaNova-Bold.woff2') format('woff2');
    font-stretch: normal;
}

@font-face {
    font-family: "Proxima Nova";
    font-style: normal;
    font-weight: 800;
    font-display: swap;
    src: url('https://www.sos-barnebyer.no/content/themes/sos-theme/assets/fonts/proxima-nova/ProximaNova-Xbold.woff2') format('woff2');
    font-stretch: normal;
}

body {
    font-family: "Proxima Nova", Proxima Nova, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    min-height: 100vh;
    padding: 0;
    color: #2d3748;
    line-height: 1.4;
    margin: 0;
}

/* Container Styles */
.container {
    width: 100%;
    max-width: 768px;
    background: #d2e8f9;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 2.5rem;
    margin: 0 auto 2rem auto;
    position: relative;
    overflow: hidden;
}

/* Add subtle gradient overlay */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1c325d 0%, #5aa3b9 50%, #1c325d 100%);
    z-index: 1;
}

/* Typography */
h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1c325d;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-align: center;
    background: linear-gradient(135deg, #1c325d 0%, #2d4a7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h2 {
    font-size: 1.75rem !important;
    font-weight: 700;
    color: #1c325d;
    margin: 1.5rem auto 1rem;
    line-height: 1.3;
    text-align: center;
    max-width: 90%;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 1rem auto;
    line-height: 1.3;
    text-align: center;
}

p {
    font-size: 1rem;
    line-height: 1.3;
    color: #4a5568;
    margin: 1rem auto;
    text-align: center;
    max-width: 90%;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    gap: 1.0rem;
    margin-top: 2rem;
}

.input-container {
    position: relative;
    margin-bottom: 0;
}

/* Name inputs side by side */
.name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    height: 56px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    color: #2d3748;
    transition: all 0.3s ease;
    font-weight: 500;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #5aa3b9;
    box-shadow: 0 0 0 3px rgba(90, 163, 185, 0.1);
    transform: translateY(-1px);
}

input[type="text"]:valid,
input[type="email"]:valid,
input[type="tel"]:valid {
    border-color: #10b981;
}



/* Modern placeholders */
input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Phone wrapper styling - works with existing input styles */
.phone-input-wrapper {
    display: flex;
    width: 100%;
    height: 56px; /* Match existing input height */
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.phone-input-wrapper:focus-within {
    border-color: #5aa3b9;
    box-shadow: 0 0 0 3px rgba(90, 163, 185, 0.1);
    transform: translateY(-1px);
}

.phone-prefix {
    background: #f8fafc;
    padding: 0 0.75rem;
    border-right: 1px solid #e2e8f0;
    color: #6b7280;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.phone-input-wrapper input[type="tel"] {
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
    flex: 1;
    height: auto;
    padding: 1rem 1.25rem;
    margin: 0;
}

.phone-input-wrapper input[type="tel"]:focus {
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Error state for phone wrapper */
.input-container.error .phone-input-wrapper {
    border-color: #dc2626 !important;
}

.input-container.error .phone-input-wrapper .phone-prefix {
    background-color: #fef2f2 !important;
}

/* Gröna ramar för valid states */
.phone-input-wrapper:has(input[type="tel"]:valid) {
    border-color: #10b981 !important;
}

.checkbox-container:has(input:checked) {
    border-color: #10b981;
}



/* Checkbox Container */
.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 0 0 0.5rem 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.checkbox-container input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #5aa3b9;
    margin-top: 2px; /* Align with first line of text */
    cursor: pointer;
    flex-shrink: 0; /* Prevent checkbox from shrinking */
}

.checkbox-container label {
    font-size: 0.95rem;
    color: #374151;
    cursor: pointer;
    line-height: 1.4;
    flex: 1;
}

/* Style the clickable link part */
.checkbox-container .terms-link {
    color: #1c325d;
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-container .terms-link:hover {
    color: #5aa3b9;
    text-decoration: none;
}

/* Buttons */
input[type="submit"],
button[type="submit"] {
    width: 100%;
    background: linear-gradient(135deg, #1c325d 0%, #2d4a7a 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(28, 50, 93, 0.3);
}

input[type="submit"]:active,
button[type="submit"]:active {
    transform: translateY(0);
}

/* Question buttons */
button:not([type="submit"]) {
    width: 100%;
    background: white;
    border: 2px solid #e2e8f0;
    color: #374151;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

button:not([type="submit"]):hover {
    border-color: #5aa3b9;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90, 163, 185, 0.15);
}

button:not([type="submit"]):active {
    transform: scale(0.98);
}

/* Add ripple effect */
button:not([type="submit"])::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(90, 163, 185, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:not([type="submit"]):active::after {
    width: 300px;
    height: 300px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translate3d(0, -20px, 0) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

.modal-content h2 {
    color: #1c325d;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    color: #4a5568;
    text-align: left;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: #9ca3af;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
}

.close:hover {
    color: #374151;
    background: #e5e7eb;
}

/* Social sharing styles - Firebase inspired */
.share-section {
    background: linear-gradient(135deg, #1c325d 0%, #2d4a7a 100%);
    padding: 2rem;
    border-radius: 12px;
    color: white;
    margin-top: 2rem;
}

.share-section h2 {
    margin-bottom: 0.5rem;
    color: white !important;
    font-size: 1.5rem !important;
}

.share-section > p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    text-align: center;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.share-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1rem;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}


.share-btn.social {
    background: #1877f2; /* Facebook blue */
    color: white;
}

.share-btn.email {
    background: #FDC643;
    color: #2d3748;
    font-weight: 600;
}

.share-btn.website {
    background: white;
    color: #1c325d;
    font-weight: 600;
    border: 2px solid white;
}

.share-btn.social:hover {
    background: #166fe5;
}

.share-btn.email:hover {
    background: #e6b63a;
}

.share-btn.website:hover {
    background: #f8fafc;
    color: #1c325d;
}

.share-btn i {
    font-size: 1.25rem;
}


/* Heartbeat animation for icons */
@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.heartbeat-red {
    color: #ef4444;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* Spacing utilities */
.spacing_btm10 { margin-bottom: 0.625rem; }
.spacing_btm20 { margin-bottom: 1.25rem; }
.spacing_btm30 { margin-bottom: 1.875rem; }
.spacing_top-5 { margin-top: -0.3125rem; }
.spacing_top-10 { margin-top: -0.625rem; }

/* Success states */
.success-message {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1rem 0;
    text-align: center;
}

.success-message h1 {
    color: #065f46;
    margin-bottom: 0.5rem;
}

.success-message p {
    color: #047857;
    margin: 0.5rem 0;
}

/* Progress indicator for multi-step forms */
.step-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
}

.step {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.3s ease;
}

.step.active {
    background: #5aa3b9;
    transform: scale(1.2);
}

.step.completed {
    background: #10b981;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid #5aa3b9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Quiz Progress Dots */
.quiz-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0 2rem 0; /* Halverad top margin: 2rem -> 1rem */
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.progress-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.progress-dot.completed {
    background: #1c325d; /* SOS dark blue for completed */
    transform: scale(1.2);
    box-shadow: 0 0 0 3px rgba(28, 50, 93, 0.2);
}

.progress-dot.current {
    background: #5aa3b9; /* SOS light blue for current */
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(90, 163, 185, 0.3);
    animation: pulse 2s infinite;
}

.progress-dot.upcoming {
    background: #cbd5e1; /* Light gray for upcoming */
    border: 2px solid #e2e8f0;
}

/* Pulse animation for current dot */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(90, 163, 185, 0.4);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(90, 163, 185, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(90, 163, 185, 0);
    }
}

/* Connect dots with lines */
.progress-dot:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    width: 1rem;
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
    transition: background 0.3s ease;
}

.progress-dot.completed:not(:last-child)::after {
    background: #1c325d;
}

/* Labels under dots (optional) */
.quiz-progress-labels {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
}

.quiz-progress-labels .label {
    width: 40px;
    font-weight: 500;
}

.quiz-progress-labels .label.completed {
    color: #1c325d;
    font-weight: 600;
}

.quiz-progress-labels .label.current {
    color: #5aa3b9;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0;
    }
    
    .container {
        padding: 1.5rem;
        margin: 0 auto;
        border-radius: 12px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.25rem;
    }
    
    .name-fields {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"] {
        height: 52px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        padding: 1.5rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* Uncomment if you want dark mode support
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        color: #e2e8f0;
    }
    
    .container {
        background: #2d3748;
        color: #e2e8f0;
    }
    */
}

@media print {
    .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    button,
    input[type="submit"] {
        display: none;
    }
}