/* --- Global Styles --- */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

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

:root {
  --primary-color: #3498db; /* Blue */
  --secondary-color: #2ecc71; /* Green */
  --background-color: #f9f9f9; /* Light Grey */
  --text-color: #333; /* Dark Grey */
  --card-bg: #fff; /* White */
  --header-height: 120px; /* Increased for two rows of content */
  --accent-color: #f39c12; /* Orange for highlights */
}

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

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

section {
    margin: 4rem 0;
    padding-top: var(--header-height); /* For scroll-to-anchor offset */
    margin-top: calc(-1 * var(--header-height)); /* Compensate for padding-top */
}

section:first-of-type {
    margin-top: 0; /* No negative margin for the very first section */
}


/* --- Reusable Section Title --- */
.section-title {
    text-align: center;
    font-size: 2.8em;
    color: var(--primary-color);
    margin-bottom: 3rem;
    font-weight: 700;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 0.8s ease-out forwards;
}

.section-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 1rem auto 0;
    border-radius: 2px;
}


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

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

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
    50% { transform: scale(1.02); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
}

/* Header Specific Animations */
@keyframes slideInHeader {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* --- Header --- */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(3, 13, 165, 0.829);
    transition: all 0.3s ease;
    animation: slideInHeader 0.7s ease-out forwards;
    /* Use flexbox for vertical arrangement of header elements */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

.header-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    max-width: 1200px;
    width: 100%; /* Ensure it takes full width of header container */
    margin-bottom: 0.5rem; /* Space between title/controls and nav */
}

.site-title {
    font-size: 2.5em;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
    padding: 0.5rem 0;
    text-align: left;
    flex-grow: 1;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

header.scrolled {
    padding: 0.5rem 0;
    background: rgba(37, 99, 235, 0.95);
    backdrop-filter: blur(10px);
    /* Adjust header-height for scrolled state if needed */
    --header-height: 80px; /* Smaller header when scrolled */
    padding: 0.5rem 0;
}

/* --- Main Navigation --- */
.main-nav {
    display: flex;
    justify-content: center; /* Center the nav links */
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    width: 100%; /* Ensure it aligns with header-top width */
    padding: 0 1rem; /* Match header-top padding */
}

.main-nav .nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

.main-nav .nav-link:hover::after {
    width: 100%;
}

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 10rem 2rem 8rem;
    text-align: center;
    position: relative;
    margin-top: var(--header-height); /* This will now correctly push content down based on the new header height */
    clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
    overflow: hidden;
    animation: fadeIn 1s ease-out;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 4em;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    letter-spacing: -0.5px;
    animation: fadeInSlideUp 1s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero p {
    font-size: 1.4em;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: fadeInSlideUp 1s ease-out 0.4s forwards;
    transform: translateY(20px);
}

.get-started-btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    background: white;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: fadeInSlideUp 1s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.get-started-btn:hover {
    animation: pulse 0.8s infinite ease-in-out;
}

/* --- Services Section --- */
.services-section {
    padding: 6rem 0;
    background: var(--background-color);
}

.services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem;
}

.service {
    background: var(--card-bg);
    border-radius: 1rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInSlideUp 0.7s ease-out forwards;
}

/* Staggered animation for services */
.service:nth-child(1) { animation-delay: 0.1s; }
.service:nth-child(2) { animation-delay: 0.2s; }
.service:nth-child(3) { animation-delay: 0.3s; }
.service:nth-child(4) { animation-delay: 0.4s; }
.service:nth-child(5) { animation-delay: 0.5s; }
.service:nth-child(6) { animation-delay: 0.6s; }


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

.service i {
    font-size: 3.2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 1.2rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 rgba(0,0,0,0);
}

.service:hover i {
    transform: scale(1.15) rotate(5deg);
    background: rgba(37, 99, 235, 0.2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.service h3 {
    color: var(--text-color);
    font-size: 1.6rem;
    margin: 0 0 1rem;
    font-weight: 600;
}

.service p {
    color: #4b5563;
    margin: 0;
    line-height: 1.6;
    font-size: 1.1em;
}

/* --- Testimonials Section --- */
.testimonials-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--background-color), #eef2f5);
}

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

