/* ============================================
   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;
    }
}

/* ============================================
   IMPORTED CONTENT (app/html pages and posts)
   ============================================ */

.wpcontent {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    line-height: 1.7;
    overflow-wrap: break-word;
}

.wpcontent h1 {
    margin: 0 0 8px;
    line-height: 1.25;
}

.wpcontent h2,
.wpcontent h3,
.wpcontent h4 {
    margin: 1.6em 0 0.5em;
    line-height: 1.3;
    color: var(--color-dark);
}

.wpcontent p,
.wpcontent ul,
.wpcontent ol {
    margin: 0 0 1.1em;
}

.wpcontent ul,
.wpcontent ol {
    padding-left: 1.6em;
}

.wpcontent .content-date {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.wpcontent img,
.wpcontent video,
.wpcontent iframe {
    max-width: 100%;
    height: auto;
}

.wpcontent iframe {
    border: 0;
}

.wpcontent figure {
    margin: 0 0 1.2em;
}

.wpcontent figcaption {
    color: var(--color-text-light);
    font-size: 0.85rem;
}

.wpcontent a {
    color: var(--color-primary);
}

.wpcontent table {
    border-collapse: collapse;
    max-width: 100%;
    margin: 0 0 1.4em;
    display: block;
    overflow-x: auto;
}

.wpcontent th,
.wpcontent td {
    border: 1px solid var(--color-border);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

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

.wpcontent pre,
.wpcontent code {
    font-family: Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.88rem;
}

.wpcontent pre {
    background: #1e1e1e;
    color: #e6e6e6;
    padding: 14px 16px;
    border-radius: 4px;
    overflow-x: auto;
    margin: 0 0 1.4em;
    line-height: 1.5;
}

.wpcontent :not(pre) > code {
    background: var(--color-bg-light);
    padding: 1px 5px;
    border-radius: 3px;
}

.wpcontent blockquote {
    margin: 0 0 1.2em;
    padding: 4px 16px;
    border-left: 4px solid var(--color-border);
    color: var(--color-text-light);
}

.wpcontent .alignleft {
    float: left;
    margin: 0 20px 10px 0;
}

.wpcontent .alignright {
    float: right;
    margin: 0 0 10px 20px;
}

.wpcontent .aligncenter {
    display: block;
    margin: 0 auto 1em;
}

.wpcontent .c-data::after {
    content: "";
    display: block;
    clear: both;
}

.wpcontent .insights-list {
    list-style: none;
    padding: 0;
}

.wpcontent .insights-list li {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.wpcontent .insights-list li div {
    color: var(--color-text-light);
    font-size: 0.92rem;
}

.mtxform {
    width: 100%;
}

.mtxform form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 18px;
    margin: 0;
}

.mtxform .form-group {
    margin: 0;
    min-width: 0;
}

.mtxform .form-full {
    grid-column: 1 / -1;
}

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

.mtxform .form-req {
    color: var(--color-primary);
}

.mtxform .form-control {
    display: block;
    width: 100%;
    padding: 13px 14px;
    font: inherit;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--color-dark);
    background: #fff;
    border: 1px solid #cdd3da;
    border-radius: 8px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.mtxform textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.mtxform .form-control:hover {
    border-color: #9aa3ad;
}

.mtxform .form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(227, 26, 33, 0.18);
}

.mtxform-button {
    display: block;
    width: 100%;
    padding: 15px 24px;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.mtxform-button:hover {
    background: var(--color-primary-dark);
}

.mtxform-button:active {
    transform: translateY(1px);
}

.mtxform-button:focus-visible {
    outline: 3px solid rgba(227, 26, 33, 0.35);
    outline-offset: 2px;
}

.mtxform-note {
    margin: 10px 0 0;
    font-size: 0.8125rem;
    color: var(--color-text-light);
    text-align: center;
}

.mtxform-errors {
    background: #fdecea;
    color: #8f1d1d;
    border: 1px solid #f0b4b4;
    border-left: 4px solid #d93025;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.mtxform-thanks {
    background: #e9f6ec;
    color: #17572a;
    border: 1px solid #b6dfc1;
    border-left: 4px solid #2e9e4f;
    border-radius: 8px;
    padding: 18px 20px;
    font-size: 1.05rem;
}

.contact-page {
    background: #f5f6f8;
}

.contact-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.contact-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #fff;
    padding: clamp(44px, 7vw, 84px) 0 clamp(64px, 9vw, 112px);
}

.contact-hero h1 {
    color: #fff;
    font-size: clamp(1.75rem, 4.2vw, 2.9rem);
    line-height: 1.15;
    margin: 0 0 16px;
    max-width: 18em;
}

.contact-kicker {
    margin: 0 0 12px;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff6b70;
}

.contact-lead {
    margin: 0;
    max-width: 38em;
    font-size: clamp(1rem, 1.8vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

.contact-body {
    padding: 0 0 clamp(40px, 6vw, 80px);
}

.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 28px;
    margin-top: -56px;
    align-items: start;
}

.contact-card {
    background: #fff;
    border-radius: 14px;
    padding: clamp(20px, 3vw, 32px);
    box-shadow: 0 10px 30px rgba(20, 30, 60, 0.09);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.contact-info .contact-card {
    padding: 22px 24px;
}

.contact-card h2 {
    margin: 0 0 10px;
    font-size: 1.35rem;
}

.contact-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-light);
}

.contact-card h2 i,
.contact-card h3 i {
    margin-right: 8px;
    color: var(--color-primary);
}

.contact-card p {
    margin: 0 0 12px;
}

.contact-card-visit {
    border-top: 4px solid var(--color-primary);
}

.contact-detail {
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--color-dark);
}

