/* ============================================
   SUNPOWER SOLAR — Tech-Driven Design System
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600;800;900&family=Kanit:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0f2027;       /* Tech Navy Blue */
  --primary-light: #203a43;
  --secondary: #f2c94c;     /* Sun Energy Yellow */
  --secondary-hover: #f1b31a;
  --accent: #27ae60;        /* Eco Green */
  --bg-white: #ffffff;
  --bg-light: #f0f8ff;      /* Soft Light Blue */
  --text-dark: #0f2027;
  --text-body: #4a5568;
  
  --line-green: #06C755;
  --glow-line: rgba(6, 199, 85, 0.4);
  --glow-tech: rgba(242, 201, 76, 0.6);

  --font-en: 'Exo 2', sans-serif;
  --font-th: 'Kanit', sans-serif;

  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 4rem;
  
  --shadow-sm: 0 4px 15px rgba(15, 32, 39, 0.08); 
  --shadow-md: 0 10px 30px rgba(15, 32, 39, 0.15);
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-full: 50px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-th);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

h1, h2, h3, h4 { color: var(--text-dark); font-weight: 600; line-height: 1.3; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-sm); }
.section { padding: var(--space-xl) 0; }
.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-family: var(--font-th);
}

.btn-yellow { background: var(--secondary); color: var(--primary); }
.btn-yellow:hover { background: var(--secondary-hover); transform: translateY(-3px); box-shadow: 0 0 20px var(--glow-tech); }

.btn-outline-white { background: transparent; color: var(--bg-white); border: 2px solid var(--bg-white); }
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--secondary); color: var(--secondary); transform: translateY(-3px); }

.title-accent {
  display: inline-block;
  color: var(--accent);
  background: rgba(39, 174, 96, 0.1);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header { position: sticky; top: 0; z-index: 1000; background: var(--bg-white); box-shadow: var(--shadow-sm); }

.top-bar { background: var(--primary); color: var(--bg-white); padding: 8px 0; font-size: 0.95rem; font-weight: 400; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-contact { display: flex; gap: 24px; align-items: center; }
.top-contact a { display: flex; align-items: center; gap: 6px; }
.top-contact a:hover { color: var(--secondary); }
.top-contact svg { width: 16px; height: 16px; fill: currentColor; }

.badge-survey { background: var(--secondary); color: var(--primary); padding: 4px 12px; border-radius: 4px; font-weight: 600; font-size: 0.85rem; display: flex; align-items: center; gap: 4px; }

.main-nav { padding: 12px 0; border-bottom: 1px solid rgba(0,0,0,0.05); }
.main-nav .container { display: flex; justify-content: space-between; align-items: center; }

.brand-logo { color: var(--primary); font-family: var(--font-en); font-size: 1.7rem; font-weight: 900; display: flex; align-items: center; gap: 10px; }
.brand-logo svg { width: 34px; height: 34px; fill: var(--secondary); }
.brand-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 500; color: var(--text-dark); font-size: 1.05rem; }
.nav-links a:hover { color: var(--accent); }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { width: 28px; height: 3px; background: var(--primary); border-radius: 2px; }

/* ============================================
   HERO BANNER
   ============================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--primary);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url('images/hero.jpg');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(15, 32, 39, 0.85) 0%, rgba(15, 32, 39, 0.4) 100%);
  z-index: 2;
}

.hero .container { position: relative; z-index: 3; }

.hero-content { 
  max-width: 700px; 
  background: rgba(15, 32, 39, 0.6); 
  backdrop-filter: blur(10px); 
  -webkit-backdrop-filter: blur(10px);
  padding: 50px; 
  border-radius: var(--radius-md);
  border-left: 5px solid var(--accent);
  box-shadow: 0 0 30px rgba(0,0,0,0.5);
  animation: techFadeIn 1.2s ease forwards;
}

@keyframes techFadeIn { from { opacity: 0; transform: translateY(20px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }

.hero-title { font-size: clamp(2.2rem, 4vw, 3.5rem); color: var(--bg-white); margin-bottom: 20px; text-shadow: 0 4px 10px rgba(0,0,0,0.5); }
.hero-subtitle { font-size: 1.2rem; color: #e2e8f0; margin-bottom: 40px; font-weight: 300; }

.hero-buttons { display: flex; gap: 15px; flex-wrap: wrap; }

/* ============================================
   THE PAIN POINT KILLER
   ============================================ */
.pain-section { background: var(--bg-white); position: relative; z-index: 10; margin-top: -40px; }

.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; box-shadow: var(--shadow-md); border-radius: var(--radius-md); background: var(--bg-white); padding: 40px; border: 1px solid #e2e8f0; }

.pain-item { text-align: center; }
.pain-icon { width: 80px; height: 80px; background: var(--bg-light); border-radius: 50%; color: var(--primary); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; transition: all 0.4s; }
.pain-icon svg { width: 36px; height: 36px; fill: currentColor; }
.pain-item:hover .pain-icon { background: var(--primary); color: var(--secondary); box-shadow: 0 0 15px var(--glow-tech); }

.pain-item h3 { font-size: 1.3rem; margin-bottom: 10px; }

/* ============================================
   OUR SOLUTIONS
   ============================================ */
.solutions { background: var(--bg-light); }

.sol-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin-top: 50px; }

