/* ========== EVANS EXCAVATING — SHARED STYLES ========== */

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --orange: #E8611A;
    --orange-dark: #C44D10;
    --orange-glow: rgba(232, 97, 26, 0.15);
    --yellow: #F5A623;
    --yellow-light: #FFD060;
    --pink: #D4547A;
    --grey-dark: #1A1A1A;
    --grey-mid: #2D2D2D;
    --grey-light: #3A3A3A;
    --grey-muted: #888;
    --white: #F5F5F0;
    --white-pure: #FFFFFF;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Barlow', sans-serif;
    background: var(--grey-dark);
    color: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.04em;
    line-height: 1.1;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ========== NAVIGATION ========== */
nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    background: rgba(26, 26, 26, 0.97);
    backdrop-filter: blur(12px);
    border-bottom: 3px solid var(--orange);
}

nav .container {
    display: flex; align-items: center; justify-content: space-between; height: 72px;
}

.nav-logo {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem; color: var(--orange); letter-spacing: 0.06em;
}
.nav-logo span { color: var(--white); }

.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }

.nav-links a {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600; font-size: 0.95rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--grey-muted); transition: color 0.2s;
    position: relative; padding: 4px 0;
}
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; background: var(--orange); transition: width 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.nav-cta {
    background: var(--orange) !important;
    color: var(--white-pure) !important;
    padding: 10px 24px !important;
    border-radius: 4px;
    transition: background 0.2s, transform 0.2s !important;
}
.nav-cta:hover { background: var(--orange-dark) !important; transform: translateY(-1px); }
.nav-cta::after { display: none !important; }

.hamburger {
    display: none; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 8px; background: none; border: none;
}
.hamburger span {
    width: 28px; height: 3px; background: var(--white);
    border-radius: 2px; transition: all 0.3s;
}

/* ========== PAGE HERO (inner pages) ========== */
.page-hero {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, var(--grey-dark) 0%, var(--grey-mid) 100%);
    position: relative; overflow: hidden;
}
.page-hero::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(232,97,26,0.03) 40px, rgba(232,97,26,0.03) 80px);
    pointer-events: none;
}
.page-hero .section-label { position: relative; z-index: 2; }
.page-hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    position: relative; z-index: 2;
}
.page-hero h1 .accent { color: var(--orange); }
.page-hero p {
    color: var(--grey-muted); font-size: 1.15rem;
    max-width: 600px; line-height: 1.7;
    margin-top: 16px; position: relative; z-index: 2;
}

/* ========== SECTION STYLES ========== */
section { padding: 100px 0; }
.bg-dark { background: var(--grey-dark); }
.bg-mid { background: var(--grey-mid); }

.section-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--orange); margin-bottom: 12px;
}
.section-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: var(--white); margin-bottom: 20px;
}
.section-desc {
    font-size: 1.1rem; color: var(--grey-muted);
    max-width: 600px; line-height: 1.7; margin-bottom: 48px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700; font-size: 1.05rem;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 16px 36px; border-radius: 4px;
    border: none; cursor: pointer; transition: all 0.3s;
}
.btn-primary { background: var(--orange); color: var(--white-pure); }
.btn-primary:hover {
    background: var(--orange-dark); transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(232,97,26,0.3);
}
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--grey-light); }
.btn-outline:hover { border-color: var(--orange); color: var(--orange); }

.btn-sm { padding: 12px 24px; font-size: 0.9rem; }

/* ========== CARDS ========== */
.card {
    background: var(--grey-dark); border: 1px solid var(--grey-light);
    border-radius: 8px; overflow: hidden; transition: all 0.3s;
}
.card:hover {
    border-color: var(--orange); transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.card-body { padding: 32px; }
.card-body h3 { font-size: 1.5rem; margin-bottom: 12px; }
.card-body p { color: var(--grey-muted); font-size: 0.95rem; line-height: 1.6; }

/* ========== SERVICE CARDS ========== */
.service-card { position: relative; overflow: hidden; }
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 3px; background: var(--orange); transform: scaleX(0); transition: transform 0.3s;
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 56px; height: 56px;
    background: var(--orange-glow); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px; font-size: 1.5rem;
}

.service-link {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--orange); font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
    font-size: 0.9rem; margin-top: 16px; transition: gap 0.2s;
}
.service-link:hover { gap: 12px; }

