/*
Theme Name:   Blocksy Child
Theme URI:    https://creativethemes.com/blocksy/
Description:  Blocksy Child Theme for techez.com.tw
Author:       CreativeThemes
Author URI:   https://creativethemes.com
Template:     blocksy
Version:      1.0.0
Text Domain:  blocksy-child
*/

/* ==========================================================================
   Techez Custom Global Layout & Container
   ========================================================================== */

:root {
    --techez-max-width: 1800px;
    --techez-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans CJK TC", "PingFang TC", sans-serif;
    --techez-primary-color: #007bff;
    --techez-dark-color: #1a1d20;
    --techez-light-color: #f8f9fa;
    --techez-gray-color: #6c757d;
}

body {
    font-family: var(--techez-font-family);
}

.techez-container {
    max-width: var(--techez-max-width);
    margin: 0 auto;
    padding-left: 40px;
    padding-right: 40px;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .techez-container {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* ==========================================================================
   Hero Banner Module
   ========================================================================== */

.techez-hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 1920 / 1200;
    background-color: #000;
}

@media (max-width: 1024px) {
    .techez-hero-slider {
        aspect-ratio: 16 / 10;
    }
}

@media (max-width: 576px) {
    .techez-hero-slider {
        aspect-ratio: 4 / 3;
    }
}

.techez-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    z-index: 1;
}

.techez-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.techez-slide-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.techez-slide-media img,
.techez-slide-media iframe,
.techez-slide-media video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none; /* Avoid clicking on iframe unless necessary */
}

/* Enable pointer events on active video slide controls if needed */
.techez-slide.active .techez-slide-media iframe {
    pointer-events: auto;
}

.techez-slide-content {
    position: absolute;
    bottom: 10%;
    left: 5%;
    right: 5%;
    color: #fff;
    z-index: 3;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    max-width: 800px;
    pointer-events: auto;
}

.techez-slide-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 15px;
    line-height: 1.2;
}

.techez-slide-desc {
    font-size: clamp(1rem, 2vw, 1.25rem);
    margin-bottom: 25px;
    opacity: 0.9;
}

.techez-slide-btn {
    display: inline-block;
    padding: 12px 35px;
    background-color: var(--techez-primary-color);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.techez-slide-btn:hover {
    background-color: #0056b3;
    color: #fff;
    transform: translateY(-2px);
}

/* Entire slide link when button is empty */
.techez-slide-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 4;
}

/* Dots Navigation */
.techez-slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
    margin: 0 !important;
    max-width: none !important;
}

.techez-slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    padding: 0;
}

.techez-slider-dot.active {
    background-color: #fff;
    transform: scale(1.2);
}

/* Arrow Navigation */
.techez-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
    margin: 0 !important;
    max-width: none !important;
}

.techez-slider-arrow:hover {
    background: rgba(0,0,0,0.6);
    opacity: 1;
}

.techez-slider-prev { left: 25px; }
.techez-slider-next { right: 25px; }

@media (max-width: 576px) {
    .techez-slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    .techez-slider-prev { left: 10px; }
    .techez-slider-next { right: 10px; }
}

/* ==========================================================================
   News Section
   ========================================================================== */

.techez-news-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-top: 60px;
    margin-bottom: 40px;
    position: relative;
}

.techez-news-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--techez-primary-color);
    margin: 10px auto 0;
}

.techez-news-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 1024px) {
    .techez-news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .techez-news-grid {
        grid-template-columns: 1fr;
    }
}

.techez-news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.techez-news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.techez-news-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.techez-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.techez-news-card:hover .techez-news-thumb img {
    transform: scale(1.05);
}

.techez-news-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.techez-news-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 10px;
    color: var(--techez-dark-color);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.techez-news-card-title:hover {
    color: var(--techez-primary-color);
}

.techez-news-more-container {
    text-align: center;
    margin-bottom: 60px;
}

.techez-news-more-btn {
    display: inline-block;
    padding: 10px 30px;
    border: 2px solid var(--techez-primary-color);
    color: var(--techez-primary-color);
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.techez-news-more-btn:hover {
    background-color: var(--techez-primary-color);
    color: #fff;
}

/* ==========================================================================
   Brand & Special Product Sections (Left-aligned & Right-aligned)
   ========================================================================== */

.techez-brand-section {
    position: relative;
    width: 100%;
    padding: 120px 0;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    color: #fff;
    margin-bottom: 60px;
}

.techez-brand-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.55);
    z-index: 1;
}

.techez-brand-content-wrapper {
    position: relative;
    z-index: 2;
    max-width: var(--techez-max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.techez-brand-inner-left {
    max-width: 650px;
    margin-right: auto;
    text-align: left;
}

.techez-brand-inner-right {
    max-width: 650px;
    margin-left: auto;
    text-align: right;
}

.techez-brand-section h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.techez-brand-section p {
    font-size: clamp(1rem, 2vw, 1.1rem);
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .techez-brand-section {
        padding: 80px 0;
    }
    .techez-brand-content-wrapper {
        padding: 0 20px;
    }
    .techez-brand-inner-right {
        text-align: left; /* Shift text to left on mobile */
    }
}

/* ==========================================================================
   Product Feature (3 Column Image)
   ========================================================================== */

.techez-product-section {
    margin-top: 60px;
    margin-bottom: 60px;
}

.techez-product-section-title {
    text-align: center;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 40px;
}

.techez-product-cols {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .techez-product-cols {
        grid-template-columns: 1fr;
    }
}

.techez-product-col {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1/1;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.techez-product-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.techez-product-col:hover img {
    transform: scale(1.03);
}

.techez-product-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.7));
    display: flex;
    align-items: flex-end;
    padding: 30px;
}