.sol-card { background: var(--bg-white); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); transition: all 0.3s; position: relative; }
.sol-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-md); }
.sol-card::after { content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: var(--primary); transform: scaleX(0); transition: transform 0.3s; transform-origin: left; }
.sol-card:hover::after { transform: scaleX(1); }

.sol-img { width: 100%; aspect-ratio: 4/3; }
.sol-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.sol-info { padding: 25px; }
.sol-info h3 { font-size: 1.2rem; margin-bottom: 10px; color: var(--primary); }
.sol-badge { display: inline-block; background: rgba(39, 174, 96, 0.1); color: var(--accent); padding: 4px 10px; border-radius: 4px; font-size: 0.85rem; font-weight: 600; }

/* ============================================
   RECENT INSTALLATIONS
   ============================================ */
.projects { background: var(--bg-white); }

.port-grid { display: flex; flex-wrap: wrap; gap: 15px; margin-top: 50px; }

.port-item { position: relative; flex: 1 1 calc(33.333% - 15px); min-width: 300px; aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-sm); }
.port-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.port-item:hover img { transform: scale(1.05); }

.save-tag { position: absolute; bottom: 20px; left: 20px; background: var(--accent); color: var(--bg-white); padding: 8px 16px; font-size: 0.95rem; font-weight: 600; border-radius: 4px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 2; display: flex; align-items: center; gap: 6px; }
.save-tag svg { width: 16px; height: 16px; fill: currentColor; }

/* ============================================
   WORK PROCESS
   ============================================ */
.process { background: var(--primary); color: var(--bg-white); position: relative; }
.process::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('https://www.transparenttextures.com/patterns/cubes.png'); opacity: 0.05; }

.process .container { position: relative; z-index: 2; }
.process .text-center h2 { color: var(--bg-white); }

.process-flex { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 60px; position: relative; }
.process-flex::before { content: ''; position: absolute; top: 40px; left: 10%; right: 10%; height: 2px; background: rgba(255,255,255,0.1); z-index: 1; border-top: 2px dashed rgba(242, 201, 76, 0.3); }

