body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; /* Common system font stack */
    margin: 0;
    padding: 0;
    background-color: #f5efe9; /* Changed to beige color to match ebook cover */
    color: #574840; /* Darker brown for text to match ebook */
    line-height: 1.6;
    min-height: 100vh;
}

/* Reset headers for consistent styling */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 20px 0;
    color: #60534a; /* Brown color for headings to match ebook */
}

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

/* Two-column flex layout for main content */
.content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 60px;
}

/* Ebook cover image container */
.ebook-cover {
    flex: 1;
    text-align: center;
}

.ebook-cover img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Form section */
.form-section {
    flex: 1 1 0%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center; /* Center all text content in the form section */
}

.form-section h1 {
    font-size: 2.2rem;
    line-height: 1.3;
    color: #60534a; /* Darker brown color */
    margin-bottom: 25px;
    text-align: center; /* Ensure heading is centered */
}

.form-section h1 i {
    font-style: italic;
    font-weight: 500; /* Slightly lighter than the heading */
    color: #74665e; /* Slightly darker shade for contrast */
}

.form-description {
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: #6c6057; /* Brown-grey text color */
    text-align: center;
}

/* Form elements */
form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px; /* Limit form width for better aesthetics */
    margin: 0 auto; /* Center the form */
    flex-shrink: 0;
}

/* Invalid input styling */
input.invalid {
    border: 2px solid #f44336 !important;
    background-color: #ffeeee;
}

input:focus {
    outline: none;
    border-color: #bc9f8e;
}

input[type="text"],
input[type="email"] {
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    justify-content: center; /* Center checkbox and label */
}

input[type="checkbox"] {
    margin-right: 10px;
}

button {
    padding: 15px;
    background-color: #bc9f8e; /* Soft brown button color to match ebook theme */
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    width: 100%; /* Make button full width of the form */
    max-width: 400px; /* Maintain consistent width */
    margin: 0 auto; /* Center the button */
}

button:hover {
    background-color: #a98f80; /* Darker brown on hover */
}

/* Additional info section */
.additional-info {
    text-align: center;
    max-width: 600px; /* Slightly narrower for better readability */
    margin: 0 auto 80px auto;
    padding: 0 20px;
}

.additional-info h2 {
    margin-bottom: 20px;
    color: #60534a; /* Match headings */
}

.additional-info p {
    color: #6c6057; /* Match text */
    font-size: 1.1rem;
}

/* Divider */
.divider {
    width: 80px;
    height: 2px;
    background-color: #d9cec5; /* Light beige-brown for divider */
    margin: 60px auto;
}

/* Author section */
.author-section {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px auto;
    padding: 0 20px;
}

.author-section h2 {
    margin-bottom: 30px;
    color: #60534a; /* Match headings */
}

.author-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px auto;
    overflow: hidden;
    border: 3px solid #d9cec5; /* Light brown border */
}

.author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #60534a; /* Match headings */
}

.author-bio {
    color: #6c6057; /* Match text */
    max-width: 600px;
    margin: 0 auto 30px auto;
    line-height: 1.7;
}

.learn-more-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: #bc9f8e; /* Match button color */
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.learn-more-btn:hover {
    background-color: #a98f80; /* Match button hover */
}

/* Message display */
#message {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
    color: #4CAF50;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    padding: 10px;
}

/* Footer - updated for new position */
footer {
    text-align: center;
    padding: 20px 0 10px 0;
    color: #948a83; /* Light brown footer text */
    font-size: 0.8rem;
    margin-top: 30px;
}

/* Social links section */
.social-links {
    text-align: center;
    margin: 25px auto 15px auto;
}

.instagram-link {
    display: inline-flex;
    align-items: center;
    color: #60534a;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    gap: 8px;
    padding: 5px 0;
}

.instagram-link i {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-link:hover {
    color: #bc9f8e;
}

/* Responsive styles */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .ebook-cover, .form-section {
        width: 100%;
    }
    
    .form-section h1 {
        font-size: 1.8rem;
    }
}

/* RODO toggle link styling */
.rodo-toggle a {
    color: #bc9f8e;
    font-weight: 400;
    font-size: 0.92rem;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
    display: inline-block;
    margin-bottom: 2px;
    margin-top: 0;
    line-height: 1.2;
}

.rodo-toggle a:hover {
    color: #a98f80;
    text-decoration: none;
}

/* RODO info block with smooth expand/collapse */
.rodo-info {
    background: #f5efe9;
    color: #574840;
    border: 1px solid #d9cec5;
    border-radius: 6px;
    margin: 0 auto 0 auto;
    padding: 12px 18px;
    max-width: 400px;
    text-align: left;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(188, 159, 142, 0.07);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1), opacity 0.3s;
}

.rodo-info.open {
    max-height: 600px;
    opacity: 1;
    padding-top: 12px;
    padding-bottom: 12px;
    margin-bottom: 10px;
}