/* =====================================================
   COMPETITOR COMPARISON
   ===================================================== */

.competitor-compare {
    padding: 0;
}

.competitor-compare-header {
    max-width: 820px;
    margin: 0 auto 12px;
    text-align: center;
}

.compare-eyebrow {
    display: inline-block;
    margin-bottom: 10px;

    color: #1DB954;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}


/* -----------------------------------------------------
   TABLE CONTAINER
   ----------------------------------------------------- */

.competitor-table-wrap {
    max-width: 1050px;
    margin: 0 auto;

    overflow-x: auto;
    -webkit-overflow-scrolling: touch;

    background: #151515;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;

    box-shadow:
        0 14px 40px rgba(0,0,0,.20);
}


/* -----------------------------------------------------
   TABLE
   ----------------------------------------------------- */

.competitor-table {
    width: 100%;
    min-width: 760px;

    border-collapse: collapse;
    border-spacing: 0;
}

.competitor-table th,
.competitor-table td {
    padding: 19px 22px;

    text-align: center;

    border-bottom: 1px solid rgba(255,255,255,.07);
}


/* HEADER */

.competitor-table thead th {
    position: relative;

    padding-top: 22px;
    padding-bottom: 22px;

    color: rgba(255,255,255,.72);

    font-size: 14px;
    font-weight: 700;

    background: rgba(255,255,255,.015);
}

.competitor-table .feature-heading {
    text-align: left;

    color: rgba(255,255,255,.45);
    font-weight: 600;
}


/* -----------------------------------------------------
   ALLARÄTT COLUMN
   ----------------------------------------------------- */

.competitor-table .allaratt-heading {
    color: #fff;
}


/* Spotify green line */

.competitor-table .allaratt-heading::before {
    content: "";

    position: absolute;

    top: 0;
    left: 14%;
    right: 14%;

    height: 4px;

    background: #1DB954;

    border-radius: 0 0 4px 4px;

    box-shadow:
        0 0 14px rgba(29,185,84,.30);
}


.recommended-label {
    color: #1DB954;

    font-size: 15px;
    font-weight: 800;

    letter-spacing: .3px;
}


/* Subtle background – not a green wall */

.competitor-table .allaratt-value {
    position: relative;

    color: #fff;

    background:
        linear-gradient(
            90deg,
            rgba(29,185,84,.035),
            rgba(29,185,84,.075),
            rgba(29,185,84,.035)
        );
}


.competitor-table .allaratt-value strong {
    color: #fff;
}


/* -----------------------------------------------------
   BODY
   ----------------------------------------------------- */

.competitor-table tbody td {
    color: rgba(255,255,255,.72);

    font-size: 15px;
}

.competitor-table tbody strong {
    color: rgba(255,255,255,.90);

    font-weight: 700;
}


.competitor-table .feature-name {
    text-align: left;

    color: rgba(255,255,255,.88);

    font-weight: 600;
}


/* Remove final separator */

.competitor-table tbody tr:last-child td {
    border-bottom: none;
}


/* Very subtle hover */

.competitor-table tbody tr {
    transition: background .15s ease;
}

.competitor-table tbody tr:hover {
    background: rgba(255,255,255,.018);
}


/* -----------------------------------------------------
   PRICE / DETAIL
   ----------------------------------------------------- */

.value-detail {
    display: block;

    margin-top: 3px;

    color: rgba(255,255,255,.42);

    font-size: 12px;
    font-weight: 400;
}


/* AllaRätt price gets a little more weight */

.competitor-table .allaratt-value strong {
    font-size: 16px;
}


/* -----------------------------------------------------
   CHECKS
   ----------------------------------------------------- */

.green-check {
    display: inline-flex;

    width: 22px;
    height: 22px;

    margin-right: 6px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(29,185,84,.14);

    color: #1DB954;

    font-size: 11px;
}

.red-cross {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 70, 70, 0.12);
    color: #ff5252;
}

.neutral-check {
    color: rgba(255,255,255,.65);
    display: inline-flex;

    width: 22px;
    height: 22px;

    margin-right: 6px;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255,255,255,.08);

    font-size: 11px;
}


/* -----------------------------------------------------
   FOOTER
   ----------------------------------------------------- */

