/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    scroll-behavior: smooth; /* Enables smooth scrolling */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    padding-top: var(--navbar-height); /* Added to push content down */
}

/* Color Variables */
:root {
    --dark-orange: #ff8c00;
    --dark-gray: #333333;
    --light-gray: #f4f4f4;
    --white: #ffffff;
    --navbar-height: 70px;
}

/* Navbar Styles */
.navbar {
    display: flex;
    align-items: center;
    background-color: var(--dark-gray);
    padding: 10px 20px;
    position: fixed; /* Keeps navbar fixed at the top */
    top: 0;
    width: 100%; /* Ensures navbar spans the full width */
    z-index: 1000;
    flex-wrap: nowrap; /* Prevent items from wrapping */
    min-height: var(--navbar-height); /* Consistent navbar height */
}

.logo img {
    height: 50px;
}

.logo-name {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.company-name {
    margin-left: 10px;
    text-align: left;
    color: var(--white);
    flex-shrink: 0;
}

.company-name p {
    margin-bottom: 7px;
    text-transform: uppercase;
    line-height: 1.4;
    letter-spacing: 0.5px; /* Spacing between letters */
    font-weight: bold;
    font-size: 14px;
    white-space: pre-line;
}

/* Social Icons Styles */
.social-icons {
    display: flex;
    gap: 15px;
    margin-left: 5px; /* Space between company name and social icons */
}

.social-icon {
    width: 24px; /* Fixed size to prevent navbar height disturbance */
    height: 24px;
    filter: brightness(0) invert(1); /* Makes black to white */
    transition: none; /* Remove transitions related to hover */
}

/* Remove the hover effect by keeping the same styles on hover */
.social-icon:hover {
    filter: brightness(0) invert(1); /* Same as default state */
    transform: none; /* No scaling on hover */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    margin-left: auto; /* Pushes nav links to the right */
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--dark-orange);
}

/* Hamburger Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    overflow: visible;
    width: 35px;
    align-items: center;
    margin-left: auto;
    position: relative;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background: var(--white);
    margin: 4px 0;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Transform hamburger into X when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
    position: absolute;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
    position: absolute;
}

/* Hero Section Styles */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    min-height: 100vh; /* Full viewport height */
    scroll-margin-top: var(--navbar-height); /* Offset for anchor links */
    margin-top: -var(--navbar-height); /* Added negative margin to fix scroll issue */
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#hero-video,
#services-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures the video covers the container */
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); /* Darkened Shaded Overlay */
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    color: var(--white);
    padding: 20px;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
}

.hero-content .btn {
    padding: 10px 20px;
    background-color: var(--dark-orange);
    color: var(--white);
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.hero-content .btn:hover {
    background-color: #e67600;
}

/* Services Section Styles */
.services {
    position: relative; /* Added for positioning video and overlay */
    padding: 60px 20px;
    background-color: var(--light-gray);
    text-align: center;
    min-height: calc(100vh - var(--navbar-height)); /* Adjusted height */
    scroll-margin-top: var(--navbar-height); /* Offset for anchor links */
}

.services .video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.services-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(211, 211, 211, 0.5); /* Darkened Shaded Overlay */
    z-index: 2;
}

.services-content {
    position: relative;
    z-index: 3;
    color: var(--white); /* Ensures text is visible over the overlay */
}

.services-content h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: black; /* Changed from #333 to black */
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.service-item {
    position: relative; /* To position overlay and icon */
    background-size: cover;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    /* height: 300px; */ /* Removed to allow dynamic height */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    color: var(--white); /* Default text color */
    padding: 20px; /* Uniform padding */
    display: flex; /* Enable Flexbox */
    flex-direction: column; /* Stack elements vertically */
    justify-content: center; /* Center content vertically */
    /* Removed overflow: hidden; */
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}

.service-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Darkened Shaded Overlay */
    z-index: 1;
}

.service-item .service-icon {
    width: 30px; /* Adjust icon size as needed */
    height: 30px;
    filter: brightness(0) invert(1); /* Added Filter to Force White */
    margin-bottom: 15px; /* Space below icon */
    z-index: 2;
}

/* New Styles for Service Header */
.service-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 10px; /* Space below header */
    position: relative; /* To allow absolute positioning of icon */
}

.service-header .service-icon {
    position: absolute;
    left: 20px; /* Left padding for icon */
    /* margin-bottom: 15px; */ /* Removed to prevent extra space */
}

.service-label {
    z-index: 2;
    text-align: center; /* Center the label */
    margin-bottom: 0px; 
}

.service-label h3 {
    font-size: 1.8em;
    margin: 0 0 15px 0; /* Adds 15px margin at the bottom */
    color: var(--white);
    line-height: 1.2; /* Reduced Line-Height for Titles */
}

/* Adjusted Service Text */
.service-text {
    z-index: 2;
    /* Ensures the text takes up available space */
    flex-grow: 1;
    display: flex;
    align-items: center; /* Centers text vertically */
}

.service-text p {
    font-size: 1.0em; /* Increased Font Size for Better Readability */
    color: var(--white);
    line-height: 1.2;      /* Reduced Line-Height for Text */
    max-height: none;      /* Remove max-height to prevent cutting off text */
    overflow: visible;     /* Allow text to be fully visible */
    text-align: left;      /* Left align the text */
    margin-top: 30px;
}

/* Highlighted Text Styles */
.alt1 {
    font-weight: normal;
}

.alt2 {
    color: #ff5e00;
}

