/**
 * Ridgeway Maker Theme - Homepage Styles
 * Hero section, services grid, featured projects, CTA
 */

/* ========================================
   HERO SECTION
   Background flows under Ridge header elements.
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--stone-900);
}

.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__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-hero-overlay);
    z-index: 1;
}

.hero__content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: var(--ridge-header-clearance) var(--spacing-md) var(--spacing-xl);
    max-width: 700px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-bold);
    color: var(--color-hero-text);
    margin-bottom: var(--spacing-sm);
    letter-spacing: var(--letter-spacing-tight);
}

.hero__subtitle {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.85);
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-lg);
    font-weight: var(--font-weight-normal);
}

.hero__actions {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
}

.hero__actions .btn--primary {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.hero__actions .btn--primary:hover {
    background-color: var(--accent-blue-deep);
    border-color: var(--accent-blue-deep);
}

.hero__actions .btn--outline {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.6);
}

.hero__actions .btn--outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

/* ========================================
   SERVICES SECTION
   ======================================== */
.service-card {
    display: block;
    padding: var(--spacing-md);
    background-color: var(--color-background);
    border-radius: var(--border-radius-md);
    text-align: center;
    text-decoration: none;
    color: var(--color-text-primary);
    transition: box-shadow var(--transition-normal), transform var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
    color: var(--color-text-primary);
}

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-accent-primary);
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
}

.service-card__title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-xs);
}

.service-card__desc {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-xs);
    line-height: var(--line-height-normal);
}

.service-card__count {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* ========================================
   SECTION FOOTER (View All links)
   ======================================== */
.section__footer {
    text-align: center;
    margin-top: var(--spacing-xl);
}

/* ========================================
   RIDGE HEADER OVER HERO
   Force light icons over dark hero background.
   The hero has a dark background, so header elements
   need white icons regardless of global theme setting.
   ======================================== */

/* When hero is present, hamburger icon should be white */
body:has(.hero) .ridge-header-hamburger .dashicons {
    color: #ffffff !important;
}

/* Hamburger background adapts for visibility on dark bg */
body:has(.hero) .ridge-header-hamburger {
    background: rgba(0, 0, 0, 0.25);
}

body:has(.hero) .ridge-header-hamburger:hover {
    background: rgba(0, 0, 0, 0.4);
}

/* ========================================
   HERO RESPONSIVE
   ======================================== */
@media screen and (max-width: 767px) {
    .hero {
        min-height: 80vh;
    }

    .hero__content {
        padding: calc(var(--ridge-header-clearance) + var(--spacing-md)) var(--spacing-sm) var(--spacing-lg);
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .hero__actions .btn {
        width: 100%;
        max-width: 280px;
    }
}
