/*
 * @license
 * SPDX-License-Identifier: Apache-2.0
*/

:root {
  --primary-color: #0A2342;
  --secondary-color: #2B2D42;
  --accent-color: #FFC300;
  --accent-color-dark: #d4a300;
  --light-gray: #F8F9FA;
  --text-color: #343A40;
  --white: #FFFFFF;
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Lato', sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset for sticky header */
}

body {
  font-family: var(--body-font);
  color: var(--text-color);
  background-color: var(--white);
  line-height: 1.7;
}

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

section {
  padding: 6rem 0;
  overflow-x: hidden;
}

section#about, section#services, section#blog {
  background-color: var(--light-gray);
}

h1, h2, h3 {
  font-family: var(--heading-font);
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  line-height: 1.2;
  font-weight: 800;
}

h2 {
  font-size: 2.8rem;
  text-align: center;
  text-transform: uppercase;
}

h3 {
  font-size: 1.6rem;
  color: var(--secondary-color);
}

p {
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(45deg, var(--accent-color), var(--accent-color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  font-family: var(--heading-font);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  border: none;
  cursor: pointer;
}

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

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(255, 195, 0, 0.4);
}

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

.btn-secondary:hover {
  background-color: var(--light-gray);
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(0,0,0,0.2);
}

/* Header */
.header {
  background-color: rgba(10, 35, 66, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--heading-font);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo svg {
    width: 28px;
    height: 28px;
    transition: transform 0.3s ease;
}

.logo:hover {
  color: var(--accent-color);
}

.logo:hover svg {
    transform: rotate(-10deg);
}

.nav-links {
  list-style: none;
  display: flex;
}

.nav-links li {
  margin-left: 2.5rem;
}

.nav-links a {
  color: var(--white);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s ease;
  padding-bottom: 5px;
  position: relative;
}

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

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

.nav-links a:hover {
  color: var(--accent-color);
}

.menu-toggle {
  display: none;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  color: white;
}


/* Hero Section */
.hero {
  background: var(--primary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  padding: 4rem 0;
  min-height: 90vh;
  overflow: hidden;
  position: relative;
  perspective: 1000px;
}

/* 3D background effect */
.hero-3d-background {
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(10, 1fr);
    z-index: 1;
    transform-style: preserve-3d;
}

.cube {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transform: rotateY(calc(var(--mouse-x, 0) * 25deg)) rotateX(calc(var(--mouse-y, 0) * -25deg));
    transition: transform 0.2s ease-out;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: 3rem;
    width: 100%;
    position: relative;
    z-index: 2;
}

.hero-content {
    animation: fadeIn 1.5s ease-in-out;
    text-align: left;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  font-size: 4.2rem;
  color: var(--white);
  line-height: 1.15;
}

.hero-content .sub-headline {
  font-size: 1.3rem;
  max-width: 550px;
  margin: 1.5rem 0 2.5rem;
  line-height: 1.7;
  opacity: 0.9;
}

.hero-buttons .btn {
  margin: 0 0.75rem 0 0;
}

.hero-image {
    perspective: 1500px;
    animation: slideInFromRight 1.5s ease-in-out;
}

@keyframes slideInFromRight {
    from { opacity: 0; transform: translateX(100px) rotateY(-20deg); }
    to { opacity: 1; transform: translateX(0) rotateY(0); }
}

.hero-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    transform: rotateY(15deg) rotateX(2deg);
    transition: transform 0.5s ease;
}

.hero-image:hover img {
    transform: rotateY(0) rotateX(0) scale(1.05);
}

/* Animate on Scroll */
.fade-in-section {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* About Section */
#about .about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

#about .about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* Why Us Section - Bento Grid */
#why-us {
    background-color: var(--white);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 250px);
    gap: 1.5rem;
    margin-top: 4rem;
}

.bento-item {
    background-size: cover;
    background-position: center;
    border-radius: 15px;
    padding: 2rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.3s ease;
}

.bento-item:hover {
    transform: scale(1.03);
}

.bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.1));
    z-index: 1;
}

.bento-item > * {
    position: relative;
    z-index: 2;
}

.bento-item h3 {
    color: var(--white);
    font-size: 1.8rem;
}
.bento-item p {
    font-size: 0.95rem;
    line-height: 1.5;
}

