:root {
    --primary-color: #0277BD;
    --primary-dark: #01579B;
    --secondary-color: #455A64;
    --secondary-dark: #263238;
    --accent-color: #FF6F00;
    --accent-light: #FF8F00;
    --text-dark: #212121;
    --text-light: #757575;
    --bg-light: #F5F5F5;
    --white: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--white);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    height: 50px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

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

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

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

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../mediafiles/NexOrganix-Background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

.hero-content {
    position: relative;
    z-index: 2;
    animation: fadeInUp 1s ease;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-welcome {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-logo {
    max-width: 550px;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(2px 2px 8px rgba(0, 0, 0, 0.4));
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 400;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-undertext {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
    display: block;
    margin-top: 1.5rem;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 16px 40px;
    text-decoration: none;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* CTA Button - Orange variant */
.btn-cta {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-light));
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.3);
}

.btn-cta:hover {
    background: linear-gradient(135deg, var(--accent-light), var(--accent-color));
    box-shadow: 0 8px 24px rgba(255, 111, 0, 0.4);
    transform: translateY(-3px) scale(1.05);
}

/* Sections */
section {
    padding: 100px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--text-dark);
    position: relative;
}

.title-text {
    display: inline-block;
    position: relative;
}

.title-accent {
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 10px auto 0;
    width: 0;
    transition: width 0.8s ease-out 0.3s;
    max-width: 100px;
}

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

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-content .lead {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.about-content p {
    margin-bottom: 1.5rem;
}

.about-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #e0e0e0;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (min-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    position: relative;
    min-height: 280px;
}

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

.service-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    transition: transform 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--accent-color);
}

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

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

.service-main {
    transition: opacity 0.3s ease;
}

.service-hover {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    font-weight: 600;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Experience Section */
.experience {
    background: var(--white);
}

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

.case-chip {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: default;
}

.case-chip:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.case-chip h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}

.case-chip p {
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1rem;
}

/* Why Us Section */
.why-us {
    background: var(--bg-light);
}

.why-us-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.why-us-statement {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.why-us-content p:last-child {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Contact Section */
.contact {
    background: var(--bg-light);
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: var(--text-light);
    line-height: 1.6;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto 3rem;
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.contact-direct {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-dark);
}

.contact-direct a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-direct a:hover {
    color: var(--accent-light);
    text-decoration: underline;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.1);
}

.form-group.error input,
.form-group.error textarea {
    border-color: #c62828;
}

.error-message {
    display: block;
    color: #c62828;
    font-size: 0.85rem;
    margin-top: 5px;
    min-height: 1.2rem;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    display: none;
    line-height: 1.6;
}

.form-message a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.form-message a:hover {
    text-decoration: none;
}

.form-message strong {
    display: block;
    margin-bottom: 0.5rem;
}

.form-message em {
    font-size: 0.9em;
    display: block;
    margin-top: 0.5rem;
}

.form-message.success {
    background: #E8F5E9;
    color: var(--primary-dark);
    display: block;
}

.form-message.error {
    background: #FFEBEE;
    color: #C62828;
    display: block;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
}

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

.fade-in {
    animation: fadeInUp 1s ease;
}

.fade-in:nth-child(2) {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.fade-in:nth-child(3) {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        min-height: 500px;
    }

    .hero h1,
    .hero-welcome {
        font-size: 1.8rem;
    }

    .hero-logo {
        max-width: 320px;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-undertext {
        font-size: 1rem;
    }

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

    section {
        padding: 60px 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .cases-grid {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1,
    .hero-welcome {
        font-size: 2.5rem;
    }

    .hero-logo {
        max-width: 450px;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }
}

@media (min-width: 1025px) {
    .services-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}