/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a4d2e;
    --secondary-color: #4f8f69;
    --accent-color: #f7b32b;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #666;
    --white: #ffffff;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Arial', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar {
    display: none;
}

.header-divider {
    width: 100%;
    height: auto;
    overflow: hidden;
}

.header-divider img {
    width: 100%;
    height: auto;
    display: block;
}

/* Navigation */
.navbar {
    padding: 25px 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 0;
    padding-right: 0;
    max-width: 90%;
}

.logo {
    margin-left: 0;
    animation: floatInFromLeft 1s ease-out;
    flex-shrink: 0;
}

.logo img {
    height: 80px;
    width: auto;
}

.navbar-right-group {
    display: flex;
    align-items: center;
    gap: 20px;
}

.butterfly-image {
    flex-shrink: 0;
}

.butterfly-image img {
    height: 80px;
    width: auto;
}

.navbar-phones {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.navbar-phones::after {
    content: '📞';
    position: absolute;
    right: -50px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
}

.navbar-phones a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 700;
    transition: var(--transition);
    white-space: nowrap;
}

.navbar-phones a:hover {
    color: var(--accent-color);
}

/* Logo Animation */
@keyframes floatInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-bg);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    position: relative;
}

.nav-menu li a:hover {
    color: var(--primary-color);
}

/* Secondary Navigation Bar */
.secondary-navbar {
    background: var(--white);
    width: 100%;
    padding: 0;
    border-top: 2px solid rgba(0, 0, 0, 0.15);
    border-bottom: 2px solid rgba(0, 0, 0, 0.15);
}

.secondary-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
}

.secondary-nav-menu li {
    flex: 1;
    text-align: center;
}

.secondary-nav-menu li a {
    display: block;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 14px;
    padding: 15px 10px;
    transition: var(--transition);
    border-right: 2px solid rgba(0, 0, 0, 0.15);
}

.secondary-nav-menu li:last-child a {
    border-right: none;
}

.secondary-nav-menu li a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
}

.nav-menu li a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: calc(150vh - 20px);
    min-height: 470px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 130px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

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

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    display: none;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    animation: fadeInUp 1.2s ease;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1.4s ease;
}

.btn {
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--dark-bg);
}

.btn-primary:hover {
    background: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--dark-bg);
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
}

