/*
Theme Name: Dunshan AI
Theme URI: https://dunshan.ai
Author: Dunshan Team
Author URI: https://dunshan.ai
Description: A WordPress theme for Dunshan AI, converted from React.
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dunshanai
*/

/* Custom utilities for nav height */
:root {
    --nav-height: 80px; /* Default nav height */
}

/* WordPress admin bar support */
html {
    --wp-admin--admin-bar--height: 32px;
    scroll-padding-top: var(--wp-admin--admin-bar--height);
}

/* Navigation height utilities */
.h-nav-height {
    height: var(--nav-height);
}

/* Header overlay behavior - header should overlay content */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: transparent;
    box-shadow: none;
    transition: all 0.3s ease;
}

/* Glassmorphism effect when scrolled */
.header-scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Case study card filtering transitions */
.case-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Header text color transitions */
.site-header .text-heading-sub {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s ease;
}

.header-scrolled .text-heading-sub {
    color: rgba(51, 65, 85, 0.8);
}

.header-scrolled .text-heading-sub:hover {
    color: var(--primary, #3b82f6);
}

/* Logo color transition */
.site-header img {
    filter: brightness(0) invert(1);
    transition: filter 0.3s ease;
}

.header-scrolled img {
    filter: none;
}

/* Adjust header position for WordPress admin bar when logged in */
.admin-bar .site-header {
    top: var(--wp-admin--admin-bar--height);
}

/* For mobile admin bar */
@media screen and (max-width: 782px) {
    html {
        --wp-admin--admin-bar--height: 46px;
    }
    
    .admin-bar .site-header {
        top: var(--wp-admin--admin-bar--height);
    }
}

@media screen and (max-width: 600px) {
    .admin-bar {
        position: unset !important;
    }
}

/* Utility Overrides */
.text-white {
    color: #ffffff !important;
}

/* Contact Form Button - Ensure white text */
#contact-form button[type="submit"] {
    color: #ffffff !important;
}
