/*
 Theme Name:   Korea Energy Solar
 Theme URI:    https://koreaenergy.kr
 Description:  Premium solar energy theme based on Astra - Editorial design system
 Author:       Korea Energy
 Author URI:   https://koreaenergy.kr
 Template:     astra
 Version:      1.2.1
 Text Domain:  koreaenergy-child
*/

/* ===== Design System: "The Solar Editorial" ===== */

:root {
    /* Primary Palette */
    --ke-primary: #1a3a5c;
    --ke-primary-dark: #00450d;
    --ke-primary-container: #1b5e20;
    --ke-on-primary: #ffffff;

    /* Surface Hierarchy */
    --ke-surface: #f8fafc;
    --ke-surface-container-low: #f2f4f6;
    --ke-surface-container: #eceeef;
    --ke-surface-container-high: #e6e9ea;
    --ke-surface-container-lowest: #ffffff;

    /* Tertiary (Solar Flare CTA) */
    --ke-tertiary: #662800;
    --ke-on-tertiary: #ffffff;

    /* Text */
    --ke-on-surface: #191c1b;
    --ke-outline: #717a6d;
    --ke-outline-variant: #c0c9bb;

    /* Glassmorphism */
    --ke-glass-bg: rgba(255, 255, 255, 0.75);
    --ke-glass-blur: 24px;

    /* Shadows */
    --ke-shadow-ambient: 0px 20px 40px rgba(25, 28, 27, 0.06);
}

/* ===== Typography ===== */
body {
    font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--ke-on-surface);
    background-color: var(--ke-surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Pretendard', 'Manrope', sans-serif;
    letter-spacing: -0.02em;
    color: var(--ke-on-surface);
}

/* Display Scale */
.ke-display-lg {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.ke-display-md {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ===== No-Line Rule: No borders for sectioning ===== */
.ke-section-alt {
    background-color: var(--ke-surface-container-low);
}

.ke-section-elevated {
    background-color: var(--ke-surface-container-lowest);
    box-shadow: var(--ke-shadow-ambient);
}

/* ===== Glassmorphism ===== */
.ke-glass {
    background: var(--ke-glass-bg);
    backdrop-filter: blur(var(--ke-glass-blur));
    -webkit-backdrop-filter: blur(var(--ke-glass-blur));
}

/* ===== Solar Gradient ===== */
.ke-solar-gradient {
    background: linear-gradient(135deg, var(--ke-primary) 0%, #2a4a6c 100%);
}

.ke-eco-gradient {
    background: linear-gradient(135deg, var(--ke-primary-dark) 0%, var(--ke-primary-container) 100%);
}

/* ===== Service Cards ===== */
.ke-card {
    background: var(--ke-surface-container-lowest);
    padding: 2.75rem;
    border-radius: 0.75rem;
    border: none;
    transition: all 300ms ease-out;
}

.ke-card:hover {
    background: var(--ke-surface);
    box-shadow: var(--ke-shadow-ambient);
    transform: translateY(-4px);
}

/* ===== Buttons ===== */
.ke-btn-primary {
    background: var(--ke-tertiary);
    color: var(--ke-on-tertiary);
    border-radius: 0.75rem;
    padding: 0.875rem 2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 200ms ease;
}

.ke-btn-primary:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.ke-btn-secondary {
    background: transparent;
    color: var(--ke-primary);
    border: 1px solid rgba(192, 201, 187, 0.15);
    border-radius: 0.75rem;
    padding: 0.875rem 2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 200ms ease;
}

/* ===== Navigation ===== */
.ke-nav {
    background: var(--ke-primary);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* ===== Hero Section ===== */
.ke-hero {
    min-height: 95vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.ke-hero-overlay {
    background: linear-gradient(to right, rgba(255,255,255,0.9), rgba(255,255,255,0.4), transparent);
}

/* ===== Trust Badges ===== */
.ke-trust-badge {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

/* ===== Form Inputs ===== */
.ke-input {
    background: var(--ke-surface-container-low);
    border: none;
    border-bottom: 2px solid transparent;
    padding: 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
    transition: all 200ms ease;
    width: 100%;
}

.ke-input:focus {
    background: var(--ke-surface-container-lowest);
    border-bottom-color: var(--ke-primary);
    outline: none;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .ke-card {
        padding: 1.5rem;
    }

    .ke-hero {
        min-height: 80vh;
    }
}

/* ===== Astra Overrides ===== */

/* Override Astra header color variables */
.ast-primary-header-bar,
.ast-primary-header-bar.ast-primary-header {
    --ast-global-color-0: #ffffff !important;
    --ast-global-color-1: #ffffff !important;
    --ast-global-color-2: #ffffff !important;
    --ast-global-color-3: #ffffff !important;
    --ast-global-color-primary: #1a3a5c !important;
    --ast-global-color-4: #1a3a5c !important;
    background-color: #1a3a5c !important;
    border-bottom: none !important;
}

.ast-container {
    max-width: 1280px;
}

.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
    background: var(--ke-surface-container-lowest);
    border: none;
    box-shadow: var(--ke-shadow-ambient);
    border-radius: 0.75rem;
}

.main-header-bar {
    background: var(--ke-primary) !important;
    border: none !important;
}

/* Header Logo (Astra custom_logo) */
.ast-site-identity {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem;
}

.site-logo-img {
    flex-shrink: 0;
    max-width: 44px !important;
}

.ast-primary-header-bar .site-logo-img img,
.ast-primary-header-bar .custom-logo-link img,
.ast-primary-header-bar img.custom-logo,
img.custom-logo {
    max-height: 44px !important;
    max-width: 44px !important;
    width: 44px !important;
    height: 44px !important;
    object-fit: contain !important;
    border-radius: 50%;
}

/* Site title - 흰색 + 왼쪽 여백 */
.site-title a,
.site-header .site-title a,
.ast-site-identity .site-title a {
    color: #ffffff !important;
}

.site-header-primary-section-left,
.site-header-section-left {
    padding-left: 2rem !important;
}

/* 헤더 배경 */
.ast-primary-header-bar,
.ast-primary-header,
.main-header-bar,
.ast-primary-header-bar.ast-primary-header {
    background-color: #1a3a5c !important;
    border-bottom: none !important;
}

/* 메뉴 글씨 흰색 */
.main-header-menu .menu-link,
.main-header-menu .menu-item > .menu-link,
.ast-builder-menu-1 .menu-item > .menu-link,
.ast-nav-menu .menu-link {
    color: #ffffff !important;
}

.main-header-menu .menu-item:hover > .menu-link,
.main-header-menu .menu-item.current-menu-item > .menu-link {
    color: #ffffff !important;
}

/* Force all header links white - any state */
.ast-primary-header-bar a,
.ast-primary-header-bar a:visited,
.ast-primary-header-bar a:active,
.ast-primary-header-bar .menu-link,
.ast-primary-header-bar .current-menu-item > .menu-link,
.ast-primary-header-bar .current_page_item > .menu-link,
.ast-primary-header-bar .current-menu-ancestor > .menu-link,
.ast-builder-menu-1 .menu-item > .menu-link,
.ast-builder-menu-1 .menu-item.current-menu-item > .menu-link,
.ast-builder-menu-1 .current-menu-ancestor > .menu-link {
    color: #ffffff !important;
}
