/* General Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Dosis', sans-serif; /* Updated to Dosis */
    color: white;
    height: 100%;
    overflow-x: hidden;
}

/* Background Image */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('background.png') no-repeat center center/cover;
    z-index: -1;
}

/* Dark Overlay */
.overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

/* Centered Content */
.content {
    text-align: center;
    position: absolute;
    top: 2%;
    width: 100%;
}

.content h1 {
    font-size: 3rem;
    margin: 0;
}

.content p {
    font-size: 1.2rem;
    opacity: 0.8;
}

/* Spiral Container */
.spiral-container {
    position: relative;
    width: 100%;
    max-width: 1200px; /* Increased width for better spread */
    margin: 250px auto 50px auto; /* Reduced bottom margin to minimize gap with footer */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping */
    justify-content: space-around; /* Spread bubbles evenly */
    align-items: center; /* Center bubbles vertically */
    gap: 30px; /* Space between bubbles */
    padding-top: 50px; /* Added padding for better spacing */
    height: unset; /* Removed height restriction to prevent scrolling */
}

/* Floating Bubbles */
.bubble {
    flex: 0 1 240px; /* Increased size to prevent text overflow */
    height: 240px; /* Adjusted height */
    border-radius: 50%;
    background: linear-gradient(135deg, #292828, #1b1a1a); /* Light orange gradient */
    color: white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3); /* Enhanced shadow effect */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 1rem;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth hover effect */
    overflow: hidden; /* Prevent text overflow */
    word-wrap: break-word; /* Ensure text wraps properly */
}

.bubble:hover {
    transform: scale(1.1); /* Enlarges on hover */
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4); /* Stronger shadow on hover */
}

.bubble h2 {
    margin: 0;
    font-size: 1.5rem; /* Adjusted heading size */
}

.bubble p {
    margin: 10px 0 0;
    font-size: 0.9rem; /* Reduced paragraph font size for better fit */
    line-height: 1.4; /* Adjusted line height for readability */
}

/* Hover Effect */
.bubble:hover {
    transform: scale(1.1); /* Enlarges on hover */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3); /* Enhanced shadow on hover */
}


/* Remove individual positioning */
#about, #accelerate, #benefits, #response, #customised #contact {
    position: static;
}

/* Footer */
footer {
    text-align: center;
    position: relative; /* Changed from absolute to relative */
    margin-top: 50px; /* Added margin to separate it from the content */
    width: 100%;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8); /* Black background with opacity */
    animation: fadeIn 0.3s ease-in-out; /* Smooth fade-in animation */
}

.modal-content {
    background: linear-gradient(135deg, #1e1e1e, #3a3a3a); /* Black-grey light gradient */
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    color: #fff; /* Changed font color to white */
    text-align: justify; /* Justify the modal content */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s ease-in-out;
    position: relative; /* Ensure close button is positioned relative to modal */
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.8rem;
}

.modal-content iframe {
    border: none;
    border-radius: 5px;
}

.close {
    color: #aaa;
    position: absolute; /* Positioned relative to the modal */
    top: 15px; /* Adjusted top position */
    right: 15px; /* Adjusted right position */
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #fff; /* White color on hover */
    text-decoration: none;
}

/* Contact Container */
.contact-container {
    max-width: 600px;
    margin: 50px auto;
    padding: 20px;
    background: #1e1e1e;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    color: white;
    font-family: 'Dosis', sans-serif;
}

.contact-container h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
    font-weight: bold;
}

input, textarea {
    margin-bottom: 15px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    background: #292828;
    color: white;
}

input:focus, textarea:focus {
    outline: none;
    border: 1px solid #ff9a76;
}

button {
    padding: 10px;
    font-size: 1rem;
    font-weight: bold;
    color: white;
    background: linear-gradient(135deg, #ff9a76, #ffcc70);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background: linear-gradient(135deg, #ffcc70, #ff9a76);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .spiral-container {
        margin: 235px auto 45px auto; /* Adjusted margin for smaller screens */
        gap: 20px; /* Reduced gap between bubbles */
    }

    .modal-content {
        padding: 20px;
        width: 90%; /* Adjusted width for smaller screens */
        margin: 20% auto; /* Adjusted margin for better alignment */
        border-radius: 10px; /* Slightly reduced border radius */
    }

    .modal-content h2 {
        font-size: 1.8rem; /* Adjusted font size for smaller screens */
    }

    .modal-content p {
        font-size: 0.9rem; /* Adjusted paragraph font size */
    }

    .modal-content ul {
        font-size: 0.9rem; /* Adjusted list font size */
    }

    .contact-container {
        padding: 15px;
    }

    button {
        font-size: 0.9rem;
    }

    footer {
        font-size: 0.8rem; /* Adjusted font size for smaller screens */
        margin-top: 30px; /* Reduced margin for better spacing */
    }
}