/* Services Section */
.services {
    background: var(--light-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
    opacity: 0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Service card animations - triggered by scroll */
.service-card.animate:nth-child(1) {
    animation: fadeInFromLeft 1s ease-out forwards;
}

.service-card.animate:nth-child(2) {
    animation: fadeInFromLeft 1s ease-out forwards;
}

.service-card.animate:nth-child(3) {
    animation: fadeIn 1s ease-out forwards;
}

.service-card.animate:nth-child(4) {
    animation: fadeInFromRight 1s ease-out forwards;
}

.service-card.animate:nth-child(5) {
    animation: fadeInFromRight 1s ease-out forwards;
}

@keyframes fadeInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes fadeInFromRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.service-icon {
    margin-bottom: 20px;
}

.service-icon img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.service-card p {
    color: var(--text-light);
}

/* Technology Section */
.technology {
    background: var(--white);
}

.technology .container {
    max-width: 100%;
    padding: 0 40px;
}

.technology-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.tech-logo {
    max-width: none;
}

.tech-logo:first-child {
    flex: 1.5;
}

.tech-logo:last-child {
    flex: 1;
}

.tech-logo img {
    width: 100%;
    height: auto;
}

.tech-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.tech-item {
    text-align: center;
}

.tech-item img {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tech-item h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.tech-item p {
    color: var(--text-light);
}

/* Gallery Section */
.gallery {
    background: var(--light-bg);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    background: #000;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
    cursor: pointer;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-hidden {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-show-more {
    text-align: center;
    margin-top: 20px;
}

.gallery-show-more .btn {
    min-width: 200px;
}

.gallery-item video:hover {
    transform: scale(1.05);
}

/* Location Section */
.location {
    background: var(--white);
    padding: 60px 0 0 0;
}

.location-content {
    padding: 0 0 40px 0;
    text-align: center;
}

.location-content h2 {
    font-size: 2.5rem;
    margin-bottom: 0;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 20px;
    display: inline-block;
}

.location-content h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-color);
}

.location-banner {
    width: 100%;
    height: 500px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.location-banner a {
    display: block;
    width: 100%;
    height: 100%;
}

.location-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.location-banner:hover img {
    transform: scale(1.05);
}

.location-map img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.location-map img:hover {
    transform: scale(1.02);
}

/* Contact Section */
.contact {
    position: relative;
    overflow: hidden;
}

.contact-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.contact-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.contact .container {
    position: relative;
    z-index: 2;
}

.contact-wrapper {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    min-height: 500px;
    padding-left: 100px;
}

.contact-form-container {
    max-width: 500px;
    width: 100%;
}

.contact-form-container h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-align: left;
    position: relative;
    padding-bottom: 20px;
}

.contact-form-container h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100px;
    height: 3px;
    background: var(--accent-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    width: 100%;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(26, 77, 46, 0.3);
}

.contact-form button {
    align-self: flex-start;
    cursor: pointer;
    border: none;
}

/* About Section */
.about {
    background: var(--white);
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    margin-top: 40px;
}

.about-content {
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

.about-content p {
    margin-bottom: 20px;
}

.about-image {
    width: 100%;
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Team Section */
.team {
    background: var(--light-bg);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.team-member {
    text-align: center;
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-10px);
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
    border: 5px solid var(--accent-color);
}

.team-member h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.team-member p {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--accent-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent-color);
}

.footer-logo img {
    max-width: 200px;
    height: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Call Button */
.call-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: var(--dark-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 999;
    transition: var(--transition);
    text-decoration: none;
}

.call-button:hover {
    transform: scale(1.1);
    background: var(--primary-color);
    color: var(--white);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 564px) {
    .header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }

    .navbar {
        padding-top: 10px;
        padding-right: 0;
        padding-bottom: 0; /* bottom padding explicitly 0 */
        padding-left: 0;
        height: auto;
    }
    
    .navbar .container {
        max-width: 100%;
        padding-top: 15px;
        padding-right: 10px;
        padding-bottom: 0; /* bottom padding explicitly 0 */
        padding-left: 10px;
        display: grid;
        /* left column: logo; right column: butterfly above phones */
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "logo butterfly"
            "logo phones";
        align-items: center;
        justify-content: space-between;
        column-gap: 12px;
        row-gap: 6px;
        position: relative;
    }
    
    .logo {
        animation: none;
        flex-shrink: 0;
        grid-area: logo;
    }
    
    .logo img {
        height: 60px;
    }
    
    .nav-toggle {
        display: flex;
        position: absolute;
        right: 15px;
        top: 18px;
        z-index: 100;
    }
    
    .navbar-right-group {
        margin-right: 0;
        display: contents;
    }
    
    .butterfly-image {
        grid-area: butterfly;
        padding-right: 30px;
        justify-self: end;
    }
    
    .butterfly-image img {
        height: 50px;
    }
    
    .navbar-phones {
        grid-area: phones;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: flex-start;
        text-align: right;
        gap: 5px;
        width: auto;
        flex-wrap: nowrap;
        position: static;
        justify-self: end;
    }
    
    .navbar-phones::after {
        display: none;
    }

    .navbar-phones a {
        font-size: 16px;
    }

    /* Reduce top padding for all sections on mobile */
    section {
        padding-top: 30px;
    }

    .secondary-navbar {
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, opacity 0.3s ease;
    }
    
    .secondary-navbar.active {
        max-height: 500px;
        opacity: 1;
    }
    
    .secondary-nav-menu {
        flex-direction: column;
    }
    
    .secondary-nav-menu li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        opacity: 0;
        transform: translateY(-10px);
        animation: fadeInDown 0.3s ease forwards;
    }
    
    .secondary-navbar.active .secondary-nav-menu li:nth-child(1) { animation-delay: 0.1s; }
    .secondary-navbar.active .secondary-nav-menu li:nth-child(2) { animation-delay: 0.15s; }
    .secondary-navbar.active .secondary-nav-menu li:nth-child(3) { animation-delay: 0.2s; }
    .secondary-navbar.active .secondary-nav-menu li:nth-child(4) { animation-delay: 0.25s; }
    .secondary-navbar.active .secondary-nav-menu li:nth-child(5) { animation-delay: 0.3s; }
    .secondary-navbar.active .secondary-nav-menu li:nth-child(6) { animation-delay: 0.35s; }
    .secondary-navbar.active .secondary-nav-menu li:nth-child(7) { animation-delay: 0.4s; }
    
    .secondary-nav-menu li:last-child {
        border-bottom: none;
    }
    
    .secondary-nav-menu li a {
        border-right: none;
        padding: 15px 20px;
        text-align: left;
    }
    
    @keyframes fadeInDown {
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        display: none;
        gap: 15px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        height: auto;
        min-height: auto;
        flex-direction: column;
        margin-top: 0;
        padding: 0;
    }
    
    .hero-background {
        position: relative;
        width: 100%;
        height: auto;
        margin: 0;
        padding: 0;
    }
    
    .hero-background img {
        object-fit: cover;
        width: 100%;
        height: auto;
        display: block;
        margin: 0;
        padding: 0;
    }
    
    .hero-background::after {
        display: none;
    }
    
    .hero-content {
        display: none;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .technology-content {
        flex-direction: column;
    }
    
    .about-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-content {
        text-align: center;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
        justify-content: center;
        padding-left: 0;
        padding: 20px;
    }
    
    .contact-form-container {
        max-width: 100%;
    }
    
    .contact-form-container h2 {
        text-align: center;
    }
    
    .contact-form-container h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .contact-image {
        order: -1;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .top-bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .header-divider img {
        height: 10px;
        object-fit: contain;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero {
        margin-top: 0;
    }
    
    .call-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
}

/* Ultra-small devices: place butterfly below logo and on same row as the numbers */
@media (max-width: 320px) {
    /* small horizontal padding for very small screens */
    .header {
        padding: 0 8px;
    }
    .navbar .container {
        grid-template-columns: auto 1fr;
        grid-template-areas:
            "logo logo"
            "butterfly phones";
        column-gap: 8px;
        row-gap: 0px;
    }

    .butterfly-image {
        display: block;
        grid-area: butterfly;
        justify-self: start;
    }

    .butterfly-image img {
        height: 40px;
    }

    .navbar-phones {
        grid-area: phones;
        justify-self: end;
        align-items: flex-end;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}