/* Custom CSS for Larry John Retirement Management Agency */

/* Hero Section Background and Styling */
.hero-section {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 50%, #0a58ca 100%);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(11, 94, 215, 0.9) 50%, rgba(10, 88, 202, 0.9) 100%);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Hero Section Image Optimization */
.hero-section img {
    max-width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    border-radius: 8px;
}

/* Gallery Images Optimization */
.gallery-item {
    height: 250px;
    background-color: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

/* Services Cards Image Optimization */
.card img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* About Section Cards */
.about-card {
    height: 100%;
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

/* Testimonial Cards */
.testimonial-card {
    height: 100%;
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-3px);
}

/* Contact Form Enhancement */
.contact-form {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
}

/* Responsive Image Handling */
@media (max-width: 768px) {
    .gallery-item {
        height: 200px;
    }
    
    .hero-section img {
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .gallery-item {
        height: 180px;
    }
    
    .hero-section img {
        max-height: 350px;
    }
}

/* Image Loading Animation */
.gallery-item img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Gallery grid improvements */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

/* Card hover effects */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Button enhancements */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}