/*
 * single-project.css
 * Styles for the Project Detail page template.
 *
 * HOW TO LOAD:
 *   Add this to your theme's functions.php:
 *
 *   add_action( 'wp_enqueue_scripts', function() {
 *       if ( is_singular( 'project' ) ) {
 *           wp_enqueue_style(
 *               'ecl-single-project',
 *               get_template_directory_uri() . '/single-project.css',
 *               [],
 *               '1.0.0'
 *           );
 *       }
 *   } );
 *
 * Color palette taken from the Sunstar SingleProjects reference design.
 */

/* =========================================================================
   CUSTOM PROPERTIES
   ========================================================================= */
:root {
    --ecl-green:        #5a8c3c;
    --ecl-green-dark:   #3d6628;
    --ecl-green-light:  #f0f6ea;
    --ecl-green-border: #c8ddb8;
    --ecl-text:         #1a1a1a;
    --ecl-text-muted:   #666666;
    --ecl-white:        #ffffff;
    --ecl-border:       #e0e0e0;
    --ecl-card-radius:  10px;
    --ecl-input-radius: 6px;
    --ecl-shadow:       0 2px 12px rgba(0, 0, 0, 0.08);
    --ecl-transition:   0.2s ease;
}

/* =========================================================================
   HERO
   ========================================================================= */
.ecl-hero {
    position: relative;
    min-height: 280px;
    background-color: #1a2e10;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
}

.ecl-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.30) 0%,
        rgba(0, 0, 0, 0.60) 100%
    );
    pointer-events: none;
}

.ecl-hero-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 36px;
}

.ecl-hero-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    color: var(--ecl-white);
    margin: 0 0 12px;
    line-height: 1.2;
}

/* BREADCRUMB */
.ecl-breadcrumb {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.ecl-breadcrumb a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color var(--ecl-transition);
}

.ecl-breadcrumb a:hover {
    color: var(--ecl-white);
    text-decoration: underline;
}

.ecl-bc-sep {
    opacity: 0.7;
}

/* =========================================================================
   PAGE WRAPPER + TWO-COLUMN LAYOUT
   ========================================================================= */
.ecl-project-wrap {
    background-color: var(--ecl-white);
    padding: 60px 0 80px;
}

.ecl-project-container {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: 1fr 340px;
	gap: 40px;
	align-items: start;
}

@media ( max-width: 980px ) {
    .ecl-project-container {
        grid-template-columns: 1fr;
    }
}

/* =========================================================================
   LEFT COLUMN: MAIN CONTENT
   ========================================================================= */
.ecl-project-main {
    min-width: 0; /* prevent grid blowout */
}

.ecl-section-heading {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ecl-text);
    margin: 0 0 20px;
}

.ecl-project-content {
    font-size: 1rem;
    line-height: 1.75;
    color: #444;
    margin-bottom: 28px;
}

.ecl-project-content p {
    margin: 0 0 16px;
}

.ecl-project-content h2,
.ecl-project-content h3 {
    font-weight: 700;
    color: var(--ecl-text);
    margin: 28px 0 12px;
}

/* FEATURED IMAGE */
.ecl-featured-image {
    margin: 0 0 20px;
    border-radius: var(--ecl-card-radius);
    overflow: hidden;
    line-height: 0;
}

.ecl-featured-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--ecl-card-radius);
}

/* GALLERY STRIP */
.ecl-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.ecl-gallery-item {
    display: block;
    width: 110px;
    height: 82px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid var(--ecl-border);
    transition: border-color var(--ecl-transition), transform var(--ecl-transition);
}

.ecl-gallery-item:hover,
.ecl-gallery-item:focus-visible {
    border-color: var(--ecl-green);
    transform: translateY(-2px);
    outline: none;
}

.ecl-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================================================================
   RIGHT SIDEBAR: SHARED CARD BASE
   ========================================================================= */
.ecl-sidebar-card {
    border-radius: var(--ecl-card-radius);
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: var(--ecl-shadow);
    background-color: var(--ecl-white);
} 

.ecl-sidebar-card:last-child {
    margin-bottom: 0;
}

.ecl-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ecl-text);
    background-color: #549f57;
    padding: 16px 20px;
    margin: 0;
    border-bottom: 1px solid #2a972e;
}

/* =========================================================================
   PROJECT INFORMATION CARD
   ========================================================================= */
.ecl-info-card {
    border: 1px solid var(--ecl-green-border);
}

.ecl-info-row {
    display: flex;
    flex-direction: column;
    padding: 14px 20px;
    border-bottom: 1px solid var(--ecl-border);
}

