/* Universal Styles & Reset */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Montserrat:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff; /* A vibrant blue */
    --secondary-color: #6c757d; /* A muted gray */
    --accent-color: #28a745; /* Green for success/CTA */
    --dark-color: #272727; /* Dark for footer/sections */
    --light-color: #f8f9fa; /* Light background */
    --text-color: #333;
    --white-color: #fff;

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Poppins', sans-serif;

    --max-width: 1200px;
    --section-padding: 80px 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white-color);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: #ffffff;
}

ul {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white-color);
    padding: 12px 25px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn:hover {
    background: var(--dark-color);
    color: var(--white-color); /* Ensure text stays white on hover */
}

.btn-primary {
    background: var(--primary-color);
}

.btn-primary:hover {
    background: #0056b3; /* Darker shade of primary */
}

.btn-secondary {
    background: var(--secondary-color);
}

.btn-secondary:hover {
    background: #5a6268; /* Darker shade of secondary */
}

.btn-small {
    padding: 8px 15px;
    font-size: 0.9rem;
}

.section-padding {
    padding: var(--section-padding);
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.bg-light {
    background-color: var(--light-color);
}

.bg-dark {
    background-color: var(--dark-color);
    color: var(--white-color);
}

.bg-dark .section-title,
.bg-dark .section-description {
    color: var(--white-color);
}
.bg-dark .section-title::after {
    background-color: var(--accent-color);
}


/* Header & Navigation */
header {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white-color);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-nav .nav-links {
    display: flex;
    gap: 25px;
}

.main-nav .nav-links a {
    color: var(--white-color);
    font-weight: 600;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    padding-bottom: 5px;
    position: relative;
}

.main-nav .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: #F97316;
    transition: width 0.3s ease;
}

.main-nav .nav-links a:hover::after,
.main-nav .nav-links a.active::after {
    width: 100%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Above nav links when active */
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: var(--white-color);
    border-radius: 5px;
    transition: all 0.3s ease;
}

/* Hero Section */
#hero {
    /* If you put a local image in public/assets/images/hero-bg.jpg, change this to: */
    /* background: url('../assets/images/hero-bg.jpg') no-repeat center center/cover; */
    /* background: url('../assets/images/hero-bg.webp') no-repeat center center/cover; */
    color: var(--white-color);
    text-align: center;
    padding: 150px 20px;
    min-height: 100vh; /* Makes the hero section cover the full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Dark overlay */
}

#hero .container {
    position: relative; /* Ensure content is above overlay */
    z-index: 1;
}

#hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    color: var(--white-color);
    line-height: 1.1;
}

#hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    font-weight: 300;
}

#hero .btn {
    font-size: 1.2rem;
    padding: 15px 35px;
    background: var(--accent-color);
}

#hero .btn:hover {
    background: #218838; /* Darker accent */
}


/* About Section (Home Page) */
#about-home .about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

#about-home p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
    align-items: stretch;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.service-card p {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

/* Portfolio Section - Flip Cards */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted min-width for cards */
    gap: 30px;
    justify-content: center;
}

.portfolio-card {
    background-color: transparent; /* Parent shouldn't have background, inner will */
    height: 380px; /* Fixed height for flip cards */
    perspective: 1000px; /* For 3D effect */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); /* Shadow on parent */
    border-radius: 10px;
    overflow: hidden; /* Important to clip content within border-radius */
    cursor: pointer; /* Indicate interactivity */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s; /* Smooth flip transition */
    transform-style: preserve-3d; /* Key for 3D flip */
    border-radius: 10px; /* Match parent */
}

.portfolio-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden; /* Hide the back of the element until it flips */
    border-radius: 10px; /* Match parent */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute content top/bottom */
    align-items: center;
    padding: 20px;
    box-sizing: border-box; /* Include padding in width/height */
}

.flip-card-front {
    background-color: var(--white-color);
    color: var(--text-color);
    transform: rotateY(0deg);
}

.flip-card-front img {
    width: 100%;
    height: 90%; /* Image takes up more space */
    object-fit: cover;
    border-radius: 8px; /* Slightly smaller radius than card */
    margin-bottom: 10px;
}

.flip-card-front h3 {
    margin-top: auto; /* Push title to bottom */
    margin-bottom: 0;
    font-size: 1.2rem; /* Adjust font size */
    flex-grow: 0; /* Don't let it grow */
    text-align: center;
}

.flip-card-back {
    background-color: var(--primary-color); /* Background for the back side */
    color: var(--white-color); /* Text color for the back side */
    transform: rotateY(180deg);
    justify-content: center; /* Center content vertically */
    text-align: center;
}

.flip-card-back h3 {
    color: var(--white-color);
    font-size: 1.5rem; /* Larger title on back */
    margin-bottom: 15px;
}

