/* Modern Premium Theme - 2026 Remake */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Core Palette - Sophisticated Indigo/Purple */
    --primary: #695aa6;
    --primary-dark: #4a3e7a;
    --primary-light: #8e7cc9;
    --accent: #695aa6;
    /* Purple (No 3rd color) */

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #695aa6 0%, #3a2e5e 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-card: linear-gradient(145deg, #ffffff 0%, #f5f5f7 100%);

    /* Neutrals */
    --bg-body: #f4f7fa;
    --text-main: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;

    /* Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(105, 90, 166, 0.15);
    --shadow-lg: 0 20px 50px rgba(105, 90, 166, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --blur: blur(12px);

    /* Layout */
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

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

html {
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-main);
    background: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--gradient-main);
    color: var(--white);
    box-shadow: 0 10px 20px rgba(105, 90, 166, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(105, 90, 166, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 1000;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    background: var(--glass-bg);
    backdrop-filter: var(--blur);
    padding: 15px 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    letter-spacing: -1px;
}

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

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

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

/* Mobile Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.menu-toggle:hover {
    transform: scale(1.1);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--bg-body);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(105, 90, 166, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-text {
    flex: 1;
    max-width: 600px;
}

.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 10px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--primary-dark);
    line-height: 1.1;
}

.hero-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-img-wrap {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
}

.hero-img {
    width: 100%;
    max-width: 500px;
    border-radius: 30px 4px 30px 4px;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.hero-shape {
    position: absolute;
    bottom: -30px;
    right: -30px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    border-radius: 30px 4px 30px 4px;
    z-index: 1;
}

/* App Page Custom Hero */
.app-hero {
    height: 50vh;
    min-height: 400px;
    background-position: center;
    background-size: cover;
}

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

.section-head {
    margin-bottom: 60px;
}

.section-subtitle {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    /* Changed from text-main (black) to primary (purple) */
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-muted);
}

/* Scroll Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: rgba(105, 90, 166, 0.2);
}

.service-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    background: rgba(105, 90, 166, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon img {
    width: 30px;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--text-main);
}

.service-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-img-wrap {
    height: 240px;
    overflow: hidden;
}

.portfolio-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.1);
}

.portfolio-info {
    padding: 25px;
    background: var(--white);
    position: relative;
}

.portfolio-cat {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 8px;
    display: block;
}

.portfolio-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

/* Testimonials */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-body p {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.testimonial-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info h5 {
    margin-bottom: 2px;
    font-size: 1rem;
}

.user-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Contact */
.contact-wrapper {
    background: var(--white);
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    max-width: 800px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e1e1e1;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 1rem;
    background: #f9f9f9;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(105, 90, 166, 0.1);
}

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

/* Responsive */
@media (max-width: 900px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 100px;
        /* Space for fixed navbar */
        padding-bottom: 60px;
        overflow: visible;
    }

    .hero .container {
        flex-direction: column-reverse;
        text-align: center;
        gap: 40px;
        padding-top: 20px;
    }

    .hero-img-wrap {
        justify-content: center;
        width: 100%;
        margin-bottom: 30px;
    }

    .hero-text {
        margin-top: 0;
        width: 100%;
        max-width: 100%;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about-img-wrap {
        order: -1;
    }

    /* Image on top in mobile */
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2.2rem;
    }

    /* Smaller font for mobile to fit screen */
    .hero-desc {
        font-size: 1rem;
    }

    .section {
        padding: 60px 0;
    }

    /* Less padding on mobile */
    .section-title {
        font-size: 2rem;
    }

    .contact-wrapper {
        padding: 30px 20px;
    }

    .navbar .container {
        padding: 0 20px;
    }

    /* Better portfolio grid on small screens */
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    /* Fix: Add background to navbar on mobile to prevent overlap issues */
    .navbar {
        background: var(--white);
        box-shadow: var(--shadow-sm);
        padding: 15px 0;
    }

    /* App Page Hero Fixes */
    .app-hero {
        min-height: auto !important;
        height: auto !important;
        padding-top: 120px !important;
        padding-bottom: 30px !important;
    }

    .app-hero .hero-title {
        font-size: 2.2rem !important;
        margin-bottom: 10px;
    }

    /* Fix: Add gap to buttons on mobile */
    .hero-btns {
        display: flex;
        flex-direction: column;
        gap: 15px;
    }
}

/* Fix Mobile Navigation */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        color: var(--primary-dark);
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 70px;
        /* Adjust based on navbar height */
        left: 0;
        width: 100%;
        flex-direction: column;
        background: var(--white);
        padding: 20px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        gap: 15px;
    }

    .nav-links.active {
        /* Class toggled by JS */
        display: flex !important;
        /* Force display flex when active */
    }

    .nav-link {
        display: block;
        padding: 10px;
        text-align: center;
    }

    .nav-link::after {
        bottom: 0;
        width: 0;
        left: 50%;
        transform: translateX(-50%);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 50px;
    }
}

/* App Page Navbar Fixes */
.back-btn {
    padding: 8px 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn i {
    font-size: 1rem;
}

@media (max-width: 600px) {
    .navbar.scanned .container {
        justify-content: space-between;
    }

    .navbar.scanned .logo {
        font-size: 1.2rem;
        max-width: 70%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .back-btn span {
        display: none;
    }

    .back-btn {
        padding: 8px 12px;
    }
}