/* ===== Fonts ===== */
@font-face {
    font-family: 'Kalameh';
    src: url("../fonts/kalameh/Kalameh-Regular.ttf") format("truetype");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Kalameh';
    src: url("../fonts/kalameh/Kalameh-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Kalameh';
    src: url("../fonts/kalameh/Kalameh-Black.ttf") format("truetype");
    font-weight: 900;
    font-display: swap;
}

/* ===== Theme Variables ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-tertiary: #eef0f4;
    --text-primary: #1a1d29;
    --text-secondary: #5a6072;
    --text-muted: #8b90a0;
    --border-color: #e4e7ec;
    --card-bg: #ffffff;
    --card-shadow: 0 4px 24px rgba(20, 23, 40, 0.06);
    --card-shadow-hover: 0 16px 48px rgba(20, 23, 40, 0.12);
    --header-bg: rgba(255, 255, 255, 0.8);

    --accent: #4f46e5;
    --accent-hover: #4338ca;

    /* Service colors */
    --purple: #8b5cf6;
    --orange: #f97316;
    --green: #22c55e;
    --blue: #3b82f6;
    --cyan: #06b6d4;
    --red: #ef4444;

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #0d0f1a;
    --bg-secondary: #141726;
    --bg-tertiary: #1c2030;
    --text-primary: #f2f4f8;
    --text-secondary: #a8aec0;
    --text-muted: #6b7180;
    --border-color: #272b3d;
    --card-bg: #161927;
    --card-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5);
    --header-bg: rgba(13, 15, 26, 0.8);
    --accent: #6366f1;
    --accent-hover: #818cf8;
}

/* ===== Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Kalameh', Tahoma, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color var(--transition), color var(--transition);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ===== Header ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

[data-theme="dark"] .logo img,
[data-theme="dark"] .footer-logo img {
    filter: brightness(0) invert(1);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 15px;
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
    background: var(--bg-secondary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
}

.theme-toggle .moon-icon { display: none; }
[data-theme="dark"] .theme-toggle .sun-icon { display: none; }
[data-theme="dark"] .theme-toggle .moon-icon { display: block; }

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 42px;
    height: 42px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 8s ease-in-out infinite;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--purple);
    top: -100px;
    right: -100px;
}

.shape-2 {
    width: 350px;
    height: 350px;
    background: var(--blue);
    bottom: -120px;
    left: -80px;
    animation-delay: 2s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    background: var(--cyan);
    top: 40%;
    left: 50%;
    animation-delay: 4s;
}

[data-theme="dark"] .hero-shape {
    opacity: 0.25;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 24px;
}

.title-line {
    display: block;
}

.gradient-text {
    background: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat-number {
    font-size: 32px;
    font-weight: 900;
    color: var(--accent);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Hero visual */
.hero-visual {
    position: relative;
    height: 420px;
}

.visual-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    z-index: 2;
    animation: float 6s ease-in-out infinite;
}

.hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

[data-theme="dark"] .hero-logo img {
    filter: brightness(0) invert(1);
}

.floating-card {
    position: absolute;
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
}

.card-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--purple), var(--blue));
    top: 20px;
    right: 40px;
    animation: float 5s ease-in-out infinite;
}

.card-2 {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    bottom: 60px;
    right: 20px;
    animation: float 7s ease-in-out infinite 1s;
}

.card-3 {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--green), var(--cyan));
    bottom: 30px;
    left: 60px;
    animation: float 6s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ===== Section Header ===== */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Services ===== */