.flip-card-back p {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 20px;
    flex-grow: 1; /* Allow description to take available space */
    display: -webkit-box;
    -webkit-line-clamp: 5; /* Limit lines for description if it's too long */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flip-card-back .btn {
    background: var(--accent-color); /* Use accent color for buttons on back */
    color: var(--white-color);
    margin-top: auto; /* Push button to bottom */
    display: inline-block; /* Allows vertical centering with align-items */
    width: auto; /* Ensure button width is natural */
}

.flip-card-back .btn:hover {
    background: #218838;
}


/* Call to Action Section (Contact) */
#contact {
    text-align: center;
    background-color: #181818;
}

#contact h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--white-color);
}

#contact p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white-color);
    padding: 60px 0 20px;
    font-size: 0.9rem;
}

footer .footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h3 {
    font-size: 1.3rem;
    color: var(--white-color);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-col ul {
    padding: 0;
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: var(--primary-color);
}

.social-links a {
    color: var(--white-color);
    font-size: 1.5rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Specific Page Styles (About, Terms, Privacy) --- */
.page-hero {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 100px 20px 80px;
    margin-bottom: 40px;
}

.page-hero h1 {
    font-size: 3.5rem;
    color: var(--white-color);
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.9);
}

.content-section h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.content-section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--dark-color);
}

.content-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-color);
}

.content-section ul {
    list-style: disc;
    margin-left: 25px;
    margin-bottom: 1rem;
}

.content-section ul li {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}
.content-section ul li i {
    margin-right: 8px;
    color: var(--primary-color);
}

/* About Page Specifics */
#our-values .values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.value-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
}

.value-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.value-card h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.value-card p {
    font-size: 0.95rem;
    color: var(--secondary-color);
}

.tech-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 15px;
    padding: 0;
    margin-top: 20px;
}

.tech-list li {
    background-color: var(--light-color);
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.tech-list li:hover {
    background-color: #e9ecef;
}

.tech-list li i {
    margin-right: 10px;
    color: var(--primary-color);
    font-size: 1.3em;
}

#cta-about{
    background-color: #181818;
    
}
#cta-about h2{
    color: var(--white-color);
}
/* Responsive Design */
@media (max-width: 992px) {
    #hero h1 {
        font-size: 3.5rem;
    }

    #hero p {
        font-size: 1.2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    h1 { font-size: 2.8rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }

    .main-nav .nav-links {
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header .container {
        flex-wrap: wrap; /* Allow wrapping for logo and nav */
    }

    .logo {
        margin-right: auto; /* Push logo to left */
    }

    .menu-toggle {
        display: flex; /* Show hamburger on mobile */
    }

    .main-nav .nav-links {
        display: none; /* Hide nav links by default */
        flex-direction: column;
        width: 100%;
        background-color: var(--dark-color);
        position: absolute;
        top: 60px; /* Adjust based on header height */
        left: 0;
        padding: 20px 0;
        text-align: center;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        transform: translateY(-100%); /* Hide off-screen */
        transition: transform 0.3s ease-in-out;
    }

    .main-nav .nav-links.active {
        transform: translateY(0); /* Slide in */
        display: flex; /* Ensure it becomes visible when active */
    }

    .main-nav .nav-links li {
        margin: 10px 0;
    }

    .main-nav .nav-links a {
        padding: 10px 0;
        display: block;
        font-size: 1.1rem;
    }
    .main-nav .nav-links a::after {
        background-color: var(--accent-color); /* Change underline color for visibility */
    }

    /* Animate hamburger */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #hero {
        padding: 100px 20px;
        min-height: 500px; /* Kept for small screens to prevent content overflow */
    }

    #hero h1 {
        font-size: 2.5rem;
    }

    #hero p {
        font-size: 1rem;
    }

    .services-grid,
    .portfolio-grid, /* This will ensure cards stack on smaller screens */
    .footer-links,
    #our-values .values-grid,
    .tech-list {
        grid-template-columns: 1fr; /* Single column layout */
    }

    /* Adjust portfolio card height for mobile */
    .portfolio-card {
        height: 350px; /* Slightly smaller for very small screens */
    }
    .flip-card-front h3, .flip-card-back h3 {
        font-size: 1.3rem;
    }
    .flip-card-back p {
        font-size: 0.95rem; /* Ensure readability */
    }


    .section-padding {
        padding: 60px 0;
    }

    .page-hero {
        padding: 80px 20px 60px;
    }
    .page-hero h1 {
        font-size: 2.8rem;
    }
    .page-hero p {
        font-size: 1.1rem;
    }

    .content-section h2 {
        font-size: 1.8rem;
    }
    .content-section h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.4rem; }

    #hero h1 {
        font-size: 2rem;
    }

    #hero p {
        font-size: 0.9rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }

    .service-card,
    .portfolio-card,
    .value-card {
        padding: 20px;
    }

    .service-card i {
        font-size: 2.5rem;
    }

    .portfolio-card h3 {
        font-size: 1.3rem;
    }
}