.ecl-info-row:last-child {
    border-bottom: none;
}

.ecl-info-label {
    font-size: 0.8rem;
    color: var(--ecl-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.ecl-info-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ecl-text);
    line-height: 1.4;
}

.ecl-no-fields {
    padding: 16px 20px;
    color: var(--ecl-text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* =========================================================================
   GET A QUOTE CARD (Formidable Form placeholder)
   =========================================================================
   When you replace the placeholder with the real Formidable shortcode,
   remove or override the .ecl-form-placeholder styles as needed.
   Keep .ecl-quote-card .frm_forms styles to maintain the card's padding.
   ========================================================================= */
.ecl-quote-card {
    border: 1px solid var(--ecl-border);
}

.ecl-form-placeholder {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* When the real Formidable form is injected, add padding the same way */
.ecl-quote-card .frm_forms {
    padding: 18px 20px 20px;
}

/* SHARED FORM FIELD WRAPPER */
.ecl-form-field {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--ecl-border);
    border-radius: var(--ecl-input-radius);
    background-color: #fafafa;
    overflow: hidden;
    transition: border-color var(--ecl-transition);
}

.ecl-form-field:focus-within {
    border-color: var(--ecl-green);
    background-color: var(--ecl-white);
}

.ecl-form-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    flex-shrink: 0;
    color: var(--ecl-text-muted);
    padding-left: 10px;
}

.ecl-form-icon--top {
    align-self: flex-start;
    padding-top: 12px;
}

.ecl-form-field input,
.ecl-form-field textarea {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 12px 11px 6px;
    font-size: 0.9rem;
    color: var(--ecl-text);
    font-family: inherit;
    resize: none;
}

.ecl-form-field input::placeholder,
.ecl-form-field textarea::placeholder {
    color: #a0a0a0;
}

.ecl-form-field--textarea {
    align-items: flex-start;
}

/* SUBMIT BUTTON */
.ecl-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: var(--ecl-green);
    color: var(--ecl-white);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 13px 24px;
    border: none;
    border-radius: var(--ecl-input-radius);
    cursor: pointer;
    width: 100%;
    transition: background-color var(--ecl-transition), transform var(--ecl-transition);
    font-family: inherit;
    letter-spacing: 0.01em;
}

.ecl-submit-btn:hover,
.ecl-submit-btn:focus-visible {
    background-color: var(--ecl-green-dark);
    transform: translateY(-1px);
    outline: 2px solid var(--ecl-green-dark);
    outline-offset: 2px;
}

/* =========================================================================
   CONTACT FOR INQUIRY CARD
   ========================================================================= */
.ecl-contact-card {
    border: 1px solid var(--ecl-green-border);
    background-color: var(--ecl-green-light);
    padding: 22px 22px 24px;
}

.ecl-contact-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ecl-text);
    margin: 0 0 8px;
}

.ecl-contact-subtext {
    font-size: 0.95rem;
    color: var(--ecl-text-muted);
    margin: 0 0 18px;
    line-height: 1.5;
}

.ecl-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background-color: var(--ecl-green);
    color: var(--ecl-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 11px 20px;
    border-radius: var(--ecl-input-radius);
    transition: background-color var(--ecl-transition), transform var(--ecl-transition);
}

.ecl-contact-btn:hover,
.ecl-contact-btn:focus-visible {
    background-color: var(--ecl-green-dark);
    color: var(--ecl-white);
    transform: translateY(-1px);
    outline: 2px solid var(--ecl-green-dark);
    outline-offset: 2px;
}
.single-project .page_content_wrap {
	padding-top: 0 !important; 
}
/* =========================================================================
   RESPONSIVE: TABLET
   ========================================================================= */
@media ( max-width: 980px ) {
    .ecl-project-container {
        padding: 0 20px;
        gap: 36px;
    }

    .ecl-sidebar-card {
        /* On mobile the sidebar stacks below the content naturally via grid */
    }
}

/* =========================================================================
   RESPONSIVE: MOBILE
   ========================================================================= */
@media ( max-width: 640px ) {
    .ecl-hero {
        min-height: 220px;
    }

    .ecl-hero-inner {
        padding: 30px 16px 28px;
    }

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

    .ecl-project-wrap {
        padding: 36px 0 56px;
    }

    .ecl-project-container {
        padding: 0 16px;
    }

    .ecl-gallery-item {
        width: 90px;
        height: 68px;
    }
}

/* =========================================================================
   ACCESSIBILITY: REDUCED MOTION
   ========================================================================= */
@media ( prefers-reduced-motion: reduce ) {
    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}