﻿/* ============================================================
   HERO CAPTION CONTAINER — CENTERED MIDDLE OF HERO
   ------------------------------------------------------------
   - Absolute center using transform.
   - Max-width keeps text readable on large screens.
   ============================================================ */
.hero-caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 900px;
    text-align: center;
    color: #fff;
    z-index: 5;
}

    /* ============================================================
   INDIVIDUAL CAPTIONS — STACKED, ONLY ONE VISIBLE AT A TIME
   ------------------------------------------------------------
   - All captions occupy the same space.
   - Only one fades in at a time.
   ============================================================ */
    .hero-caption .caption {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        opacity: 0; /* Hidden by default */
        animation: captionFade 16s infinite;
    }

        /* ============================================================
   CAPTION ROTATION TIMING
   ------------------------------------------------------------
   - Each caption gets a delay so they rotate in sequence.
   - Total cycle = 16 seconds.
   ============================================================ */
        .hero-caption .caption:nth-child(1) {
            animation-delay: 0s;
        }

        .hero-caption .caption:nth-child(2) {
            animation-delay: 4s;
        }

        .hero-caption .caption:nth-child(3) {
            animation-delay: 8s;
        }

        .hero-caption .caption:nth-child(4) {
            animation-delay: 12s;
        }

/* ============================================================
   KEYFRAMES — FADE + SLIDE ANIMATION
   ------------------------------------------------------------
   - Smooth fade-in from below.
   - Hold.
   - Fade-out upward.
   ============================================================ */
@keyframes captionFade {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    25% {
        opacity: 1;
        transform: translateY(0);
    }

    35% {
        opacity: 0;
        transform: translateY(-20px);
    }

    100% {
        opacity: 0;
    }
}

/* ============================================================
   TEXT STYLING — CLEAN, CORPORATE, PREMIUM
   ============================================================ */
.hero-caption h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.hero-caption p {
    font-size: 1.25rem;
    opacity: 0.9;
}



/* ============================================================
   SECTION DIVIDER — ULTRA-THIN LINE WITH FADE-IN ANIMATION
   ------------------------------------------------------------
   - Used under section titles (e.g., "Project Portfolio").
   - Width-expansion + fade-in animation for premium polish.
   ============================================================ */
.section-divider {
    height: 1px; /* Ultra-thin line */
    width: 160px; /* Initial visible width */
    background-color: #dcdcdc;
    margin: 10px auto 20px auto;
    opacity: 0; /* Start invisible */
    animation: fadeInLine 0.8s ease forwards;
}

/* ============================================================
   ANIMATION: fadeInLine
   ------------------------------------------------------------
   - Expands the line from 0px to full width.
   - Fades opacity from 0 → 1.
   ============================================================ */
@keyframes fadeInLine {
    from {
        opacity: 0;
        width: 0; /* Start collapsed */
    }

    to {
        opacity: 1;
        width: 700px; /* Final width (visual emphasis) */
    }
}

/* ============================================================
   PROJECT CARD — BASE CONTAINER
   ------------------------------------------------------------
   - White background for clean corporate look
   - Rounded corners for premium feel
   - Smooth hover elevation for interactivity
   - Flex column for equal-height behavior in grid
   ============================================================ */
.project-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Light shadow */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    /* Equal-height + vertical flow */
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .project-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.12); /* Slightly stronger on hover */
    }

    /* Prevent content collapsing */
    .project-card > * {
        flex-shrink: 0;
    }

    /* Remove bottom spacing inconsistencies */
    .project-card p:last-of-type,
    .project-card ul:last-of-type {
        margin-bottom: 0;
    }

/* ============================================================
   CLIENT LOGO
   ------------------------------------------------------------
   - Fixed height for consistency across all project cards
   - Auto width maintains aspect ratio
   - Slight opacity for a refined presence
   ============================================================ */
.client-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
    display: block;
    margin: 0 auto 12px auto;
}

/* ============================================================
   PROJECT IMAGES — CONSISTENT SIZE
   ------------------------------------------------------------
   - Matches the visual behavior of refresh-uae.com/projects.html
   - Fixed height for uniform rows
   - Object-fit: cover to avoid distortion
   ============================================================ */
