/* ====================================
   JOMARTHEL - Images & Visuals
   Enhanced image styling for the website
   ==================================== */

/* ===== Hero Section Images ===== */
.hero {
    background-image:
        linear-gradient(135deg, rgba(10, 24, 69, 0.92) 0%, rgba(26, 42, 94, 0.88) 50%, rgba(20, 184, 166, 0.75) 100%),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?ixlib=rb-4.0.3&w=1920&q=80&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero-main-image {
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: var(--transition-slow);
    border: 4px solid rgba(255, 255, 255, 0.1);
}

.hero-main-image:hover {
    transform: perspective(1000px) rotateY(0) rotateX(0) scale(1.02);
}

.hero-image-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-image-wrapper::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.hero-image-wrapper img {
    position: relative;
    z-index: 1;
}

/* Hero floating badges */
.hero-badge-float {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 16px 22px;
    border-radius: var(--radius-md);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.hero-badge-float i {
    width: 40px;
    height: 40px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: var(--white);
}

.hero-badge-float .badge-text {
    display: flex;
    flex-direction: column;
}

.hero-badge-float strong {
    font-size: 0.95rem;
    color: var(--white);
    font-weight: 700;
}

.hero-badge-float span {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
}

.badge-top {
    top: 10%;
    left: -5%;
    animation: float-card 6s ease-in-out infinite;
}

.badge-bottom {
    bottom: 15%;
    right: -5%;
    animation: float-card 6s ease-in-out infinite 3s;
}

/* ===== Service Card Images ===== */
.service-card-image {
    width: 100%;
    height: 220px;
    position: relative;
    overflow: hidden;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.service-card:hover .service-card-image img {
    transform: scale(1.1);
}

.service-card-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(10, 24, 69, 0.5) 100%);
}

.service-card-content {
    padding: 40px 32px 32px;
    position: relative;
}

.service-card-content .service-icon {
    position: absolute;
    top: -35px;
    left: 32px;
    box-shadow: 0 10px 30px rgba(20, 184, 166, 0.3);
    background: var(--white) !important;
    width: 70px;
    height: 70px;
    border: 4px solid var(--white);
    z-index: 2;
}

.service-card-content .service-icon::after {
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    opacity: 1;
}

.service-card-content .service-icon i {
    color: var(--white) !important;
    z-index: 3;
}

.service-card-content h3 {
    margin-top: 30px;
}

/* ===== About Preview Image ===== */
.about-main-image {
    background: none !important;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.about-main-image::before,
.about-main-image::after {
    display: none !important;
}

.about-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

/* ===== Portfolio Images ===== */
.portfolio-image {
    background: var(--gray-200) !important;
    position: relative;
}

.portfolio-image::before,
.portfolio-image::after {
    display: none !important;
}

.portfolio-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: var(--transition-slow);
}

.portfolio-item:hover .portfolio-image > img,
.portfolio-item-full:hover .portfolio-image > img {
    transform: scale(1.1);
}

.portfolio-image .portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 24, 69, 0.95) 0%, rgba(10, 24, 69, 0.4) 60%, transparent 100%);
    display: flex;
    align-items: flex-end;
    padding: 30px;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay,
.portfolio-item-full:hover .portfolio-overlay {
    opacity: 1;
}

/* ===== Testimonial Avatars ===== */
.author-avatar {
    overflow: hidden;
    background: var(--gradient-accent);
    width: 55px;
    height: 55px;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ===== Team Photos ===== */
.team-image {
    overflow: hidden;
    position: relative;
    background: var(--gradient-dark) !important;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
    position: relative;
    z-index: 0;
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.team-image::before {
    display: none !important;
}

.team-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 24, 69, 0.6) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}

.team-social {
    z-index: 3 !important;
}

/* ===== Story Images (About Page) ===== */
.story-img {
    overflow: hidden;
    position: relative;
}

.story-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.story-img:hover img {
    transform: scale(1.1);
}

.story-img::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 24, 69, 0.4) 0%, rgba(20, 184, 166, 0.3) 100%);
    z-index: 1;
}

.story-img i {
    position: relative;
    z-index: 2;
}

/* ===== Service Detail Images ===== */
.detail-image {
    overflow: hidden;
    position: relative;
}

.detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.detail-image::before,
.detail-image::after {
    display: none;
}

.detail-image-overlay {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 24, 69, 0.5) 0%, rgba(20, 184, 166, 0.3) 100%);
    z-index: 1;
}

.detail-image-badge {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 14px;
}

.detail-image-badge i {
    width: 50px;
    height: 50px;
    background: var(--gradient-accent);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.detail-image-badge strong {
    display: block;
    color: var(--primary-dark);
    font-size: 1.05rem;
    font-weight: 700;
}

.detail-image-badge span {
    color: var(--gray-600);
    font-size: 0.85rem;
}

/* ===== Contact Map Image ===== */
.map-wrapper {
    position: relative;
    overflow: hidden;
}

.map-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.map-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(10, 24, 69, 0.85) 0%, rgba(20, 184, 166, 0.7) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    padding: 40px;
}

/* ===== Background Pattern Overlay ===== */
.has-pattern {
    position: relative;
}

.has-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../assets/dots-pattern.svg');
    background-repeat: repeat;
    opacity: 0.1;
    pointer-events: none;
}

/* ===== Client Logo Enhancements ===== */
.client-logo {
    position: relative;
    overflow: hidden;
}

.client-logo::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-accent);
    transform: translateY(100%);
    transition: var(--transition);
    z-index: 0;
}

.client-logo:hover::before {
    transform: translateY(0);
}

.client-logo i,
.client-logo span {
    position: relative;
    z-index: 1;
}

/* ===== Process Step Enhancement ===== */
.process-step {
    position: relative;
}

.process-step::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -15px;
    width: 30px;
    height: 2px;
    background: var(--accent);
    opacity: 0.3;
    display: none;
}

@media (min-width: 1025px) {
    .process-step:not(:last-child)::before {
        display: block;
    }
}

/* ===== Image Loading ===== */
img {
    -webkit-user-drag: none;
    user-drag: none;
    user-select: none;
}

.img-fluid {
    max-width: 100%;
    height: auto;
}

.img-rounded {
    border-radius: var(--radius-md);
}

.img-circle {
    border-radius: 50%;
}

.img-shadow {
    box-shadow: var(--shadow-lg);
}

.img-cover {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* ===== Responsive Image Adjustments ===== */
@media (max-width: 1024px) {
    .hero-main-image {
        max-width: 400px;
    }

    .badge-top,
    .badge-bottom {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-main-image {
        max-width: 300px;
        transform: none;
    }

    .hero {
        background-attachment: scroll;
    }

    .detail-image-badge {
        bottom: 20px;
        left: 20px;
        padding: 14px 18px;
    }

    .detail-image-badge i {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
