@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    line-height: 1.8;
    color: #E0E0E0;
    background: linear-gradient(45deg, #121212, #1A1A2E, #16213E, #0F3460);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Animated Gradient Background */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Glassmorphism Header */
header {
    background: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 1.5rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    animation: fadeInDown 1s ease-out;
    transition: transform 0.3s ease; /* Smooth transition for hiding/showing */
    transform: translateY(0); /* Default visible state */
    will-change: transform;
    backface-visibility: hidden;
}

/* Class to hide the header when scrolling down */
header.header-hidden {
    transform: translateY(-100%); /* Slide the header up out of view */
}

/* Fade In Animation for Header */
@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.logo {
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 60px;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
}

nav ul li {
    opacity: 0;
    animation: slideIn 0.5s ease forwards;
    animation-delay: calc(0.1s * var(--i));
}

nav ul li:nth-child(1) { --i: 1; }
nav ul li:nth-child(2) { --i: 2; }
nav ul li:nth-child(3) { --i: 3; }
nav ul li:nth-child(4) { --i: 4; }
nav ul li:nth-child(5) { --i: 5; }
nav ul li:nth-child(6) { --i: 6; }
nav ul li:nth-child(7) { --i: 7; }
nav ul li:nth-child(8) { --i: 8; }

/* Slide In Animation for Nav Links */
@keyframes slideIn {
    0% { opacity: 0; transform: translateX(20px); }
    100% { opacity: 1; transform: translateX(0); }
}

nav ul li a {
    color: #E0E0E0;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #00DDEB;
    bottom: -5px;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

nav ul li a.active,
nav ul li a:hover {
    color: #00DDEB;
}

nav ul li a:focus {
    outline: 2px solid #00DDEB;
    outline-offset: 2px;
}

main {
    padding: 3rem 2rem;
}

section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure the hero section is visible immediately on page load */
.hero {
    text-align: center;
    padding: 5rem 2rem;
    background: linear-gradient(135deg, #00DDEB, #FF2E63);
    color: #fff;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    opacity: 1; /* Make hero visible by default */
    transform: translateY(0);
    animation: fadeIn 1.5s ease;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInScale 1s ease forwards 0.5s;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0;
    animation: fadeInScale 1s ease forwards 0.7s;
}

/* Fade In and Scale Animation for Hero Content */
@keyframes fadeInScale {
    0% { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #FF2E63;
    color: #fff;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.3s ease, background 0.3s ease;
    opacity: 0;
    animation: fadeInScale 1s ease forwards 0.9s;
}

.cta-button:hover {
    background: #00DDEB;
    transform: scale(1.05);
}

.cta-button:focus {
    outline: 2px solid #00DDEB;
    outline-offset: 2px;
}

.stats, .features, .services, .portfolio, .blog, .about, .contact, .testimonials, .process, .team, .faq, .benefits, .cta-banner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 0;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: #fff;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #fff;
}

.stats-grid, .feature-grid, .service-grid, .service-list, .portfolio-grid, .testimonial-grid, .blog-posts, .process-grid, .team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #00DDEB;
}

.stat-item p {
    font-size: 1.2rem;
}

.feature, .service, .portfolio-item, .testimonial, .blog-post, .process-item, .team-member {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: calc(0.2s * var(--i));
}

.feature:nth-child(1), .service:nth-child(1), .portfolio-item:nth-child(1), .testimonial:nth-child(1), .blog-post:nth-child(1), .process-item:nth-child(1), .team-member:nth-child(1) { --i: 1; }
.feature:nth-child(2), .service:nth-child(2), .portfolio-item:nth-child(2), .testimonial:nth-child(2), .blog-post:nth-child(2), .process-item:nth-child(2), .team-member:nth-child(2) { --i: 2; }
.feature:nth-child(3), .service:nth-child(3), .portfolio-item:nth-child(3), .testimonial:nth-child(3), .blog-post:nth-child(3), .process-item:nth-child(3), .team-member:nth-child(3) { --i: 3; }
.feature:nth-child(4), .service:nth-child(4), .portfolio-item:nth-child(4), .testimonial:nth-child(4), .blog-post:nth-child(4), .process-item:nth-child(4), .team-member:nth-child(4) { --i: 4; }
.feature:nth-child(5), .service:nth-child(5), .portfolio-item:nth-child(5), .testimonial:nth-child(5), .blog-post:nth-child(5), .process-item:nth-child(5), .team-member:nth-child(5) { --i: 5; }
.feature:nth-child(6), .service:nth-child(6), .portfolio-item:nth-child(6), .testimonial:nth-child(6), .blog-post:nth-child(6), .process-item:nth-child(6), .team-member:nth-child(6) { --i: 6; }

/* Fade In Animation for Cards */
@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

.feature:hover, .service:hover, .portfolio-item:hover, .testimonial:hover, .blog-post:hover, .process-item:hover, .team-member:hover {
    transform: translateY(-10px);
    box-shadow: 8px 8px 20px rgba(0, 0, 0, 0.4), -8px -8px 20px rgba(255, 255, 255, 0.1);
}

.feature:focus-within, .service:focus-within, .portfolio-item:focus-within, .testimonial:focus-within, .blog-post:focus-within, .process-item:focus-within, .team-member:focus-within {
    outline: 2px solid #00DDEB;
    outline-offset: 2px;
}

.portfolio-image, .team-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.testimonial cite {
    display: block;
    margin-top: 1rem;
    font-style: italic;
    color: #B0B0B0;
}

.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.blog-search {
    max-width: 300px;
}

.blog-search input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #E0E0E0;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.blog-search input:focus {
    border-color: #00DDEB;
    outline: none;
}

.blog-categories {
    margin-bottom: 2rem;
}

.blog-categories h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.blog-categories ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.blog-categories ul li a {
    color: #B0B0B0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-categories ul li a:hover {
    color: #FF2E63;
}

.blog-categories ul li a:focus {
    outline: 2px solid #FF2E63;
    outline-offset: 2px;
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-message {
    text-align: center;
    padding: 1rem;
    border-radius: 10px;
    font-weight: 600;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(0, 221, 235, 0.1);
    color: #00DDEB;
}

.form-message.error {
    display: block;
    background: rgba(255, 46, 99, 0.1);
    color: #FF2E63;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.05);
    color: #E0E0E0;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #00DDEB;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 200px;
}

.contact-info {
    text-align: center;
    margin-top: 3rem;
}

.contact-info h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin: 0.5rem 0;
}

.map-placeholder {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.faq-item {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.faq-item:hover {
    transform: translateY(-5px);
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.3), -5px -5px 15px rgba(255, 255, 255, 0.05);
}

.faq-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.faq-item p {
    margin: 0;
}

.team-member {
    text-align: center;
}

.team-member p {
    margin: 0.5rem 0;
}

.team-member p strong {
    color: #00DDEB;
}

.process-item {
    text-align: center;
}

.cta-banner {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #FF2E63, #00DDEB);
    border-radius: 15px;
    color: #fff;
}

.cta-banner h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-banner p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

footer {
    background: rgba(18, 18, 18, 0.9);
    color: #E0E0E0;
    padding: 3rem 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section p {
    margin: 0.5rem 0;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li a {
    color: #B0B0B0;
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
}

.footer-section ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    background: #FF2E63;
    bottom: -2px;
    left: 0;
    transition: width 0.3s ease;
}

.footer-section ul li a:hover::after {
    width: 100%;
}

.footer-section ul li a:hover {
    color: #FF2E63;
}

.footer-section ul li a:focus {
    outline: 2px solid #FF2E63;
    outline-offset: 2px;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Ad Space Styling */
.ad-space {
    padding: 2rem;
    text-align: center;
}

.ad-space h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.ad-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 728px;
    margin: 0 auto;
    min-height: 90px; /* Minimum height to prevent layout shift */
}

/* Go to Top Button Styling */
.go-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(255, 46, 99, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.go-to-top.show {
    opacity: 1;
    visibility: visible;
}

.go-to-top:hover {
    background: #00DDEB;
    transform: scale(1.1);
}

.go-to-top:focus {
    outline: 2px solid #00DDEB;
    outline-offset: 2px;
}

@media (max-width: 768px) {
    header {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.2rem;
    }

    .logo-image {
        max-height: 50px;
    }

    h2 {
        font-size: 2rem;
    }

    .blog-header {
        flex-direction: column;
        gap: 1rem;
    }

    .blog-search {
        max-width: 100%;
    }

    .contact-info {
        margin-top: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-grid, .feature-grid, .service-grid, .service-list, .portfolio-grid, .testimonial-grid, .blog-posts, .process-grid, .team-grid {
        grid-template-columns: 1fr;
    }

    .logo-image {
        max-height: 40px;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

    .portfolio-image, .team-image {
        height: 150px;
    }

    .contact-form input,
    .contact-form textarea {
        font-size: 0.9rem;
    }

    .go-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* WhatsApp Popup Styling */
.whatsapp-popup-button {
    position: fixed;
    bottom: 2rem;
    right: 6rem; /* Positioned to the left of the go-to-top button */
    background: rgba(255, 255, 255, 0.9); /* WhatsApp green */
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-popup-button img.whatsapp-icon {
    width: 30px;
    height: 30px;
}

.whatsapp-popup-button:hover {
    background: #000000;
    transform: scale(1.1);
}

.whatsapp-popup-button:focus {
    outline: 2px solid #00DDEB;
    outline-offset: 2px;
}

.whatsapp-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-popup.show {
    display: flex;
    opacity: 1;
}

.whatsapp-popup-content {
    background: rgba(18, 18, 18, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideInPopup 0.3s ease forwards;
}

@keyframes slideInPopup {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.whatsapp-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #E0E0E0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.whatsapp-popup-close:hover {
    color: #FF2E63;
}

.agent-dropdown {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #050505;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.agent-dropdown:focus {
    border-color: #00DDEB;
    outline: none;
}

.chat-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-message {
    padding: 0.8rem;
    border-radius: 10px;
    max-width: 80%;
}

.chat-message.bot-message {
    background: rgba(0, 221, 235, 0.1);
    color: #00DDEB;
    align-self: flex-start;
}

.chat-message.user-message {
    background: rgba(255, 46, 99, 0.1);
    color: #FF2E63;
    align-self: flex-end;
}

.chat-input {
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: #E0E0E0;
    font-size: 1rem;
}

.chat-input input:focus {
    border-color: #00DDEB;
    outline: none;
}

.chat-input button {
    padding: 0.8rem 1.5rem;
    background: #FF2E63;
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.chat-input button:hover {
    background: #00DDEB;
}

.chat-input button:focus {
    outline: 2px solid #00DDEB;
    outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .whatsapp-popup-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .whatsapp-popup-button {
        bottom: 1rem;
        right: 4.5rem;
        width: 40px;
        height: 40px;
    }

    .whatsapp-popup-button img.whatsapp-icon {
        width: 24px;
        height: 24px;
    }
}