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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #000;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3 {
    color: #000;
    margin-bottom: 1rem;
    font-weight: 500;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 1.75rem;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
}

h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

ul {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

a {
    color: #000;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #C6DBF8;
}

/* Header */
header {
    padding: 2rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.title-with-icon {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
}

.header-link {
    display: flex;
    align-items: baseline;
    text-decoration: none;
}

.header-link:hover {
    text-decoration: none;
}

.header-icon {
    height: 3rem;
    margin-right: 0.5rem;
}

header h1 {
    color: #000;
    margin-right: auto;
}

.blue-line {
    width: 100%;
    max-width: 200px;
    height: 4px;
    background-color: #C6DBF8;
    margin-top: 0;
}

.tagline {
    font-size: 1.2rem;
    margin-top: 0.5rem;
    padding-left: 0;
}

.store-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-left: 2rem;
}

.store-button {
    height: 50px;
    width: auto;
    display: block;
}

.store-button:hover {
    opacity: 0.85;
}

/* Main content */
main {
    flex: 1;
    padding: 2rem 0;
}

.app-feature {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.image-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin-bottom: 0px;
}

.main-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.image-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50px;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    pointer-events: none;
}

/* Legal sections */
.legal {
    background-color: white;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.legal h2 {
    border-bottom: 2px solid #C6DBF8;
}

.legal p {
    max-width: 800px;
}

/* Footer */
footer {
    background-color: #C6DBF8;
    color: black;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav a {
    color: black;
    margin-left: 1.5rem;
}

.footer-nav a:hover {
    color: #333;
}

/* Responsive design */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .header-icon {
        height: 3rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .logo-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 1rem;
        text-align: left;
        width: 100%;
    }

    .header-content {
        align-items: flex-start;
        text-align: left;
    }

    .blue-line {
        width: 70%;
        margin-top: 0;
        margin-left: 0;
        margin-right: auto;
    }

    .tagline {
        padding-left: 0;
        width: 100%;
        text-align: center;
    }

    .store-buttons {
        margin-left: 0;
        flex-direction: column;
        align-items: flex-end;
    }

    .store-button {
        height: 45px;
    }

    footer .container {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        margin-top: 1rem;
    }

    .footer-nav a {
        margin: 0 0.75rem;
    }

    header .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
        width: 100%;
    }

    .image-container {
        width: 95%;
        max-width: 500px;
    }

    .feature-blue-line {
        max-width: 200px;
    }

    .feature-description {
        /* Font size now handled by clamp() in the main declaration */
        /* Any other styles for this breakpoint can remain */
    }

    .inline-image {
        height: 35px;
    }

    .step5-text-content {
        display: none;
    }
}