.techez-product-col-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

/* ==========================================================================
   Brand Logos Bar
   ========================================================================== */

.techez-logos-section {
    background-color: #fff;
    padding: 40px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 60px;
}

.techez-logos-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 50px;
}

.techez-logo-item {
    max-width: 150px;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

.techez-logo-item:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .techez-logos-grid {
        gap: 30px;
    }
    .techez-logo-item {
        max-width: 110px;
    }
}

/* ==========================================================================
   Home Preview Page Specific Fixes (Page ID 25087)
   ========================================================================== */

/* 1. Force Page Wrapper, Blocksy Container, and main structure to Full Width (100%)
   This allows blocksy page layout to act as a full canvas (100% width) so backgrounds stretch to edge */
.page-id-25087 #main-container,
.page-id-25087 .site-main,
.page-id-25087 #primary,
.page-id-25087 .content-area,
.page-id-25087 article.page,
.page-id-25087 .entry-content,
.page-id-25087 .ct-container,
.page-id-25087 .ct-container-full,
.page-id-25087 #main {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* 2. Elementor Header Layout (Background 100% stretched, Content 1800px Capped & Centered) */
/* Specific styling targeting the sticky elementor header wrapper */
.page-id-25087 header.elementor-location-header {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Force the main header parent container and horizontal row bars to stretch 100% */
.page-id-25087 #header_pop,
.page-id-25087 .elementor-element-74f64ad2,
.page-id-25087 .elementor-element-1ed82f2d {
    width: 100% !important;
    max-width: none !important;
    --width: 100% !important;
    --content-width: 100% !important;
}

/* Restrict the inner contents inside the top grey bar and logo menu bar to 1800px and center them */
.page-id-25087 .elementor-element-74f64ad2 > .e-con-inner,
.page-id-25087 .elementor-element-1ed82f2d > .e-con-inner {
    --width: 1800px !important;
    --content-width: 1800px !important;
    max-width: 1800px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .page-id-25087 .elementor-element-74f64ad2 > .e-con-inner,
    .page-id-25087 .elementor-element-1ed82f2d > .e-con-inner {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* 3. Elementor Footer Layout (Background 100% stretched, Content 1800px Capped via e-con-inner) */
.page-id-25087 footer.elementor-location-footer {
    width: 100% !important;
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.page-id-25087 footer.elementor-location-footer > .e-con {
    width: 100% !important;
    max-width: none !important;
}

.page-id-25087 footer.elementor-location-footer .e-con-inner {
    --width: 1800px !important;
    max-width: 1800px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 40px !important;
    padding-right: 40px !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .page-id-25087 footer.elementor-location-footer .e-con-inner {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* 4. Release Gutenberg's constraints on all homepage blocks to allow full-width background stretching */
.page-id-25087 .entry-content > .techez-hero-slider,
.page-id-25087 .entry-content > .techez-brand-section,
.page-id-25087 .entry-content > .techez-product-section,
.page-id-25087 .entry-content > .techez-logos-section,
.page-id-25087 .entry-content > .techez-news-section,
.page-id-25087 .entry-content > .wp-block-shortcode {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* 5. Hero Banner 3-1 Scenario: Responsive layout capped at 1800px */
.page-id-25087 .techez-hero-slider {
    position: relative !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow: hidden !important;
}

/* Bypass layout constraints on slider direct children (slides, arrows, dots) */
.page-id-25087 .techez-hero-slider > * {
    max-width: none !important;
}

/* Let the slides take full size of slider */
.page-id-25087 .techez-hero-slider .techez-slide {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Reset margin on arrows and dots to avoid Gutenberg positioning conflicts */
.page-id-25087 .techez-hero-slider .techez-slider-arrow,
.page-id-25087 .techez-hero-slider .techez-slider-dots {
    margin: 0 !important;
}

/* Width < 1800px: Full width, sticking to menu */
@media (max-width: 1800px) {
    .page-id-25087 .techez-hero-slider {
        max-width: 100% !important;
        margin-top: 0 !important;
    }
}

/* Width >= 1801px: Capped at 1800px, centered with top spacing & round corners */
@media (min-width: 1801px) {
    .page-id-25087 .techez-hero-slider {
        max-width: 1800px !important;
        margin-top: 40px !important;
        border-radius: 8px;
    }
}

/* 6. Section margins for professional breathing space (RWD Spacing) */
.page-id-25087 .techez-hero-slider,
.page-id-25087 .techez-news-section,
.page-id-25087 .techez-brand-section,
.page-id-25087 .techez-product-section,
.page-id-25087 .techez-logos-section {
    margin-bottom: 95px !important;
    margin-top: 0 !important;
}

@media (max-width: 768px) {
    .page-id-25087 .techez-hero-slider,
    .page-id-25087 .techez-news-section,
    .page-id-25087 .techez-brand-section,
    .page-id-25087 .techez-product-section,
    .page-id-25087 .techez-logos-section {
        margin-bottom: 55px !important;
    }
}

/* 7. Force Slide Media to bypass WordPress constrained layout widths */
.page-id-25087 .techez-slide-media {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    z-index: 1 !important;
}

.page-id-25087 .techez-slide-media img,
.page-id-25087 .techez-slide-media iframe {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
}