.project-image {
    width: 100%;
    height: 220px; /* Core project image height */
    object-fit: cover; /* Perfect cropping without distortion */
    object-position: center;
    border-radius: 8px;
    display: block;
}

.project-image-full {
    width: 100%;
    height: 400px; /* Larger hero-style project image */
    object-fit: cover;
    object-position: center;
    border-radius: 10px;
    display: block;
}

/* Bootstrap override fix for img-fluid */
img.img-fluid {
    height: auto;
}

.project-image.img-fluid,
.project-image-full.img-fluid {
    height: inherit !important;
}

/* ============================================================
   PROJECT TITLE
   ------------------------------------------------------------
   - Strong hierarchy
   - Slight spacing for readability
   ============================================================ */
.project-title {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

/* ============================================================
   BADGES (TECHNICAL TAGS)
   ------------------------------------------------------------
   - Compact, readable, and visually distinct
   - Slight spacing between badges
   ============================================================ */
.project-badges .badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    margin-right: 6px;
}

/* RTL badge spacing adjustment */
html[dir="rtl"] .project-badges .badge {
    margin-right: 0;
    margin-left: 6px;
}

/* ============================================================
   SUMMARY TEXT
   ------------------------------------------------------------
   - Softer color for readability
   - Comfortable line height
   ============================================================ */
.project-summary,
.project-card p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 14px;
}

/* ============================================================
   SECTION HEADINGS (INSIDE CARDS)
   ------------------------------------------------------------
   - Icon + bold text
   - Spacing above and below for clean separation
   ============================================================ */
.section-heading,
.project-card h6 {
    margin-top: 18px;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    display: flex;
    align-items: center;
}

    .project-card h6 i {
        width: 18px;
        text-align: center;
        margin-right: 8px;
    }

html[dir="rtl"] .project-card h6 i {
    margin-right: 0;
    margin-left: 8px;
}

/* ============================================================
   LISTS (TECHNICAL DETAILS)
   ------------------------------------------------------------
   - Clean spacing
   - Slightly smaller text for dense technical content
   ============================================================ */
.project-list,
.project-card ul {
    padding-left: 18px;
    margin-bottom: 12px;
}

    .project-list li,
    .project-card ul li {
        margin-bottom: 6px;
        color: #444;
        line-height: 1.5;
        font-size: 0.9rem;
    }

html[dir="rtl"] .project-card ul {
    padding-left: 0;
    padding-right: 18px;
}

/* ============================================================
   MATERIALS + SCOPE TEXT
   ------------------------------------------------------------
   - Slight emphasis
   - Consistent spacing
   ============================================================ */
.project-materials,
.project-scope {
    color: #333;
    margin-bottom: 12px;
    font-weight: 500;
}

/* ============================================================
   PROJECT CARD — ULTRA THIN DIVIDER
   ------------------------------------------------------------
   - Clean, subtle line to separate header content
   - Matches REFRESH GLOBAL’s corporate aesthetic
   ============================================================ */
.project-divider {
    height: 1px;
    width: 250px; /* Adjust length if needed */
    background-color: #dcdcdc; /* Light neutral gray */
    margin: 12px auto 18px auto; /* Centered with spacing */
    opacity: 0.8; /* Slight softness */
}

/* ============================================================
   GRID SPACING + EQUAL HEIGHT FIX
   ------------------------------------------------------------
   - Applied to Bootstrap columns that hold project cards.
   - Ensures consistent spacing and equal-height behavior.
   ============================================================ */
.col-md-6.col-lg-4,
.col-12 {
    margin-bottom: 30px;
    display: flex; /* So the card can stretch full height */
}

    .col-md-6.col-lg-4 > .project-card,
    .col-12 > .project-card {
        flex: 1;
    }

/* ============================================================
   RESPONSIVE TUNING
   ------------------------------------------------------------
   - Slightly tighter padding and smaller images on small screens.
   ============================================================ */
@media (max-width: 576px) {
    .project-card {
        padding: 16px;
    }

    .project-image {
        height: 180px; /* Slightly smaller on mobile */
    }

    .project-image-full {
        height: 260px;
    }
}