/* Publications Section Styles */
.publications {
    padding: 60px 20px;
    display: flex;
    align-items: flex-start; /* Align items to the top */
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap; /* Allow items to wrap */
    min-height: calc(100vh - var(--navbar-height)); /* Adjusted height */
    scroll-margin-top: var(--navbar-height); /* Offset for anchor links */
}

.publications-content, .publications-text {
    flex: 1 1 45%; /* Adjusted to 45% to allow space between image and text */
    max-width: 45%;
    box-sizing: border-box;
}

.publications-content {
    text-align: center; /* Center the content */
}

.publications-content a.amazon-link-wrapper {
    display: inline-block; /* Allows stacking of images */
    text-decoration: none; /* Removes underline from links */
}

.publications-content .book-image {
    display: block;
    margin: 0 auto;
    width: 100%; /* Make book image responsive */
    height: auto;
    border-radius: 10px;
}

.publications-content .available-at-amazon {
    display: block;
    margin: 10px auto 0; /* Adds spacing above the image */
    width: 140px; /* Fixed width as per requirement */
    height: auto;
    border-radius: 5px;
}

.publications-text h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: var(--dark-gray);
}

.publications-text p {
    font-size: 18px;
    color: #555555;
}

/* New Publications Quotes Section Styles */
.publications-quotes {
    /* Removed background-color for a cleaner look */
    margin-top: 20px;
    padding: 10px 0;
}

.publications-quotes h3 {
    font-size: 1.8em;
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.publications-quotes blockquote {
    font-style: italic;
    margin-bottom: 15px;
    position: relative;
    padding-left: 15px;
    color: #555555;
}

.publications-quotes blockquote::before {
    content: "“";
    font-size: 2em;
    position: absolute;
    left: 0;
    top: -10px;
    color: #ff7d04;
}

.publications-quotes blockquote p {
    margin: 0;
    line-height: 1.2;
    color: #664833;
}

/* Technologies Section Styles */
.technologies {
    padding: 60px 20px;
    background-color: var(--light-gray);
    text-align: center;
    min-height: calc(100vh - var(--navbar-height)); /* Adjusted height */
    scroll-margin-top: var(--navbar-height); /* Offset for anchor links */
}

.technologies h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--dark-gray);
}

.technologies-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.technologies-member {
    background-color: var(--white);
    border: 1px solid #dddddd;
    border-radius: 10px;
    padding: 20px;
    width: 250px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.technologies-member img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 15px;
}

.technologies-member h3 {
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.technologies-member p {
    color: #666666;
}

.technologies-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Contact Section Styles */
.contact {
    padding: 60px 20px;
    text-align: center;
    min-height: calc(100vh - var(--navbar-height)); /* Adjusted height */
    scroll-margin-top: var(--navbar-height); /* Offset for anchor links */
}

.contact h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    color: var(--dark-gray);
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-gray);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.contact-form .btn {
    display: block;
    width: 100%;
    padding: 10px;
    background-color: var(--dark-orange);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.contact-form .btn:hover {
    background-color: #e67600;
}

/* Footer Styles */
footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 20px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 20px;
    margin-bottom: 10px;
    padding: 0;
}

.footer-links li {
    margin: 5px 0;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--dark-orange);
}

footer p {
    font-size: 14px;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .navbar {
        flex-wrap: nowrap;
        min-height: var(--navbar-height);
    }

    .logo-name {
        flex-shrink: 0;
    }

    .nav-links {
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease-in-out;
        background-color: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
    }

    .nav-links.active {
        max-height: 500px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .nav-links a {
        color: var(--white);
        text-decoration: none;
        font-size: 16px;
        transition: color 0.3s ease;
    }

    .nav-links a:hover {
        color: var(--dark-orange);
    }

    .hamburger {
        display: flex;
        margin-left: auto;
    }

    /* Adjust company name on small screens */
    .company-name {
        margin-left: 10px;
        flex-shrink: 0;
    }

    /* Hero Section Adjustments */
    .hero {
        flex-direction: column;
        padding: 60px 20px;
        /* Removed margin-top */
    }

    .hero-content {
        text-align: center;
    }

    /* Services Section Adjustments */
    .services {
        flex-direction: column;
        text-align: center;
    }

    .services-content {
        padding: 20px;
    }

    /* Publications Section Adjustments */
    .publications {
        flex-direction: column;
        text-align: center;
    }

    .publications-content, .publications-text {
        max-width: 100%;
        flex: 1 1 100%;
    }

    .publications-content a.amazon-link-wrapper {
        display: inline-block; /* Ensure images stack vertically */
    }

    .publications-content .book-image {
        width: 100%; /* Make book image responsive */
        /* height: auto; */ /* Already set */
    }

    .publications-content .available-at-amazon {
        width: 140px; /* Maintain fixed width on mobile */
        margin: 10px auto 0; /* Center the image */
    }

    /* Ensure social icons remain visible on mobile */
    .social-icons {
        margin-left: 5px; /* Adjust spacing if necessary */
    }

    .publications-text {
        padding: 20px;
    }

    .publications-quotes {
        margin-top: 20px; /* Adjusted margin for mobile */
        padding: 10px 0;
    }

    .publications-quotes h3 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }

    .publications-quotes blockquote {
        margin-bottom: 15px;
        padding-left: 15px;
    }

    .publications-quotes blockquote::before {
        font-size: 2em;
        top: -5px;
    }

    /* Technologies Section Adjustments for Mobile */
    .technologies-cards {
        flex-direction: column;
        align-items: center;
    }

    .technologies-member {
        width: 100%;
        max-width: 300px;
    }

    /* Footer Adjustments for Mobile */
    .footer-links {
        flex-direction: column; /* Stack links vertically */
        align-items: center;
        gap: 10px;
    }
}
