/* Image Styles for Epic Deals Website */

/* Hero section with background image */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 4rem 2rem;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/images/webp/hero.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
    transform: scale(1.03);
    transition: transform 8s ease;
}

.hero:hover::before {
    transform: scale(1.08);
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        160deg,
        rgba(10, 10, 10, 0.88) 0%,
        rgba(10, 10, 10, 0.65) 50%,
        rgba(217, 74, 62, 0.35) 100%
    );
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 860px;
    padding: 0 1.5rem;
}

/* About page image */
.about-image {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Service cards with images */
.service-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    height: 100%;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-image {
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

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

.service-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

/* Team/office image */
.team-section {
    position: relative;
    padding: 4rem 0;
}

.team-image {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

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

/* Contact page image */
.contact-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 4rem 2rem;
    margin-bottom: 4rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/images/webp/contact.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.contact-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(217, 74, 62, 0.8) 0%, rgba(10, 10, 10, 0.7) 100%);
    z-index: -1;
}

.contact-hero-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
}

/* Background patterns */
.bg-pattern {
    background-image: url('../assets/images/webp/bg-pattern.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.bg-texture {
    background-image: url('../assets/images/webp/bg-texture.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Lazy loading - fade in on load */
img[loading="lazy"] {
    opacity: 1;
    transition: opacity 0.4s ease;
}

/* Image optimization classes */
.image-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-contain {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Fallback for browsers that don't support WebP */
.no-webp .hero::before {
    background-image: url('../assets/images/original/hero.jpg');
}

.no-webp .contact-hero::before {
    background-image: url('../assets/images/original/contact.jpg');
}

.no-webp .bg-pattern {
    background-image: url('../assets/images/original/bg-pattern.jpg');
}

.no-webp .bg-texture {
    background-image: url('../assets/images/original/bg-texture.jpg');
}
.image-attribution {
    text-align: center;
    padding: 1rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.image-attribution a {
    color: var(--accent);
    text-decoration: none;
}

.image-attribution a:hover {
    text-decoration: underline;
}
