/* ===== CSS Variables & Reset ===== */
:root {
    --primary-color: #0052cc;
    --primary-dark: #003399;
    --secondary-color: #00a4ef;
    --accent-color: #ff6b35;
    --text-dark: #1a1a1a;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

html {
    scroll-behavior: smooth;
}

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

.section-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Navigation ===== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

.navbar {
    background-color: transparent;
    box-shadow: none;
}

.header-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem 4rem 1rem 3rem;
}

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

.logo {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--primary-color);
}

.logo-subtitle {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.6rem;
    width: 100%;
    justify-content: center;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: color 0.3s ease;
}

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

.webmail-corner-link {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 110;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background-color: var(--accent-color);
    color: #ffffff;
    font-family: 'Segoe UI', 'Segoe UI Emoji', 'Noto Color Emoji', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.webmail-corner-link:hover {
    transform: translateY(-1px);
    background-color: #ff5f24;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.webmail-icon {
    font-size: 1.1rem;
}

@media (max-width: 920px) {
    .header-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        padding-right: 2rem;
    }

    .nav-links {
        width: 100%;
        justify-content: center;
        gap: 1rem;
        padding: 0.5rem 0;
    }

    .webmail-corner-link {
        right: 0.85rem;
    }
}

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

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

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 8rem 2rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

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

.btn-primary:hover {
    background-color: #ff5722;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* ===== Services Section ===== */
.services {
    padding: 5rem 2rem;
    background-color: var(--bg-light);
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

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

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

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

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

.service-features {
    list-style: none;
    color: var(--text-light);
}

.service-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.service-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== Products Section ===== */
.products {
    padding: 5rem 2rem;
    background-color: var(--bg-white);
    overflow: hidden; /* Ensure content doesn't overflow */
}

.product-intro {
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.05) 0%, rgba(0, 164, 239, 0.05) 100%);
    padding: 2.5rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    border-left: 4px solid var(--primary-color);
    box-sizing: border-box; /* Ensure padding is included in width calculations */
}

.product-intro h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.product-intro p {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    /* Fallback for older browsers */
    display: -ms-grid;
    -ms-grid-columns: (minmax(350px, 1fr))[auto-fit];
    /* Additional fallback */
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

.product-card {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    /* Ensure proper width in flexbox fallback */
    flex: 1 1 350px;
    max-width: 400px;
    min-width: 300px;
    box-sizing: border-box; /* Include padding in width calculations */
    margin: 0 auto; /* Center cards in flexbox layout */
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", "EmojiSymbols", "EmojiOne Mozilla", "Twemoji Mozilla", "Segoe UI", sans-serif;
    text-align: center;
}

.product-card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-subtitle {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.product-description {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.product-features-title {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.product-features {
    list-style: none;
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.product-features li {
    padding: 0.5rem 0;
    padding-left: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.product-card .btn {
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

/* ===== Technology Section ===== */
.technology {
    padding: 5rem 2rem;
    background-color: var(--bg-light);
}

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

.tech-category {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.tech-category h3 {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.tech-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-item {
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.tech-badge {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.tech-item p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ===== Case Studies Section ===== */
.case-studies {
    padding: 5rem 2rem;
    background-color: var(--bg-light);
}

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

.case-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.case-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.case-company {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.case-industry {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.case-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.case-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.metric {
    text-align: center;
}

.metric-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.metric-label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 0.25rem;
}

.case-tech {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tech-tag {
    display: inline-block;
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== About Section ===== */
.about {
    padding: 5rem 2rem;
    background-color: var(--bg-white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
    align-items: center;
}

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

.about-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: var(--text-light);
    font-size: 0.9rem;
}

.why-choose {
    margin-top: 3rem;
}

.why-choose h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.features-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.feature h4 {
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.feature p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ===== Contact Section ===== */
.contact {
    padding: 5rem 2rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.contact .section-title {
    color: white;
}

.contact .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    color: var(--text-dark);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.form-message {
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
}

.form-message.success {
    background-color: #d1fae5;
    color: #065f46;
}

.form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
}

.contact-info {
    color: rgba(255, 255, 255, 0.95);
}

.info-block {
    margin-bottom: 2rem;
}

.info-block h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.info-block p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.social-icon {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 2rem 1rem;
}

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

.footer-section h5 {
    margin-bottom: 1rem;
    font-size: 1rem;
}

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ===== Modal/Popup ===== */
.modal {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-content h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

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

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: color 0.3s ease;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal.hidden {
    display: none;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .header-inner {
        grid-template-columns: auto auto;
        align-items: center;
        padding: 1rem 1rem 0.85rem;
        position: relative;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-white);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-md);
        z-index: 50;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
    }

    .webmail-corner-link {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: auto;
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero {
        padding: 4rem 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .case-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid,
    .tech-grid,
    .cases-grid,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .navbar .container {
        padding: 1rem;
    }

    .logo {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

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

    .section-title {
        font-size: 1.5rem;
    }

    .services-grid,
    .tech-grid,
    .cases-grid,
    .products-grid,
    .features-list {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    h1, h2, h3 {
        font-size: 1.3rem;
    }

    .case-metrics {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}