.testimonial {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInSlideUp 0.7s ease-out forwards;
}

/* Staggered animation for testimonials */
.testimonial:nth-child(1) { animation-delay: 0.1s; }
.testimonial:nth-child(2) { animation-delay: 0.2s; }
.testimonial:nth-child(3) { animation-delay: 0.3s; }


.testimonial:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.testimonial p {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.8rem;
    font-style: italic;
    quotes: "“" "”" "‘" "’";
}

.testimonial p::before {
    content: open-quote;
    font-size: 2.5em;
    color: var(--primary-color);
    line-height: 0;
    margin-right: 0.15em;
    vertical-align: -0.4em;
}

.testimonial p::after {
    content: close-quote;
    font-size: 2.5em;
    color: var(--primary-color);
    line-height: 0;
    margin-left: 0.05em;
    vertical-align: -0.4em;
}


.testimonial-author {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    border: 3px solid var(--primary-color);
    object-fit: cover;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
    font-size: 1.15rem;
}

.author-title {
    color: #666;
    margin: 0;
    font-size: 0.95rem;
}

/* --- About Us Section Improvements --- */
.about-section {
  padding: 6rem 0;
  background-color: var(--background-color);
}

.about-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  padding: 1rem;
}

.about-item {
  background-color: var(--card-bg);
  padding: 2.5rem;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: left;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInSlideUp 0.8s ease-out forwards;
}

/* Staggered animation for about items */
.about-item:nth-child(1) { animation-delay: 0.1s; }
.about-item:nth-child(2) { animation-delay: 0.3s; }
.about-item:nth-child(3) { animation-delay: 0.5s; }


.about-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.about-item i.about-icon {
    font-size: 3.5rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    display: block;
    text-align: center;
    background: rgba(46, 204, 113, 0.1);
    width: 70px;
    height: 70px;
    line-height: 70px;
    border-radius: 50%;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.3s ease;
}

.about-item:hover i.about-icon {
    transform: rotateY(360deg) scale(1.1);
    background: rgba(46, 204, 113, 0.2);
}


.about-item h3 {
  margin-top: 0.5rem;
  font-size: 2rem;
  color: var(--primary-color);
  text-align: center;
  margin-bottom: 1rem;
}

.about-item p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.about-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.about-item li {
  margin-bottom: 0.8rem;
  font-size: 1.05em;
  color: #444;
  position: relative;
  padding-left: 1.5em;
}

.about-item li::before {
  content: "\f00c";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: var(--secondary-color);
  position: absolute;
  left: 0;
  top: 0.1em;
  font-size: 0.9em;
}

/* --- Comments Section --- */
.comments-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
}

.comments-wrapper {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    padding: 2.5rem;
}

#comments-list {
    margin-bottom: 2rem;
}

.comment {
    background: #fdfdfd;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    animation: fadeInSlideUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}
.comment:first-child { animation-delay: 0.1s; }
.comment:nth-child(2) { animation-delay: 0.2s; }
.comment:nth-child(3) { animation-delay: 0.3s; }


.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed #f0f0f0;
}

.comment-author {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.comment-date {
    color: #777;
    font-size: 0.85rem;
}

.comment-content {
    line-height: 1.7;
    color: #444;
}

.comment-form {
    background: #fdfdfd;
    padding: 2.5rem;
    border-radius: 10px;
    margin-top: 2.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

.comment-form h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.8rem;
    text-align: center;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.comment-form button[type="submit"],
.github-login-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.comment-form button[type="submit"] {
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}

.comment-form button[type="submit"]:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.github-login-btn {
    background: #24292e;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.github-login-btn:hover {
    background: #33383d;
    transform: translateY(-2px);
}

.github-login-btn i {
    font-size: 1.3rem;
}

/* --- Contact Section --- */
.contact-section {
  padding: 6rem 0;
  background-color: #f0f4f8;
}

#contact-form {
  max-width: 600px;
  margin: 0 auto;
  padding: 2.5rem;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  animation: fadeInSlideUp 0.8s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

#contact-form input, #contact-form textarea {
  width: 100%;
  padding: 1.1rem;
  margin-bottom: 1.2rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.05rem;
}

#contact-form input:focus, #contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}

#contact-form button[type="submit"] {
  background-color: var(--primary-color);
  color: #fff;
  padding: 1.1rem 2.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  width: auto;
  display: block;
  margin: 0 auto;
}

