/**
 * Projects Page Styles
 * HB Power Tower - Kadence Child Theme
 */

.hw-projects-hero {
    background: var(--hw-navy);
    padding: var(--space-16) 0 var(--space-12);
    text-align: center;
}

.hw-projects-hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4vw, var(--text-5xl));
    color: var(--hw-white);
    margin-bottom: var(--space-4);
}

.hw-projects-hero p {
    font-size: var(--text-lg);
    color: var(--hw-gray-300);
    max-width: 600px;
    margin: 0 auto;
}

.hw-projects-grid {
    padding: var(--space-16) 0;
    background: var(--hw-gray-50);
}

.hw-projects-grid .kt-row-column-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-8);
}

/* ============================================================
   PROJECTS PAGE
   HB Power Tower - Kadence Child Theme
   ============================================================ */

/* ============================================================
   TAILWIND PROJECT GRID - Container fix
   ============================================================ */
section .max-w-6xl {
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    max-width: 72rem;
}

section.bg-slate-50,
section.bg-slate-900,
section.bg-\[\#0F172A\],
section.bg-\[\#F5F7FA\],
section.bg-emerald-50,
section.bg-blue-50,
section.bg-purple-50 {
    width: 100%;
}

/* Vietnam project - Cathead Transmission */
.hw-projects-grid div.bg-white:nth-of-type(1) > div.h-48 {
    background: url('/wp-content/uploads/tower-images/project-vn-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Indonesia project - Lattice Transmission */
.hw-projects-grid div.bg-white:nth-of-type(2) > div.h-48 {
    background: url('/wp-content/uploads/tower-images/project-id-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Philippines project - Urban Monopole */
.hw-projects-grid div.bg-white:nth-of-type(3) > div.h-48 {
    background: url('/wp-content/uploads/tower-images/project-ph-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Additional projects (4th, 5th, etc.) - alternate images */
.hw-projects-grid div.bg-white:nth-of-type(4) > div.h-48 {
    background: url('/wp-content/uploads/tower-images/project-ke-01.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.hw-projects-grid div.bg-white:nth-of-type(5) > div.h-48 {
    background: url('/wp-content/uploads/tower-images/cathead-02.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

.hw-projects-grid div.bg-white:nth-of-type(6) > div.h-48 {
    background: url('/wp-content/uploads/tower-images/lattice-02.jpg') center/cover no-repeat !important;
    aspect-ratio: 4 / 5 !important;
    height: auto !important;
    min-height: 280px;
    position: relative;
    overflow: hidden;
}

/* Hide the giant emoji placeholder */
.hw-projects-grid div.bg-white > div.h-48 > span.text-6xl {
    display: none !important;
}

/* Card hover effect */
.hw-projects-grid div.bg-white:hover > div.h-48 {
    transform: scale(1.03);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Subtle gradient overlay for text contrast */
.hw-projects-grid div.bg-white > div.h-48::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15,23,42,0.75) 0%, rgba(15,23,42,0.3) 50%, transparent 100%);
    pointer-events: none;
}

.hw-project-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--duration-base) var(--ease-out-quart);
}

.hw-project-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-6px);
}

.hw-project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out-quart);
}

.hw-project-card:hover img {
    transform: scale(1.08);
}

.hw-project-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        oklch(0.15 0.02 250 / 0.95) 0%,
        oklch(0.15 0.02 250 / 0.4) 50%,
        oklch(0.15 0.02 250 / 0.1) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-6);
}

.hw-project-card-country {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-2);
}

.hw-project-card-voltage {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--hw-orange);
    margin-bottom: var(--space-2);
}

.hw-project-card-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--hw-white);
    margin-bottom: var(--space-2);
}

.hw-project-card-desc {
    font-size: var(--text-sm);
    color: var(--hw-gray-300);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-4);
}

.hw-project-card-tags {
    display: flex;
    gap: var(--space-2);
    flex-wrap: wrap;
}

.hw-project-card-tags span {
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--hw-gold);
    background: oklch(0.65 0.15 50 / 0.15);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.hw-projects-cta {
    padding: var(--space-16) 0;
    background: var(--hw-white);
    text-align: center;
}

.hw-projects-cta .kt-row-column-wrap {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 768px) {
    .hw-projects-grid .kt-row-column-wrap {
        grid-template-columns: 1fr;
    }
}
