/* Core Typography Styles */

/* Font Family Selection */
body {
    font-family: 'Inter', 'Roboto', 'Poppins', Arial, sans-serif; /* Primary Font */
    color: #2d2d2d; /* Dark Gray for primary text */
    line-height: 1.6; /* Comfortable reading */
    margin: 0; /* Remove default margin */
    padding: 0; /* Remove default padding */
}

/* Headings */
h1 {
    font-size: 3rem; /* Large font size */
    font-weight: 700; /* Bold */
    text-transform: uppercase; /* Uppercase for emphasis */
    line-height: 1.3; /* Tighter line height */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    margin: 10rem 1rem 1rem; /* Space above (10rem) and below (1rem) for desktop */
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem; /* Slightly smaller on mobile */
        margin: 4.5rem 1rem 1rem; /* Space above (4.5rem) and below (1rem) for mobile */
    }
}

h2 {
    font-size: 2.5rem; /* Increased size for prominence */
    font-weight: 600; /* Semi-bold */
    line-height: 1.3; /* Tighter line height */
    margin: 2rem 0; /* Space above and below */
}

h3 {
    font-size: 2rem; /* Increased size for better hierarchy */
    font-weight: 500; /* Medium weight */
    line-height: 1.3; /* Tighter line height */
    margin: 1.5rem 0; /* Space above and below */
}

h4 {
    font-size: 1.5rem; /* Increased size for better visibility */
    font-weight: 500; /* Medium weight */
    line-height: 1.3; /* Tighter line height */
    margin: 1.5rem 0; /* Space above and below */
}

/* Body Text */
p {
    font-size: 1rem; /* Comfortable size */
    margin-bottom: 1.5rem; /* Space between paragraphs */
}

/* Links */
a {
    font-weight: 600; /* Semi-bold for emphasis */
    color: #2563eb; /* Spiritual Blue */
    text-decoration: none; /* Remove underline */
    transition: color 0.2s ease; /* Smooth color transition */
}

a:hover {
    text-decoration: underline; /* Underline on hover */
    color: #1d4ed8; /* Darker blue on hover */
}

/* Buttons */
button {
    font-size: 1.125rem; /* Slightly larger for buttons */
    font-weight: 600; /* Semi-bold for buttons */
    padding: 0.5rem 1rem; /* Add padding for better touch targets */
    border: none; /* Remove default border */
    border-radius: 5px; /* Rounded corners */
    background-color: #2563eb; /* Button background color */
    color: #ffffff; /* White text for contrast */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.2s ease; /* Smooth background transition */
}

button:hover {
    background-color: #1d4ed8; /* Darker background on hover */
}

/* List Items */
ul, ol {
    font-size: 1rem; /* Standard size for lists */
    margin-bottom: 1rem; /* Space between list items */
}

/* Text Color and Contrast */
.dark-background {
    color: #ffffff; /* Light text on dark backgrounds */
}

.light-background {
    color: #2d2d2d; /* Dark text on light backgrounds */
}

/* Special Sections (Quotes, Spiritual Texts) */
blockquote {
    font-family: 'Georgia', 'Merriweather', serif; /* Use serif for quotes */
    padding-left: 1rem; /* Indent */
    border-left: 4px solid #ff6600; /* Highlight border */
    background-color: #f9f9f9; /* Light background for quotes */
    margin: 1.5rem 0; /* Space around blockquotes */
    font-style: italic; /* Italicize quotes for emphasis */
}

/* Accessibility */
:focus {
    outline: none; /* Remove default outline */
    box-shadow: 0 0 0 2px #2563eb; /* Custom focus ring */
}
/* === Essay Container Styles === */
.essay-container {
    width: 55%;
    max-width: 1000px;
    background: #fff;
    padding: 5rem 6.25rem;
    margin: 6.25rem auto;
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.15);
    border-radius: 0.9375rem;
    font-size: 1.5rem;
    line-height: 1.6;
    color: #333;
    text-align: justify;
    border-left: 0.5rem solid #3498db;
    transition: box-shadow 0.3s ease-in-out;
    hyphens: auto; /* Improves justified text readability */
    position: relative;
    overflow: hidden; /* Maintains rounded corners with banner */
    padding-top: 2rem; /* Adjusted for banner */
}

/* === Essay Banner === */
.essay-banner {
    width: calc(100% + 12.5rem); /* Extends beyond padding */
    height: 200px;
    margin: -2rem -6.25rem 2rem -6.25rem;
    object-fit: cover;
    border-radius: 0.9375rem 0.9375rem 0 0;
    display: block;
}

/* === Hover Effect === */
.essay-container:hover {
    box-shadow: 0 1.25rem 3.125rem rgba(0, 0, 0, 0.2);
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .essay-container {
        width: 70%;
        padding: 3rem 4rem;
        margin: 4rem auto;
        font-size: 1.375rem; /* 22px */
    }
    
    .essay-banner {
        width: calc(100% + 8rem);
        margin: -1.5rem -4rem 1.5rem -4rem;
        height: 160px;
    }
}

@media (max-width: 600px) {
    .essay-container {
        width: 90%;
        padding: 2rem 1.875rem;
        margin: 2rem auto;
        font-size: 1.25rem; /* 20px */
        line-height: 1.5;
        text-align: left;
        border-left-width: 0.375rem;
    }

    .essay-banner {
        width: calc(100% + 3.75rem);
        margin: -1rem -1.875rem 1rem -1.875rem;
        height: 120px;
        border-radius: 0.625rem 0.625rem 0 0;
    }
}

/* === Accessibility & Interaction === */
.essay-container a {
    color: #2980b9;
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.essay-container a:hover,
.essay-container a:focus {
    color: hsl(204, 70%, 53%);
    text-decoration-thickness: 0.125rem;
}

/* === Print Optimization === */
@media print {
    .essay-container {
        box-shadow: none;
        border-left: 0;
        padding: 0;
        margin: 2rem auto;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem; /* Slightly smaller on mobile */
        margin: 11rem 1rem 1rem; /* Increased space above (11rem) for mobile */
    }
    h2 {
        font-size: 2rem; /* Slightly smaller on mobile */
    }
    h3 {
        font-size: 1.5rem; /* Slightly smaller on mobile */
    }
    h4 {
        font-size: 1.25rem; /* Slightly smaller on mobile */
    }
    p {
        font-size: 0.95rem; /* Slightly smaller for better fit */
    }
    button {
        font-size: 1rem; /* Adjust button size for mobile */
    }
}
