/* ============================================================
   G-GROUP — Design System Global Styles
   UI UX Pro Max | Liquid Glass + Enterprise Gateway
   ============================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* ---- CSS Custom Properties ---- */
:root {
  /* Colors */
  --color-primary: #0F172A;
  --color-secondary: #334155;
  --color-cta: #0369A1;
  --color-cta-hover: #0284C7;
  --color-background: #F8FAFC;
  --color-text: #020617;
  --color-text-light: #64748B;
  --color-white: #FFFFFF;
  --color-border: #E2E8F0;
  --color-surface: #FFFFFF;
  --color-surface-glass: rgba(255, 255, 255, 0.7);

  /* G-THERM specific */
  --gtherm-primary: #0C4A6E;
  --gtherm-accent: #0369A1;
  --gtherm-light: #E0F2FE;
  --gtherm-gradient: linear-gradient(135deg, #0C4A6E 0%, #0369A1 100%);

  /* G-RENOV specific */
  --grenov-primary: #1E3A5F;
  --grenov-accent: #2563EB;
  --grenov-light: #DBEAFE;
  --grenov-gradient: linear-gradient(135deg, #1E3A5F 0%, #2563EB 100%);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.12), 0 10px 10px rgba(0, 0, 0, 0.04);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.08);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-smooth: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fluid: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font-heading: 'Poppins', sans-serif;
  --font-body: 'Open Sans', sans-serif;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-primary);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p {
  color: var(--color-secondary);
  max-width: 65ch;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-base);
  cursor: pointer;
}

a:hover {
  color: var(--color-cta);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol {
  list-style: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

/* Focus states for a11y */
:focus-visible {
  outline: 2px solid var(--color-cta);
  outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ---- Utility Classes ---- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 768px) {
  .container { padding: 0 var(--space-lg); }
}

@media (min-width: 1024px) {
  .container { padding: 0 var(--space-xl); }
}

.section {
  padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
  .section { padding: var(--space-4xl) 0; }
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section-header h2 {
  margin-bottom: var(--space-md);
}

.section-header p {
  margin: 0 auto;
  font-size: 1.1rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-cta);
  margin-bottom: var(--space-sm);
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-smooth);
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-cta);
  color: var(--color-white);
  box-shadow: 0 4px 14px rgba(3, 105, 161, 0.35);
}

.btn-primary:hover {
  background: var(--color-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(3, 105, 161, 0.45);
  color: var(--color-white);
}

.btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--color-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-md);
}

.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--color-cta);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.05rem;
  border-radius: var(--radius-lg);
}

.btn svg, .btn .btn-icon {
  width: 20px;
  height: 20px;
}

/* ---- Cards ---- */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-smooth);
  border: 1px solid var(--color-border);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: transparent;
}

.card-glass {
  background: var(--color-surface-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-glass);
  transition: all var(--transition-smooth);
}

.card-glass:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.85);
}

/* ---- Icon Containers ---- */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
  flex-shrink: 0;
}

.icon-box svg {
  width: 28px;
  height: 28px;
}

.icon-box-blue {
  background: var(--gtherm-light);
  color: var(--gtherm-accent);
}

.icon-box-navy {
  background: rgba(15, 23, 42, 0.08);
  color: var(--color-primary);
}

/* ---- Forms ---- */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
  color: var(--color-primary);
}

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-cta);
  box-shadow: 0 0 0 3px rgba(3, 105, 161, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-light);
}

/* ---- Grid Layouts ---- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Navigation (shared structure) ---- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  transition: all var(--transition-smooth);
  padding: var(--space-md) 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-md);
  padding: var(--space-sm) 0;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}

.navbar-logo span {
  color: var(--color-cta);
}

.navbar-links {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

.navbar-links a {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--color-secondary);
  position: relative;
  padding: var(--space-xs) 0;
}

.navbar-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-cta);
  transition: width var(--transition-smooth);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
  width: 100%;
}

.navbar-links a:hover,
.navbar-links a.active {
  color: var(--color-cta);
}

@media (min-width: 1024px) {
  .navbar-links {
    display: flex;
  }
}

/* Mobile menu toggle */
.menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: var(--space-xs);
  z-index: 60;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: all var(--transition-smooth);
  border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

