/*
Theme Name: HENZA Tools Showcase
Theme URI: http://example.com
Author: Your Name
Author URI: http://example.com
Description: A professional custom theme for showcasing HENZA tools.
Version: 1.9
License: GNU General Public License v2 or later
Text Domain: henza-tools
*/

/* ---------------------------
   Google Fonts
--------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Roboto:wght@400;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Aptos+Display:wght@400;600;700&display=swap');

/* ---------------------------
   Base Styles
--------------------------- */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    background-color: #f4f7fb;
    color: #222;
}

a { text-decoration: none; color: inherit; }

/* ---------------------------
   Header
--------------------------- */
header {
    background: linear-gradient(135deg, #003366 0%, #0055a3 100%);
    color: #fff;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 40%;
    height: 100%;
    background: url('/wp-content/themes/my-custom-theme/assets/metallic-texture.jpg') repeat;
    background-size: cover;
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
    mix-blend-mode: overlay;
    mask-image: linear-gradient(to right, black 0%, black 40%, transparent 90%);
    -webkit-mask-image: linear-gradient(to right, black 0%, black 40%, transparent 90%);
}

header .logo,
header nav { position: relative; z-index: 1; }

header .logo h2 {
    font-family: 'Aptos Display', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

header .logo img { height: 50px; width: auto; }

header nav { display: flex; align-items: center; gap: 18px; margin-left: 20px; }
header nav li { list-style: none; }
header nav a {
    color: #fff;
    font-weight: 500;
    position: relative;
    padding: 6px 4px;
    transition: color 0.2s ease;
}
header nav a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #00aaff;
    transition: width 0.3s;
    position: absolute;
    bottom: -6px;
    left: 0;
}
header nav a:hover::after { width: 100%; }

header .cta-btn {
    display: inline-block;
    padding: 10px 18px;
    background: #00aaff;
    color: #002244;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 6px 14px rgba(0, 122, 204, 0.12);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    border: none;
}
header .cta-btn:hover,
header .cta-btn:focus {
    background: #0077cc;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(0, 122, 204, 0.18);
    outline: none;
}

header .nav-pill { background: rgba(255,255,255,0.06); padding: 8px 12px; border-radius: 6px; }
header.sticky { background: linear-gradient(135deg, #002244 0%, #004080 100%); transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }

/* ---------------------------
   Mini Header (Dynamic)
--------------------------- */
.mini-header {
    position: sticky;
    top: 0;
    z-index: 998;
    background: linear-gradient(135deg, #003366 0%, #0055a3 100%);
    padding: 10px 30px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mini-header-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }

.mini-header-left { display: flex; flex-direction: column; gap: 4px; }
.mini-header-left .breadcrumb { font-size: 0.85rem; font-weight: 400; color: #fff; }
.mini-header-left .breadcrumb a { color: #00aaff; text-decoration: none; }
.mini-header-left .breadcrumb a:hover { color: #66c2ff; }
.mini-header-left .page-title { font-size: 1.5rem; font-weight: 700; color: #fff; }

.mini-header-right { cursor: pointer; font-weight: 600; color: #fff; font-size: 1rem; display: flex; align-items: center; }
.mini-header-right i { font-style: normal; margin-right: 4px; transition: color 0.3s ease; }
.mini-header-right.active i { color: #00aaff; }

.details-text { display: none; margin: 10px 0 20px 0; padding: 10px; background: #f5f5f5; border-left: 4px solid #0055a3; color: #003366; }

/* ---------------------------
   Quick Links Sidebar (Dynamic)
--------------------------- */
.product-sidebar {
    width: 320px;
    flex: 0 0 320px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    box-sizing: border-box;
    max-height: 550px;
    overflow-y: auto;
}

.product-sidebar h3 { font-size: 1.2rem; margin-bottom: 10px; color: #003366; border-bottom: 1px solid #ddd; padding-bottom: 6px; }
.product-sidebar ul { list-style: none; padding: 0; margin: 0; }
.product-sidebar li { margin-bottom: 6px; padding: 4px 0; }
.product-sidebar li.main-category a { color: #003366; font-weight: 700; text-decoration: none; display: block; font-size: 0.95rem; }
.product-sidebar li.main-category a.active { color: #00aaff; }
.product-sidebar li.sub-category > a { color: #0055a3; text-decoration: none; display: block; padding-left: 14px; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-sidebar li.sub-category > a.active { font-weight: 700; color: #00aaff; }
.product-sidebar li.sub-category ul li a { font-size: 0.82rem; color: #0055a3; padding-left: 28px; }

/* Daughter branch (tiles of current page) */
.product-sidebar li.sidebar-tile a {
    font-size: 0.78rem;
    color: #0077cc;
    padding-left: 38px;
    font-weight: 500;
}
.product-sidebar li.sidebar-tile a:hover {
    color: #00aaff;
    text-decoration: underline;
}

.show-more-btn { display: block; margin-top: 8px; font-size: 0.85rem; font-weight: 600; color: #0055a3; cursor: pointer; }

/* ---------------------------
   Hero Section
--------------------------- */
.hero { 
    background: linear-gradient(rgba(0,38,77,0.65), rgba(0,38,77,0.65)),
        url('/wp-content/themes/my-custom-theme/assets/construction-site-background.jpg') no-repeat center center;
    background-size: cover;
    color: #fff;
    text-align: center;
    padding: 150px 20px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0; left: 0;
    background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: moveParticles 60s linear infinite;
    pointer-events: none;
    z-index: 0;
}

.hero-content { position: relative; z-index: 1; }
.hero-line, .hero-btn { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.hero-line.visible, .hero-btn.visible { opacity: 1; transform: translateY(0); }

@keyframes moveParticles { from { background-position: 0 0; } to { background-position: 1000px 1000px; } }

/* ---------------------------
   About Section
--------------------------- */
.about-section {
    padding: 80px 40px;
    background: #f8f9fb;
    color: #002244;
    font-family: 'Aptos Display', sans-serif;
}
.about-container { display: flex; flex-direction: column; align-items: center; max-width: 1200px; margin: 0 auto; gap: 40px; }

.about-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
    flex-wrap: wrap;
    position: relative;
}
.about-row.reverse { flex-direction: row-reverse; }

.about-image { flex: 1 1 45%; min-width: 300px; overflow: hidden; position: relative; }
.about-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: transform 0.5s ease, box-shadow 0.3s ease;
}
.about-image img:hover { transform: scale(1.05) translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.2); }

.about-content { flex: 1 1 50%; font-size: 1.05rem; line-height: 1.7; }
.about-content h2,
.about-content p { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.about-content h2.visible,
.about-content p.visible { opacity: 1; transform: translateY(0); }
.about-content h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: #004080;
    position: relative;
}
.about-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #003366, #00aaff);
    margin-top: 10px;
    border-radius: 2px;
}

.about-btn-container { text-align: center; margin-top: 40px; }
.about-btn {
    display: inline-block;
    padding: 12px 24px;
    background: #0077cc;
    color: #fff;
    font-weight: 700;
    border-radius: 8px;
    text-transform: uppercase;
    box-shadow: 0 6px 14px rgba(0, 119, 204, 0.12);
    transition: background 0.2s ease, transform 0.12s ease;
}
.about-btn:hover,
.about-btn:focus { background: #005fa3; transform: translateY(-3px); color: #fff; outline: none; }

/* ---------------------------
   Products Section
--------------------------- */
.products {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
}
.products h2 { text-align: center; margin-bottom: 40px; font-size: 36px; color: #003366; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}
.product-card:hover { transform: translateY(-10px) rotate(-1deg) scale(1.05); box-shadow: 0 20px 40px rgba(0,0,0,0.2); }
.product-card img { width: 100%; height: 200px; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover img { transform: scale(1.1) rotate(0.5deg); }

.product-card .product-info { padding: 20px; }
.product-card .product-info h3 { margin-top: 0; margin-bottom: 10px; font-size: 22px; color: #003366; font-family: 'Montserrat', sans-serif; }
.product-card .product-info p { margin: 0; color: #555; font-size: 16px; }

.product-card.scroll-fade { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.product-card.scroll-fade.visible { opacity: 1; transform: translateY(0); }

/* ---------------------------
   Footer
--------------------------- */
footer {
    background-color: #003366;
    color: #fff;
    padding: 30px 40px;
    text-align: center;
    margin-top: 60px;
}

/* ---------------------------
   Responsive
--------------------------- */
@media (max-width: 992px) {
    .intro-container { grid-template-columns: 1fr; text-align: center; }
    .about-container { flex-direction: column; gap: 30px; text-align: center; }
    .about-row.reverse { flex-direction: column; }
    .about-image, .about-content { flex: 1 1 100%; }
    .about-content h2::after { margin-left: auto; margin-right: auto; }
}

@media (max-width: 768px) {
    header { padding: 12px 18px; }
    header .logo img { height: 40px; }
    header nav { gap: 12px; flex-wrap: wrap; }
    .hero { background-attachment: scroll; padding: 90px 16px; }
    .hero-line { text-shadow: 1px 1px 4px rgba(0,0,0,0.6); }

    .mini-header { padding: 8px 16px; }
    .mini-header-inner { flex-direction: column; gap: 4px; }
    .mini-header-left, .mini-header-right { width: 100%; justify-content: space-between; flex-direction: row; display: flex; }

    .product-sidebar { width: 100%; flex: 0 0 auto; max-height: none; }
}