:root {
    --primary-color: #0F172A;
    /* Slate 900 */
    --secondary-color: #334155;
    /* Slate 700 */
    --accent-color: #0EA5E9;
    /* Sky 500 */
    --accent-hover: #0284C7;
    /* Sky 600 */
    --light-bg: #F8FAFC;
    /* Slate 50 */
    --white: #FFFFFF;
    --text-main: #1E293B;
    /* Slate 800 */
    --text-light: #64748B;
    /* Slate 500 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgba(14, 165, 233, 0.3);
    --radius: 0.5rem;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grids */
.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--light-bg);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-size: 1.125rem;
}

.section-hero-title {
    background-color: var(--primary-color);
    color: white;
    padding: 4rem 0;
}

.section-hero-title h1 {
    font-size: 2.5rem;
    text-align: center;
}

.section-hero-title p {
    text-align: center;
    color: #94a3b8;
    max-width: 600px;
    margin: 1rem auto 0;
}

.section-light-border {
    background-color: #F8FAFC;
    border-top: 1px solid #E2E8F0;
}

/* Header & Nav */
header {
    background-color: var(--primary-color);
    /* Dark header to match logo background */
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all var(--transition-normal);
}

header.scrolled {
    box-shadow: var(--shadow-md);
    background-color: rgba(15, 23, 42, 0.95);
    /* Keep it dark when scrolled */
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--white);
    /* White text for dark header */
    letter-spacing: -0.025em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
    border-radius: 4px;
}

.logo-subtext {
    display: block;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: #cbd5e1;
    /* Light slate for links on dark bg */
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width var(--transition-normal);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-color);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    transition: all var(--transition-normal);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 4px 14px 0 rgba(14, 165, 233, 0.39);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.23);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--white);
    /* Changed to white for better contrast on hero if needed, or accent */
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
    color: var(--white);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    background: linear-gradient(-45deg, #0F172A, #1e293b, #0f172a, #334155);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    color: var(--white);
    padding: 10rem 0 8rem;
    /* More spacing */
    position: relative;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    /* Modern angle cut */
}

/* Hero for subpages needs to be slightly different if reused, but for now assuming main hero structure */

.hero-content {
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.25rem;
    color: #94a3b8;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Services Preview */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    transform-origin: bottom;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card:hover::before {
    transform: scaleY(1);
}

.service-icon {
    width: 3.5rem;
    height: 3.5rem;
    background-color: #F0F9FF;
    /* Keeping it light */
    color: var(--accent-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--accent-color);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.service-link {
    color: var(--accent-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link i {
    transition: transform var(--transition-fast);
}

.service-link:hover i {
    transform: translateX(5px);
}

/* Portfolio Preview */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    border: 1px solid #e2e8f0;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.portfolio-img {
    height: 180px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.portfolio-img.slider-height {
    height: 300px;
    padding: 0;
    background: #f1f5f9;
}

.portfolio-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Ensure full image is visible */
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.portfolio-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.1);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.portfolio-item:hover .portfolio-img::after {
    opacity: 1;
}

.portfolio-img i {
    transition: transform 0.5s ease;
    z-index: 2;
}

.portfolio-item:hover .portfolio-img i {
    transform: scale(1.2);
    color: var(--accent-color);
}

/* Portfolio Image Slider */
.portfolio-slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.portfolio-slider .slider-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.portfolio-slider .slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
}

.portfolio-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--accent-color);
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: #25D366;
    color: white;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all var(--transition-normal);
    animation: fadeIn 1s ease 1s backwards;
}

.whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.4);
    color: white;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    margin-bottom: 0.5rem;
}

.portfolio-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #F1F5F9;
    color: var(--text-light);
    border-radius: 999px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.portfolio-link-domain {
    display: block;
    margin: 0.3rem 0 0.6rem 0;
}

.portfolio-link-domain a {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-decoration: none;
}

.portfolio-description {
    margin-bottom: 1rem;
}

.portfolio-features {
    font-size: 0.9rem;
    color: var(--text-light);
    list-style-type: disc;
    padding-left: 1.2rem;
    margin-bottom: 1rem;
}

.portfolio-item.custom-dev {
    background-color: var(--primary-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    color: white;
}

.portfolio-item.custom-dev h3 {
    color: white;
    margin-bottom: 1rem;
}

.portfolio-item.custom-dev p {
    color: #cbd5e1;
    margin-bottom: 2rem;
}

.portfolio-custom-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: #94a3b8;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--primary-color);
        /* Changed to dark to match header */
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
        color: var(--white);
        /* Ensure button is visible on dark header */
    }
}

/* Utilities */
.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

.w-full {
    width: 100%;
}

.link-no-style {
    color: inherit;
    text-decoration: none;
}