.services {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.service-card {
    position: relative;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    overflow: hidden;
    transition: all var(--transition);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.card-glow {
    position: absolute;
    top: -60px;
    right: -60px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover .card-glow {
    opacity: 0.5;
}

.service-card[data-color="purple"] .card-glow { background: var(--purple); }
.service-card[data-color="orange"] .card-glow { background: var(--orange); }
.service-card[data-color="green"] .card-glow { background: var(--green); }
.service-card[data-color="blue"] .card-glow { background: var(--blue); }
.service-card[data-color="cyan"] .card-glow { background: var(--cyan); }
.service-card[data-color="red"] .card-glow { background: var(--red); }

.card-content {
    position: relative;
    z-index: 1;
}

.card-icon {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding: 16px;
}

.card-icon .service-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* CSS color filters for the logo per service */
.card-icon.purple { background: rgba(139, 92, 246, 0.12); }
.card-icon.purple .service-logo { filter: brightness(0) saturate(100%) invert(45%) sepia(82%) saturate(2000%) hue-rotate(240deg); }

.card-icon.orange { background: rgba(249, 115, 22, 0.12); }
.card-icon.orange .service-logo { filter: brightness(0) saturate(100%) invert(55%) sepia(80%) saturate(2500%) hue-rotate(360deg); }

.card-icon.green { background: rgba(34, 197, 94, 0.12); }
.card-icon.green .service-logo { filter: brightness(0) saturate(100%) invert(60%) sepia(60%) saturate(1200%) hue-rotate(90deg); }

.card-icon.blue { background: rgba(59, 130, 246, 0.12); }
.card-icon.blue .service-logo {  }

.card-icon.cyan { background: rgba(6, 182, 212, 0.12); }
.card-icon.cyan .service-logo { filter: brightness(0) saturate(100%) invert(60%) sepia(80%) saturate(1500%) hue-rotate(150deg); }

.card-icon.red { background: rgba(239, 68, 68, 0.12); }
.card-icon.red .service-logo { filter: brightness(0) saturate(100%) invert(40%) sepia(90%) saturate(3000%) hue-rotate(340deg); }

.card-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card-description {
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 20px;
}

.card-features {
    margin-bottom: 24px;
}

.card-features li {
    position: relative;
    padding-right: 22px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.card-features li::before {
    content: '';
    position: absolute;
    right: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-weight: 700;
    font-size: 15px;
    transition: gap var(--transition);
}

.card-link:hover {
    gap: 12px;
}

.card-link svg {
    transform: scaleX(-1);
}

/* ===== About ===== */
.about {
    padding: 100px 0;
}

.about-wrapper {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-content .section-title {
    text-align: right;
}

.about-text {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 20px;
}

.about-features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.feature-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-text h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-text p {
    color: var(--text-secondary);
    font-size: 14px;
}

.about-visual {
    display: flex;
    justify-content: center;
}

.about-image-container {
    position: relative;
    width: 360px;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-shape {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--purple), var(--blue), var(--cyan));
    border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%;
    opacity: 0.15;
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% { border-radius: 40% 60% 55% 45% / 50% 45% 55% 50%; }
    50% { border-radius: 55% 45% 40% 60% / 45% 55% 50% 50%; }
}

.about-logo {
    position: relative;
    width: 180px;
    height: 180px;
    z-index: 1;
}

.about-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

[data-theme="dark"] .about-logo img {
    filter: brightness(0) invert(1);
}

/* ===== Blog ===== */
.blog {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.blog-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent), var(--purple));
}

.blog-card:nth-child(2) .blog-image-placeholder {
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}
.blog-card:nth-child(3) .blog-image-placeholder {
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.blog-category {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--card-bg);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
}

.blog-content {
    padding: 24px;
}

.blog-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.5;
}

.blog-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.blog-date {
    color: var(--text-muted);
    font-size: 13px;
}

.blog-read-more {
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

/* ===== Contact ===== */
.contact {
    padding: 100px 0;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact-info .section-title {
    text-align: right;
}

.contact-description {
    color: var(--text-secondary);
    font-size: 17px;
    margin-bottom: 36px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 36px;
}

.contact-method {
    display: flex;
    gap: 16px;
    align-items: center;
}

.method-icon {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.method-text h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.method-text p {
    color: var(--text-secondary);
    font-size: 15px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.contact-form-wrapper {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--card-shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 15px;
    transition: border-color var(--transition);
    resize: vertical;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== Footer ===== */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 16px;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 15px;
    max-width: 300px;
}

.footer-column h4 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a,
.footer-column ul li {
    color: var(--text-secondary);
    font-size: 15px;
    transition: color var(--transition);
}

.footer-column ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Scroll Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 992px) {
    .hero-content,
    .about-wrapper,
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-visual {
        order: -1;
        height: 320px;
    }

    .services-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 44px;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 72px;
        right: 0;
        left: 0;
        flex-direction: column;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        padding: 16px 24px;
        gap: 4px;
        transform: translateY(-150%);
        transition: transform var(--transition);
        box-shadow: var(--card-shadow);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        display: block;
        padding: 12px 16px;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title {
        font-size: 30px;
    }

    .hero-stats {
        gap: 28px;
        flex-wrap: wrap;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-description {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 30px;
    }
}