.competitor-compare-footer {
    max-width: 1050px;

    margin: 15px auto 0;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.compare-source {
    margin: 0;

    color: rgba(255,255,255,.38);

    font-size: 11px;
    line-height: 1.5;
}


.compare-more-link {
    display: inline-flex;

    flex-shrink: 0;

    align-items: center;

    gap: 8px;

    color: #1DB954;

    font-size: 14px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color .15s ease,
        gap .15s ease;
}


.compare-more-link:hover {
    color: #22d760;
    gap: 11px;
}


.compare-more-link i {
    font-size: 12px;
}


/* -----------------------------------------------------
   MOBILE
   ----------------------------------------------------- */

@media (max-width: 768px) {

    .competitor-compare {
        padding: 10px 0;
    }

    .competitor-compare-header {
        padding: 0 15px;
        margin-bottom: 25px;
    }

    .competitor-table-wrap {
        margin-left: 15px;
        margin-right: 15px;

        border-radius: 13px;
    }

    .competitor-table th,
    .competitor-table td {
        padding: 16px 15px;
    }


    /*
       Keep row description visible while
       scrolling horizontally
    */

    .competitor-table th:first-child,
    .competitor-table td:first-child {
        position: sticky;

        left: 0;

        z-index: 2;

        background: #151515;

        box-shadow:
            8px 0 12px rgba(0,0,0,.16);
    }


    .competitor-table thead th:first-child {
        z-index: 3;
    }


    .competitor-compare-footer {
        margin: 14px 18px 0;

        flex-direction: column;

        align-items: flex-start;

        gap: 13px;
    }


    .compare-more-link {
        font-size: 15px;
    }

}

.recommended-label, .other-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    color: #1DB954;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .3px;
}

.recommended-label img, .home-allaratt img{
    width: 24px;
    height: auto;
    object-fit: contain;
    display: block;
	transform: rotate(-30deg);
}

.other-label img{
    object-fit: contain;
	display: block;}

th:nth-child(3) .other-label img {
    width: 24px;
	height: auto;
	margin:0;}
	
th:nth-child(4) .other-label img {
    width: 24px;
	height: auto;
	margin:0;}
	
th:nth-child(5) .other-label img {
    width: 24px;
	height: auto;
	margin:0;}
	
	@media (max-width: 768px) {

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #171717;
    }

    .comparison-table thead th:first-child {
        z-index: 3;
    }

    .comparison-table th:first-child,
    .comparison-table td:first-child {
        box-shadow: 8px 0 12px -10px rgba(0,0,0,.9);
    }
}

.home-compare {
    max-width: 1200px;
    margin: 70px auto;
}

.home-compare-header {
    text-align: center;
    margin-bottom: 28px;
}

.home-compare-header h2 {
    margin-bottom: 8px;
}

.home-compare-header p {
    max-width: 720px;
    margin: 0 auto;
    opacity: .75;
}

.home-compare-scroll {
    overflow-x: auto;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 18px;
    background: rgba(15,18,24,.82);
    box-shadow: 0 15px 40px rgba(0,0,0,.25);
}

.home-compare-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

.home-compare-table th,
.home-compare-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-align: center;
}

.home-compare-table th:first-child,
.home-compare-table td:first-child {
    text-align: left;
    font-weight: 600;
}

.home-compare-table thead th {
    height: 70px;
    font-size: 14px;
}

.home-service {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.home-service img {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.home-compare-table small {
    display: block;
    margin-top: 4px;
    opacity: .55;
    font-size: 11px;
}

/* AllaRätt-kolumnen */
.home-compare-table .home-allaratt {
    background: rgba(0, 220, 100, .055);
}

.home-compare-table thead .home-allaratt {
    color: #19dc70;
    border-top: 3px solid #19dc70;
}

.home-compare-table tbody tr:last-child td {
    border-bottom: 0;
}

.home-compare-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    font-size: 12px;
}

.home-compare-bottom span, .hp-math-all span{
    opacity: .45;
	font-size: 12px;
}

.home-compare-bottom a {
    color: #19dc70;
    font-weight: 700;
    text-decoration: none;
}

.home-compare-bottom a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {

    .home-compare {
        margin: 45px 0;
    }

    .home-compare-header {
        padding: 0 15px;
    }

    .home-compare-header h2 {
        font-size: 24px;
    }

    .home-compare-scroll {
        border-radius: 14px;
    }

    .home-compare-table {
        min-width: 720px;
    }

    .home-compare-table th,
    .home-compare-table td {
        padding: 14px 12px;
        font-size: 12px;
    }

    .home-compare-table th:first-child,
    .home-compare-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        min-width: 145px;
        background: #11151d;
        box-shadow: 8px 0 12px -10px #000;
    }

    .home-compare-table thead th:first-child {
        z-index: 3;
    }

    .home-compare-bottom {
        padding: 0 10px;
    }

    .home-compare-bottom span, .hp-math-all span {
        display: none;
    }

    .home-compare-bottom a {
        margin-left: auto;
    }
}

/* =========================================================
   FÖRDJUPAD JÄMFÖRELSE
   AllaRätt.nu vs HP-appen / HPGuiden / HP-spelet
   ========================================================= */

