/*
Theme Name: Comtechzone Theme
Author: Comtechzone
Author URI: https://comtechzone.com/
Description: A premium, lightweight, responsive and SEO-friendly WordPress theme designed for corporate, engineering, industrial and consulting websites with structured project management and flexible customization.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 8.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: comtechzone-theme
Domain Path: /languages
Tags: custom-logo, custom-menu, custom-colors, featured-images, threaded-comments, translation-ready, wide-blocks
*/


/* ==================================================
   01. PREMIUM GLOBAL DESIGN SYSTEM
================================================== */

:root {

    /* Corporate Brand Colours */

    --ctz-primary: #0b1f33;
    --ctz-primary-dark: #071626;
    --ctz-secondary: #176bba;
    --ctz-secondary-dark: #125595;
    --ctz-accent: #c6a46c;
    --ctz-accent-light: #f1e7d5;


    /* Background Colours */

    --ctz-white: #ffffff;
    --ctz-background: #ffffff;
    --ctz-surface: #edf4fa;
    --ctz-surface-light: #f7f9fc;
    --ctz-surface-dark: #142f49;


    /* Typography Colours */

    --ctz-text: #334155;
    --ctz-heading: #0b1f33;
    --ctz-muted: #64748b;
    --ctz-border: #dce5ee;
    --ctz-border-dark: #b8c9d9;


    /* Status Colours */

    --ctz-success: #15803d;
    --ctz-error: #b91c1c;
    --ctz-warning: #a16207;


    /* Typography */

    --ctz-font-body:
        "Segoe UI",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        sans-serif;

    --ctz-font-heading: var(--ctz-font-body);

    --ctz-font-size: 16px;
    --ctz-line-height: 1.75;


    /* Website Layout */

    --ctz-container: 1320px;
    --ctz-container-padding: 32px;

    --ctz-section-spacing:
        clamp(40px, 5vw, 80px);


    /* Border Radius */

    --ctz-radius-sm: 6px;
    --ctz-radius-md: 10px;
    --ctz-radius-lg: 16px;


    /* Premium Shadows */

    --ctz-shadow-sm:
        0 3px 12px rgba(11, 31, 51, 0.05);

    --ctz-shadow-md:
        0 8px 28px rgba(11, 31, 51, 0.08);

    --ctz-shadow-lg:
        0 16px 48px rgba(11, 31, 51, 0.12);


    /* Corporate Gradients */

    --ctz-gradient-primary:
        linear-gradient(
            135deg,
            var(--ctz-primary-dark) 0%,
            var(--ctz-primary) 55%,
            var(--ctz-surface-dark) 100%
        );

    --ctz-gradient-secondary:
        linear-gradient(
            135deg,
            var(--ctz-secondary-dark),
            var(--ctz-secondary)
        );

    --ctz-gradient-light:
        linear-gradient(
            135deg,
            var(--ctz-white),
            var(--ctz-surface)
        );

    --ctz-gradient-accent:
        linear-gradient(
            90deg,
            var(--ctz-accent),
            var(--ctz-accent-light)
        );


    /* Transitions */

    --ctz-transition: 200ms ease;
    --ctz-transition-slow: 350ms ease;


    /* Compatible Colour Variables */

    --ctz-color-primary: var(--ctz-primary);
    --ctz-color-primary-dark: var(--ctz-primary-dark);
    --ctz-color-secondary: var(--ctz-secondary);
    --ctz-color-accent: var(--ctz-accent);
    --ctz-color-white: var(--ctz-white);
    --ctz-color-background: var(--ctz-background);
    --ctz-color-surface: var(--ctz-surface);
    --ctz-color-text: var(--ctz-text);
    --ctz-color-heading: var(--ctz-heading);
    --ctz-color-muted: var(--ctz-muted);
    --ctz-color-border: var(--ctz-border);
    --ctz-color-success: var(--ctz-success);
    --ctz-color-error: var(--ctz-error);

}