.contact-detail a {
    color: var(--color-dark);
    font-weight: 600;
    text-decoration: none;
}

.contact-detail a:hover {
    color: var(--color-primary);
}

.contact-link {
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}

.contact-link:hover {
    text-decoration: underline;
}

.contact-rate {
    margin: 4px 4px 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.contact-form-card h2 {
    font-size: clamp(1.4rem, 2.4vw, 1.75rem);
}

.contact-form-intro {
    margin: 0 0 24px;
    color: var(--color-text-light);
}

.newsletter-card {
    max-width: 560px;
    margin: -56px auto 0;
}

.newsletter-meet {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.newsletter-meet a {
    color: var(--color-primary);
    font-weight: 600;
}

@media (max-width: 900px) {
    .newsletter-card {
        margin-top: -40px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        margin-top: -40px;
    }

    .contact-form-card {
        order: -1;
    }
}

@media (max-width: 560px) {
    .contact-inner {
        padding: 0 16px;
    }

    .mtxform form {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .contact-card {
        border-radius: 12px;
    }
}

@media (max-width: 700px) {
    .wpcontent {
        padding: 24px 16px 40px;
    }

    .wpcontent .alignleft,
    .wpcontent .alignright {
        float: none;
        margin: 0 0 1em;
    }
}

body.matraex-template.body-index {
    padding-top: 0;
}

.notfound {
    max-width: 640px;
    margin: 0 auto;
    padding: 70px 20px 90px;
    text-align: center;
}

.notfound-code {
    font-size: 7rem;
    font-weight: 800;
    line-height: 1;
    color: var(--color-primary);
    letter-spacing: -2px;
}

.notfound h1 {
    margin: 4px 0 12px;
}

.notfound-lead {
    font-size: 1.25rem;
    color: var(--color-dark);
}

.notfound-timer {
    color: var(--color-text-light);
    margin: 24px 0 16px;
}

.notfound-timer span {
    display: inline-block;
    min-width: 1.6em;
    font-weight: 700;
    color: var(--color-primary);
}

.notfound-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.notfound-links {
    color: var(--color-text-light);
}
