/* ==========================================================================
   Metal America Concrete - Global Utility Styles
   ==========================================================================
   Reusable utility classes and component styles adapted from Metal America.
   ========================================================================== */

/* ==========================================================================
   Container Utility
   ========================================================================== */

.mac-container {
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* ==========================================================================
   Screen Reader Only Utility
   ========================================================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ==========================================================================
   Text Alignment Utilities
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* ==========================================================================
   Heading Overrides
   ========================================================================== */

h3 {
    margin-bottom: 0.5em;
}

/* ==========================================================================
   Post Card Styles
   ========================================================================== */

.post-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.post-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5em;
    line-height: 1.3;
}

.post-card-title a {
    color: #111;
    text-decoration: none;
}

.post-card-title a:hover {
    color: #FF2400;
}

.post-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 1em;
    flex: 1;
}

.post-card-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.5em;
}

.post-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #FF2400;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.post-card-link:hover {
    color: #cc1d00;
    text-decoration: underline;
}

/* ==========================================================================
   Post Hero Section
   ========================================================================== */

.post-hero-section {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.post-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.post-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 40px 20px;
}

.post-hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5em;
    color: #fff;
    line-height: 1.1;
}

.post-hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.5;
}

/* ==========================================================================
   Button Base Styles
   ========================================================================== */

.mac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
    text-align: center;
    white-space: nowrap;
    font-family: 'Work Sans', 'Work Sans Fallback', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

.mac-btn:hover {
    text-decoration: none;
}

.mac-btn:focus-visible {
    outline: 2px solid #FF2400;
    outline-offset: 2px;
}

.mac-btn:active {
    transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   Button Variants
   -------------------------------------------------------------------------- */

/* Primary Button - Red */
.mac-btn-primary {
    background-color: #FF2400;
    color: #fff;
    border-color: #FF2400;
}

.mac-btn-primary:hover {
    background-color: #cc1d00;
    border-color: #cc1d00;
    color: #fff;
}

/* Secondary Button - Black */
.mac-btn-secondary {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.mac-btn-secondary:hover {
    background-color: #333;
    border-color: #333;
    color: #fff;
}

/* Outline Button - Black Border */
.mac-btn-outline {
    background-color: transparent;
    color: #000;
    border: 2px solid #000;
}

.mac-btn-outline:hover {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* ==========================================================================
   Post Card Grid
   ========================================================================== */

.post-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 40px 0;
}

@media (max-width: 960px) {
    .post-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
}

@media (max-width: 600px) {
    .post-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ==========================================================================
   Post Hero Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .post-hero-section {
        min-height: 300px;
    }

    .post-hero-title {
        font-size: 2rem;
    }

    .post-hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .post-hero-section {
        min-height: 250px;
    }

    .post-hero-title {
        font-size: 1.5rem;
    }

    .post-hero-content {
        padding: 30px 15px;
    }
}

/* ==========================================================================
   Button Responsive
   ========================================================================== */

@media (max-width: 480px) {
    .mac-btn {
        padding: 10px 22px;
        font-size: 0.9rem;
    }
}
