/* Base styles */
:root {
    --primary-color: #2D4B3E;
    --background-color: #272521;
    --card-background: #EDE8DE;
    --text-color: #2D4B3E;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow: hidden;
}

/* Page Layout */
.page {
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background-color: var(--background-color);
    overflow: hidden;
}

.input-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    height: 100vh;
    width: 100vw;
    transition: transform 0.3s ease-in-out;
}

.results-page {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
}

/* Results Container */
.results-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin: 0;
    height: 100%;
}

/* Left Side */
.results-left {
    background-color: #FFFAEF;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: flex-start;
    justify-content: center;
    height: 100%;
    padding: 0 5%;
}
.results-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 37.448px;
    font-weight: 400;
    color: #325142;
    line-height: normal;
    margin: 0;
    text-align: left;
    align-self: flex-start;
    width: 100%;
}

.date-link {
    display: block;
    text-decoration: underline;
    cursor: pointer;
    color: #325142;
    font-family: 'Libre Baskerville', serif;
    font-size: 37.448px;
    font-weight: 400;
    line-height: normal;
    margin-top: 8px;
    text-align: left;
}

/* Cards Grid */
.results-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 178px);
    gap: 16px;
    width: 100%;
}

/* Individual Cards */
.result-card {
    background: var(--card-background);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 178px;
    box-sizing: border-box;
}

.result-card h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--text-color);
    margin: 0 0 8px 0;
}

.result-card .number {
    font-family: 'Libre Baskerville', serif;
    font-size: 36px;
    line-height: normal;
    font-weight: 400;
    color: var(--text-color);
    margin: 8px 0;
}

.result-card p {
    font-size: 12px;
    font-style: normal;
    line-height: normal;
    color: var(--text-color);
    margin: 0;
}

.result-card.blurred .number,
.result-card.blurred p {
    filter: blur(8px);
    user-select: none;
    color: rgba(45, 75, 62, 0.7);  /* Using var(--text-color) with opacity */
}

.result-card.blurred {
    position: relative;
    cursor: not-allowed;
}

.result-card.blurred::after {
    content: "Pay to see more";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--text-color);
    opacity: 0.7;
}

/* Right Side */
.results-right {
    background: #272521;
    border-radius: 0;
    height: 100vh;
    width: 100%;
    margin: 0;
    overflow: visible;
    position: relative;
}

.scroll-container {
    height: 100vh;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.scroll-section {
    min-height: 100%;
    scroll-snap-align: start;
    padding: 24px 48px;
    background: #272521;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    overflow-y: auto;
    box-sizing: border-box;
}

.scroll-section.active {
    opacity: 1;
}

.matrix-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--card-background);
    margin: 0;
    text-align: center;
    width: 100%;
}

.matrix-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    position: relative;
    gap: 0;
    margin: 0;
    border: none;
}

.matrix-cell {
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    border-right: 1px solid rgba(250, 247, 242, 0.3);
    border-bottom: 1px solid rgba(250, 247, 242, 0.3);
}

.matrix-cell:nth-child(3n) {
    border-right: none;
}

.matrix-cell:nth-last-child(-n+3) {
    border-bottom: none;
}

.matrix-cell:nth-child(3n-2) {
    border-left: none;
}

.matrix-cell:nth-child(-n+3) {
    border-top: none;
}

.matrix-number {
    font-family: 'Libre Baskerville', serif;
    font-size: 36px;
    line-height: 1;
    color: var(--card-background);
    margin: 0;
    font-weight: 400;
}

.matrix-declarations {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #EDE8DE99;
    margin: 0;
}

.matrix-text {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: var(--card-background);
    opacity: 0.6;
    white-space: nowrap;
}

.scroll-indicator {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
}

.indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--card-background);
    opacity: 0.5;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.indicator-dot.active {
    opacity: 1;
    transform: scale(1.2);
}

/* Input Card Styles */
.card {
    background-color: var(--card-background);
    border-radius: 12px;
    padding: 0 32px;
    text-align: center;
    width: 341px;
    height: 492px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-sizing: border-box;
    margin: auto;
}

.input-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 0 40px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 94px;
    margin-bottom: auto;
}

.subtitle {
    color: #325142;
    font-family: Inter;
    font-size: 14px;
    font-weight: 400;
    line-height: normal;
    margin: 0;
    text-align: center;
    width: 100%;
}

form {
    width: 205px;
}

.input-group {
    width: 100%;
}

input[type="date"] {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-family: "Libre Baskerville";
    font-size: 14px;
    font-weight: 400;
    color: #325142;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
}

/* Style the calendar icon */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    filter: invert(24%) sepia(29%) saturate(375%) hue-rotate(93deg) brightness(96%) contrast(89%);
}

/* Style the date placeholder */
input[type="date"]::-webkit-datetime-edit {
    color: #325142;
}

/* Style individual parts of the date */
input[type="date"]::-webkit-datetime-edit-fields-wrapper { }
input[type="date"]::-webkit-datetime-edit-text { }
input[type="date"]::-webkit-datetime-edit-month-field { }
input[type="date"]::-webkit-datetime-edit-day-field { }
input[type="date"]::-webkit-datetime-edit-year-field { }