/* ==================================================
   02. CSS RESET
================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    padding: 0;
    background: var(--ctz-background);
    color: var(--ctz-text);
    font-family: var(--ctz-font-body);
    font-size: var(--ctz-font-size);
    line-height: var(--ctz-line-height);
    overflow-wrap: break-word;
    -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

img {
    vertical-align: middle;
}

iframe {
    max-width: 100%;
}

figure {
    margin: 0 0 1.5rem;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--ctz-secondary);
    color: var(--ctz-white);
}


/* ==================================================
   03. PREMIUM TYPOGRAPHY
================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0 0 1rem;
    color: var(--ctz-heading);
    font-family: var(--ctz-font-heading);
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: break-word;
}

h1 {
    font-size: clamp(2.25rem, 4.5vw, 4rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(1.75rem, 3.2vw, 2.75rem);
    letter-spacing: -0.03em;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    letter-spacing: -0.02em;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin: 0 0 1rem;
}

a {
    color: var(--ctz-secondary);
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color var(--ctz-transition);
}

a:hover {
    color: var(--ctz-primary);
}

strong,
b {
    font-weight: 700;
}

small {
    font-size: 0.875em;
}

hr {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid var(--ctz-border);
}


/* ==================================================
   04. GLOBAL WEBSITE LAYOUT
================================================== */

.ctz-site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.ctz-main {
    flex: 1 0 auto;
    min-width: 0;
    width: 100%;
}

.ctz-container {
    width: 100%;
    max-width: var(--ctz-container);
    margin-inline: auto;
    padding-inline: var(--ctz-container-padding);
}

.ctz-section {
    padding-block: var(--ctz-section-spacing);
}

.ctz-section--light {
    background: var(--ctz-surface);
}

.ctz-section--dark {
    background: var(--ctz-gradient-primary);
    color: var(--ctz-white);
}

.ctz-section--dark h1,
.ctz-section--dark h2,
.ctz-section--dark h3,
.ctz-section--dark h4,
.ctz-section--dark h5,
.ctz-section--dark h6 {
    color: var(--ctz-white);
}

.ctz-section--dark a:not(.ctz-button) {
    color: #c6e2ff;
}


/* ==================================================
   05. CORPORATE SECTION HEADINGS
================================================== */

.ctz-section-heading {
    position: relative;
    max-width: 820px;
    margin-bottom: clamp(28px, 4vw, 48px);
}

.ctz-section-heading h2 {
    margin-bottom: 14px;
}

.ctz-section-heading p {
    max-width: 700px;
    margin-bottom: 0;
    color: var(--ctz-muted);
    line-height: 1.8;
}

.ctz-section--dark .ctz-section-heading p {
    color: #d4e1ed;
}

.ctz-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    color: var(--ctz-secondary);
    font-size: 0.75rem;
    font-weight: 650;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.ctz-section--dark .ctz-section-eyebrow {
    color: var(--ctz-accent-light);
}


/* ==================================================
   06. PREMIUM GLOBAL BUTTONS
================================================== */

.ctz-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 48px;
    padding: 13px 26px;
    border: 1px solid transparent;
    border-radius: var(--ctz-radius-sm);
    background: var(--ctz-gradient-secondary);
    color: var(--ctz-white);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--ctz-shadow-sm);
    transition:
        background-color var(--ctz-transition),
        color var(--ctz-transition),
        border-color var(--ctz-transition),
        box-shadow var(--ctz-transition),
        transform var(--ctz-transition);
}

.ctz-button:hover {
    background: var(--ctz-primary);
    color: var(--ctz-white);
    text-decoration: none;
    box-shadow: var(--ctz-shadow-md);
}

.ctz-button:active {
    transform: translateY(1px);
}

