/*
Theme Name: Tera-Gateway Synergies
Theme URI: https://www.teragatewaysynergies.com
Author: Tera-Gateway Synergies
Author URI: https://www.teragatewaysynergies.com
Description: Custom WordPress theme for Tera-Gateway Synergies IT Consultancy - built to match the official brand mockup. Features a navy/red palette, hero diagonal sweep, services grid, stats bar, and full responsive layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: Proprietary
License URI: #
Text Domain: tgs-theme
Tags: custom-logo, custom-menu, full-width-template, footer-widgets, business
*/

/* ============================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ============================================================ */
:root {
  --tgs-navy:      #1A3C8F;
  --tgs-dark-navy: #0D1B4B;
  --tgs-red:       #E63329;
  --tgs-blue-mid:  #2357C5;
  --tgs-light-bg:  #F5F7FF;
  --tgs-white:     #FFFFFF;
  --tgs-text:      #2C2C2C;
  --tgs-muted:     #5A6A7E;
  --tgs-border:    #DDE3F0;
  --tgs-icon-bg:   #1A3C8F;

  --font-display: 'Poppins', sans-serif;
  --font-body:    'Inter', sans-serif;

  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  16px;
  --radius-full: 50px;

  --shadow-card: 0 4px 20px rgba(26,60,143,0.08);
  --shadow-hover: 0 8px 32px rgba(26,60,143,0.16);

  --max-w: 1200px;
  --section-py: 80px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--tgs-text);
  background: var(--tgs-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section-py { padding: var(--section-py) 0; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--tgs-dark-navy);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.15rem; }
h4 { font-size: 1rem; }

p { color: var(--tgs-muted); line-height: 1.7; }

.accent-red    { color: var(--tgs-red); }
.accent-blue   { color: var(--tgs-navy); }
.text-white    { color: var(--tgs-white) !important; }
.text-center   { text-align: center; }

.section-label {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tgs-navy);
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--tgs-dark-navy);
  margin-bottom: 16px;
}

.section-divider {
  width: 48px;
  height: 3px;
  background: var(--tgs-red);
  margin: 0 auto 16px;
  border-radius: 2px;
}

.section-divider.left { margin-left: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--tgs-navy);
  color: var(--tgs-white);
  border-color: var(--tgs-navy);
}
.btn-primary:hover {
  background: var(--tgs-dark-navy);
  border-color: var(--tgs-dark-navy);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26,60,143,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--tgs-navy);
  border-color: var(--tgs-navy);
}
.btn-outline:hover {
  background: var(--tgs-navy);
  color: var(--tgs-white);
}

.btn-white {
  background: var(--tgs-white);
  color: var(--tgs-navy);
  border-color: var(--tgs-white);
}
.btn-white:hover {
  background: transparent;
  color: var(--tgs-white);
}

.btn-arrow::after {
  content: '›';
  font-size: 1.2em;
  line-height: 1;
}

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
#site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--tgs-white);
  box-shadow: 0 2px 16px rgba(0,0,0,0.08);
  transition: box-shadow 0.3s;
}

#site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

/* Logo */
.site-logo { display: flex; align-items: center; gap: 10px; }
.site-logo img { height: 48px; width: auto; }
.site-logo-text {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--tgs-navy);
}
.site-logo-text span { color: var(--tgs-red); }

/* Nav */
#primary-nav { display: flex; align-items: center; gap: 32px; }

#primary-nav a {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--tgs-text);
  padding: 6px 0;
  position: relative;
  transition: color 0.2s;
}

#primary-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--tgs-navy);
  transition: width 0.25s;
}

#primary-nav a:hover,
#primary-nav .current-menu-item a { color: var(--tgs-navy); }
#primary-nav a:hover::after,
#primary-nav .current-menu-item a::after { width: 100%; }

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px; height: 2px;
  background: var(--tgs-navy);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
#hero {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  display: flex;
  align-items: center;
  background: var(--tgs-white);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: 580px;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 80px 0;
}

.hero-content h1 { margin-bottom: 20px; }

.hero-content p {
  font-size: 1rem;
  color: var(--tgs-muted);
  max-width: 420px;
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.hero-badges {
  display: flex;
  gap: 24px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--tgs-border);
}

.hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.hero-badge .badge-icon {
  width: 52px; height: 52px;
  border: 2px solid var(--tgs-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tgs-navy);
  font-size: 1.3rem;
}

.hero-badge .badge-label {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tgs-muted);
}

/* Hero image with diagonal sweep */
.hero-image-wrap {
  position: relative;
  height: 100%;
  min-height: 580px;
}

.hero-image-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--tgs-navy) 0%, var(--tgs-blue-mid) 60%, #3d7bd4 100%);
  clip-path: polygon(8% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 1;
}

.hero-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  clip-path: polygon(8% 0%, 100% 0%, 100% 100%, 0% 100%);
  z-index: 2;
  opacity: 0.45;
  mix-blend-mode: luminosity;
}

/* Tech icon overlays on hero image */
.hero-tech-icons {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
#services { background: var(--tgs-white); }

.services-header { text-align: center; margin-bottom: 48px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--tgs-white);
  border: 1px solid var(--tgs-border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: default;
}

.service-card:hover {
  border-color: var(--tgs-navy);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.service-icon {
  width: 64px; height: 64px;
  background: var(--tgs-navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--tgs-white);
  font-size: 1.5rem;
  transition: background 0.3s;
}

.service-card:hover .service-icon { background: var(--tgs-red); }

.service-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--tgs-dark-navy);
  margin-bottom: 10px;
}