.submit-button {
    background-color: var(--primary-color);
    color: #EDE8DE;
    border: none;
    border-radius: 4px;
    padding: 12px 24px;
    font-family: "Libre Baskerville";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    cursor: pointer;
    width: calc(100% - 64px);
    max-width: 200px;
    position: absolute;
    bottom: 48px;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 0;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Table styles - place these with other table-related styles */
.table-container {
    width: 100%;
    margin: auto;
    padding-bottom: 24px;
}

.table-grid {
    display: grid;
    grid-template-columns: 0.3fr 0.7fr 0.4fr 0.5fr 1.2fr;
    width: 100%;
    margin: 0;
}

.table-header {
    display: contents;
}

.table-header .table-cell {
    padding: 12px;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 400;
    color: rgba(237, 232, 222, 0.60);
    border-bottom: 1px solid rgba(250, 247, 242, 0.3);
    text-align: center;
    line-height: normal;
}

.table-row {
    display: contents;
}

.table-cell {
    border-right: 1px solid rgba(250, 247, 242, 0.3);
    border-bottom: 1px solid rgba(250, 247, 242, 0.3);
    padding: 12px 8px;
    white-space: normal;
    line-height: 1.4;
}

.table-row .table-cell {
    padding: 12px;
    font-family: 'Libre Baskerville', serif;
    font-size: 12px;
    color: var(--card-background);
}

.table-row .table-cell:last-child {
    font-size: 11px;
    line-height: 1.3;
    padding-right: 48px;
    hyphens: auto;
    word-wrap: break-word;
    word-break: normal;
    overflow-wrap: break-word;
}

.table-cell:nth-child(5) {
    border-right: none;
}

.table-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 20px;
    font-weight: 400;
    color: var(--card-background);
    margin-bottom: 24px;
    text-align: center;
    width: 100%;
}

/* Add language support for hyphenation */
html {
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    lang: de;
}

/* Add this new container style */
.matrix-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px;  /* Reduced from 48px */
    margin: auto;  /* Centers the content vertically */
}

.card h1 {
    color: #325142;
    font-family: "Libre Baskerville";
    font-size: 30.277px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin-top: 64px;
    margin-bottom: 0;
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    /* Enable general scrolling */
    body {
        overflow-y: auto;
        overflow-x: hidden;
    }

    .page {
        position: static;
        height: auto;
        overflow: visible;
    }

    /* Hide input page when showing results */
    .input-page[style*="transform"] {
        display: none;
    }

    /* Results Container */
    .results-container {
        grid-template-columns: 1fr;
        height: auto;
        overflow: visible;
        gap: 0;
    }

    /* Cards Section */
    .results-left {
        min-height: auto;
        height: auto;
        padding: 48px 16px;
        gap: 50px;
    }

    /* Cards Grid - Mobile Only */
    .results-cards {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 180px);
        gap: 20px;
        width: 100%;
        margin-bottom: 40px;
    }

    /* Individual Cards */
    .result-card {
        height: 180px;
        padding: 24px;
        margin: 0;
        box-sizing: border-box;
    }

    /* Right side with Matrix and Table */
    .results-right {
        height: 100vh;  /* Fixed height for container */
        position: relative;
        overflow: hidden;  /* Hide overflow */
    }

    .scroll-container {
        height: 100%;
        overflow-y: auto;
        scroll-snap-type: y mandatory;
        scroll-behavior: smooth;
        position: absolute;  /* Position absolutely */
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    /* Matrix and Table sections */
    .scroll-section {
        min-height: 100vh;
        height: 100vh;
        scroll-snap-align: start;
        scroll-snap-stop: always;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 48px 16px;
        background: #272521;
        opacity: 1;
        box-sizing: border-box;
    }

    /* Ensure content is properly centered */
    .matrix-content,
    .table-content {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
    }

    /* Hide scroll indicator */
    .scroll-indicator {
        display: none;
    }

    /* Table adjustments */
    .table-container {
        padding-top: 0;  /* Remove top padding */
        width: 100%;
    }

    /* Adjust table section padding */
    .scroll-section:last-child {
        padding-top: 64px;  /* Add more padding at the top of the table section */
        justify-content: flex-start;  /* Align content to top */
    }

    .table-title {
        margin-bottom: 32px;  /* Increase space between title and table */
    }

    .table-grid {
        width: 100%;
        margin-top: 16px;  /* Add some space above the table */
    }

    /* Input page styles */
    .input-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 20px;
        box-sizing: border-box;
    }

    .card {
        width: 100%;
        max-width: 341px;
        margin: 0;
        position: relative;
        top: auto;
        transform: none;
        height: 492px;
    }

    /* Keep the rest of the card's internal spacing */
    .input-container {
        margin-top: 94px;
    }

    .submit-button {
        position: absolute;
        bottom: 48px;
        left: 50%;
        transform: translateX(-50%);
        width: calc(100% - 64px);
    }

    /* Matrix Styles für Mobile */
    .matrix-content {
        padding: 24px 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .matrix-container {
        width: 100%;
        max-width: none;
        aspect-ratio: 1 / 1;
        gap: 1px;
    }

    .matrix-cell {
        padding: 8px;
    }

    .matrix-number {
        font-size: 24px;
    }

    .matrix-declarations {
        font-size: 10px;
    }

    .matrix-title {
        font-size: 18px;
        margin-bottom: 24px;
    }
} 