/* ==========================================================================
   Front Page Styles - Metal America Concrete
   ========================================================================== */

/* CSS Variables moved to main.css so they load on all pages */

/* ==========================================================================
   1. Hero Section
   ========================================================================== */

.hero-section {
    position: relative;
    min-height: clamp(350px, 50vh, 600px);
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.4) 60%, rgba(0,0,0,0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: left;
    width: 100%;
    max-width: var(--mac-container);
    margin: 0 auto;
    padding: 40px 20px;
    color: var(--mac-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    box-sizing: border-box;
}

.hero-mascot {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
}

.hero-mascot img {
    max-height: 65px;
    width: auto;
}

.hero-main-title {
    margin: 0 0 20px;
    font-size: inherit;
    font-weight: inherit;
}

.hero-main-title .hero-prefix {
    font-size: 1.1rem;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
    color: var(--mac-white);
}

.hero-main-title .hero-h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    display: block;
    color: var(--mac-white);
    max-width: 800px;
}

.hero-red-dot {
    color: var(--mac-red);
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--mac-white);
    max-width: 800px;
    line-height: 1.5;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mac-white);
    border: 2px solid var(--mac-white);
    color: var(--mac-black);
    padding: 16px 40px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: var(--mac-font);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

.hero-button:hover {
    background: var(--mac-black);
    color: var(--mac-white);
    border-color: var(--mac-white);
}

.hero-button-red {
    background: var(--mac-red);
    border-color: var(--mac-red);
    color: var(--mac-white);
}

.hero-button-red:hover {
    background: var(--mac-red-hover);
    border-color: var(--mac-red-hover);
    color: var(--mac-white);
}

.hero-app-badges {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 32px;
}

.hero-app-badges a {
    display: inline-block;
    transition: opacity 0.3s ease;
}

.hero-app-badges a:hover {
    opacity: 0.8;
}

.hero-app-badges img {
    height: 50px;
    width: auto;
    display: block;
}

/* ==========================================================================
   2. Thin Banner
   ========================================================================== */

.front-page-wrapper {
    font-family: var(--mac-font);
}

.thin-banner-section {
    background: var(--mac-black);
    height: 40px;
    font-family: var(--mac-font);
}

.thin-banner-container {
    max-width: var(--mac-container);
    display: flex;
    margin: 0 auto;
    height: 100%;
}

.banner-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mac-white);
    text-decoration: none;
    gap: 8px;
    transition: background 0.3s ease;
}

.banner-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.banner-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: currentColor;
}

.banner-title {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--mac-font);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ==========================================================================
   3. Services Grid
   ========================================================================== */

.services-section {
    padding: 60px 0 10px 0;
    background: var(--mac-gray-50);
}

.services-container {
    max-width: var(--mac-container);
    margin: 0 auto;
    padding: 0 20px;
}

.services-title {
    text-align: left;
    font-size: 2rem;
    margin-bottom: 40px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--mac-white);
    padding: 0;
    border-radius: 8px;
    box-shadow: var(--mac-shadow-sm);
    text-align: left;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-card-body {
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.service-card h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
}

.service-card p {
    color: var(--mac-gray-600);
    font-size: 0.95rem;
}

/* ==========================================================================
   3b. Services Section - Contact Button
   ========================================================================== */

.services-contact-btn-wrap {
    margin-top: 30px;
    text-align: left;
}

.services-contact-btn {
    display: inline-block;
    background: var(--mac-black);
    color: var(--mac-white);
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--mac-font);
    border: 2px solid var(--mac-black);
    transition: background 0.3s ease, color 0.3s ease;
}

.services-contact-btn:hover {
    background: var(--mac-white);
    color: var(--mac-black);
    text-decoration: none;
}

/* ==========================================================================
   4. CTA Section (Home)
   ========================================================================== */

.cta-section-home {
    position: relative;
    background-color: var(--mac-black);
    background-size: cover;
    background-position: center;
    padding: 0;
    text-align: left;
}