.ctz-button svg {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.ctz-button--outline {
    border-color: var(--ctz-secondary);
    background: transparent;
    color: var(--ctz-secondary);
    box-shadow: none;
}

.ctz-button--outline:hover {
    background: var(--ctz-secondary);
    border-color: var(--ctz-secondary);
    color: var(--ctz-white);
}

.ctz-button--secondary {
    background: var(--ctz-primary);
    border-color: var(--ctz-primary);
    color: var(--ctz-white);
}

.ctz-button--secondary:hover {
    background: var(--ctz-secondary);
    border-color: var(--ctz-secondary);
}

.ctz-button--light {
    background: var(--ctz-white);
    border-color: var(--ctz-white);
    color: var(--ctz-primary);
}

.ctz-button--light:hover {
    background: var(--ctz-accent);
    border-color: var(--ctz-accent);
    color: var(--ctz-primary-dark);
}

.ctz-button--gold {
    background: var(--ctz-accent);
    border-color: var(--ctz-accent);
    color: var(--ctz-primary-dark);
}

.ctz-button--gold:hover {
    background: var(--ctz-accent-light);
    border-color: var(--ctz-accent-light);
    color: var(--ctz-primary-dark);
}

.ctz-button:disabled,
button.ctz-button[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}


/* ==================================================
   07. PREMIUM FORM ELEMENTS
================================================== */

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="hidden"]):not([type="image"]):not([type="range"]):not([type="color"]),
textarea,
select {
    width: 100%;
    max-width: 100%;
    min-height: 46px;
    padding: 12px 15px;
    border: 1px solid var(--ctz-border);
    border-radius: var(--ctz-radius-sm);
    background: var(--ctz-surface-light);
    color: var(--ctz-text);
    font-size: 0.9375rem;
    line-height: 1.5;
    transition:
        background-color var(--ctz-transition),
        border-color var(--ctz-transition),
        box-shadow var(--ctz-transition);
}

input:is(
    [type="text"],
    [type="email"],
    [type="tel"],
    [type="url"],
    [type="search"],
    [type="password"],
    [type="number"]
):focus,
textarea:focus,
select:focus {
    background: var(--ctz-white);
    border-color: var(--ctz-secondary);
    outline: 2px solid var(--ctz-secondary);
    outline-offset: 1px;
    box-shadow: 0 0 0 4px rgba(23, 107, 186, 0.08);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

label {
    color: var(--ctz-heading);
    font-size: 0.9375rem;
    font-weight: 550;
}

input::placeholder,
textarea::placeholder {
    color: var(--ctz-muted);
    opacity: 1;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--ctz-secondary);
}

input:disabled,
textarea:disabled,
select:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

input[aria-invalid="true"],
textarea[aria-invalid="true"],
select[aria-invalid="true"] {
    border-color: var(--ctz-error);
}


/* ==================================================
   08. REUSABLE PREMIUM COMPONENTS
================================================== */

.ctz-card {
    position: relative;
    min-width: 0;
    background: var(--ctz-white);
    border: 1px solid var(--ctz-border);
    border-radius: var(--ctz-radius-md);
    box-shadow: var(--ctz-shadow-sm);
    transition:
        border-color var(--ctz-transition),
        box-shadow var(--ctz-transition);
}

.ctz-card--premium {
    border-top: 3px solid var(--ctz-accent);
}

.ctz-card--dark {
    background: var(--ctz-gradient-primary);
    border-color: var(--ctz-primary);
    color: var(--ctz-white);
}

.ctz-card--dark h2,
.ctz-card--dark h3,
.ctz-card--dark h4 {
    color: var(--ctz-white);
}

.ctz-card--dark a:not(.ctz-button) {
    color: #c6e2ff;
}

.ctz-card-body {
    padding: clamp(20px, 3vw, 32px);
}

.ctz-accent-line {
    display: block;
    width: 48px;
    height: 3px;
    margin-block: 16px;
    background: var(--ctz-gradient-accent);
}

.ctz-text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ctz-secondary);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.ctz-text-link:hover {
    color: var(--ctz-primary);
    text-decoration: underline;
}

.ctz-text-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@media (hover: hover) {

    .ctz-card:hover {
        border-color: var(--ctz-border-dark);
        box-shadow: var(--ctz-shadow-md);
    }

}


/* ==================================================
   09. EDITOR CONTENT STYLING
================================================== */

.ctz-content,
.entry-content {
    min-width: 0;
    line-height: 1.8;
}

.ctz-content p,
.entry-content p {
    margin-bottom: 1.25rem;
}

.ctz-content ul,
.ctz-content ol,
.entry-content ul,
.entry-content ol {
    padding-inline-start: 1.5rem;
    margin-bottom: 1.5rem;
}