.p-step { text-align: center; position: relative; z-index: 2; width: 22%; }
.p-icon { width: 80px; height: 80px; background: var(--primary-light); border: 2px solid var(--secondary); color: var(--secondary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; box-shadow: 0 0 15px rgba(242, 201, 76, 0.2); transition: all 0.3s; }
.p-icon svg { width: 36px; height: 36px; fill: currentColor; }
.p-step:hover .p-icon { background: var(--secondary); color: var(--primary); box-shadow: 0 0 25px var(--glow-tech); transform: scale(1.1); }

.p-step h3 { color: var(--bg-white); font-size: 1.15rem; margin-bottom: 10px; }
.p-step p { color: #a0aec0; font-size: 0.95rem; }

/* ============================================
   LOCATION & CONTACT (FOOTER)
   ============================================ */
.footer { background: var(--primary-light); color: #e2e8f0; padding: var(--space-xl) 0 0; }

.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 50px; }

.footer-col h3 { color: var(--secondary); font-size: 1.5rem; margin-bottom: 25px; }

.f-address { display: flex; gap: 15px; margin-bottom: 20px; font-size: 1.05rem; }
.f-address svg { width: 24px; height: 24px; fill: var(--secondary); flex-shrink: 0; margin-top: 3px; }

.youtube-link { display: inline-flex; align-items: center; gap: 10px; background: #ff0000; color: white; padding: 10px 20px; border-radius: var(--radius-sm); font-weight: 600; margin-top: 15px; }
.youtube-link:hover { opacity: 0.9; }
.youtube-link svg { width: 24px; height: 24px; fill: currentColor; }

.contact-list { display: flex; flex-direction: column; gap: 15px; }
.c-item { display: flex; align-items: center; gap: 15px; font-size: 1.15rem; font-weight: 600; color: var(--bg-white); }
.c-icon { width: 45px; height: 45px; background: rgba(255,255,255,0.05); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--secondary); border: 1px solid rgba(255,255,255,0.1); }
.c-icon svg { width: 20px; height: 20px; fill: currentColor; }

.footer-bottom { background: var(--primary); text-align: center; padding: 25px 0; color: rgba(255,255,255,0.5); font-size: 0.9rem; }

/* ============================================
   MANDATORY MASSIVE LINE CTA
   ============================================ */
.float-line-huge {
  position: fixed;
  bottom: 20px; right: 20px;
  background: var(--line-green); color: var(--bg-white);
  font-size: 1.3rem; font-weight: 600;
  padding: 18px 40px;
  border-radius: var(--radius-full);
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 0 30px var(--glow-line), 0 10px 20px rgba(0,0,0,0.25);
  border: 4px solid var(--bg-white);
  z-index: 9999;
  animation: techPulse 2s infinite;
}

.float-line-huge svg { width: 34px; height: 34px; fill: currentColor; }

@keyframes techPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 20px rgba(6, 199, 85, 0.4), 0 8px 15px rgba(0,0,0,0.15); }
  50% { transform: scale(1.03); box-shadow: 0 0 45px rgba(6, 199, 85, 0.7), 0 12px 25px rgba(0,0,0,0.25); border-color: #f0f8ff; }
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
  .hero-content { background: rgba(15, 32, 39, 0.85); padding: 40px 30px; }
  .pain-grid { grid-template-columns: repeat(2, 1fr); padding: 30px; }
  .sol-grid { grid-template-columns: repeat(2, 1fr); }
  .port-item { flex: 1 1 calc(50% - 15px); }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .float-line-huge { font-size: 1.15rem; padding: 15px 30px; border-width: 3px; }
}

@media (max-width: 768px) {
  .top-bar { display: none; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .main-nav .btn-yellow { display: none; }
  
  .pain-section { margin-top: 0; padding-top: 40px; }
  .pain-grid { grid-template-columns: 1fr; box-shadow: none; border: none; padding: 10px; }
  
  .hero-title { font-size: 2.2rem; }
  .hero-buttons { flex-direction: column; width: 100%; }
  .hero-buttons .btn { width: 100%; justify-content: center; }
  
  .sol-grid { grid-template-columns: 1fr; }
  .port-item { flex: 1 1 100%; }
  
  .process-flex { flex-direction: column; gap: 30px; align-items: center; }
  .process-flex::before { display: none; }
  .p-step { width: 100%; max-width: 300px; }
  
  .float-line-huge { font-size: 1rem; padding: 12px 20px; bottom: 15px; right: 15px; border-width: 2px; }
  .float-line-huge svg { width: 28px; height: 28px; }
}
