/* style.css */
:root {
    /* Color Palette - From app/constants/colors.js */
    --primary-color: #f38c74;
    --primary-dark: #d46b5a;
    --primary-light: #f8b4a4;
    --accent-color: #ff6f61;
    --success-color: #8bc34a;
    --warning-color: #ffa726;
    --error-color: #e57373;
    --info-color: #64b5f6;
    --background-color: #FFFFFF;
    --background-light: #F5F5F5;
    --surface-color: #FFFFFF;
    --divider-color: #E0E0E0;
    --text-primary: #1f1f1f; /* Slightly softer black */
    --text-secondary: #6d6d6d; /* Adjusted for readability */
    --text-light: #FFFFFF;
    --text-disabled: #9E9E9E;
    --modal-background: rgba(0, 0, 0, 0.7); /* Darker overlay */
    --shadow-color: rgba(0, 0, 0, 0.1);

    /* Font */
    --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

/* General Reset & Body Styling */
body {
    font-family: var(--font-family);
    line-height: 1.7; /* Increased for better readability */
    margin: 0;
    padding: 0;
    background-color: var(--background-light);
    color: var(--text-primary);
    font-size: 16px; /* Base font size */
}

/* Container */
.container {
    max-width: 1100px; /* Wider for two-column layout */
    margin: 30px auto;
    padding: 0; /* Padding moved to sections */
    background-color: var(--surface-color);
    box-shadow: 0 4px 15px var(--shadow-color);
    border-radius: 12px; /* Softer corners */
    overflow: hidden; /* Keep rounded corners */
}

/* Header */
header {
    color: var(--text-light);
    padding: 15px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space between logo and title */
}

/* Actual logo styling */
.logo {
    height: 40px; /* Maintain desired height */
    width: auto; /* Let width adjust automatically */
    max-width: 180px; /* Optional: Prevent logo becoming excessively wide */
    vertical-align: middle; /* Align nicely */
}


header h1 {
    margin: 0;
    font-size: 1.8em;
    text-align: right; /* Align title to the right */
}

/* Navigation */
nav {
    background-color: var(--surface-color);
    padding: 15px 30px;
    text-align: center;
    border-bottom: 1px solid var(--divider-color);
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    display: inline;
    margin: 0 20px;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary-dark);
    font-weight: 600; /* Bolder links */
    font-size: 1.1em;
    transition: color 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active { /* Style for active page */
    color: var(--accent-color);
}

/* Main Content Area */
main {
    padding: 30px 40px; /* More padding */
}

/* Headings */
h2 {
    color: var(--primary-dark);
    border-bottom: 2px solid var(--primary-light);
    padding-bottom: 10px;
    margin-top: 0; /* Remove default top margin for first heading */
    margin-bottom: 25px;
    font-size: 1.7em;
}

h3 {
    color: var(--primary-color);
    margin-top: 35px;
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* Paragraphs and Lists */
p, li {
    color: var(--text-secondary);
    margin-bottom: 1em;
}

ul, ol {
    padding-left: 25px;
}

/* Two-Column Layout for Instructions */
.instruction-step {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    align-items: flex-start; /* Align items to the top */
    gap: 30px; /* Space between text and image */
    padding: 25px 0;
    border-bottom: 1px solid var(--divider-color);
}
.instruction-step:last-child {
    border-bottom: none;
}

.instruction-text {
    flex: 1 1 55%; /* Text takes slightly more space, allows shrinking */
    min-width: 280px; /* Minimum width before wrapping */
}

.instruction-image {
    flex: 1 1 40%; /* Image takes slightly less space, allows shrinking */
    min-width: 250px; /* Minimum width before wrapping */
    text-align: center;
}

/* Actual Image Styling within instruction-image div */
.instruction-image img.modal-trigger {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    cursor: pointer;
    margin: 0 auto;
    border: 1px solid var(--divider-color); /* Add subtle border */
}


/* Important Note Box */
.important-note {
    background-color: #fff8e1; /* Lighter warning background */
    border-left: 5px solid var(--warning-color);
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    color: var(--text-secondary);
}

.important-note strong {
    color: var(--warning-color); /* Use warning color for emphasis */
    font-weight: 600;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9em;
    color: var(--text-secondary);
    background-color: var(--background-light);
    border-top: 1px solid var(--divider-color);
    border-bottom-left-radius: 12px; /* Match container */
    border-bottom-right-radius: 12px; /* Match container */
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-background);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0; /* Start transparent for fade-in */
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1; /* Fade in */
}

.modal-content {
    background: var(--surface-color);
    padding: 20px;
    max-width: 90%;
    max-height: 90vh; /* Limit height based on viewport height */
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    overflow: hidden; /* Needed for image max-height */
    display: flex; /* Center image inside */
    justify-content: center;
    align-items: center;
}

.modal-image {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 40px); /* Adjust max height considering padding */
    width: auto; /* Maintain aspect ratio */
    height: auto; /* Maintain aspect ratio */
    object-fit: contain; /* Ensure image fits without distortion */
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1; /* Ensure close button alignment */
    padding: 0 5px;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--text-primary);
}

.app-store-buttons a {
    text-decoration: none;
}