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

:root {
    /* Teal / Grey palette */
    --primary-color: #0F8A8A;      /* deep teal */
    --secondary-color: #2FA3A5;    /* medium teal */
    --accent-green: #84C7C8;       /* light aqua */
    --accent-purple: #79BEC0;      /* muted aqua */
    --accent-red: #52595A;         /* dark grey accent */
    --text-dark: #2F3A3A;          /* dark slate */
    --text-light: #5E6E6E;         /* mid slate */
    --bg-light: #E5EFEF;           /* very light aqua/grey */
    --bg-cream: #CBD8D8;           /* soft desaturated grey */
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

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

/* Buttons */
.btn-primary, .btn-secondary, .btn-outline, .btn-white {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(15, 138, 138, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 138, 138, 0.4);
}

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

.btn-secondary:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

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

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

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

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    max-width: 100%;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

/* Active state is always applied */
.nav-link.active {
    color: var(--primary-color);
}

/* Apply hover styles only on devices that actually support hover (e.g., desktop) */
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover { color: var(--primary-color); }
}

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

/* Keep underline for active link */
.nav-link.active::after { width: 100%; }

/* Only show hover underline when hover is supported */
@media (hover: hover) and (pointer: fine) {
  .nav-link:hover::after { width: 100%; }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--bg-cream) 0%, #eef6f6 100%);
    padding: 140px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 20%, rgba(15, 138, 138, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(47, 163, 165, 0.05) 0%, transparent 50%);
    /* animation: float 20s ease-in-out infinite; */
}

.page-header h1 {
    position: relative;
    z-index: 2;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.page-header p {
    position: relative;
    z-index: 2;
    font-size: 1.25rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}
.breadcrumb {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr; /* logo column + links column, same as index */
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-brand .brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-logo {
    height: 50px;
    width: auto;
    max-width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* two columns, same as index */
    gap: 2rem;
}

.footer-column h4 {
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 0.5rem;
}

.footer-column ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-column ul li a:hover {
    color: var(--white); /* match index */
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* Services Overview */
.services-overview {
    background: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

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

.service-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(15, 138, 138, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: rgba(15, 138, 138, 0.2);
}

.service-card.featured {
    border: 2px solid var(--primary-color);
    background: linear-gradient(135deg, rgba(15, 138, 138, 0.02) 0%, rgba(255, 255, 255, 0.95) 100%);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(15, 138, 138, 0.1), rgba(47, 163, 165, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    transform: scale(1.1) rotate(-5deg);
}

.service-icon.yellow,
.service-icon.green,
.service-icon.purple,
.service-icon.red {
    /* All icons use the same base styling now */
    background: linear-gradient(135deg, rgba(15, 138, 138, 0.1), rgba(47, 163, 165, 0.1));
    color: var(--primary-color);
}

.service-card:hover .service-icon.yellow,
.service-card:hover .service-icon.green,
.service-card:hover .service-icon.purple,
.service-card:hover .service-icon.red {
    /* All hover to the same primary gradient */
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.service-card h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.service-features li i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.service-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
    justify-content: center;
}

.tech-tag {
    background: var(--bg-light);
    color: var(--text-light);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Service Details */
.service-details {
    padding: 80px 0;
    background: var(--bg-light);
}

.service-details.alt {
    background: var(--white);
}

.service-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.service-detail-text h2 {
    margin-bottom: 1rem;
}

.service-detail-text .lead {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

.service-list {
    margin: 2rem 0;
}

.service-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.service-item i {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-top: 0.2rem;
}

.service-item h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.service-item p {
    font-size: 0.95rem;
    margin: 0;
}

.service-pricing {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 2rem 0;
    text-align: center;
}

.service-pricing h4 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.service-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.service-detail-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-illustration {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.code-lines {
    position: absolute;
    top: 20%;
    left: 15%;
    right: 15%;
}

.code-line {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    margin: 8px 0;
    border-radius: 2px;
}

.code-line:nth-child(1) { width: 80%; }
.code-line:nth-child(2) { width: 60%; }
.code-line:nth-child(3) { width: 90%; }
.code-line:nth-child(4) { width: 70%; }

.mobile-screens {
    position: absolute;
    top: 15%;
    left: 20%;
    right: 20%;
    bottom: 15%;
}

.screen {
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.screen-1 {
    width: 40px;
    height: 60px;
    top: 0;
    left: 0;
}

.screen-2 {
    width: 40px;
    height: 60px;
    top: 20px;
    left: 30px;
}

.screen-3 {
    width: 40px;
    height: 60px;
    top: 40px;
    left: 60px;
}

/* Development Process */
.development-process {
    padding: 80px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.process-step {
    text-align: center;
    padding: 2rem 1rem;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.process-step h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.process-step p {
    font-size: 0.95rem;
}

/* Technologies Section */
.technologies-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.tech-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

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

.tech-category h3 {
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.tech-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.tech-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.tech-icon:hover {
    transform: translateY(-5px);
}

.tech-icon i {
    font-size: 2rem;
    color: var(--primary-color);
}

.tech-icon span {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.cta-content p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    font-size: 1.2rem;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: var(--white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid #e0e5ec;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: var(--shadow);
}

.faq-question {
    width: 100%;
    padding: 1.5rem 2rem;
    background: var(--white);
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    background: var(--bg-light);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 1.5rem 2rem;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: var(--transition);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav { padding: 1rem; }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        /* align-items: flex-end; */
        padding: 2rem;
        box-shadow: var(--shadow);
        transition: var(--transition);
        z-index: 999;
    }

    .nav-menu.active { left: 0; }
    
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Page Header Mobile */
    .page-header {
        padding: 90px 0 60px;
        text-align: center;
    }
    
    .page-header h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .page-header p {
        font-size: 1rem;
        max-width: 90%;
        margin: 0 auto;
    }
    
    /* Footer Mobile */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-brand {
        align-items: center;
    }
    
    .footer-brand .brand {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        margin: 0 auto;
        max-width: 400px;
        padding: 2rem 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 2rem;
    }
    
    .service-detail-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .service-actions .btn-primary,
    .service-actions .btn-outline {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    
    .process-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .process-step {
        padding: 1.5rem 1rem;
    }
    
    .step-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
    
    .tech-categories {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .tech-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .tech-icon {
        padding: 0.8rem;
    }
    
    .tech-icon i {
        font-size: 1.5rem;
    }
    
    .tech-icon span {
        font-size: 0.8rem;
    }
    
    .service-illustration {
        width: 250px;
        height: 250px;
        font-size: 3rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .nav {
        padding: 1rem 15px;
    }
    
    .page-header {
        padding: 80px 0 60px;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 0.95rem;
    }
    
    .btn-primary, 
    .btn-secondary, 
    .btn-outline, 
    .btn-white {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 14px 24px;
    }
    
    .services-overview,
    .service-details,
    .development-process,
    .technologies-section,
    .cta,
    .faq {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
        max-width: 350px;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .tech-icons {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .tech-icon {
        padding: 0.6rem;
    }
    
    .tech-icon i {
        font-size: 1.3rem;
    }
    
    .service-illustration {
        width: 200px;
        height: 200px;
        font-size: 2.5rem;
    }
    
    .process-step {
        padding: 1.25rem 0.8rem;
    }
    
    .step-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .cta-content h2 {
        font-size: 1.8rem;
    }
    
    .cta-content p {
        font-size: 0.95rem;
    }
    
    .faq-question {
        padding: 1.25rem 1.5rem;
        font-size: 1rem;
    }
    
    .faq-answer {
        padding: 0 1.5rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1.25rem 1.5rem;
    }
}