/* ============================================
   ALL INDIA INFOTECH - Main Public Stylesheet
   Modern Tech Blog & Services Platform
   ============================================ */

:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --primary-light: #6c83f7;
    --secondary: #7209b7;
    --accent: #f72585;
    --success: #06d6a0;
    --warning: #ffd166;
    --dark: #1a1a2e;
    --darker: #16213e;
    --text: #333;
    --text-light: #6c757d;
    --bg: #f8f9fa;
    --white: #ffffff;
    --border: #e9ecef;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Fira Code', 'Consolas', monospace;
}

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

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.7;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
    background: var(--white);
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: relative;
    z-index: 100;
    transition: all 0.3s;
}

.site-header.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.main-nav {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    font-size: 14px;
    position: relative;
    padding: 4px 0;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

.nav-cta {
    background: var(--primary) !important;
    color: var(--white) !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--dark);
}

/* ---------- Hero Section ---------- */
.hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--darker) 50%, #0f3460 100%);
    color: var(--white);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(67,97,238,0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(114,9,183,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero .container { position: relative; z-index: 1; }

.hero h1 {
    font-size: 52px;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 18px;
    color: rgba(255,255,255,0.7);
    max-width: 600px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: 48px;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stats .stat h3 {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-light);
}

.hero-stats .stat p {
    font-size: 14px;
    color: rgba(255,255,255,0.5);
    margin: 0;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    font-family: var(--font);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(67,97,238,0.35);
    color: var(--white);
}

.btn-outline-white {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
}

.btn-outline-white:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}

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

.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ---------- Sections ---------- */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-title p {
    color: var(--text-light);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.section-title .badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(67,97,238,0.1);
    color: var(--primary);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.bg-light { background: var(--bg); }

/* ---------- Services ---------- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.service-card {
    background: var(--white);
    border-radius: 16px;
    padding: 36px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border-color: transparent;
}

.service-card .service-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

.service-card .learn-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    font-weight: 600;
    font-size: 14px;
}

/* ---------- Tech Stack ---------- */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.tech-item {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    transition: all 0.2s;
}

.tech-item:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.tech-item i {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.tech-item span {
    font-weight: 600;
    font-size: 13px;
    color: var(--dark);
}

/* ---------- Blog Cards ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 28px;
}

.blog-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
}

.blog-card .card-image {
    height: 220px;
    overflow: hidden;
}

.blog-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

.blog-card .card-body {
    padding: 24px;
}

.blog-card .card-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.blog-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card h3 a { color: var(--dark); }
.blog-card h3 a:hover { color: var(--primary); }

.blog-card .excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-light);
}

/* ---------- CTA Section ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-section p {
    color: rgba(255,255,255,0.6);
    font-size: 16px;
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Blog Detail ---------- */
.post-content {
    max-width: 780px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.9;
    color: #2d2d2d;
}

.post-content h2 { font-size: 28px; margin: 32px 0 16px; color: var(--dark); }
.post-content h3 { font-size: 22px; margin: 28px 0 12px; color: var(--dark); }
.post-content p { margin-bottom: 20px; }
.post-content ul, .post-content ol { margin-bottom: 20px; padding-left: 24px; }
.post-content li { margin-bottom: 8px; }
.post-content img { border-radius: 12px; margin: 24px 0; }

.post-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.6;
    margin: 24px 0;
}

.post-content code {
    background: #f1f3f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--accent);
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content blockquote {
    border-left: 4px solid var(--primary);
    background: #f8f9ff;
    padding: 16px 24px;
    margin: 24px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #555;
}

/* ---------- Contact Form ---------- */
.contact-form {
    max-width: 640px;
}

.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--dark);
}

.contact-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font);
    transition: border-color 0.2s;
    outline: none;
}

.contact-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67,97,238,0.1);
}

/* ---------- Page Banner ---------- */
.page-banner {
    background: linear-gradient(135deg, var(--dark), var(--darker));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.page-banner h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
}

.page-banner .breadcrumb {
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

.page-banner .breadcrumb a { color: rgba(255,255,255,0.7); }

/* ---------- Sidebar ---------- */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

.sidebar-widget {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
}

.sidebar-widget h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.category-list { list-style: none; }
.category-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.category-list li:last-child { border-bottom: none; }
.category-list a { color: var(--text); font-size: 14px; }
.category-list a:hover { color: var(--primary); }
.category-list .count {
    background: var(--bg);
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: var(--text-light);
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
    padding: 4px 14px;
    background: var(--bg);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    transition: all 0.2s;
}
.tag-cloud a:hover {
    background: var(--primary);
    color: var(--white);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .blog-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border);
    }
    .main-nav.open { display: flex; }
    .main-nav li { width: 100%; }
    .main-nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }

    .hero { padding: 60px 0 50px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .hero-stats { gap: 24px; flex-wrap: wrap; }
    .hero-stats .stat h3 { font-size: 24px; }

    .section { padding: 50px 0; }
    .section-title h2 { font-size: 28px; }

    .services-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
}