@media (min-width: 1024px) {
  .menu-toggle { display: none; }
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 380px;
  height: 100vh;
  background: var(--color-white);
  z-index: 55;
  padding: 100px var(--space-xl) var(--space-xl);
  transition: right var(--transition-fluid);
  box-shadow: var(--shadow-xl);
}

.mobile-menu.open {
  right: 0;
}

.mobile-menu a {
  display: block;
  padding: var(--space-md) 0;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.1rem;
  color: var(--color-secondary);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu a:hover {
  color: var(--color-cta);
}

.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 52;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-smooth);
}

.mobile-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ---- Footer ---- */
.footer {
  background: var(--color-primary);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--space-3xl) 0 var(--space-xl);
}

.footer h4 {
  color: var(--color-white);
  margin-bottom: var(--space-lg);
  font-size: 1.1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
  display: block;
  padding: var(--space-xs) 0;
}

.footer a:hover {
  color: var(--color-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  margin-top: var(--space-md);
  font-size: 0.95rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.footer-social {
  display: flex;
  gap: var(--space-md);
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.footer-social a:hover {
  background: var(--color-cta);
  color: var(--color-white);
  transform: translateY(-2px);
}

.footer-social a svg {
  width: 18px;
  height: 18px;
}

/* ---- Animations & Scroll Reveal ---- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }

/* Floating animation */
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
}

.float { animation: float 4s ease-in-out infinite; }

/* Pulse glow */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(3, 105, 161, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(3, 105, 161, 0); }
}

/* Gradient shift */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Stats Counter ---- */
.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--color-cta);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-label {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  font-family: var(--font-heading);
}

.badge-blue {
  background: var(--gtherm-light);
  color: var(--gtherm-accent);
}

.badge-navy {
  background: rgba(15, 23, 42, 0.06);
  color: var(--color-primary);
}

/* ---- Testimonial ---- */
.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  position: relative;
}

.testimonial-card::before {
  content: '\201C';
  font-size: 4rem;
  font-family: Georgia, serif;
  color: var(--color-cta);
  opacity: 0.15;
  position: absolute;
  top: 16px;
  left: 24px;
  line-height: 1;
}

.testimonial-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-secondary);
  margin-bottom: var(--space-lg);
  font-style: italic;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--gtherm-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gtherm-accent);
  font-family: var(--font-heading);
}

.testimonial-name {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* ---- CTA Banner ---- */
.cta-banner {
  background: var(--color-primary);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(3, 105, 161, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
  position: relative;
  z-index: 1;
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
  margin: 0 auto var(--space-xl);
  position: relative;
  z-index: 1;
}

.cta-banner .btn {
  position: relative;
  z-index: 1;
}

/* ---- Page Hero ---- */
.page-hero {
  padding: 160px 0 80px;
  background: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(3, 105, 161, 0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(3, 105, 161, 0.15) 0%, transparent 60%);
}

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

.page-hero h1 {
  color: var(--color-white);
  margin-bottom: var(--space-md);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.15rem;
}

.page-hero .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  font-size: 0.9rem;
}

.page-hero .breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
}

.page-hero .breadcrumb a:hover {
  color: var(--color-white);
}

.page-hero .breadcrumb .separator {
  color: rgba(255, 255, 255, 0.3);
}

.page-hero .breadcrumb .current {
  color: var(--color-white);
  font-weight: 500;
}

/* ---- Responsive text alignment ---- */
.text-center { text-align: center; }
.text-left { text-align: left; }

@media (max-width: 767px) {
  .md-text-center { text-align: center; }
}

/* ---- Preloader ---- */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #F0F4F8;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.preloader-logo img {
  height: 80px;
  width: auto;
}