.ctz-content li,
.entry-content li {
    margin-bottom: 0.5rem;
}

.ctz-content blockquote,
.entry-content blockquote {
    margin: 1.75rem 0;
    padding: 20px 24px;
    background: var(--ctz-surface);
    border: 0;
    border-inline-start: 3px solid var(--ctz-accent);
    color: var(--ctz-heading);
}

.ctz-content blockquote p:last-child,
.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.ctz-content pre,
.entry-content pre {
    max-width: 100%;
    padding: 20px;
    overflow-x: auto;
    background: var(--ctz-primary);
    border-radius: var(--ctz-radius-sm);
    color: var(--ctz-white);
}

.ctz-content img,
.entry-content img {
    max-width: 100%;
    height: auto;
}


/* ==================================================
   10. WORDPRESS CORE CLASSES
================================================== */

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-inline: auto;
}

.alignwide,
.alignfull {
    max-width: 100%;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text,
.gallery-caption,
.wp-element-caption {
    margin-top: 10px;
    color: var(--ctz-muted);
    font-size: 0.875rem;
    line-height: 1.6;
    text-align: center;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
}

.wp-block-table {
    max-width: 100%;
    overflow-x: auto;
}

.wp-block-embed iframe {
    max-width: 100%;
}

.wp-block-button__link {
    transition:
        background-color var(--ctz-transition),
        color var(--ctz-transition);
}

.wp-block-separator {
    border-color: var(--ctz-border);
}

.bypostauthor {
    color: inherit;
}

.sticky {
    position: relative;
}


/* ==================================================
   11. PROFESSIONAL CONTENT TABLES
================================================== */

.ctz-table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.ctz-content table {
    width: 100%;
    margin-bottom: 1.5rem;
    border-collapse: collapse;
    text-align: start;
    font-size: 0.9375rem;
}

.ctz-content th,
.ctz-content td {
    padding: 14px 18px;
    border: 1px solid var(--ctz-border);
    vertical-align: top;
    line-height: 1.65;
}

.ctz-content th {
    background: var(--ctz-primary);
    color: var(--ctz-white);
    font-weight: 600;
    text-align: start;
}

.ctz-content tbody tr:nth-child(even) {
    background: var(--ctz-surface-light);
}

.ctz-content table caption {
    padding: 12px;
    color: var(--ctz-muted);
    font-size: 0.875rem;
    text-align: start;
}


/* ==================================================
   12. PREMIUM PAGINATION
================================================== */

.ctz-pagination {
    margin-top: clamp(28px, 4vw, 48px);
}

.ctz-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ctz-pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
}

.ctz-pagination a.page-numbers,
.ctz-pagination span.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 8px 14px;
    background: var(--ctz-white);
    border: 1px solid var(--ctz-border);
    border-radius: var(--ctz-radius-sm);
    color: var(--ctz-heading);
    font-size: 0.875rem;
    font-weight: 550;
    text-decoration: none;
}

.ctz-pagination a.page-numbers:hover {
    border-color: var(--ctz-secondary);
    color: var(--ctz-secondary);
}

.ctz-pagination .page-numbers.current {
    background: var(--ctz-primary);
    border-color: var(--ctz-primary);
    color: var(--ctz-white);
}

.ctz-pagination .page-numbers.dots {
    background: transparent;
    border-color: transparent;
}


/* ==================================================
   13. EMPTY STATES
================================================== */

.ctz-empty-state {
    width: 100%;
    padding: clamp(24px, 4vw, 48px);
    background: var(--ctz-gradient-light);
    border: 1px solid var(--ctz-border);
    border-radius: var(--ctz-radius-md);
    color: var(--ctz-muted);
    text-align: center;
}

.ctz-empty-state h2,
.ctz-empty-state h3 {
    color: var(--ctz-heading);
}

.ctz-empty-state p:last-child {
    margin-bottom: 0;
}


/* ==================================================
   14. ACCESSIBILITY
================================================== */

:focus-visible {
    outline: 3px solid var(--ctz-secondary);
    outline-offset: 4px;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    position: fixed;
    z-index: 99999;
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    padding: 12px 20px;
    margin: 0;
    overflow: visible;
    clip: auto;
    clip-path: none;
    background: var(--ctz-white);
    color: var(--ctz-primary);
    font-weight: 600;
    box-shadow: var(--ctz-shadow-md);
}


