/* ==========================================================================
   DESIGN SYSTEM & CUSTOM VARIABLES (DAYLIGHT LIGHT THEME)
   ========================================================================== */
:root {
    /* Color Palette - Fresh Clean Energy Vibe */
    --bg-main: #f8fafc;
    /* Light Slate/Sky clean background */
    --bg-card: rgba(255, 255, 255, 0.85);
    /* White Glassmorphism */
    --bg-header: rgba(255, 255, 255, 0.9);

    --primary: #059669;
    /* Fresh Active Emerald Green (Eco/Energy) */
    --primary-hover: #047857;
    --primary-glow: rgba(5, 150, 105, 0.12);

    --accent: #ea580c;
    /* Solar Sun Orange/Amber */
    --accent-glow: rgba(234, 88, 12, 0.12);

    --info: #2563eb;
    /* Sky Blue for home energy */
    --info-glow: rgba(37, 99, 235, 0.08);

    --text-main: #0f172a;
    /* Dark Slate for perfect contrast and readability */
    --text-muted: #475569;
    /* Soft slate gray */
    --border-color: rgba(226, 232, 240, 0.8);
    /* Crisp light border */
    --border-glow: rgba(5, 150, 105, 0.25);

    /* Font Families */
    --font-heading: 'Outfit', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Layout properties */
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

input,
button,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

/* Utilities */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.text-center {
    text-align: center;
}

.text-green {
    color: var(--primary);
    font-weight: 600;
}

.text-amber {
    color: var(--accent);
    font-weight: 600;
}

.text-blue {
    color: var(--info);
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-heading);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background: #fff;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.glass-card:hover {
    border-color: rgba(5, 150, 105, 0.2);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
}

.sub-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary);
    margin-bottom: 12px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 1.8rem;
    color: var(--accent);
    filter: drop-shadow(0 2px 4px var(--accent-glow));
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.5px;
}

.logo-text .highlight {
    color: var(--primary);
}

.nav-menu ul {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: 8px 0;
    position: relative;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link-btn {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 6px 16px;
    border-radius: 8px;
    white-space: nowrap;
}

.nav-link-btn:hover {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 10px var(--primary-glow);
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 16px;
}

.phone-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 150, 105, 0.06);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
}

.phone-btn:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.animate-phone {
    animation: ring 1.5s infinite;
}

@keyframes ring {

    0%,
    100% {
        transform: rotate(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: rotate(-10deg);
    }

    20%,
    40%,
    60%,
    80% {
        transform: rotate(10deg);
    }
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-main);
}

/* Mobile Nav Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(5px);
    z-index: 1000;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: flex-end;
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-content {
    width: 300px;
    height: 100%;
    background: #fff;
    border-left: 1px solid var(--border-color);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-close {
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
}

.mobile-close:hover {
    color: var(--text-main);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.mob-link {
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-muted);
}

.mob-link:hover {
    color: var(--primary);
}

.button-mob {
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    margin-top: 10px;
}

.button-mob:hover {
    background: var(--primary);
    color: #fff;
}

/* ==========================================================================
   HERO SECTION (Daylight Sun & Blue Sky Vibe)
   ========================================================================== */
.hero-section {
    padding: 160px 0 90px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #e0f2fe 0%, #f0fdf4 60%, var(--bg-main) 100%);
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 75% 20%, rgba(251, 191, 36, 0.12) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.hero-content .badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #0f172a;
    letter-spacing: -1px;
}

.hero-desc {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 35px;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 50px;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
}

.stat-item h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-unit {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 600;
    margin-left: 4px;
}

.stat-item p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Visual Card */
.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.main-visual-card {
    width: 360px;
    height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.08);
}

.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(5, 150, 105, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.solar-panel-3d {
    position: relative;
    width: 180px;
    height: 180px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: perspective(600px) rotateX(15deg) rotateY(-5deg);
}

.panel-icon-glow {
    font-size: 8rem;
    color: #f1f5f9;
    filter: drop-shadow(0 5px 15px rgba(5, 150, 105, 0.15));
    background: linear-gradient(135deg, #0284c7, #0369a1);
    /* Solar panel deep blue gradient */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.sun-glow {
    position: absolute;
    top: -20px;
    right: -20px;
    width: 65px;
    height: 65px;
    background: radial-gradient(circle, #fbbf24 20%, rgba(251, 191, 36, 0) 70%);
    filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.5));
    animation: pulse 4s infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }

    100% {
        transform: scale(1.15);
        opacity: 1;
    }
}

.visual-specs {
    width: 100%;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
}

.spec-label {
    color: var(--text-muted);
}

.spec-label i {
    margin-right: 6px;
}

.spec-value {
    font-weight: 700;
}

/* ==========================================================================
   SECTIONS GENERAL STYLE
   ========================================================================== */
.section {
    padding: 90px 0;
    position: relative;
}

.dark-bg {
    /* Alternative section styling - soft fresh green gradient background */
    background: linear-gradient(180deg, #f0fdf4 0%, #e6fcf0 100%);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-header {
    max-width: 700px;
    margin: 0 auto 55px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 15px;
    color: #0f172a;
}

.section-desc {
    color: var(--text-muted);
    font-size: 1rem;
}

/* ==========================================================================
   SECTION: TỰ ĐỘNG BÙ LƯỚI
   ========================================================================== */
.diagram-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 40px;
    align-items: stretch;
}

.diagram-controls {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.diagram-controls h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #0f172a;
}

.control-note {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 25px;
}

.control-group {
    margin-bottom: 25px;
}

.control-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.slider-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.bg-green {
    background: rgba(5, 150, 105, 0.1);
    color: var(--primary);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.bg-blue {
    background: rgba(37, 99, 235, 0.08);
    color: var(--info);
    border: 1px solid rgba(37, 99, 235, 0.15);
}

/* Range Slider Styling */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: #e2e8f0;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.4);
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.4);
}