@media (max-width: 600px) {
    .line-break {
        display: block;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo-container {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }

    .header-content {
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .tagline {
        text-align: center;
        padding-left: 0;
        margin-top: 0.25rem;
    }

    .store-buttons {
        margin-left: 0;
        margin-top: 1rem;
        justify-content: flex-start;
        flex-direction: row;
        gap: 1rem;
    }

    .store-button {
        height: 45px;
    }

    .image-container {
        max-width: 95%;
    }

    .image-fade {
        height: 30px;
    }

    .feature-title {
        font-size: 1.8rem;
        margin-top: 1rem;
    }

    .feature-blue-line {
        max-width: 150px;
        margin-top: 0.25rem;
    }

    .feature-description {
        font-size: 0.95rem;
        margin-top: 0.75rem;
    }

    .step-content {
        padding: 0 10px;
    }

    .step-title {
        font-size: 1.4rem;
    }

    .step-descriptions ul {
        margin-left: 1rem;
    }

    .step-image img {
        max-width: 100%;
        height: auto;
    }

    .footer .container {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .footer-nav {
        margin-top: 0.5rem;
    }

    .footer-nav a {
        margin: 0 0.5rem;
    }

    .step-descriptions ul {
        margin-left: 1rem;
    }

    /* Add rules to shrink list items and inline images */
    .step-descriptions li {
        font-size: 0.9rem;
        /* Reduce font size for list items */
        /* Remove flex display to restore bullet points */
        /* display: flex; */
        /* align-items: center; */
        margin-bottom: 0.5rem;
        /* Adjust spacing between list items */
    }

    .inline-image {
        /* height: 30px; Further reduce inline image height */
        /* height: 25px; */
        /* height: 22px; Make image even smaller */
        /* height: 11px; Make image half the previous size */
        /* height: 11px !important; Add !important to override HTML attribute */
        /* height: 19px !important; Increase height to 175% of 11px */
        height: 30px !important;
        /* Set height to 22px */
        margin-left: 8px;
        /* Adjust spacing */
        vertical-align: middle;
        /* Align image vertically with text */
    }
}

.feature-title {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1.5rem, 5vw, 2.8rem);
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #000;
    text-align: center;
    max-width: 1000px;
    line-height: 1.2;
}

.feature-blue-line {
    width: 100%;
    max-width: 700px;
    height: 6px;
    background-color: #C6DBF8;
    margin: 0 auto 1.5rem;
}

.feature-description {
    font-family: 'Poppins', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.6;
    max-width: 800px;
    text-align: center;
    margin: 0 auto 2rem;
    padding: 0 1rem;
}

.line-break {
    display: block;
}

/* Steps Section */
.steps-section {
    margin: 4rem 0;
}

.step-container {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.step-container-split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0rem;
    max-width: 1200px;
    margin: 0 auto;
}

.step-container-reverse {
    flex-direction: row-reverse;
}

.step-image {
    flex: 1;
    max-width: clamp(35%, 40vw, 40%);
    position: relative;
}

.step-image-left {
    align-self: flex-start;
}

.step-image-right {
    align-self: flex-end;
}

.step-image-center {
    max-width: 80%;
    align-self: center;
    flex: 4;
}

.step-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.step-image::after {
    content: '';
    display: block;
    width: 170%;
    height: 6px;
    background-color: #C6DBF8;
    margin: 1.5rem 0 0;
}

/* Specific styling for Step 1 (left-aligned) */
.step-image-left::after {
    margin: 1.5rem 0 0 0;
    /* Align to left */
    transform: none;
}

/* Specific styling for Step 2 (right-aligned) */
.step-image-right::after {
    margin: 1.5rem 0 0 auto;
    /* Align to right */
    transform: translateX(-40%);
    /* Shift towards left */
}

.step-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: min(10%, 5vw);
    margin-left: clamp(1rem, 4vw, 2rem);
}

.step-tag {
    display: inline-block;
    background-color: #C6DBF8;
    color: #000;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: 500;
    margin-bottom: 1rem;
}

.step-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.step-descriptions p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.inline-image {
    height: 45px;
    width: auto;
    margin-left: 10px;
    vertical-align: middle;
    border-radius: 5px;
}

.step-image-center::after {
    width: 100%;
    margin: 1.5rem 0 0 auto;
    transform: translateX(0%);
}

.step-container-split .step-title {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.3;
}

.step-container-split .step-content {
    flex: 1;
    min-width: 25%;
}

@media (max-width: 900px) {

    .step-container,
    .step-container-reverse,
    .step-container-split {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }

    /* General rule for all steps showing text above image */
    .steps-section .step-container {
        flex-direction: column-reverse;
    }

    /* Special fix just for Step 2 - ensure content appears above image */
    .step2-section .step-container {
        flex-direction: column;
    }

    /* Special fix just for Step 6 - ensure content appears above image */
    .step6-section .step-container {
        flex-direction: column;
    }

    /* For the split container with Step 4/5 */
    .step-container-split {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    /* Order: Step 4 text, Step 5 text, then image */
    .step-container-split .step-content:nth-child(1) {
        order: 1;
        margin-bottom: 0;
        /* Remove margin below step 4 title container */
    }

    /* Reduce bottom margin on Step 4's title specifically on mobile */
    .step-container-split .step-content:nth-child(1) .step-title {
        margin-bottom: 0;
        /* Remove space below Step 4 title */
    }

    .step-container-split .step-content:nth-child(3) {
        order: 2;
        margin-top: 0;
        /* Remove margin above step 5 title container */
    }

    /* Hide the Step 5 Tag specifically on mobile */
    .step-container-split .step-content:nth-child(3) .step-tag {
        display: none;
    }

    /* Ensure split container titles match general mobile h2 size */
    .step-container-split .step-title {
        font-size: 1.5rem;
        /* Match mobile h2 size */
    }

    /* Add a full stop visually after split container titles on mobile */
    .step-container-split .step-title::after {
        content: ".";
    }

    .step-container-split .step-image {
        order: 3;
        margin-top: 2rem;
        /* Add some space above the image */
    }

    .step-content {
        width: 100%;
        padding-left: 0;
        margin-left: 0;
        align-items: flex-start;
        text-align: left;
    }

    /* Hide original Step 6 tag */
    .step6-section .step-tag {
        display: none;
    }

    /* Add "Step 5" label using ::before on mobile for step 6 content */
    .step6-section .step-content::before {
        content: "Step 5";
        display: inline-block;
        background-color: #C6DBF8;
        color: #000;
        padding: 0.5rem 1rem;
        border-radius: 50px;
        font-weight: 500;
        margin-bottom: 1rem;
        /* Inherit styles from .step-tag */
    }

    .step-image {
        max-width: 90% !important;
        margin-left: 0;
        align-self: center;
    }

    .step-image-left,
    .step-image-right,
    .step-image-center {
        align-self: center;
    }

    .step-image::after {
        width: 170%;
        margin: 1.5rem auto 0;
        transform: none;
    }

    .step-image-right::after,
    .step-image-left::after,
    .step-image-center::after {
        /* width: 110%; */
        /* width: 55%; Make line half length on mobile */
        /* margin: 1.5rem auto 0; */
        /* Keep margin? Might not matter if hidden */
        /* transform: none; */
        /* Keep transform? Might not matter if hidden */
        display: none;
        /* Hide the line completely on mobile */
    }

    .step-tag {
        text-align: left;
    }

    .step-title {
        text-align: left;
    }

    .step-descriptions p {
        text-align: left;
    }

    .feature-blue-line {
        max-width: 350px;
    }

    /* Ensure step1-image also gets the larger width on mobile */
    .step1-image {
        /* max-width: 90%; */
        max-width: 90% !important;
        /* Add !important to override base style */
    }
}

/* Make step1.png smaller */
.step1-image {
    max-width: clamp(40%, 40vw, 35%);
}

/* Style for header logo text to replicate previous H1 look */
.header-link .header-logo-text {
    color: #000;
    /* Copied from 'header h1' */
    margin-right: auto;
    /* Copied from 'header h1' */
    font-size: 3rem;
    /* Explicitly set from base h1 rule */
    font-weight: 500;
    /* Explicitly set from base h1 rule */
    display: inline;
    /* Ensure it behaves like text inline */
}

/* Underline blog post headings directly */
.blog-post h1,
.blog-post h2 {
    display: inline-block;
    /* Make element only as wide as content */
    padding-bottom: 0.5rem;
    /* Space between text and underline */
    border-bottom: 6px solid #C6DBF8;
    /* The underline */
    margin-bottom: 1.5rem;
    /* Spacing after underline */
    /* Ensure text within the inline-block element is aligned as needed (usually left) */
    text-align: left;
}

/* Specifically make H1 bold in blog posts */
.blog-post h1 {
    font-weight: 700;
    /* Or 'bold' */
}

/* Reset padding/margin for step content within blog posts */
.blog-post .step-content {
    padding-left: 0;
    margin-left: 0;
    text-align: left;
}

/* Style the actual image directly within step content */
.blog-post .step-content img {
    max-width: 400px;
    /* Control image size */
    width: 100%;
    /* Allow shrinking */
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    /* Make it a block element */
    margin: 1rem auto;
    /* Center using auto margins, add top margin */
}

/* Style step tags within blog posts as bold text */
.blog-post .step-tag {
    font-size: 1.6rem;
    /* Slightly smaller than h2 */
    font-weight: 700;
    /* Make text bold */
    color: #000;
    /* Set text color to black */
    background-color: transparent;
    /* Remove background */
    border-radius: 0;
    /* Remove rounded corners */
    padding: 0;
    /* Remove padding */
    margin-bottom: 0.5rem;
    /* Keep reduced bottom margin */
}

/* Hide the ::after pseudo-element (blue line) for step images in blog posts */
.blog-post .step-image::after {
    display: none;
}

/* Reduce margin between step sections in blog posts */
.blog-post .steps-section {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Narrow the main content column for blog posts for readability */
.blog-post {
    max-width: 800px;
    /* Adjust as needed */
    /* Ensure it remains centered (margin: auto inherited from .container should work, but explicit is safer) */
    margin-left: auto;
    margin-right: auto;
}

/* Apply serif font (like Medium) to blog post body text */
.blog-post p,
.blog-post li {
    font-family: Georgia, serif;
    /* Use Georgia or fallback to generic serif */
}

/* Make links within blog posts blue and underlined */
.blog-post a {
    color: #0056b3;
    /* A standard blue color */
    text-decoration: underline;
}

/* Adjust hover state for blog post links (optional, e.g., slightly darker blue) */
.blog-post a:hover {
    color: #003d80;
    /* text-decoration: none; Optional: remove underline on hover */
}

/* Layout store buttons horizontally in blog posts */
.blog-post .store-buttons-blog {
    display: flex;
    /* Make direct children (<a> tags) flex items */
    gap: 15px;
    /* Increase gap slightly for better spacing */
    align-items: center;
    /* Vertically align <a> tags */
    flex-wrap: wrap;
    /* Allow wrapping on very small screens if necessary */
    /* Remove justify-content unless specific alignment (like center) is desired */
    /* justify-content: center; */
    margin-top: 1rem;
}

/* Style the images (store-button) inside the blog button links */
.blog-post .store-buttons-blog .store-button {
    /* Do NOT set display here; let the image behave naturally inside the <a> */
    height: 45px;
    /* Adjust height slightly if needed */
    width: auto;
    /* Maintain aspect ratio */
    vertical-align: middle;
    /* Good practice for images within links */
}

/* Optional: Adjust button size specifically for the blog if needed */
/* .blog-post .store-buttons-blog .store-button {
    height: 40px;
} */

.blog-post .store-buttons-blog .store-button {
    height: 50px;
    width: auto;
}

/* Blog Post Table Styles */
.table-container {
    overflow-x: auto;
    /* For responsive behavior on small screens */
    margin: 2rem 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table th,
table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
}

table th {
    background-color: #C6DBF8;
    font-weight: 600;
    color: #000;
}

table tr:last-child td {
    border-bottom: none;
}

table tr:hover {
    background-color: #f9f9f9;
}

table td strong {
    font-weight: 600;
}

.centered-blog-picture {
    display: flex;
    justify-content: center;
    margin: 1rem auto;
    width: 100%;
    max-width: 500px;
}

.centered-blog-picture img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}