/* 
   LearnCorp - Tech Prime Design System
   Theme: Midnight Blue & Neon Emerald
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Space+Grotesk:wght@500;700;800&display=swap');

:root {
    /* Color Palette - Light Theme */
    --bg-dark: #ffffff;
    /* White */
    --bg-card: #f8f9fa;
    /* Light Gray */
    --bg-card-hover: #e9ecef;
    /* Gray 200 */

    --primary: #55b8b5;
    /* Logo Teal */
    --primary-glow: rgba(85, 184, 181, 0.2);
    /* Teal Glow */
    --secondary: #343a40;
    /* Dark Gray */

    --text-main: #000000;
    /* Pure Black */
    --text-muted: #343a40;
    /* Dark Gray */

    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.9);

    /* Layout */
    --max-width: 1280px;
    --nav-height: 80px;
    --border-radius: 12px;
}

/* Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    /* Clean Background */
    background-color: var(--bg-dark);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.1;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    width: min(90%, var(--max-width));
    margin-inline: auto;
}

/* Text Gradient Animation */
.text-gradient {
    color: #000000 !important;
    /* Force Pure Black */
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: initial;
    display: inline-block;
}

.section-padding {
    padding-block: 6rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    font-family: 'Space Grotesk', sans-serif;
}

.btn-primary {
    background: var(--primary);
    color: #020617;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-primary:hover {
    background: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--primary-glow);
}

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

.btn-outline:hover {
    background: rgba(16, 185, 129, 0.1);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    z-index: 1000;
    transition: all 0.4s ease;
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar>div:last-child {
    margin-right: 12rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;

    /* Removed Absolute Center Positioning - Now Left Aligned */
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    font-size: 1.8rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    background: transparent;
    margin-left: 6rem;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;

    /* Absolute Center the Menu */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-link {
    font-size: 0.95rem;
    color: var(--text-muted);
    font-weight: 500;
}

.nav-link:hover {
    color: white;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: var(--nav-height);
    isolation: isolate;
}

.hero-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    filter: blur(80px);
}

.hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-inline: auto;
}

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

/* Services Preview */
.services-section {
    position: relative;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #000000;
    /* Force Black */
}

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

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    background: var(--bg-card-hover);
    transform: translateY(-5px);
    border-color: rgba(16, 185, 129, 0.2);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Contact Form */
.glass-form {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
    background: rgba(255, 255, 255, 0.05);
}

/* Custom Select Dropdown Arrow */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M12 13.172l4.95-4.95 1.414 1.414L12 16 5.636 9.636 7.05 8.222z' fill='rgba(148, 163, 184, 1)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2rem;
}

.form-group select option {
    background-color: var(--bg-card);
    color: var(--text-main);
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .glass-form {
        padding: 1.5rem;
    }
}

/* Footer Styles */
footer {
    background-color: #f8f9fa;
    /* Light Gray Background */
    color: #343a40;
    /* Dark Gray Text */
    padding-block: 4rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid #e9ecef;
}

.footer-links h4 {
    color: #000000 !important;
    /* Black Headings */
}

.footer-links a {
    color: #495057 !important;
    /* Dark Gray Links */
}

.footer-links a:hover {
    color: var(--primary) !important;
    /* Teal on Hover */
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid #dee2e6;
    margin-top: 3rem;
    padding-top: 2rem;
    text-align: center;
    color: #6c757d;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    text-align: left;
    /* Ensure text aligns left by default in grid */
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: white;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-muted);
}

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

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary);
    color: #020617;
    transform: translateY(-3px);
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 900;
        opacity: 0;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-bg-shape {
        display: none;
    }

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

/* Floating AI Button */
.ai-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(147, 51, 234, 0.4);
    z-index: 2000;
    transition: all 0.3s ease;
    animation: pulse-ai 2s infinite;
    text-decoration: none;
}

.ai-float:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(147, 51, 234, 0.6);
}

@keyframes pulse-ai {
    0% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(147, 51, 234, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(147, 51, 234, 0);
    }
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 350px;
    height: 500px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-widget.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    pointer-events: all;
}

.chat-header {
    padding: 1rem;
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chat-header p {
    margin: 0;
    font-size: 0.8rem;
    opacity: 0.9;
}

.chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s;
}

.chat-header button:hover {
    transform: rotate(90deg);
}

.chat-body {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-message {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.user-message {
    background: linear-gradient(135deg, #4f46e5, #9333ea);
    color: white;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

.chat-footer {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.chat-footer input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 0.8rem;
    border-radius: 8px;
    color: white;
    outline: none;
    transition: border-color 0.3s;
}

.chat-footer input:focus {
    border-color: var(--primary);
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-footer button:hover {
    background: var(--secondary);
}

/* Contact Split Layout */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
    margin-top: 2rem;
}

.quick-connect {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

.quick-connect h3 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.connect-item {
    display: block;
    margin-bottom: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
}

.connect-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
    transform: translateY(-5px);
}

.connect-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.connect-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: white;
}

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


@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Tablet Layout (768px - 1024px) */
@media (max-width: 1024px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        /* Force 2 columns on tablet */
        gap: 1.5rem;
    }

    .section-header h2 {
        font-size: 2rem;
        /* Slightly smaller headings */
    }
}

@media (max-width: 768px) {
    .header {
        height: var(--nav-height);
    }

    .navbar {
        display: flex;
        flex-direction: row;
        /* Horizontal alignment */
        justify-content: space-between;
        align-items: center;
        padding: 0 1rem;
    }

    .logo {
        margin: 0;
    }

    /* Show Toggle Button */
    .mobile-toggle {
        display: block !important;
        font-size: 1.8rem;
        cursor: pointer;
        color: var(--text-main);
    }

    /* Hide Socials/Buttons on Mobile if needed, or adjust */
    /* Hide Socials/Buttons on Mobile if needed, or adjust */
    .header-socials,
    .header .btn-primary {
        display: none !important;
    }

    .navbar>div:last-child {
        display: flex !important;
        /* Show the container holding the toggle */
        gap: 1rem;
    }

    /* Mobile Menu Drawer */
    .nav-menu {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        width: 100%;
        height: 0;
        /* Collapsed by default */
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        /* Hide content when collapsed */
        transition: height 0.3s ease, opacity 0.3s ease;
        opacity: 0;
        pointer-events: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(10px);
        padding: 0;
    }

    /* Active State for Menu */
    .nav-menu.active {
        height: 300px;
        /* Expand */
        opacity: 1;
        pointer-events: auto;
        padding: 2rem 0;
    }

    /* Orphan code removed */

    .nav-menu li {
        margin: 0;
    }

    .nav-link {
        font-size: 0.9rem;
        /* Slightly smaller for mobile fitting */
    }

    /* ------------------------------------- */
    /* Mobile Footer Layout (Unchanged) */
    /* ------------------------------------- */
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }

    /* Brand (child 1) - Left Align */
    .footer-brand {
        grid-column: 1 / -1;
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1rem;
    }

    .footer-grid>div:nth-child(2) {
        grid-column: 1;
        text-align: left;
        justify-self: start;
    }

    .footer-grid>div:nth-child(3) {
        grid-column: 2;
        text-align: right;
        justify-self: end;
    }

    .footer-grid>div:nth-child(4) {
        grid-column: 1 / -1;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-grid>div:nth-child(4) .social-links {
        justify-content: center;
    }

    .contact-wrapper {
        gap: 2rem;
    }

    .quick-connect {
        padding: 1.5rem;
    }

    .chat-widget {
        width: 90%;
        height: 60vh;
        right: 5%;
        bottom: 5rem;
    }

    .ai-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}