#solar-slider::-webkit-slider-thumb {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.4);
}

#solar-slider::-moz-range-thumb {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.4);
}

#load-slider::-webkit-slider-thumb {
    background: var(--info);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3), 0 2px 8px rgba(37, 99, 235, 0.4);
}

#load-slider::-moz-range-thumb {
    background: var(--info);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3), 0 2px 8px rgba(37, 99, 235, 0.4);
}

#calc-bill::-webkit-slider-thumb {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.4);
}

#calc-bill::-moz-range-thumb {
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.3), 0 2px 8px rgba(5, 150, 105, 0.4);
}

#calc-load-slider::-webkit-slider-thumb {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.3), 0 2px 8px rgba(234, 88, 12, 0.4);
}

#calc-load-slider::-moz-range-thumb {
    background: var(--accent);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.3), 0 2px 8px rgba(234, 88, 12, 0.4);
}

/* Hover effects for sliders to make them feel highly interactive */
input[type="range"]:hover::-webkit-slider-thumb {
    transform: scale(1.15);
}

input[type="range"]:hover::-moz-range-thumb {
    transform: scale(1.15);
}

.status-box {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.status-box h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.status-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.status-metrics {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}

.metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
}

.metric span {
    color: var(--text-muted);
}

.metric strong {
    font-size: 1.1rem;
}

/* Interactive SVG Diagram */
.diagram-display {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

.svg-container {
    width: 100%;
    max-width: 500px;
}

/* Flow lines keyframe animations */
#flow-solar {
    animation: flowGreen 2s linear infinite;
}

#flow-grid {
    animation: flowAmber 2s linear infinite;
}

#flow-home {
    animation: flowBlue 1.5s linear infinite;
}

@keyframes flowGreen {
    to {
        stroke-dashoffset: -50;
    }
}

@keyframes flowAmber {
    to {
        stroke-dashoffset: -50;
    }
}

@keyframes flowBlue {
    to {
        stroke-dashoffset: -60;
    }
}

.svg-node {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.svg-node:hover {
    transform: scale(1.06);
}

/* ==========================================================================
   SECTION: KỸ THUẬT LẮP ĐẶT ATS
   ========================================================================== */
.tech-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.tech-card {
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

.tech-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
}

.tech-icon {
    width: 50px;
    height: 50px;
    background: rgba(5, 150, 105, 0.06);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.tech-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #0f172a;
}

.tech-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.tech-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.tech-details li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.tech-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.gallery-info h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 12px;
    color: #0f172a;
}

.gallery-info p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

.gallery-bullets {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.bullet-item {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    padding: 6px 12px;
    border-radius: 30px;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.gallery-visual {
    display: flex;
    justify-content: center;
}

.image-wrapper {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 4px solid #ffffff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.gallery-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: var(--transition);
}

.image-wrapper:hover .gallery-img {
    transform: scale(1.04);
}

.image-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

/* ==========================================================================
   SECTION: DỰ ÁN THỰC TẾ
   ========================================================================== */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 45px;
}

.filter-tab {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-family: var(--font-heading);
    cursor: pointer;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.03);
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.08);
}

.project-img-wrapper {
    position: relative;
    overflow: hidden;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.project-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.portfolio-card:hover .project-img {
    transform: scale(1.05);
}

.project-loc {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
}

.project-loc i {
    margin-right: 4px;
    color: var(--accent);
}

.project-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-tag {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.project-info h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #0f172a;
}

.project-info p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.project-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

.pm-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 0.8rem;
}

.pm-item span {
    color: var(--text-muted);
}

.pm-item strong {
    font-size: 0.95rem;
    color: var(--text-main);
}

/* ==========================================================================
   SECTION: SOLAR CALCULATOR
   ========================================================================== */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: stretch;
}

.calc-inputs {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-inputs h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #0f172a;
}

.calc-group {
    margin-bottom: 30px;
}

.calc-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.calc-group label strong {
    font-size: 1.2rem;
    color: var(--primary);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.radio-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.radio-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.01);
}

