/* Subtle styling for page.php that maintains Metal America brand aesthetic */

/* Global mascot background that stays behind everything */
body {
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/metal-america-mascot.jpg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
    z-index: -10; /* Very low z-index to be behind everything */
    pointer-events: none;
}

/* Base page container that builds on your existing styles */
.page-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 30px 20px; /* Restored bottom padding */
    box-sizing: border-box;
    font-family: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    position: relative; /* For proper stacking context */
    z-index: 1; /* Above the mascot background */
}

/* Base styling without affecting spacing */
.page-container h1, 
.page-container h2 {
    color: #000000;
    font-weight: 700;
    line-height: 1.2;
}

.page-container h1 {
    font-size: 3.5rem; /* Increased from 3rem to 3.5rem */
}

.page-container h2 {
    font-size: 2rem;
}

.page-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

.page-container h4,
.page-container h5,
.page-container h6 {
    margin-top: 0.5em; /* Reduced top margin */
}

.page-container p {
    margin-top: 0.6em; /* Reduced top margin */
}

/* Links styling to match brand colors */
.page-container a:not(.button):not(.wp-block-button__link) {
    color: #ff2400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.page-container a:not(.button):not(.wp-block-button__link):hover {
    color: #000000;
    text-decoration: underline;
}

/* Target WordPress content areas specifically */
.entry-content a:not(.button):not(.wp-block-button__link),
.post-content a:not(.button):not(.wp-block-button__link),
.page-content a:not(.button):not(.wp-block-button__link),
.wp-block-post-content a:not(.button):not(.wp-block-button__link),
.wp-block-group a:not(.button):not(.wp-block-button__link),
.wp-block a:not(.button):not(.wp-block-button__link) {
    color: #ff2400;
    text-decoration: none;
    transition: color 0.2s ease;
}

.entry-content a:not(.button):not(.wp-block-button__link):hover,
.post-content a:not(.button):not(.wp-block-button__link):hover,
.page-content a:not(.button):not(.wp-block-button__link):hover,
.wp-block-post-content a:not(.button):not(.wp-block-button__link):hover,
.wp-block-group a:not(.button):not(.wp-block-button__link):hover,
.wp-block a:not(.button):not(.wp-block-button__link):hover {
    color: #000000;
    text-decoration: underline;
}

/* Ensure button links stay white */
.page-container .button a,
.wp-block-button__link,
.wp-block-button__link a,
a.wp-block-button__link,
a.button,
.button a {
    color: white !important;
    text-decoration: none;
}

.page-container .button a:hover,
.wp-block-button__link:hover,
.wp-block-button__link a:hover,
a.wp-block-button__link:hover,
a.button:hover,
.button a:hover {
    color: white !important;
    text-decoration: none;
}

/* Ensure consistent button styling */
.wp-block-button__link, 
.page-container .button {
    background-color: #ff2400;
    color: white;
    padding: 12px 24px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
}

.wp-block-button__link:hover, 
.page-container .button:hover {
    background-color: #dd0000;
    text-decoration: none;
}

.wp-block-button.is-style-outline .wp-block-button__link {
    background-color: transparent;
    border: 2px solid #ff2400;
    color: #ffffff;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: #ff2400;
    color: white;
}

/* Contact Button Styles */
.contact-btn {
    background-color: #ff2400;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 2px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
}

.contact-btn:hover {
    background-color: #e62000;
    color: #ffffff;
}

/* Post CTA Section */
.post-cta-section {
    margin-top: 60px;
    padding: 20px 0;
    text-align: left;
}

.post-cta-section .cta-heading {
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
    color: #333;
    text-align: left;
}

.post-cta-section .contact-btn {
    background-color: #ff2400;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 2px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
}

.post-cta-section .contact-btn:hover {
    background-color: #e62000;
}

@media screen and (max-width: 768px) {
    .post-cta-section {
        margin-top: 40px;
        padding: 15px 0;
    }
    
    .post-cta-section .cta-heading {
        font-size: 1.3rem;
    }
}

/* Tables with brand styling */
.wp-block-table table {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-table th,
.wp-block-table td {
    border: 1px solid #ddd;
    padding: 12px;
}

.wp-block-table th {
    background-color: #f2f2f2;
    font-weight: 700;
    text-align: left;
}

.wp-block-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Quote styling */
.wp-block-quote {
    border-left: 4px solid #ff2400;
    padding: 20px 30px;
    margin: 30px 0;
    background-color: #f9f9f9;
    font-style: italic;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.wp-block-quote p {
    margin-bottom: 15px;
}

.wp-block-quote p:last-child {
    margin-bottom: 0;
}

/* Media & Image */
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* To ensure content remains readable */
.page-container p, 
.page-container h1, 
.page-container h2, 
.page-container h3, 
.page-container li,
.page-container table {
    position: relative;
    z-index: 2; /* Above the background image */
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .page-container {
        padding: 0 15px 30px; /* Restored bottom padding on mobile */
    }
    
    .page-container h1 {
        font-size: 3rem; /* Scaled down proportionally for mobile */
    }
    
    .page-container h2 {
        font-size: 1.6rem;
    }
    
    .page-container h3 {
        font-size: 1.3rem;
    }
}