.service-card p {
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--tgs-muted);
}

/* ============================================================
   STATS BAR
   ============================================================ */
#stats-bar {
  background: linear-gradient(135deg, var(--tgs-dark-navy) 0%, var(--tgs-navy) 100%);
  padding: 48px 0;
  position: relative;
  overflow: hidden;
}

#stats-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  position: relative;
  z-index: 1;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.stat-item:last-child { border-right: none; }

.stat-icon {
  width: 52px; height: 52px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tgs-white);
  font-size: 1.3rem;
  flex-shrink: 0;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--tgs-white);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about { background: var(--tgs-white); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-left h2 { margin-bottom: 20px; }

.about-left p {
  font-size: 0.95rem;
  margin-bottom: 24px;
  color: var(--tgs-muted);
}

.about-right h3 {
  font-size: 1.1rem;
  color: var(--tgs-dark-navy);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--tgs-navy);
  margin-bottom: 28px;
}

.why-item {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  align-items: flex-start;
}

.why-icon {
  width: 44px; height: 44px;
  background: var(--tgs-light-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tgs-navy);
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.why-content h4 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tgs-dark-navy);
  margin-bottom: 6px;
}

.why-content p {
  font-size: 0.875rem;
  color: var(--tgs-muted);
  line-height: 1.6;
}

.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 32px;
  box-shadow: var(--shadow-card);
}
.about-image img { width: 100%; height: 300px; object-fit: cover; }

/* ============================================================
   INDUSTRIES SECTION
   ============================================================ */
#industries { background: var(--tgs-light-bg); }

.industries-header { text-align: center; margin-bottom: 48px; }

.industries-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 16px;
}

.industry-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 24px 8px;
  background: var(--tgs-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--tgs-border);
  text-align: center;
  transition: all 0.25s;
  cursor: default;
}

.industry-item:hover {
  border-color: var(--tgs-navy);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.industry-icon {
  font-size: 1.8rem;
  color: var(--tgs-navy);
}

.industry-label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--tgs-text);
  line-height: 1.3;
}

/* ============================================================
   CTA BANNER
   ============================================================ */
#cta-banner {
  background: linear-gradient(135deg, var(--tgs-dark-navy) 0%, var(--tgs-navy) 50%, #2357C5 100%);
  padding: 64px 0;
  position: relative;
  overflow: hidden;
}

#cta-banner::after {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.cta-text h2 {
  color: var(--tgs-white);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 8px;
}

.cta-text p {
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  background: var(--tgs-dark-navy);
  color: rgba(255,255,255,0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-brand .site-logo-text { color: var(--tgs-white); }
.footer-brand .site-logo-text span { color: var(--tgs-red); }

.footer-brand p {
  margin-top: 16px;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.55);
  line-height: 1.7;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.social-link {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
  transition: all 0.25s;
  text-decoration: none;
}
.social-link:hover {
  background: var(--tgs-navy);
  color: var(--tgs-white);
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--tgs-white);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.55);
  font-size: 0.875rem;
  transition: color 0.2s;
  text-decoration: none;
}
.footer-col ul li a:hover { color: var(--tgs-white); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
}
.footer-contact-item .contact-icon {
  color: var(--tgs-red);
  margin-top: 2px;
  flex-shrink: 0;
}

.footer-bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.35);
}

.footer-bottom a {
  color: rgba(255,255,255,0.35);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: rgba(255,255,255,0.7); }

.footer-legal { display: flex; gap: 24px; }

/* ============================================================
   WORDPRESS CORE STYLES (alignment, captions, etc.)
   ============================================================ */
.wp-block-image figcaption,
.wp-caption-text {
  font-size: 0.8rem;
  color: var(--tgs-muted);
  text-align: center;
  margin-top: 8px;
}

.alignnone  { margin: 0 0 24px; }
.aligncenter { display: block; margin: 24px auto; }
.alignleft  { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .industries-grid { grid-template-columns: repeat(4, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

@media (max-width: 768px) {
  :root { --section-py: 56px; }

  #primary-nav { display: none; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0; background: var(--tgs-white); box-shadow: 0 8px 24px rgba(0,0,0,0.12); padding: 24px; gap: 16px; }
  #primary-nav.open { display: flex; }
  .nav-toggle { display: flex; }

  .hero-inner { grid-template-columns: 1fr; }
  .hero-image-wrap { display: none; }
  .hero-content { padding: 60px 0; }

  .services-grid { grid-template-columns: 1fr 1fr; }
  .industries-grid { grid-template-columns: repeat(4, 1fr); }
  .stats-grid { grid-template-columns: 1fr 1fr; }

  .cta-inner { flex-direction: column; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

@media (max-width: 480px) {
  .services-grid { grid-template-columns: 1fr; }
  .industries-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-badges { flex-direction: column; gap: 16px; }
}

/* ============================================================
   UTILITY ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.animate-in.delay-1 { animation-delay: 0.1s; }
.animate-in.delay-2 { animation-delay: 0.2s; }
.animate-in.delay-3 { animation-delay: 0.3s; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