.competitor-details {
    max-width: 1050px;
    margin: 0 auto;
    padding: 30px 20px 16px;
}


/* =========================================================
   VARJE JÄMFÖRELSEKAPITEL
   ========================================================= */

.competitor-detail {
    position: relative;
    padding: 18px 0;
    scroll-margin-top: 100px;
}

/* Avdelare mellan kapitlen */

.competitor-detail + .competitor-detail {
    border-top: 1px solid rgba(255, 255, 255, 0.09);
}


/* =========================================================
   RUBRIKER
   ========================================================= */

.competitor-detail h2 {
    position: relative;
    margin: 0 0 28px;
    padding-top: 17px;

    color: #fff;

    font-size: clamp(28px, 4vw, 38px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

/* Spotify-grön linje över H2 */

.competitor-detail h2::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 48px;
    height: 4px;

    background: #1DB954;
    border-radius: 4px;
}


/* H3 om du lägger till underavsnitt */

.competitor-detail h3 {
    margin: 38px 0 16px;

    color: #fff;

    font-size: 21px;
    font-weight: 700;
    line-height: 1.3;
}


/* =========================================================
   BRÖDTEXT
   ========================================================= */

.competitor-detail > p {
    max-width: 850px;

    margin: 0 0 19px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 16px;
    line-height: 1.75;
}


/* Viktiga värden */

.competitor-detail p strong {
    color: rgba(255, 255, 255, 0.94);
    font-weight: 700;
}


/* Länkar */

.competitor-detail a {
    color: #1DB954;
    text-decoration: none;
    font-weight: 600;
}

.competitor-detail a:hover {
    color: #22d760;
    text-decoration: underline;
}


/* =========================================================
   SCREENSHOTS
   ========================================================= */

.competitor-screenshots {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 22px;

    margin: 32px 0 38px;
}


/* Screenshot card */

.competitor-screenshots figure {
    position: relative;

    margin: 0;
    padding: 10px;

    overflow: hidden;

    background: rgba(255, 255, 255, 0.025);

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 15px;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.competitor-screenshots figure:hover {
    transform: translateY(-2px);

    border-color: rgba(255,255,255,.16);

    box-shadow:
        0 14px 35px rgba(0,0,0,.22);
}

.competitor-screenshots figure.allaratt-screen:hover {
    border-color: rgba(29,185,84,.45);
}


/* Själva bilden */

.competitor-screenshots img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}


/* Bildtext */

.competitor-screenshots figcaption {
    padding: 11px 7px 4px;

    color: rgba(255, 255, 255, 0.52);

    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;

    text-align: center;
}


/* AllaRätt-bilden kan märkas ut med denna klass */

.competitor-screenshots figure.allaratt-screen {
    border-color: rgba(29, 185, 84, 0.28);

    background:
        linear-gradient(
            180deg,
            rgba(29, 185, 84, 0.055),
            rgba(255, 255, 255, 0.02)
        );
}


.competitor-screenshots figure.allaratt-screen figcaption {
    color: #1DB954;
    font-weight: 700;
}


/* =========================================================
   SLUTSATS / "PASSAR DIG SOM"
   ========================================================= */

.competitor-verdict {
    position: relative;

    max-width: 900px;

    margin-top: 34px;
    padding: 23px 26px 22px 29px;

    overflow: hidden;

    background:
        linear-gradient(
            90deg,
            rgba(29, 185, 84, 0.07),
            rgba(255, 255, 255, 0.025)
        );

    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}


/* Spotify-grön kant */

.competitor-verdict::before {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    width: 4px;

    background: #1DB954;
}


/* Text inne i slutsatsen */

.competitor-verdict p {
    margin: 0;

    color: rgba(255, 255, 255, 0.70);

    font-size: 15px;
    line-height: 1.65;
}


.competitor-verdict p + p {
    margin-top: 15px;
    padding-top: 15px;

    border-top: 1px solid rgba(255, 255, 255, 0.07);
}


.competitor-verdict strong {
    color: #fff;
}


/* AllaRätt-slutsatsen får lite grön accent */

.competitor-verdict p:last-child strong {
    color: #1DB954;
}


/* =========================================================
   OPTIONAL: LITEN ETIKETT ÖVER SCREENSHOT
   ========================================================= */

.screen-label {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    margin-bottom: 9px;

    color: rgba(255, 255, 255, 0.52);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}


.allaratt-screen .screen-label {
    color: #1DB954;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .competitor-details {
        padding: 15px 16px 55px;
    }


    .competitor-detail {
        padding: 48px 0;
    }


    .competitor-detail h2 {
        margin-bottom: 22px;

        font-size: 27px;
        line-height: 1.2;
    }


    .competitor-detail > p {
        font-size: 15px;
        line-height: 1.7;
    }


    /* Bilder ovanpå varandra */

    .competitor-screenshots {
        grid-template-columns: 1fr;

        gap: 16px;

        margin: 27px 0 31px;
    }


    .competitor-screenshots figure {
        padding: 8px;

        border-radius: 12px;
    }


    .competitor-screenshots img {
        border-radius: 8px;
    }


    .competitor-verdict {
        margin-top: 28px;

        padding: 20px 19px 20px 22px;
    }


    .competitor-verdict p {
        font-size: 14px;
        line-height: 1.65;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .competitor-details {
        padding-left: 15px;
        padding-right: 15px;
    }


    .competitor-detail {
        padding: 42px 0;
    }


    .competitor-detail h2 {
        font-size: 25px;
    }


    .competitor-detail h2::before {
        width: 40px;
    }

}

/* =========================================================
   SCREENSHOT FORMATS
   ========================================================= */


/* ---------------------------------------------------------
   HP-APPEN
   Mobil mot mobil – original 369 × 748
   --------------------------------------------------------- */

.screenshots-mobile {
    grid-template-columns: repeat(2, 369px);
    justify-content: center;
    gap: 35px;
}

.screenshots-mobile img {
    width: 100%;
    height: auto;
    aspect-ratio: 369 / 748;
    object-fit: contain;
}


/* ---------------------------------------------------------
   HPGUIDEN
   Resultatanalys – original 612 × 612
   --------------------------------------------------------- */

.screenshots-square {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.screenshots-square img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
}


/* ---------------------------------------------------------
   HP-SPELET
   Matematik – original 962 × 795
   --------------------------------------------------------- */

.screenshots-math {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.screenshots-math img {
    width: 100%;
    height: auto;
    aspect-ratio: 962 / 795;
    object-fit: contain;
}


/* ---------------------------------------------------------
   TABLET / MOBILE
   --------------------------------------------------------- */

@media (max-width: 820px) {

    /*
       Mobilbilderna ska fortfarande ligga sida vid sida.
       De är gjorda för att jämföras direkt.
    */

    .competitor-screenshots.screenshots-mobile {
        grid-template-columns: repeat(2, minmax(0, 280px));
        justify-content: center;
        gap: 14px;
    }

}


/* ---------------------------------------------------------
   SMALL MOBILE
   --------------------------------------------------------- */

@media (max-width: 480px) {

    .competitor-screenshots.screenshots-mobile {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .screenshots-mobile figure {
        padding: 5px;
    }

    .screenshots-mobile figcaption {
        padding: 8px 2px 2px;
        font-size: 11px;
    }

}

/* AllaRätt screenshot-card */
.competitor-screenshots figure.allaratt-screen {
    border: 1px solid rgba(29, 185, 84, .40);

    background:
        linear-gradient(
            180deg,
            rgba(29, 185, 84, .075),
            rgba(29, 185, 84, .025)
        );

    box-shadow:
        0 0 0 1px rgba(29, 185, 84, .04),
        0 12px 30px rgba(0, 0, 0, .18);
}


/* Konkurrent */
.competitor-screenshots figure:not(.allaratt-screen) {
    border: 1px solid rgba(255, 255, 255, .10);

    background: rgba(255, 255, 255, .025);

    box-shadow:
        0 12px 30px rgba(0, 0, 0, .12);
}


/* AllaRätt caption */
.competitor-screenshots figure.allaratt-screen figcaption {
    color: #1DB954;
    font-weight: 700;
}


/* Konkurrent caption */
.competitor-screenshots figure:not(.allaratt-screen) figcaption {
    color: rgba(255, 255, 255, .52);
    font-weight: 500;
}


/* Hover – konkurrent */
.competitor-screenshots figure:not(.allaratt-screen):hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, .18);
}


/* Hover – AllaRätt */
.competitor-screenshots figure.allaratt-screen:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 185, 84, .65);

    box-shadow:
        0 0 0 1px rgba(29, 185, 84, .08),
        0 14px 35px rgba(0, 0, 0, .22);
}

.screenshot-zoom {
    display: block;
    cursor: zoom-in;
}

.screenshot-zoom img {
    display: block;
    width: 100%;
    height: auto;
}

.image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.85);
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox img {
    max-width: 95vw;
    max-height: 92vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 10px;
    box-shadow: 0 12px 50px rgba(0,0,0,.35);
}

.image-lightbox-close {
    position: absolute;
    top: 15px;
    right: 22px;

    border: 0;
    background: transparent;

    color: #fff;
    font-size: 46px;
    line-height: 1;

    cursor: pointer;
}

@media (max-width: 600px) {
    .image-lightbox {
        padding: 15px;
    }

    .image-lightbox img {
        max-width: 100%;
        max-height: 90vh;
    }
}