/* ============================================
   MATRAEX - GLOBAL STYLESHEET
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --color-primary: #E31A21;
    --color-primary-dark: #C01418;
    --color-secondary: #333333;
    --color-dark: #1a1a1a;
    --color-text: #333;
    --color-text-light: #666;
    --color-border: #ddd;
    --color-bg-light: #f8f8f8;
    --color-white: #fff;
    --font-main: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --container-max: 1200px;
    --header-height: 80px;
}

/* ============================================
   GLOBAL RESETS & BASE
   ============================================ */
* {
    box-sizing: border-box;
}

body.matraex-template {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    padding-top: var(--header-height);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem 0;
    color: var(--color-dark);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }

p {
    margin: 0 0 1rem 0;
    line-height: 1.8;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

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

/* ============================================
   HEADER
   ============================================ */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

header.header-transparent {
    background: transparent;
    box-shadow: none;
}

header.header-transparent.scrolled {
    background: var(--color-white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo img {
    height: 50px;
    width: auto;
    display: block;
}

.nav-main {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-main li {
    margin: 0;
    padding: 0;
}

.nav-link {
    color: var(--color-dark);
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    display: block;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

header.header-transparent .nav-link {
    color: var(--color-white);
}

header.header-transparent.scrolled .nav-link {
    color: var(--color-dark);
}

.menu-toggle {
    display: none;
}

.menu-toggle-checkbox {
    display: none;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border-radius: 5px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(227, 26, 33, 0.3);
}

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

.btn-secondary:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: var(--color-white);
    transform: translateY(-2px);
}

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

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

.btn-lg {
    padding: 16px 40px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    overflow: hidden;
}

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 800"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%231a1a2e;stop-opacity:1" /><stop offset="100%" style="stop-color:%230f3460;stop-opacity:1" /></linearGradient></defs><rect fill="url(%23grad)" width="1200" height="800"/><circle cx="200" cy="200" r="150" fill="rgba(14,111,193,0.1)"/><circle cx="1000" cy="600" r="200" fill="rgba(14,111,193,0.1)"/></svg>') center/cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.8) 0%, rgba(15, 52, 96, 0.6) 100%);
}

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

.hero-content {
    text-align: center;
    color: var(--color-white);
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 0;
}

.hero-title {
    font-size: 64px;
    font-weight: 700;
    color: var(--color-white) !important;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 22px;
    line-height: 1.6;
    margin-bottom: 40px;
    color: rgba(255,255,255,0.95);
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   SERVICES PREVIEW
   ============================================ */
.services-preview {
    padding: 80px 0;
    background: var(--color-white);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-header h2 {
    font-size: 42px;
    margin-bottom: 20px;
}

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

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 20px;
}

.service-card {
    text-align: center;
    padding: 40px 30px;
    background: var(--color-white);
    border-radius: 10px;
    border: 2px solid #eee;
    transition: all 0.3s ease;
}

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

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, #ff4040 100%);
    border-radius: 50%;
    font-size: 36px;
    color: var(--color-white);
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--color-dark);
}

.service-card p {
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 0;
}

/* ============================================
   LOCATION SECTION
   ============================================ */
.location-section {
    padding: 80px 0;
    background: var(--color-bg-light);
}

.layout-row {
    display: flex;
    gap: 60px;
    align-items: center;
}

.layout-half {
    flex: 1;
}

.location-section h2 {
    font-size: 36px;
    margin-bottom: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: var(--color-text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   PRICING PREVIEW
   ============================================ */
.pricing-preview {
    padding: 80px 0;
    background: var(--color-white);
}

.pricing-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.pricing-text h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.app-type-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.calculator-box {
    background: var(--color-bg-light);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #eee;
}

.calculator-box h3 {
    font-size: 24px;
    margin-bottom: 15px;
}

.calculator-box p {
    color: var(--color-text-light);
    margin-bottom: 25px;
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    text-align: center;
    color: var(--color-white);
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-section h2 {
    font-size: 42px;
    color: var(--color-white) !important;
    margin-bottom: 20px;
}

.cta-section p {
    font-size: 20px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 40px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: #2c2c2c;
    color: #ccc;
    padding: 60px 0 30px;
}

.footer .layout-row {
    display: flex;
    gap: 60px;
    margin-bottom: 40px;
}

.footer .col {
    flex: 1;
}

.footer .logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.footer .text {
    color: #999;
    font-size: 14px;
    line-height: 1.7;
}

.footer .menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer .menu-list li {
    margin-bottom: 12px;
}

.footer .menu-list a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s ease;
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .nav-main.hide-mobile {
        display: none;
    }

    .menu-toggle {
        display: block;
        font-size: 24px;
        color: var(--color-dark);
        cursor: pointer;
    }

    header.header-transparent .menu-toggle {
        color: var(--color-white);
    }

    header.header-transparent.scrolled .menu-toggle {
        color: var(--color-dark);
    }
}

@media (max-width: 768px) {
    body.matraex-template {
        padding-top: 70px;
    }

    :root {
        --header-height: 70px;
    }

    .hero-title {
        font-size: 42px !important;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    h2 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 36px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .layout-row {
        flex-direction: column;
        gap: 40px;
    }

    .pricing-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .app-type-buttons {
        flex-direction: column;
    }

    .footer .layout-row {
        flex-direction: column;
        gap: 40px;
    }

    .services-preview,
    .location-section,
    .pricing-preview {
        padding: 60px 0;
    }

    .cta-section {
        padding: 60px 0;
    }
}
