/* style.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.7;
    background-color: #f4f8fb;
    color: #333;
}

header {
    background-color: #2c3e50;
    color: white;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px; /* Add padding to align with the main section */
    box-sizing: border-box; /* Ensure padding is included in the width */
}

.logo {
    flex-grow: 0;
}

nav ul {
    list-style: none;
    display: flex;
    margin-left: auto;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding-bottom: 5px;
    transition: border-bottom 0.3s ease;
}

nav ul li a.active-nav {
    font-weight: 600;
    border-bottom: 2px solid #3498db;
}

.main {
    width: 100%;
    overflow: hidden;
}

.section {
    padding: 100px 20px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.5s ease, transform 0.5s ease; /* Keep the original transition */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
}

.section.active {
    opacity: 1;
    transform: translateY(0);
}

/* Section h2 */
.section h2 {
    color: #3498db;
    margin-bottom: 10px;
    font-size: 2.5em;
}

/* Home Section */
#home {
    padding-top: 80px;
    color: white;
}

.section .background-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.section .background-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section .background-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(rgba(44, 62, 80, 0.7), rgba(44, 62, 80, 0.7));
  z-index: 0; /* Place the gradient between the image and the content */
}

.home-content {
    max-width: 800px;
    margin: 0 auto;
}

.home-content h1 {
    font-size: 3em;
    margin-bottom: 10px;
}

.home-content .tagline {
    font-size: 1.2em;
    color: #f4f8fb;
    margin-bottom: 20px;
}

.home-content .btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.home-content .btn:hover {
    background-color: #2980b9;
}

/* Section Header */
.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5em;
    margin-bottom: 5px;
}

.section-header p {
    font-size: 1.1em;
    color: #555;
}

/* Services Section */
#services {
    background-color: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.service-item {
    background-color: #f9f9f9;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out;
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item i {
    font-size: 2.5em;
    color: #3498db;
    margin-bottom: 15px;
}

.service-item h3 {
    font-size: 1.5em;
    margin-bottom: 10px;
}

.service-item p {
    color: #666;
}

/* About Section */
#about {
    background-color: #f0f8ff;
}

.about-content {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    flex-direction: row-reverse;
}

.about-text {
    flex: 2;
    text-align: left;
    /* Adjust padding for reversed order */
    padding-right: 0;
    padding-left: 50px;
}

.about-image {
    flex: 1;
    /* Adjust margin for reversed order */
    margin-right: 0;
    margin-left: 0;
}

.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
#contact {
    background-color: white;
}

.contact-details-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 60px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.contact-detail {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    width: 100%;
    text-align: left;
}

.contact-detail i {
    font-size: 1.5em;
    margin-right: 20px;
    color: #3498db;
    min-width: 30px;
}

.contact-detail p {
    margin: 0;
    color: #555;
}

.contact-detail a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

contact-detail a:hover {
    color: #2980b9;
}

html {
    scroll-behavior: smooth;
}

/* Logo Styling */
.logo img {
    max-height: 50px;
    vertical-align: middle;
}

/* Language Selector Styles */
.language-selector {
    position: relative;
    display: inline-block;
    margin-left: 20px;
}

.language-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    padding: 0;
}

.flag-icon {
    width: 20px;
    height: auto;
    margin-right: 5px;
}

.language-dropdown {
    display: none; /* Default hidden state for desktop hover */
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 0;
    margin: 0;
    z-index: 1000;
    border-radius: 4px;
    overflow: hidden;
    min-width: 150px;
    max-width: 200px;
    transform-origin: top right;
    animation: rollout-right 0.3s ease-in-out;
    box-sizing: border-box;
}

.language-dropdown li {
    padding: 0;
    display: flex;
    align-items: center;
}

.language-dropdown li a {
    display: block;
    width: 100%;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease, font-weight 0.3s ease;
    box-sizing: border-box;
}

.language-dropdown li a:hover {
    background-color: #f0f0f0;
}

/* Style for the active language link */
.language-dropdown li a.active-lang {
    font-weight: bold;
    background-color: #e0e0e0;
    color: #2c3e50;
}

