/*
 * KrestChat - Corporate Front-End CSS System
 * Styled to look premium, modern, and high-tech (tawk.to corporate style)
 */

/* Google Fonts loaded via <link> in HTML head for faster rendering */

:root {
    --primary: #0052cc;
    --primary-dark: #003d99;
    --primary-light: rgba(0, 82, 204, 0.1);
    --secondary: #ffffff;
    --primary-gradient: linear-gradient(135deg, #0052cc 0%, #0084ff 100%);
    --bg-dark: #090d16;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --border-color: rgba(255, 255, 255, 0.07);
    --border-color-hover: rgba(255, 255, 255, 0.15);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --font-family: 'Outfit', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(0, 82, 204, 0.04) 0%, transparent 45%),
        radial-gradient(circle at 90% 80%, rgba(0, 132, 255, 0.04) 0%, transparent 45%);
    background-attachment: fixed;
}

/* CONTAINER */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* HEADER & FLOATING NAVIGATION */
header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background-color: rgba(9, 13, 22, 0.7);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #ffffff;
}

.logo-img {
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 82, 204, 0.2));
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    padding: 6px 0;
}

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

.nav-link:hover {
    color: #ffffff;
}

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

.nav-link.active {
    color: #ffffff;
    font-weight: 600;
}

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

.btn-header {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-header:hover {
    background-color: #ffffff;
    color: var(--bg-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255,255,255,0.1);
}

.btn-signup-header {
    background: var(--primary-gradient);
    border: none;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.2);
}

.btn-signup-header:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 82, 204, 0.35);
}

/* BUTTONS */
.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 82, 204, 0.3);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 82, 204, 0.45);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: #ffffff;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* SUBPAGE HERO */
.subpage-hero {
    padding: 160px 0 80px;
    text-align: center;
    position: relative;
}

.hero-badge {
    background-color: var(--primary-light);
    border: 1px solid rgba(0, 82, 204, 0.2);
    color: #38bdf8;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.hero-badge i {
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.subpage-hero h1 {
    font-size: 54px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.subpage-hero h1 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subpage-hero p.subtitle {
    font-size: 19px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto 30px;
}

/* SECTION UTILITIES */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
    letter-spacing: -0.01em;
}

.section-header h2 span {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-header p {
    font-size: 16.5px;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

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

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 35px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    background-color: var(--bg-card-hover);
    border-color: var(--border-color-hover);
    box-shadow: 0 10px 30px rgba(0, 82, 204, 0.05);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background-color: rgba(0, 82, 204, 0.1);
    color: #38bdf8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 25px;
}

.card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.card p {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* CTA BLOCK */
.cta-block {
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.1) 0%, rgba(0, 132, 255, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-block h2 {
    font-size: 38px;
    font-weight: 800;
    margin-bottom: 15px;
}

.cta-block p {
    font-size: 17.5px;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FOOTER */
footer {
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px;
    background-color: rgba(9, 13, 22, 0.85);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-brand p {
    font-size: 14.5px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 320px;
}

.footer-links-col {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.footer-links-col h4 {
    font-size: 14.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #ffffff;
}

.footer-links-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
}

.footer-links-col a:hover {
    color: #ffffff;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
}

.footer-bottom p {
    font-size: 13.5px;
    color: var(--text-muted);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.03);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    background-color: var(--primary);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* RESPONSIVE DESIGN */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
    z-index: 1001;
}

.mobile-menu-toggle:hover {
    color: var(--primary);
}

@media (max-width: 992px) {
    .subpage-hero h1 {
        font-size: 42px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .header-container {
        position: relative;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
        gap: 0 !important;
    }
    
    .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: rgba(9, 13, 22, 0.98);
        border-bottom: 1px solid var(--border-color);
        padding: 0 20px;
        gap: 20px;
        align-items: center;
        z-index: 1000;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(20px);
        max-height: 0;
        opacity: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, padding 0.4s ease;
    }
    
    .nav-links.active {
        max-height: 480px;
        opacity: 1;
        padding: 30px 20px;
    }
    
    .nav-link {
        font-size: 16px;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }
    
    .nav-link::after {
        display: none; /* remove hover line effect on mobile for better UX */
    }
    
    .btn-header, .btn-signup-header {
        width: 80%;
        justify-content: center;
        margin-top: 5px;
    }
    
    .subpage-hero {
        padding: 180px 0 60px;
    }
    
    .subpage-hero p.subtitle {
        font-size: 16px;
    }
    
    .cta-block h2 {
        font-size: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