.cta-section-home__overlay {
    padding: 60px 0;
    background: rgba(0, 0, 0, 0.6);
}

.cta-section-home h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--mac-white);
}

.cta-section-home p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 0 30px;
    color: var(--mac-gray-300);
}

.cta-button-home {
    display: inline-block;
    background: var(--mac-red);
    border: 2px solid var(--mac-red);
    color: var(--mac-white);
    padding: 14px 36px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    font-family: var(--mac-font);
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.cta-button-home:hover {
    background: #d61d00;
    border-color: #d61d00;
    color: var(--mac-black);
}

.cta-button-contact {
    background: transparent;
    border-color: var(--mac-white);
    color: var(--mac-white);
    margin-left: 12px;
}

.cta-button-contact:hover {
    background: var(--mac-white);
    border-color: var(--mac-white);
    color: var(--mac-black);
}

/* ==========================================================================
   5. Dealers Stats
   ========================================================================== */

.dealers-stats-section {
    padding: 10px 0 60px 0;
    background-color: #f8f8f8;
}

.dealers-stats-container {
    max-width: var(--mac-container);
    margin: 0 auto;
    padding: 0 20px;
}

.dealers-stats-divider {
    width: 100%;
    height: 3px;
    background: var(--mac-red);
    margin-bottom: 40px;
}

.dealers-stats-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--mac-black);
    margin: 0 0 40px;
}

.dealers-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.dealers-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dealers-stat-number {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    color: var(--mac-red);
    line-height: 1.1;
}

.dealers-stat-label {
    font-size: 1rem;
    color: var(--mac-black);
    font-weight: 400;
}

/* ==========================================================================
   6. Featured Publications
   ========================================================================== */

.featured-publications-section {
    padding: 0;
    background-color: transparent;
    width: 100%;
}

.publications-container {
    width: 100%;
    max-width: calc(100% - 40px);
    margin: 0 auto;
    padding: 15px 15px 30px 15px;
    text-align: center;
    background-color: #f8f8f8;
}

.publications-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mac-gray-600);
    margin-top: 0;
    margin-bottom: 0;
}

.publications-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.publication-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.publication-item a {
    position: relative;
    display: inline-block;
    border-radius: 4px;
    overflow: hidden;
}

.publication-item a::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
}

.publication-item a:hover::after {
    background: rgba(0, 0, 0, 0.15);
}

.publication-item img {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-contact-btn {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .cta-button-contact {
        margin-left: 0;
        margin-top: 12px;
        display: block;
        text-align: center;
    }

    .dealers-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px 20px;
    }

    .hero-section {
        min-height: 500px;
    }

    .hero-content {
        padding: 20px 20px;
        max-width: 100%;
    }

    .hero-main-title .hero-h2 {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        max-width: 100%;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        max-width: 100%;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-button {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
    }

    .hero-app-badges {
        justify-content: center;
    }

    .hero-app-badges img {
        height: 40px;
    }

    .hero-mascot {
        top: 15px;
        right: 15px;
    }

    .hero-mascot img {
        max-height: 35px;
    }

    /* Thin banner mobile slider setup */
    .thin-banner-container {
        position: relative;
        overflow: hidden;
        flex-wrap: nowrap;
        gap: 0;
        height: 40px;
        box-sizing: border-box;
    }

    .banner-item {
        flex: 0 0 100%;
        width: 100%;
        height: 40px;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        left: 0;
        will-change: transform;
        transform: translateX(100%);
        opacity: 0;
        display: flex !important;
        box-sizing: border-box;
        padding: 8px 0;
    }
}

@media (max-width: 768px) {
    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 1fr);
        gap: 15px;
    }

    .publication-item img {
        max-height: 50px;
    }

    .featured-publications-section {
        max-width: 100%;
    }

    .publications-container {
        max-width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .banner-item {
        flex: 0 0 100%;
        justify-content: center;
    }

    .publications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .publication-item img {
        max-height: 40px;
    }
}
