/* General Content Typography Improvements */

/* Fix global letter-spacing issues */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: normal !important;
}

.alt-font {
    letter-spacing: -0.5px;
}

/* Override Bootstrap's aggressive styling */
.container article p,
.container .content-section p {
    font-size: 17px;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: #333;
}

/* Better heading hierarchy */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 600;
}

.container h1 { font-size: 2.5rem; }
.container h2 { font-size: 2rem; }
.container h3 { font-size: 1.75rem; }
.container h4 { font-size: 1.5rem; }
.container h5 { font-size: 1.25rem; }
.container h6 { font-size: 1.1rem; }

/* Improve readability on services page */
.services-box-style-01 h2 {
    font-size: 20px !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
}

.services-box-style-01 p {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #555 !important;
}

/* Fix bunched text issues */
.text-justify {
    text-align: left !important;
    hyphens: none !important;
}

/* Better spacing for lists */
.container ul,
.container ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
}

.container li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

/* Improve form elements */
.container input[type="text"],
.container input[type="email"],
.container input[type="tel"],
.container textarea,
.container select {
    font-size: 16px;
    line-height: 1.5;
    padding: 0.75rem 1rem;
}

/* Better blockquote styling */
.container blockquote {
    font-size: 1.125rem;
    font-style: italic;
    border-left: 4px solid #ddd;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #666;
}

/* Improve table readability */
.container table {
    font-size: 16px;
    line-height: 1.5;
}

.container th,
.container td {
    padding: 0.75rem;
}

/* Better link styling */
.container article a {
    color: #0066cc;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.container article a:hover {
    text-decoration-thickness: 2px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .container h1 { font-size: 2rem; }
    .container h2 { font-size: 1.75rem; }
    .container h3 { font-size: 1.5rem; }
    .container h4 { font-size: 1.25rem; }
    
    .container article p,
    .container .content-section p {
        font-size: 16px;
    }
}

/* Fix overly wide content */
.container .row > [class*="col-"] {
    max-width: 100%;
}

/* Improve content sections */
.content-section {
    padding: 3rem 0;
}

.content-section:first-child {
    padding-top: 2rem;
}

.content-section:last-child {
    padding-bottom: 2rem;
}

/* Better image handling */
.container img {
    max-width: 100%;
    height: auto;
}

/* Fix text that's too close to edges on mobile */
@media (max-width: 576px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Improve readability with better contrast */
.text-dark-gray {
    color: #2c2c2c !important;
}

.text-muted {
    color: #6c757d !important;
}

/* Fix Bootstrap's aggressive margin removal */
.last-paragraph-no-margin p:last-child {
    margin-bottom: 0;
}

.last-paragraph-no-margin p:not(:last-child) {
    margin-bottom: 1rem;
}

/* Fix overly tight letter-spacing */
.ls-minus-3px {
    letter-spacing: -1px !important; /* Override from -3px */
}

.ls-minus-2px {
    letter-spacing: -0.5px !important; /* Override from -2px */
}

.xs-ls-minus-2px {
    letter-spacing: -0.5px !important;
}

/* Page title specific improvements */
.page-title-extra-large h1 {
    letter-spacing: -0.5px !important;
    font-size: 48px !important;
    line-height: 1.2 !important;
}

@media (max-width: 768px) {
    .page-title-extra-large h1 {
        font-size: 36px !important;
        letter-spacing: 0 !important;
    }
}

/* Footer list styling - remove unwanted indentation */
footer ul {
    padding-left: 0 !important;
    margin-bottom: 0;
    list-style: none;
}

footer ul li {
    margin-bottom: 8px;
    padding-left: 0;
}

footer ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer ul li a:hover {
    color: rgba(255, 255, 255, 1);
}

/* Area links in footer */
footer .area-link {
    display: inline-block;
    margin: 0 10px 10px 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer .area-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

footer .area-link .area-state {
    font-size: 13px;
    opacity: 0.8;
}