/* ============================================
   CIRCUIT TECHNOLOGIES - MAIN STYLESHEET
   Where Technology Meets Innovation
   ============================================ */

:root {
    --primary-dark: #0a0a2a;
    --primary: #1a2a6c;
    --secondary: #b21f1f;
    --accent: #fdbb4d;
    --light: #f8f9fa;
    --dark: #1a1a2e;
    --gray: #6c757d;
    --white: #ffffff;
    --shadow-sm: 0 2px 5px rgba(0,0,0,0.05);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
    background: var(--white);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================
   HEADER STYLES
   ============================================ */

header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo:hover .logo-img {
    transform: scale(1.05);
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-text span {
    color: var(--secondary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 35px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--secondary);
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--secondary));
    color: white;
    padding: 180px 0 120px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-badge {
    display: inline-block;
    background: rgba(253, 187, 77, 0.2);
    backdrop-filter: blur(10px);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 25px;
    animation: fadeInUp 0.6s ease;
    letter-spacing: 1px;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease;
    font-weight: 700;
    line-height: 1.2;
}

.hero h2 .highlight {
    color: var(--accent);
    position: relative;
    display: inline-block;
}

.hero h2 .highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(253, 187, 77, 0.3);
    border-radius: 4px;
    z-index: -1;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
    animation: fadeInUp 0.8s ease 0.2s both;
    opacity: 0.95;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 35px;
    background: linear-gradient(135deg, var(--secondary), #8b1515);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(178, 31, 31, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--secondary);
    border-color: white;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--secondary);
    color: var(--secondary);
    padding: 10px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-outline-primary:hover {
    background: var(--secondary);
    color: white;
    transform: translateY(-2px);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ============================================
   INNOVATION PREVIEW SECTION
   ============================================ */

.innovation-preview {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--light), #ffffff);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
    font-weight: 700;
}

.section-title h2:after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    border-radius: 2px;
}

.section-title p {
    color: var(--gray);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 25px auto 0;
}

.innovation-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin: 50px 0;
}

.innovation-item {
    background: var(--white);
    border-radius: 20px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.innovation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transform: scaleX(0);
    transition: var(--transition);
}

.innovation-item:hover::before {
    transform: scaleX(1);
}

.innovation-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.innovation-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(178, 31, 31, 0.1), rgba(253, 187, 77, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.innovation-icon i {
    font-size: 2.5rem;
    color: var(--secondary);
}

.innovation-item h4 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.innovation-item p {
    color: var(--gray);
    margin-bottom: 15px;
}

.status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: #e8f4fd;
    color: var(--primary);
}

.text-center {
    text-align: center;
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    padding: 60px 0;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.service-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .service-image {
    transform: scale(1.05);
}

.service-card h3 {
    padding: 25px 25px 15px;
    color: var(--primary);
    font-size: 1.5rem;
}

.service-card p {
    padding: 0 25px 20px;
    color: var(--gray);
    line-height: 1.7;
}

.service-link {
    display: inline-block;
    margin: 0 25px 25px;
    color: var(--secondary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.service-link:hover {
    transform: translateX(5px);
    color: #8b1515;
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 80px 0;
    margin-top: 60px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 50px;
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    animation: countUp 2s ease;
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Scroll Reveal Animation */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 992px) {
    .container {
        padding: 0 30px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        text-align: center;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        padding: 150px 0 80px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .innovation-showcase {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.7rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .innovation-item {
        padding: 25px 20px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
    text-align: center;
}

.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--light);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* Selection Styling */
::selection {
    background: var(--secondary);
    color: white;
}

/* Loading Animation */
.loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loading.hide {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--light);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}