/* Ensure dropdown remains visible when hovering over the toggle or dropdown (Desktop) */
.language-selector:hover .language-dropdown,
.language-dropdown:hover {
    display: block; /* Use display for desktop hover */
    transform: scaleY(1); /* Expand the dropdown */
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Header */
    header {
        padding: 10px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 1000;
    }

    nav {
        width: 100%;
    }

    .logo {
        flex-grow: 0;
    }

    .menu-toggle {
        background: none;
        border: none;
        color: white;
        font-size: 1.5em;
        cursor: pointer;
        padding: 20px 30px;
        z-index: 1001;
        position: relative;
        order: 2;
    }

    /* Hide the default nav on mobile */
    nav > ul:not(.nav-links) {
        display: none;
    }

    /* Show the slide-in nav */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        transform: translateX(100%);
        width: 300px;
        height: 100%;
        background-color: #2c3e50;
        padding-top: 60px;
        transition: transform 0.3s ease;
        flex-direction: column;
        align-items: flex-start;
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links li {
        margin: 0;
        padding: 15px 20px;
        border-bottom: 1px solid #444;
        width: 100%;
        text-align: left;
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    /* Rest of mobile styles remain */
    /* Sections */
    .section {
        padding: 60px 20px;
    }

    .section h2 {
        font-size: 2em;
    }

    /* Home Section */

    .home-content h1 {
        font-size: 2.5em;
    }

    /* Services Section */
    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-item {
        padding: 20px;
    }

    .service-item i {
        font-size: 2em;
    }

    .service-item h3 {
        font-size: 1.2em;
    }

    /* About Section */
    .about-content {
        flex-direction: column;
        align-items: center;
    }

    .about-text {
        padding-right: 0;
        padding-left: 0;
        text-align: center;
        margin-bottom: 30px;
    }

    /* Contact Section */
    .contact-details-container {
        padding: 40px;
    }

    .language-selector {
        position: absolute;
        top: 10px;
        left: 20px;
        margin: 0;
    }

    .language-dropdown {
        left: 0;
        right: auto; /* Reset right alignment */
        transform-origin: top left;
        display: block;
        visibility: hidden; /* Start hidden */
        opacity: 0; /* Start transparent */
        transform: scaleY(0.95); /* Start slightly scaled */
        transition: visibility 0.3s ease, opacity 0.3s ease, transform 0.3s ease; /* Add transition */
    }

    /* Show dropdown when .open is present (Mobile) */
    .language-selector.open .language-dropdown {
        visibility: visible; /* Make visible */
        opacity: 1; /* Make opaque */
        transform: scaleY(1); /* Animate to full size */
    }

}

/* Rollout Animation */
/* Modify the animation name and origin */
@keyframes rollout-left {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Larger Screens */
@media screen and (min-width: 769px) {
    /* Reset nav ul styles to default */
    nav ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        width: auto;
        margin-left: auto;
    }

    .menu-toggle {
        display: none;
    }

    .nav-links {
        /* Reset slide-in nav styles */
        position: static;
        height: auto;
        width: auto;
        background-color: transparent;
        padding: 0;
        transition: none;
        flex-direction: row;
        align-items: center;
        box-shadow: none;
    }

    .nav-links li {
        margin-right: 25px;
        margin-left: 0;
        padding: 0;
        border: none;
    }

    /* Logo left, Nav right */
    header {
        justify-content: flex-start;
    }

    nav {
        margin-left: auto;
    }

    .language-dropdown {
        left: auto;
        right: 0;
        transform-origin: top right;
        max-width: 200px;
        transform: scaleY(0);
        animation: rollout-right 0.3s ease-in-out;
        /* Ensure display: none is the default for desktop */
        display: none;
        /* Remove visibility/opacity/transition for desktop hover */
        visibility: initial;
        opacity: initial;
        transition: initial;
    }

    /* Ensure dropdown remains visible on hover (Desktop) */
    .language-selector:hover .language-dropdown {
        display: block; /* Use display for desktop hover */
        transform: scaleY(1);
    }

    /* Add rollout-left animation keyframes back */
    @keyframes rollout-left {
        from {
            transform: scaleX(0);
        }
        to {
            transform: scaleX(1);
        }
    }
}