/* ========== IMAGE CONTAINERS ========== */
.img-cover {
    width: 100%; height: 100%; object-fit: cover;
}
.img-container {
    overflow: hidden; border-radius: 8px;
    background: var(--grey-mid);
}
.img-container img { transition: transform 0.4s; }
.img-container:hover img { transform: scale(1.05); }

/* ========== SERVICE DETAIL PAGE ========== */
.service-detail-hero {
    padding: 140px 0 60px;
    position: relative; overflow: hidden;
}
.service-detail-hero .hero-img {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover; background-position: center;
    opacity: 0.2;
}
.service-detail-hero::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0;
    height: 120px; background: linear-gradient(transparent, var(--grey-dark));
}

.detail-content { max-width: 800px; }
.detail-content h2 {
    font-size: 2rem; margin: 48px 0 20px; color: var(--orange);
}
.detail-content p {
    font-size: 1.05rem; color: var(--grey-muted);
    line-height: 1.8; margin-bottom: 16px;
}
.detail-content ul {
    list-style: none; margin: 20px 0 32px;
}
.detail-content ul li {
    padding: 10px 0 10px 28px; position: relative;
    color: var(--grey-muted); font-size: 1rem; line-height: 1.6;
    border-bottom: 1px solid rgba(58,58,58,0.5);
}
.detail-content ul li::before {
    content: ''; position: absolute; left: 0; top: 18px;
    width: 10px; height: 10px; background: var(--orange);
    border-radius: 50%;
}

.detail-gallery {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 16px; margin: 32px 0;
}
.detail-gallery img {
    width: 100%; aspect-ratio: 16/10; object-fit: cover;
    border-radius: 8px; border: 1px solid var(--grey-light);
}

.detail-sidebar {
    background: var(--grey-mid); border: 1px solid var(--grey-light);
    border-radius: 8px; padding: 32px; position: sticky; top: 96px;
}
.detail-sidebar h3 { font-size: 1.4rem; margin-bottom: 20px; }
.detail-sidebar .sidebar-link {
    display: block; padding: 12px 16px; margin-bottom: 8px;
    border-radius: 6px; font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
    font-size: 0.9rem; color: var(--grey-muted);
    transition: all 0.2s; border: 1px solid transparent;
}
.detail-sidebar .sidebar-link:hover { color: var(--white); background: var(--grey-light); }
.detail-sidebar .sidebar-link.active {
    color: var(--orange); border-color: var(--orange);
    background: var(--orange-glow);
}

/* ========== PORTFOLIO GRID ========== */
.portfolio-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.portfolio-item {
    position: relative; border-radius: 8px; overflow: hidden;
    cursor: pointer; aspect-ratio: 4/3;
    background: var(--grey-mid); border: 1px solid var(--grey-light);
}
.portfolio-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    padding: 24px 20px 20px; transform: translateY(100%); transition: transform 0.3s;
}
.portfolio-item:hover .portfolio-overlay { transform: translateY(0); }
.portfolio-overlay h4 { font-size: 1.2rem; margin-bottom: 4px; }
.portfolio-overlay p { font-size: 0.8rem; color: var(--orange); text-transform: uppercase; letter-spacing: 0.06em; }

.filter-btn {
    background: var(--grey-mid); border: 1px solid var(--grey-light);
    color: var(--grey-muted); font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600; font-size: 0.9rem; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 10px 24px; border-radius: 4px;
    cursor: pointer; transition: all 0.2s;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--orange); border-color: var(--orange); color: var(--white-pure);
}

/* ========== REVIEWS ========== */
.review-card {
    background: var(--grey-mid); border: 1px solid var(--grey-light);
    border-radius: 8px; padding: 36px 32px; position: relative;
}
.review-stars { color: var(--yellow); font-size: 1.2rem; letter-spacing: 4px; margin-bottom: 20px; }
.review-card blockquote {
    color: var(--white); font-size: 1rem; line-height: 1.7;
    margin-bottom: 24px; font-style: italic;
}
.review-author {
    font-family: 'Barlow Condensed', sans-serif; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.06em; font-size: 0.9rem;
}
.review-location { color: var(--grey-muted); font-size: 0.8rem; margin-top: 2px; }
.review-card::before {
    content: '\201C'; position: absolute; top: 16px; right: 24px;
    font-size: 4rem; color: var(--orange); opacity: 0.15;
    font-family: Georgia, serif; line-height: 1;
}

