/* TechSynergy - Optimized Main Stylesheet */

/* Extended CSS Variables */
:root {
    --dark-card: #1e293b;
    --surface-hover: #f8fafc;
    --border-light: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --gradient-primary: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-green) 100%);
    --gradient-hero: linear-gradient(135deg, #1e40af 0%, #059669 100%);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-full: 9999px;
    --transition-fast: all 0.15s ease-out;
    --section-padding: 4rem 0;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
}

/* Services section */
.services { 
    background: var(--background-light); 
    padding: 60px 0; 
    margin: 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    color: var(--text-primary);
    line-height: 1.2;
    padding: 0 1rem;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
}

.services-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: var(--spacing-lg); 
}

.service-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    will-change: transform;
}

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

.service-icon { 
    font-size: 3rem; 
    margin-bottom: var(--spacing-md); 
}

.service-icon .material-icons { 
    color: var(--primary-blue) !important; 
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.service-card p { 
    color: var(--text-secondary); 
    line-height: 1.6; 
}

/* Service areas section */
.service-areas {
    padding: 60px 0;
    background: var(--dark-bg);
    color: white;
}

.service-areas .section-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-areas-intro {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.area-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    backdrop-filter: blur(10px);
    will-change: transform;
}

.area-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-green);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.area-card h3 {
    color: var(--primary-green);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.area-card p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* About section styles */
.about-section {
    width: 100%;
    min-height: 600px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    margin: 0;
}

.image-column {
    position: relative;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-about {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
}

.image-column::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30,41,59,0.85) 0%, rgba(51,65,85,0.75) 100%);
    z-index: 2;
}

.image-column::after {
    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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 3;
}

.image-content {
    position: relative;
    z-index: 4;
    text-align: center;
    color: white;
    padding: 3rem;
    max-width: 500px;
}

.image-icon {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem auto;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255,255,255,0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.image-icon svg {
    width: 60px;
    height: 60px;
    fill: white;
}

.image-tagline {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 1rem;
    letter-spacing: 0.05em;
}

.image-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.text-column {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.text-column::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(37,99,235,0.05) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50%, -50%);
}

.text-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
}

.section-label {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.main-heading {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: #1e293b;
    margin-bottom: 1.5rem;
}

.highlight-text {
    background: linear-gradient(135deg, #2563eb, #10b981);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.description {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.key-points {
    list-style: none;
    margin-bottom: 2.5rem;
}

.key-points li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    color: #475569;
}

.key-points li::before {
    content: '✓';
    background: linear-gradient(135deg, #2563eb, #10b981);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
    font-weight: bold;
    font-size: 0.8rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.primary-btn {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(37,99,235,0.3);
}

.secondary-btn {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 1rem;
}

.secondary-btn:hover {
    color: #1d4ed8;
    transform: translateX(5px);
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

.floating-circle {
    position: absolute;
    background: rgba(37,99,235,0.1);
    border-radius: 50%;
    animation: floatSlow 6s ease-in-out infinite;
}

.floating-circle:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    right: 10%;
    animation-delay: 0s;
}

.floating-circle:nth-child(2) {
    width: 60px;
    height: 60px;
    bottom: 30%;
    right: 20%;
    animation-delay: 2s;
}

.floating-circle:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 60%;
    right: 5%;
    animation-delay: 4s;
}

@keyframes floatSlow {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.6;
    }
}

/* Contact section */
.contact { 
    padding: 60px 0; 
    background: var(--background-light); 
    margin: 0;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl);
}

@media (max-width: 768px) {
    .contact-form {
        padding: 1.5rem;
        margin: 0 1rem;
        box-shadow: var(--shadow-md);
    }
}

.form-group { 
    margin-bottom: var(--spacing-lg); 
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.submit-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: white;
    padding: 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover { 
    transform: translateY(-2px); 
    box-shadow: var(--shadow-md); 
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Recommendation section */
.recommendation-section {
    margin-top: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* Responsive design */
@media (max-width: 968px) {
    .about-section {
        grid-template-columns: 1fr;
        min-height: auto;
        width: 100%;
        overflow: hidden;
        margin: 0;
    }
    
    .image-column {
        min-height: 50vh;
        order: 2;
        width: 100%;
        overflow: hidden;
    }
    
    .text-column {
        padding: 3rem 2rem;
        order: 1;
        width: 100%;
        overflow: hidden;
    }
    
    .main-heading {
        font-size: 2.5rem;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    .image-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Hide elements that might cause overflow */
    .floating-circle,
    .floating-elements {
        display: none;
    }
}

@media (max-width: 768px) {
    /* Section padding adjustments */
    .services { 
        padding: 40px 0; 
    }
    
    .service-areas { 
        padding: 40px 0; 
    }
    
    .contact { 
        padding: 40px 0; 
    }
    
    /* Grid adjustments */
    .services-grid { 
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .areas-grid { 
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }
    
    .area-card {
        padding: 1.25rem;
    }
    
    .text-column {
        padding: 2rem 1.5rem;
        width: 100%;
        overflow: hidden;
    }
    
    .text-column::before {
        display: none;
    }
    
    .main-heading {
        font-size: 1.8rem;
        line-height: 1.3;
        word-wrap: break-word;
    }
    
    .description {
        font-size: 1.1rem;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        width: 100%;
    }
    
    .primary-btn,
    .secondary-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .image-content {
        padding: 2rem 1rem;
        max-width: 100%;
    }
    
    .image-icon {
        width: 100px;
        height: 100px;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    header, footer, .cta-button, .submit-btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .hero, .services, .about-section, .contact {
        page-break-inside: avoid;
    }
}