/* === MODERN DESIGN – Hedvig Rabattkoder === */

:root {
    --primary: #654df0;
    --primary-dark: #4c38c9;
    --primary-light: #ede9fe;
    --accent: #06b6a4;
    --accent-light: #ccfbf1;
    --bg: #f5f3ff;
    --bg-card: #ffffff;
    --text: #1e1b4b;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: #e5e7eb;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 4px 24px rgba(101, 77, 240, 0.06);
    --shadow-hover: 0 8px 32px rgba(101, 77, 240, 0.12);
    --gradient: linear-gradient(135deg, #654df0 0%, #06b6a4 100%);
    --gradient-subtle: linear-gradient(135deg, #ede9fe 0%, #ccfbf1 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* === HEADER & NAV === */
header {
    background: var(--text);
    padding: 1rem 2rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

header nav {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

header nav a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.55rem 1.15rem;
    border-radius: 100px;
    transition: all 0.25s ease;
}

header nav a:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

header nav a.nav-active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 12px rgba(101, 77, 240, 0.4);
}

/* === MAIN === */
main {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* === HERO === */
.hero {
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1,
.hero h2 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.hero h1 span,
.hero h2 span {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto;
}

.last-updated {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.last-updated::before {
    content: "";
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* === HERO CODE HIGHLIGHT === */
.hero-code {
    background: var(--bg-card);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    margin: 2rem auto 1.5rem;
    max-width: 560px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: 0 8px 40px rgba(101, 77, 240, 0.15);
}

.hero-code:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 48px rgba(101, 77, 240, 0.22);
    border-color: var(--primary-dark);
}

.hero-code-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
}

.hero-code-value {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: 4px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0 1rem;
}

.hero-code-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-code-info {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.hero-copy-btn {
    font-size: 1rem;
    padding: 0.75rem 2rem;
    background: var(--primary);
    box-shadow: 0 4px 16px rgba(101, 77, 240, 0.3);
}

.hero-copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

@media (max-width: 640px) {
    .hero-code-value {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .hero-code {
        padding: 2rem 1.25rem;
    }
}

/* === CODE CARDS === */
.codes-section {
    margin-bottom: 3rem;
}

.codes-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.codes-section > p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.code-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.75rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.code-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gradient);
    border-radius: 4px 0 0 4px;
}

.code-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: rgba(101, 77, 240, 0.2);
}

.code-info {
    flex: 1;
}

.code-info .code-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-light);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.code-info .code-value {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.code-info .code-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.code-status {
    text-align: right;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.status-active {
    background: var(--accent-light);
    color: #0d9488;
}

.status-limited {
    background: #fef3c7;
    color: #d97706;
}

.code-status .expires {
    font-size: 0.72rem;
    color: var(--text-light);
    margin-top: 0.35rem;
}

.copy-btn {
    display: inline-block;
    margin-top: 0.6rem;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.03);
}

.copy-btn.copied {
    background: var(--accent);
}

/* === COPY STATE SYSTEM === */
.copy-icon {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.3rem;
    margin-top: -2px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.copy-icon-inline {
    margin-right: 0;
    margin-left: 0.5rem;
}

/* Default: show copy icon, hide check icon */
.icon-check {
    display: none;
}

.icon-copy {
    opacity: 0.5;
}

.hero-code:hover .icon-copy {
    opacity: 1;
}

/* Copied state: swap icons, change colors */
.hero-code.is-copied .icon-copy {
    display: none;
}

.hero-code.is-copied .icon-check {
    display: inline-block;
    color: var(--accent);
    animation: popIn 0.3s ease;
}

.hero-code.is-copied {
    border-color: var(--accent);
    box-shadow: 0 8px 40px rgba(6, 182, 164, 0.2);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-code.is-copied .hero-copy-btn {
    background: var(--accent);
    box-shadow: 0 4px 16px rgba(6, 182, 164, 0.3);
}

.hero-code.is-copied .btn-label {
    display: none;
}

.hero-code.is-copied .btn-label-copied {
    display: inline;
}

.btn-label-copied {
    display: none;
}

@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    60% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Transition back to default smoothly */
.hero-code {
    transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.hero-copy-btn {
    transition: background 0.3s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.codes-note {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-light);
    margin-top: 1rem;
}

/* === STEPS === */
.steps-section {
    margin-bottom: 3rem;
}

.steps-section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.steps {
    display: grid;
    gap: 1rem;
}

.step {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.step:hover {
    box-shadow: var(--shadow);
}

.step-number {
    background: var(--gradient);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.step-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* === SECTIONS === */
section {
    margin-bottom: 2.5rem;
}

section h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

section p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

/* === INSURANCE GRID === */
.insurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.insurance-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

a.insurance-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: rgba(101, 77, 240, 0.25);
}

.insurance-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: var(--text);
}

.insurance-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* === BENEFITS === */
.benefits ul {
    list-style: none;
    padding: 0;
}

.benefits ul li {
    padding: 0.65rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.benefits ul li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
}

/* === FAQ === */
.faq {
    margin-bottom: 2.5rem;
}

.faq h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.faq details {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 1.1rem 1.4rem;
    margin-bottom: 0.6rem;
    border: 1px solid var(--border);
    transition: all 0.25s ease;
}

.faq details[open] {
    box-shadow: var(--shadow);
    border-color: rgba(101, 77, 240, 0.15);
}

.faq summary {
    font-weight: 600;
    cursor: pointer;
    color: var(--text);
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq summary::after {
    content: "+";
    font-size: 1.2rem;
    color: var(--primary);
    font-weight: 300;
    transition: transform 0.25s ease;
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq details p {
    margin-top: 0.75rem;
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* === CTA === */
.cta-section {
    text-align: center;
    background: var(--gradient-subtle);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    border: 1px solid rgba(101, 77, 240, 0.1);
    margin-bottom: 2.5rem;
}

.cta-section h3 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.cta-section p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* === INFO GRID (sub-pages) === */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    box-shadow: var(--shadow);
}

.info-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.info-card p {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* === COUPON BOX (sub-pages) === */
.coupon-box {
    background: var(--bg-card);
    border: 2px dashed rgba(101, 77, 240, 0.3);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.coupon-box:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-hover);
}

.coupon-box .code-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 2px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0.5rem 0;
}

.coupon-box .status-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    background: var(--accent-light);
    color: #0d9488;
}

.coupon-box .copy-btn {
    display: inline-block;
    margin-top: 1rem;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}

.coupon-box .copy-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.03);
}

.coupon-box .copy-btn.copied {
    background: var(--accent);
}

/* === INTERNAL LINKS === */
.internal-links {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.internal-links h4 {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.internal-links a {
    display: inline-block;
    margin-right: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}

.internal-links a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* === FOOTER === */
footer {
    text-align: center;
    padding: 2.5rem 1.5rem;
    color: var(--text-light);
    font-size: 0.78rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
    .hero h1,
    .hero h2 {
        font-size: 1.75rem;
    }

    .code-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .code-status {
        text-align: left;
    }

    header nav {
        gap: 0.25rem;
    }

    header nav a {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
    }

    main {
        padding: 2rem 1rem;
    }
}
