.hero {
    padding: 120px 0 80px;
    background-color: #f8f9fa;
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #212529;
}

.hero-text p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #6c757d;
    max-width: 540px;
}

.btn-primary {
    display: inline-block;
    background-color: #4361ee;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-primary:hover {
    background-color: #3a56d4;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Bubble style image container */
.bubble-container {
    position: relative;
    width: 100%;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bubble-image {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.bubble-image::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 3px solid transparent;
    border-radius: inherit;
    background: linear-gradient(90deg, #4361ee, #60efff, #4361ee) border-box;
    -webkit-mask: 
        linear-gradient(#fff 0 0) padding-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 300% 100%;
    animation: borderAnimation 6s linear infinite;
    z-index: 2;
    transition: all 0.4s ease;
}

/* Hover effect for expanding border */
.bubble-container:hover .bubble-image::before {
    inset: -4px;  /* Expands the border outward */
    border-width: 6px;  /* Makes the border thicker */
    filter: brightness(1.2);  /* Makes the border colors brighter */
}

/* Optional: slight scale effect on the image itself */
.bubble-container:hover .bubble-image {
    transform: scale(1.02);
}

.bubble-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
    transform: scale(1.02); /* Slightly larger to hide any edge artifacts */
    transition: transform 0.4s ease;
}

/* Optional: scale the image slightly more on hover */
.bubble-container:hover .bubble-image img {
    transform: scale(1.05);
}

/* Floating bubble animations in background */
.bubble-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(67, 97, 238, 0.1), rgba(96, 239, 255, 0.1));
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    animation: float 10s linear infinite;
}

.bubble:nth-child(1) {
    width: 80px;
    height: 80px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.bubble:nth-child(2) {
    width: 40px;
    height: 40px;
    left: 20%;
    top: 80%;
    animation-delay: 2s;
    animation-duration: 12s;
}

.bubble:nth-child(3) {
    width: 60px;
    height: 60px;
    right: 15%;
    top: 30%;
    animation-delay: 4s;
    animation-duration: 18s;
}

.bubble:nth-child(4) {
    width: 50px;
    height: 50px;
    right: 30%;
    bottom: 20%;
    animation-delay: 6s;
    animation-duration: 20s;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-60px) rotate(180deg);
        opacity: 0.4;
    }
    100% {
        transform: translateY(-120px) rotate(360deg);
        opacity: 0;
    }
}

@keyframes borderAnimation {
    0% { background-position: 0% 0%; }
    100% { background-position: 300% 0%; }
}

/* Responsive layout */
@media (min-width: 992px) {
    .hero-content {
        flex-direction: row;
        align-items: center;
    }
    .hero-text {
        flex: 1;
        padding-right: 40px;
    }
    .hero-image {
        flex: 1;
    }
    .hero-text h1 {
        font-size: 3rem;
    }
    .bubble-container {
        height: 400px;
    }
}

/* For tablets */
@media (max-width: 991px) and (min-width: 768px) {
    .bubble-container {
        height: 350px;
    }
}

/* For mobile phones */
@media (max-width: 767px) {
    .hero-text {
        text-align: center;
    }
    .hero-text p {
        margin-left: auto;
        margin-right: auto;
    }
    .bubble-container {
        height: 300px;
    }
}