/* ========================================
   IT STUDIO NI - MAIN STYLESHEET (OPTIMIZED)
   Version: 2.0
   Last Updated: November 2025
======================================== */

/* ========================================
   CSS RESET & BASE STYLES
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Brand Colors */
    --primary: #009688;
    --primary-dark: #00796B;
    --primary-light: #4DB6AC;
    --secondary: #00334E;
    --secondary-dark: #002538;
    
    /* UI Colors */
    --text: #1a1a1a;
    --text-light: #4a4a4a;
    --text-lighter: #6b6b6b;
    --bg: #ffffff;
    --bg-light: #f8f9fa;
    --bg-accent: #E0F2F1;
    --border: #e1e8ed;
    
    /* Status Colors */
    --success: #4CAF50;
    --error: #f44336;
    --warning: #ff9800;
    
    /* Spacing */
    --container-max: 1200px;
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 40px;
    --spacing-xl: 60px;
    --spacing-2xl: 80px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   TYPOGRAPHY
======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
}

h4 {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-light);
}

.lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-light);
}

.highlight {
    color: var(--primary);
}

a {
    color: var(--primary);
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   LAYOUT
======================================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-2xl) 0;
}

.section-sm {
    padding: var(--spacing-xl) 0;
}

/* ========================================
   HEADER & NAVIGATION (FIXED)
======================================== */
header {
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    z-index: 1001;
}

.logo .highlight {
    color: var(--primary);
}

nav ul {
    display: flex;
    gap: var(--spacing-lg);
    list-style: none;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 500;
    font-size: 1rem;
    transition: color var(--transition-fast);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-fast);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

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

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
    z-index: 1001;
    transition: transform var(--transition-fast);
}

.mobile-menu-toggle:hover {
    transform: scale(1.1);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

/* ========================================
   HERO SECTION (CONSOLIDATED & FIXED)
======================================== */
.hero {
    background: linear-gradient(135deg, var(--bg-accent) 0%, var(--bg) 100%);
    padding: var(--spacing-2xl) 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.hero-content h1 {
    margin-bottom: var(--spacing-md);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    max-width: 600px;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 400px;
    width: 100%;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 150, 136, 0.15);
    transition: transform var(--transition-normal);
}

.hero-image img:hover {
    transform: scale(1.02);
}

/* Sub Hero (for internal pages like About, Contact, etc.) */
.sub-hero {
    background: linear-gradient(135deg, #E0F2F1 0%, #ffffff 100%);
    padding: 80px 0 60px;
    text-align: center;
}

/* ========================================
   BUTTONS (ENHANCED)
======================================== */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-normal);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 150, 136, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 150, 136, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    margin-left: var(--spacing-sm);
}

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

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

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

/* Button Loading State */
.btn:disabled,
.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn.loading::after {
    content: '⏳';
    margin-left: 8px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   FORMS (NEW - CRITICAL FOR CONTACT PAGE)
======================================== */
.form-group {
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text);
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    background: white;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* Form Validation States */
input:invalid:not(:placeholder-shown),
textarea:invalid:not(:placeholder-shown) {
    border-color: var(--error);
}

input:valid:not(:placeholder-shown),
textarea:valid:not(:placeholder-shown) {
    border-color: var(--success);
}

/* Error/Success Messages */
.form-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: var(--spacing-md);
    font-weight: 500;
}

.form-message.success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid var(--success);
}

.form-message.error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid var(--error);
}

/* ========================================
   SERVICES SECTION
======================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.service-card {
    background: white;
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 51, 78, 0.1);
    border-color: var(--primary);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-md);
    font-size: 32px;
    color: var(--primary);
    transition: transform var(--transition-fast);
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    color: var(--secondary);
    margin-bottom: var(--spacing-sm);
}

.service-card p {
    margin-bottom: var(--spacing-md);
    font-size: 1rem;
}

/* ========================================
   WHY CHOOSE SECTION (FIXED)
======================================== */
.why-section {
    background: var(--secondary);
    color: white;
}

.why-section h2,
.why-section h3 {
    color: white;
}

.why-section p {
    color: rgba(255, 255, 255, 0.9);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.why-item {
    padding: var(--spacing-md);
}

.why-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--primary);
}

/* ========================================
   STATS SECTION
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    text-align: center;
}

.stat {
    padding: var(--spacing-md);
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    margin-top: var(--spacing-sm);
    font-size: 1.1rem;
    font-weight: 500;
}

.stat-detail {
    color: var(--text-lighter);
    font-size: 0.9rem;
    margin-top: var(--spacing-xs);
}

/* ========================================
   CLIENTS SECTION
======================================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-xl);
}

.client-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 8px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all var(--transition-normal);
}

.client-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.client-card h4 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: var(--spacing-xs);
}

.client-card .location {
    color: var(--text-lighter);
    font-size: 0.9rem;
}

/* ========================================
   CTA SECTION
======================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: var(--spacing-2xl);
    border-radius: 16px;
    margin: var(--spacing-2xl) 0;
    box-shadow: 0 10px 40px rgba(0, 150, 136, 0.3);
}

.cta-section h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

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

.cta-section .btn:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

/* ========================================
   TRUST BAR (NEW)
======================================== */
.trust-bar {
    background: white;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--spacing-md) 0;
}

.trust-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    text-align: center;
}

.trust-items div {
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 500;
}

/* ========================================
   FOOTER
======================================== */
footer {
    background: var(--secondary);
    color: white;
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
}

.footer-about h3 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

.footer-about p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-xs);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ========================================
   UTILITY CLASSES
======================================== */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

/* ========================================
   ACCESSIBILITY
======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 968px) {
    /* Mobile Navigation */
    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: white;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right var(--transition-normal);
        padding-top: 80px;
        z-index: 999;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        gap: 0;
        padding: var(--spacing-md);
    }
    
    nav li {
        width: 100%;
    }
    
    nav a {
        display: block;
        padding: var(--spacing-sm);
        border-bottom: 1px solid var(--border);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    /* Hero adjustments */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-image {
        order: -1;
        margin-bottom: var(--spacing-lg);
    }
    
    /* Buttons stack on mobile */
    .btn-secondary {
        margin-left: 0;
        margin-top: var(--spacing-sm);
        display: block;
        width: 100%;
    }
    
    .btn-primary {
        width: 100%;
    }
    
    /* Footer adjustments */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    /* Trust bar */
    .trust-items {
        flex-direction: column;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 16px;
    }
    
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    header,
    footer,
    .mobile-menu-toggle,
    .btn,
    .cta-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
    
    a {
        text-decoration: underline;
    }
}
/* Fix dark text on dark background */
section[style*="background: #00334E"] h2,
section[style*="background: #00334E"] h3,
section[style*="background: #00334E"] p {
    color: white !important;
}

section[style*="background: #00334E"] .service-card {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

section[style*="background: #00334E"] .service-card h3,
section[style*="background: #00334E"] .service-card p {
    color: white !important;
}