#contact-form button[type="submit"]:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.success-message {
  color: #059669;
  margin-top: 1.5rem;
  padding: 1.2rem;
  border-radius: 8px;
  background-color: #ecfdf5;
  text-align: center;
  font-weight: 600;
  border: 1px solid #a7f3d0;
}

/* --- Footer --- */
footer {
  background-color: var(--primary-color);
  color: #fff;
  text-align: center;
  padding: 2rem;
  position: relative;
  bottom: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

footer p {
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

footer a {
  color: #fff;
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

footer a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}


/* --- Responsive Improvements --- */
@media (max-width: 768px) {
    .header-top {
        flex-direction: row; /* Keep title and controls on one line if space allows */
        justify-content: space-between;
        width: 100%;
    }

    .site-title {
        text-align: left;
        font-size: 1.8em;
        flex-grow: 1;
    }

    .header-controls {
        flex-direction: row; /* Keep controls in a row */
        gap: 0.8rem;
        align-items: center;
    }

    .main-nav {
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
        display: none; /* Controlled by JS for mobile toggle */
        padding-top: 0.5rem;
        text-align: center; /* Center nav links in mobile menu */
    }

    .main-nav.active {
        display: flex;
        background: rgba(var(--primary-color), 0.9);
        border-radius: 8px;
        padding: 1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .hero {
        padding: 8rem 1.5rem 6rem;
    }

    .hero h2 {
        font-size: 2.8em;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 1.2em;
        padding: 0 1rem;
    }

    .get-started-btn {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2em;
        margin-bottom: 2rem;
    }
    
    .services, .testimonials, .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    #contact-form {
        padding: 1.5rem;
    }

    .comment-form {
        padding: 1.5rem;
    }

    .ai-box {
        width: 90%;
        left: 5%;
        right: 5%;
        bottom: 5%;
        max-height: 70%;
        top: auto;
        transform: translateY(100%);
    }

    .ai-box.show {
        transform: translateY(0);
    }

    .techzone-container {
        position: static; /* No longer fixed for mobile header, it will flow */
        margin: 0; /* Remove fixed positioning margins */
        flex-direction: row;
        gap: 5px;
        order: 2; /* Position it after hamburger if needed, or adjust */
    }
    .techzone-icon {
        width: 40px; /* Smaller icon for mobile header */
        height: 40px;
        border-width: 2px;
    }
    .techzone-container span {
        font-size: 0.7em; /* Smaller text for mobile */
    }
    .hamburger {
        display: block; /* Show hamburger on mobile */
        order: 1; /* Position hamburger before AI icon on mobile */
    }

}

/* Hamburger menu for mobile */
.hamburger {
    display: none; /* Hidden by default on desktop */
    width: 30px;
    height: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 1001; /* Above nav links */
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

/* Animation for hamburger to close icon */
.hamburger.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}


@media (min-width: 769px) { /* Show nav on desktop, hide hamburger */
    .hamburger {
        display: none;
    }
    .main-nav {
        display: flex !important; /* Ensure it's flex on desktop */
    }
    .techzone-container {
        position: fixed; /* Keep fixed position for desktop */
        top: 20px;
        right: 20px;
        flex-direction: column;
    }
    .techzone-icon {
        width: 80px;
        height: 80px;
        border-width: 3px;
    }
    .techzone-container span {
        font-size: 1em;
    }
    header.scrolled .techzone-container {
        top: 10px; /* Adjust if header shrinks */
        right: 10px;
        transform: scale(0.8);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hero h2 {
        font-size: 3.5em;
    }

    .hero p {
        font-size: 1.3em;
    }

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

    .about-content {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (min-width: 1025px) {
    .hero h2 {
        font-size: 4em;
    }

    .services, .testimonials {
        grid-template-columns: repeat(3, 1fr);
    }
}