/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Open Sans', sans-serif;
}

body {
    background-image: url('https://images.unsplash.com/photo-1485470733090-0aae1788d5af?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1517&q=80');
    background-size: cover;
    background-position: center;
}

/* Header styles */
header {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 20px 0;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    animation: fadeIn 2s ease-in-out, borderAnimation 3s linear infinite;
    border: 5px solid transparent;
    padding: 10px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

header h1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 5px solid #f0a500;
    transform: scale(1.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

header h1:hover::before {
    opacity: 1;
    transform: scale(1);
}

nav {
    position: relative;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 15px;
    position: relative;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding: 10px; /* Increased padding */
    border-bottom: 2px solid transparent;
}

nav ul li a:hover {
    color: #f0a500;
    border-bottom: 2px solid #f0a500;
}

section {
    padding: 20px;
    text-align: center;
}

section h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    color: #fff;
    animation: fadeIn 2s ease-in-out;
}

.service-box, .about-box {
    background: rgba(255, 255, 255, 0.8);
    margin: 10px;
    padding: 15px;
    border-radius: 5px;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
}

.service-box:hover, .about-box:hover {
    border-color: #ff007f;
    box-shadow: 0 0 10px rgba(255, 0, 127, 0.5);
}

.service-box:hover h3, .about-box:hover h3 {
    color: #ff007f;
}

footer {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Responsive styles */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        font-size: 1.2em; /* Increased font size for better readability */
        padding: 15px; /* Increased padding for larger clickable area */
    }

    section h2 {
        font-size: 1.5em;
    }

    .service-box, .about-box {
        margin: 10px 0;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.2em;
    }

    nav ul li a {
        font-size: 1.1em; /* Increased font size for mobile devices */
        padding: 20px; /* Increased padding for larger clickable area */
    }

    section h2 {
        font-size: 1.2em;
    }
}

/* Keyframes for animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes borderAnimation {
    0% {
        border-color: #f0a500;
    }
    25% {
        border-color: #ff5722;
    }
    50% {
        border-color: #4caf50;
    }
    75% {
        border-color: #2196f3;
    }
    100% {
        border-color: #f0a500;
    }
}

/* New section styles */
#how-it-works {
    background: rgba(255, 255, 255, 0.8);
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#how-it-works::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1485470733090-0aae1788d5af?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1517&q=80') no-repeat center center;
    background-size: cover;
    opacity: 0.3;
    z-index: -1;
    transition: opacity 0.3s ease;
}

#how-it-works:hover::before {
    opacity: 0.5;
}

#how-it-works h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #00796b;
    animation: fadeIn 2s ease-in-out;
}

.steps {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.3s ease;
    position: relative;
    overflow: hidden;
}

.step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 150, 136, 0.2);
    transition: opacity 0.3s ease;
    z-index: -1;
}

.step:hover::before {
    opacity: 0.4;
}

.step:hover {
    background: #e0f2f1;
    transform: scale(1.05);
}

.step h3 {
    color: #00796b;
}

.step p {
    color: #555;
}

.step a {
    color: #00796b;
    text-decoration: none;
    font-weight: bold;
}

.step a:hover {
    text-decoration: underline;
}
