/* --- Global Reset --- */
* { box-sizing: border-box; }

body {
    margin: 0;
    width: 100%;
    font-family: Arial, sans-serif;
    line-height: 1.5;
    background-color: #f4f4f4; /* Added light grey background to make white container pop */
}

/* --- Container & Layout --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto; /* Adds space around the border */
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    
    /* These three lines create the border look */
    border: 2px solid #0000FF; 
    padding: 25px;
    background-color: #ffffff;
}

/* --- Poetry Formatting --- */
.poem-content {
    line-height: 1.6;
    margin-bottom: 2em;
}

.poem-content br {
    display: block;
    content: "";
    margin-top: 0;
}

.poem-content p {
    margin: 0 0 1.2em 0;
}

/* --- Author Section --- */
.author-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 20px;
    width: 100%; /* Ensures it fills the container width */
}

.author-bio { flex: 2; min-width: 300px; }
.author-image-box { flex: 1; min-width: 250px; text-align: center; }
.author-image-box img { 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
    max-width: 100%; 
    height: auto; 
}

/* --- Headings & Links --- */
h1 { color: #0000FF; margin-top: 0; margin-bottom: 20px; }
h2 { color: #1F51FF !important; font-size: 1.3em; margin-top: 30px; }
h3 { color: #2e8b57; } 

.full a, .list li a { 
    color: #006400; 
    text-decoration: none; 
    font-weight: 700; 
}

.full a:hover, .list li a:hover {
    color: #006400; 
    text-decoration: underline;
}

/* --- Responsive --- */
@media only screen and (max-width: 768px) {
    .container { width: 95%; padding: 15px; }
    .author-wrapper { flex-direction: column-reverse; }
}

/* --- Fix for Author Intro Layout --- */
.section {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    align-items: flex-start;
    width: 100%;
}

.left {
    flex: 2;
    min-width: 300px;
}

.right {
    flex: 1;
    min-width: 250px;
    text-align: center;
}

.right img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 8px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); 
}

/* Responsive adjustment for mobile */
@media only screen and (max-width: 768px) {
    .section {
        flex-direction: column-reverse;
    }
}

/* --- Final Fix for List Alignment --- */
.list {
    display: block;          
    width: 100%;            
    clear: both;            
    margin-top: 20px;
    margin-bottom: 20px;
}

/* --- Updated List Alignment --- */
.list ul, .list ol {
    /* Changed from disc to none to remove bullets */
    list-style-type: none !important;  
    /* Force the marker inside the element's box */
    list-style-position: inside !important;
    padding-left: 0;    
    margin: 0;
}

.list li {
    /* Crucial: Must be list-item to show the marker */
    display: list-item !important;       
    margin-bottom: 8px;    
    width: 100%;
}

/* Ensure the links inside the list remain styled correctly */
.list li a {
    display: inline; /* Keeps the link text flowing normally */
}

/* Forces the list to sit under the heading by ensuring it's not floated */
.list {
    display: block;
    clear: both;
    margin-top: 20px;
}
/* --- Optimized Mobile Fix --- */
@media only screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    /* Only target the main container for padding to avoid double-padding issues */
    .container {
        width: 95% !important;
        padding: 10px !important;
    }

    /* Reset section/wrapper padding so they don't push out of the container */
    .section, .author-wrapper {
        width: 100% !important;
        padding: 0 !important; 
    }

    /* Ensure images and bio stay within bounds */
    .left, .right, .author-bio, .author-image-box {
        width: 100% !important;
        min-width: 0 !important; /* Removes the fixed 300px/250px constraint */
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }
}