.quality {
    grid-column: 1 / 3;
    background-image: url('https://images.pexels.com/photos/1216589/pexels-photo-1216589.jpeg');
}
.timely {
    background-image: url('https://images.pexels.com/photos/439777/pexels-photo-439777.jpeg');
}
.transparent {
    background-image: url('https://images.pexels.com/photos/3184292/pexels-photo-3184292.jpeg');
}
.customer-centric {
    grid-column: 2 / 4;
    background-image: url('https://images.pexels.com/photos/164558/pexels-photo-164558.jpeg');
}


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

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.service-card svg {
    width: 50px;
    height: 50px;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

/* Process */
.process-timeline {
    display: flex;
    justify-content: space-between;
    margin-top: 5rem;
    position: relative;
    perspective: 1000px;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color) 0%, var(--primary-color) 100%);
    z-index: 1;
}
.timeline-item {
    width: 23%;
    text-align: center;
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-item:hover {
    transform: translateY(-10px) rotateY(10deg) scale(1.05);
}

.timeline-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 1.5rem;
    color: var(--accent-color);
    border: 4px solid var(--light-gray);
    box-shadow: 0 0 0 4px var(--primary-color);
}
.timeline-icon svg {
    width: 36px;
    height: 36px;
}
.timeline-item h4 {
    font-family: var(--heading-font);
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}


/* Projects */
.project-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

/* Testimonials */
#testimonials {
    background-color: var(--primary-color);
    color: var(--white);
}
#testimonials h2 {
    color: var(--white);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

.testimonial-card {
    background-color: rgba(255,255,255, 0.05);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: background-color 0.3s ease;
}

.testimonial-card:hover {
    background-color: rgba(255,255,255, 0.1);
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    flex-shrink: 0;
    margin-top: 0.5rem;
}

.testimonial-body svg {
    width: 40px;
    height: 40px;
    color: var(--accent-color);
    margin-bottom: 1rem;
    opacity: 0.5;
}
.testimonial-body p:first-of-type {
    font-style: italic;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}
.testimonial-body p:last-of-type {
    font-weight: bold;
    color: var(--accent-color);
    text-align: right;
    margin-bottom: 0;
}


/* Blog */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.blog-post-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eef;
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(43, 45, 66, 0.1);
}

.blog-post-card h3 {
    font-size: 1.3rem;
    line-height: 1.4;
    color: var(--primary-color);
}

.blog-post-card .read-more {
    color: var(--primary-color);
    font-weight: bold;
    text-decoration: none;
    align-self: flex-start;
    transition: color 0.3s ease;
    margin-top: 1rem;
}

.blog-post-card .read-more:hover {
    color: var(--accent-color);
}

/* Contact */
#contact {
    position: relative;
    background: linear-gradient(rgba(248, 249, 250, 0.9), rgba(248, 249, 250, 0.9)), url('https://images.pexels.com/photos/316093/pexels-photo-316093.jpeg') no-repeat center center/cover;
}

.contact-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
    align-items: start;
}

.contact-form {
    background: var(--white);
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.contact-form h3 {
    margin-top: 0;
}

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

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--body-font);
    font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 195, 0, 0.3);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-info {
    padding-top: 1rem;
}

.contact-info h3 {
    margin-top: 0;
}

.contact-info p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.social-icons {
    margin-top: 1.5rem;
}

.social-icons a {
    margin-right: 1.5rem;
    display: inline-block;
}

.social-icons svg {
    width: 30px;
    height: 30px;
    color: var(--primary-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-icons a:hover svg {
    color: var(--accent-color);
    transform: scale(1.2);
}


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

/* Back to Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--accent-color);
  color: var(--primary-color);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  z-index: 999;
  opacity: 0;
  transform: translateY(100px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background-color: var(--accent-color-dark);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
}


/* Responsive */
@media (max-width: 1024px) {
    #about .about-grid, .contact-grid, .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-3d-background {
        display: none; /* Hide 3D effect on tablets and mobile */
    }

    .hero-content {
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-content .sub-headline {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
      margin: 0;
    }

    .hero-image {
        margin-top: 2rem;
        max-width: 500px;
        justify-self: center;
    }
    
    .hero-image img {
        transform: none;
    }

    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: repeat(2, 250px);
    }
    .quality { grid-column: 1 / 3; }
    .timely { grid-column: 1 / 2; }
    .transparent { grid-column: 2 / 3; }
    .customer-centric { grid-column: 1 / 3; }

    .process-timeline {
        flex-direction: column;
        gap: 3rem;
        align-items: center;
    }

    .process-timeline::before {
        display: none; /* Hide horizontal line on smaller screens */
    }
    
    .timeline-item:hover {
        transform: translateY(-10px) scale(1.05);
    }

    .contact-grid {
        gap: 3rem;
    }

    #contact {
        background-image: none;
        background-color: var(--light-gray);
    }
}

@media (max-width: 768px) {
    h2 {
        font-size: 2.2rem;
    }

    .hero-content h1 {
        font-size: 2.8rem;
    }

    .hero-content .sub-headline {
        font-size: 1.2rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        background: var(--primary-color);
        text-align: center;
        padding: 1rem 0;
        border-top: 1px solid var(--accent-color);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .menu-toggle {
        display: block;
    }

    section {
        padding: 4rem 0;
    }

    .container {
        padding: 0 1.5rem;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 250px);
    }

    .bento-item {
        grid-column: auto !important;
    }

    .testimonial-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .testimonial-body {
        width: 100%;
    }

    .testimonial-body p:last-of-type {
        text-align: center;
    }
}