/* ==================================================
   15. UTILITY CLASSES
================================================== */

.ctz-text-center {
    text-align: center;
}

.ctz-text-muted {
    color: var(--ctz-muted);
}

.ctz-text-primary {
    color: var(--ctz-primary);
}

.ctz-text-secondary {
    color: var(--ctz-secondary);
}

.ctz-background-light {
    background: var(--ctz-surface);
}

.ctz-background-white {
    background: var(--ctz-white);
}

.ctz-clear::after,
.ctz-content::after {
    display: table;
    clear: both;
    content: "";
}


/* ==================================================
   16. TABLET RESPONSIVE DESIGN
================================================== */

@media (max-width: 1024px) {

    :root {
        --ctz-container-padding: 24px;
        --ctz-section-spacing: 52px;
    }

    .ctz-section-heading {
        margin-bottom: 32px;
    }

}


/* ==================================================
   17. MOBILE RESPONSIVE DESIGN
================================================== */

@media (max-width: 767px) {

    :root {
        --ctz-container-padding: 18px;
        --ctz-section-spacing: 36px;
    }

    h1 {
        font-size: clamp(1.875rem, 7vw, 2.75rem);
    }

    h2 {
        font-size: clamp(1.625rem, 5vw, 2rem);
    }

    h3 {
        font-size: 1.25rem;
    }

    .ctz-section-heading {
        margin-bottom: 24px;
    }

    .ctz-section-heading p {
        font-size: 0.9375rem;
    }

    .ctz-button {
        min-height: 46px;
        padding: 12px 20px;
    }

    .alignleft,
    .alignright {
        float: none;
        margin: 0 auto 1.5rem;
    }

    .ctz-content th,
    .ctz-content td {
        padding: 10px 12px;
    }

    .ctz-content blockquote,
    .entry-content blockquote {
        padding: 16px 18px;
    }

    input:is(
        [type="text"],
        [type="email"],
        [type="tel"],
        [type="url"],
        [type="search"],
        [type="password"],
        [type="number"]
    ),
    textarea,
    select {
        font-size: 16px;
    }

}


/* ==================================================
   18. SMALL MOBILE DEVICES
================================================== */

@media (max-width: 360px) {

    :root {
        --ctz-container-padding: 14px;
        --ctz-section-spacing: 28px;
    }

    .ctz-button {
        padding-inline: 16px;
    }

    .ctz-pagination a.page-numbers,
    .ctz-pagination span.page-numbers {
        min-width: 36px;
        min-height: 36px;
        padding: 6px 10px;
    }

}


/* ==================================================
   19. REDUCED MOTION ACCESSIBILITY
================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

}


/* ==================================================
   20. HIGH CONTRAST ACCESSIBILITY
================================================== */

@media (forced-colors: active) {

    .ctz-button,
    .ctz-card,
    .ctz-empty-state {
        border: 1px solid ButtonText;
        box-shadow: none;
    }

    :focus-visible {
        outline: 3px solid Highlight;
    }

}


/* ==================================================
   21. PRINT OPTIMIZATION
================================================== */

@media print {

    body {
        background: #ffffff;
        color: #000000;
    }

    .ctz-container {
        max-width: 100%;
        padding-inline: 0;
    }

    .ctz-section {
        padding-block: 20px;
    }

    .ctz-section--dark,
    .ctz-card--dark {
        background: #ffffff;
        color: #000000;
    }

    .ctz-section--dark h1,
    .ctz-section--dark h2,
    .ctz-section--dark h3,
    .ctz-section--dark h4,
    .ctz-section--dark h5,
    .ctz-section--dark h6,
    .ctz-card--dark h2,
    .ctz-card--dark h3,
    .ctz-card--dark h4 {
        color: #000000;
    }

    .ctz-card {
        box-shadow: none;
        break-inside: avoid;
    }

    .ctz-content th {
        background: #eeeeee;
        color: #000000;
    }

    .ctz-pagination {
        display: none;
    }

}