/* ========== CONTACT FORM ========== */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%; background: var(--grey-dark); border: 1px solid var(--grey-light);
    border-radius: 6px; padding: 14px 18px; color: var(--white);
    font-family: 'Barlow', sans-serif; font-size: 0.95rem; transition: border-color 0.2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--orange);
}
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--grey-muted); }
.contact-form textarea { min-height: 140px; resize: vertical; }

.contact-detail {
    display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.contact-detail-icon {
    width: 48px; height: 48px; background: var(--orange-glow);
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; font-size: 1.2rem; flex-shrink: 0;
}
.contact-detail-text strong {
    display: block; font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase; letter-spacing: 0.06em;
    font-size: 0.85rem; color: var(--grey-muted); margin-bottom: 2px;
}
.contact-detail-text span, .contact-detail-text a { font-size: 1.05rem; color: var(--white); }

/* ========== PAGE HERO WATERMARK ========== */
.page-hero {
    position: relative;
}
.page-hero-watermark {
    position: absolute; right: 5%; top: 50%; transform: translateY(-50%);
    width: 350px; height: 350px; opacity: 0.04; pointer-events: none; z-index: 1;
    background: url('../images/logo.PNG') no-repeat center center;
    background-size: contain;
}

/* ========== CTA BANNER ========== */
.cta-banner {
    background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
    padding: 80px 0; text-align: center; position: relative; overflow: hidden;
}
.cta-banner::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(-45deg, transparent, transparent 20px, rgba(0,0,0,0.05) 20px, rgba(0,0,0,0.05) 40px);
    pointer-events: none;
}
.cta-banner h2 { font-size: clamp(2rem, 4vw, 3.2rem); margin-bottom: 16px; position: relative; }
.cta-banner p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 32px; position: relative; }
.cta-banner .btn { background: var(--white-pure); color: var(--orange); position: relative; }
.cta-banner .btn:hover { background: var(--white); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }

/* ========== FOOTER ========== */
footer {
    background: var(--grey-dark); border-top: 1px solid var(--grey-light); padding: 48px 0 24px;
}
.footer-main {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 40px; flex-wrap: wrap; gap: 32px;
}
.footer-brand .nav-logo { font-size: 1.6rem; margin-bottom: 12px; }
.footer-brand p { color: var(--grey-muted); font-size: 0.9rem; max-width: 300px; line-height: 1.6; }
.footer-links { display: flex; gap: 48px; }
.footer-col h4 { font-size: 1.1rem; margin-bottom: 16px; color: var(--white); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--grey-muted); font-size: 0.9rem; transition: color 0.2s; }
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
    border-top: 1px solid var(--grey-light); padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 16px;
}
.footer-bottom p { color: var(--grey-muted); font-size: 0.85rem; }
.footer-nap { color: var(--grey-muted); font-size: 0.85rem; text-align: right; }

/* ========== GRID HELPERS ========== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 48px; }

/* ========== ANIMATIONS ========== */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ========== IMAGE OPTIMIZATION ========== */
.portfolio-item img,
.detail-gallery img,
.card img {
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Ensure consistent aspect ratios for portfolio items with real photos */
.portfolio-item img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
}

/* Service card images - consistent height with cover fit */
.card .card-img, .card > div:first-child {
    overflow: hidden;
}
.card > div:first-child img {
    transition: transform 0.4s ease;
}
.card:hover > div:first-child img {
    transform: scale(1.05);
}

/* Gallery images - optimize for various photo sizes and orientations */
.detail-gallery img {
    width: 100%; aspect-ratio: 16/10;
    object-fit: cover; object-position: center;
    border-radius: 8px; border: 1px solid var(--grey-light);
    transition: transform 0.3s;
}
.detail-gallery img:hover {
    transform: scale(1.02);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 968px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2-1 { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-gallery { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-links.active {
        display: flex; flex-direction: column;
        position: absolute; top: 72px; left: 0; right: 0;
        background: var(--grey-dark); border-bottom: 3px solid var(--orange);
        padding: 24px; gap: 20px;
    }
    .hamburger { display: flex; }
    .grid-3, .grid-2, .portfolio-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-links { flex-direction: column; gap: 24px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-nap { text-align: center; }
    section { padding: 64px 0; }
    .page-hero { padding: 120px 0 60px; }
}