.radio-card input {
    display: none;
}

.radio-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.radio-content i {
    font-size: 1.5rem;
}

.radio-card:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.radio-card.active {
    border-color: var(--primary);
    background: rgba(5, 150, 105, 0.05);
}

.radio-card.active .radio-content {
    color: var(--primary);
}

/* Calculator Results Box */
.calc-results {
    background: #ffffff;
    border: 1px solid rgba(5, 150, 105, 0.2);
    box-shadow: 0 10px 30px rgba(5, 150, 105, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.results-glowing-effect {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    filter: blur(10px);
    pointer-events: none;
}

.calc-results h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    color: #0f172a;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.95rem;
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-main);
}

.result-label {
    color: var(--text-muted);
}

.result-value {
    font-weight: 700;
}

.total-saving-row {
    border-bottom: none;
    background: rgba(5, 150, 105, 0.05);
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid rgba(5, 150, 105, 0.15);
}

.total-saving-row .result-value {
    font-size: 1.15rem;
}

/* ==========================================================================
   SECTION: CONTACT & LEAD FORM
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 50px;
    align-items: center;
}

.contact-info h2 {
    font-family: var(--font-heading);
    font-size: 2.3rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.25;
    color: #0f172a;
}

.contact-info>p {
    color: var(--text-muted);
    margin-bottom: 35px;
    font-size: 1.05rem;
}

.info-details {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-detail-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.info-detail-item .icon {
    font-size: 1.4rem;
    color: var(--primary);
    background: rgba(5, 150, 105, 0.06);
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(5, 150, 105, 0.15);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-detail-item h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin-bottom: 4px;
    color: #0f172a;
}

.info-detail-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Form Styles */
.contact-form-container {
    background: #ffffff;
    border-color: var(--border-color);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.04);
}

.contact-form-container h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: #0f172a;
}

.lead-form {
    margin-top: 25px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.form-group label .required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-main);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 8px var(--primary-glow);
}

.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.password-wrapper input {
    padding-right: 45px !important;
    width: 100%;
}

.password-toggle-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    width: 24px;
    height: 24px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle-btn:hover {
    color: var(--primary);
}


/* Spinner anim */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success alert box */
.success-alert {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 10px;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.success-icon {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.success-alert h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: #0f172a;
}

.success-alert p {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 320px;
}

/* ==========================================================================
   FOOTER AREA (Warm Slate daylight ending)
   ========================================================================== */
.footer-area {
    background-color: #0f172a;
    /* Keeping dark footer for modern high-contrast design grounding */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 80px 0 30px;
    color: #f8fafc;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 25px;
    max-width: 300px;
}

.social-links {
    display: flex;
    gap: 12px;
}

.social-link {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #f8fafc;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-3px);
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #ffffff;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #94a3b8;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 0.9rem;
    color: #94a3b8;
}

.footer-contact p {
    color: #94a3b8;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact strong {
    color: #fff;
}

.footer-contact i {
    color: var(--primary);
    margin-top: 4px;
}

.footer-contact a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    color: #64748b;
    font-size: 0.8rem;
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVE DESIGN)
   ========================================================================== */
@media (max-width: 1200px) {
    .nav-menu ul {
        gap: 16px;
    }
    .nav-link {
        font-size: 0.88rem;
    }
    .nav-link-btn {
        padding: 5px 12px;
        font-size: 0.88rem;
    }
    .phone-btn {
        padding: 8px 14px;
        font-size: 0.85rem;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 60px;
    }

    .hero-content {
        align-items: center;
    }

    .hero-visual {
        order: -1;
    }

    .tech-cards-grid {
        grid-template-columns: 1fr;
    }

    .tech-gallery {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calculator-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .hero-content h1 {
        font-size: 2.3rem;
    }

    .diagram-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .radio-cards {
        grid-template-columns: 1fr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   NEWS / ARTICLES SECTION
   ========================================================================== */
.news-section {
    background: var(--bg-main);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 48px;
}

.news-card {
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    cursor: default;
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(5, 150, 105, 0.12);
    border-color: var(--border-glow);
}

.news-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-img {
    transform: scale(1.04);
}

.news-cat-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.news-body {
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.news-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-excerpt {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.news-meta i {
    color: var(--primary);
}

/* ==========================================================================
   PRODUCTS SECTION
   ========================================================================== */
.san-pham-section {
    background: var(--bg-main);
    border-top: 1px solid var(--border-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

.product-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.03);
    transition: var(--transition);
    border-radius: var(--border-radius);
    overflow: hidden;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(5, 150, 105, 0.1);
    border-color: var(--border-glow);
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.15);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* ==========================================================================
   REUSABLE DETAIL MODAL
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #ffffff;
    max-width: 750px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border-radius: 16px;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
    background: none;
    border: none;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: var(--primary) !important;
}

.article-content-body {
    white-space: pre-wrap;
}

@media (max-width: 768px) {
    .modal-card {
        padding: 20px 15px;
    }
}