/*
Theme Name: Frontier Axis Engineering
Theme URI: https://frontieraxisengineering.com
Author: Frontier Axis Engineering
Description: A modern, professional WordPress theme for an engineering and pipeline design firm.
Version: 2.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: frontieraxis
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@600;700;800&display=swap');

/* ========================================
   CSS VARIABLES
======================================== */
:root {
  --primary: #00467F;
  --primary-dark: #003359;
  --primary-light: #0066b3;
  --secondary: #FF6B35;
  --secondary-dark: #e55420;
  --secondary-light: #ff8a5e;
  --accent: #00B4D8;
  --text: #1E1E1E;
  --text-light: #6B7280;
  --text-white: #FFFFFF;
  --bg: #FFFFFF;
  --bg-light: #F9FAFB;
  --bg-dark: #111827;
  --border: #E5E7EB;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1.125rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-light);
  font-size: 1.0625rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

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

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

/* ========================================
   LAYOUT & CONTAINERS
======================================== */
.container {
  width: 90%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-fluid {
  width: 100%;
  padding: 0 2rem;
}

main {
  min-height: 60vh;
}

/* ========================================
   HEADER & NAVIGATION
======================================== */
.site-header {
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

.header-top {
  background: var(--primary);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-contact a {
  color: white;
  margin-left: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.header-contact a:hover {
  color: var(--secondary);
}

.header-main {
  padding: 1.5rem 0;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  transition: var(--transition);
}

.logo-img {
  height: 120px;
  width: auto;
  max-width: 500px;
  transition: var(--transition);
}

.site-logo:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

@media (max-width: 968px) {
  .logo-img {
    height: 80px;
    max-width: 350px;
  }
}

@media (max-width: 640px) {
  .logo-img {
    height: 60px;
    max-width: 280px;
  }
}

.main-navigation {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.main-navigation a {
  color: var(--text);
  font-weight: 500;
  font-size: 1rem;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
}

.main-navigation a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--secondary);
  transition: width 0.3s ease;
}

.main-navigation a:hover::after,
.main-navigation a.current-menu-item::after {
  width: 100%;
}

.main-navigation a:hover {
  color: var(--primary);
}

.header-cta {
  margin-left: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001;
}

.mobile-menu-toggle span {
  display: block;
  width: 25px;
  height: 3px;
  background: var(--primary);
  margin: 5px 0;
  transition: var(--transition);
  border-radius: 3px;
}

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

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

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

/* ========================================
   BUTTONS
======================================== */
.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1.5;
}

.btn-primary {
  background: var(--secondary);
  color: var(--text-white);
  box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
  color: var(--text-white);
}

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

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

.btn-white {
  background: white;
  color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.btn-white:hover {
  background: var(--bg-light);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}

/* ========================================
   HERO SECTION
======================================== */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 8rem 0;
  overflow: hidden;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeInUp 1s ease;
}

.hero h1 {
  color: white;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  margin-bottom: 2.5rem;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   SERVICES SECTION
======================================== */
.services {
  padding: 6rem 0;
  background: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 4rem;
}

.section-subtitle {
  color: var(--secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

.section-title {
  color: var(--text);
  margin-bottom: 1rem;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: white;
}

.service-icon svg {
  stroke: white;
}

.service-card h3 {
  color: var(--text);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.service-card h4 {
  color: var(--primary);
  margin-bottom: 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.service-card p {
  color: var(--text-light);
  line-height: 1.7;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list li {
  color: var(--text-light);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
  line-height: 1.6;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.service-list li:last-child {
  border-bottom: none;
}

.service-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--secondary);
  font-weight: 600;
}

/* ========================================
   ABOUT SECTION
======================================== */
.about {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 40%;
  height: 200%;
  background: rgba(255, 255, 255, 0.03);
  transform: rotate(15deg);
}

.about-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.about h2 {
  color: white;
  margin-bottom: 1.5rem;
}

.about p {
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.8;
}

/* ========================================
   CTA SECTION
======================================== */
.cta {
  padding: 6rem 0;
  text-align: center;
  background: white;
}

.cta h2 {
  margin-bottom: 1rem;
}

.cta p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  color: var(--text-light);
}

/* ========================================
   FOOTER
======================================== */
.site-footer {
  background: var(--bg-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 4rem 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-section h3 {
  color: white;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  display: block;
  margin-bottom: 0.75rem;
}

.footer-section a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-bottom {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9375rem;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  color: white;
}

.social-links a:hover {
  background: var(--secondary);
  transform: translateY(-3px);
}

/* ========================================
   POST STYLES
======================================== */
.post {
  background: white;
  border-radius: var(--radius-lg);
  padding: 3rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow);
}

.post h2 {
  margin-bottom: 1rem;
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */
@media (max-width: 968px) {
  .header-top {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .main-navigation {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    align-items: flex-start;
    overflow-y: auto;
  }
  
  .main-navigation.active {
    right: 0;
  }
  
  .main-navigation ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
  }
  
  .main-navigation li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }
  
  .main-navigation a {
    display: block;
    padding: 1rem 0;
  }
  
  .header-cta {
    margin: 2rem 0 0 0;
    width: 100%;
  }
  
  .header-cta .btn {
    width: 100%;
  }
  
  .hero {
    padding: 5rem 0;
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .hero-buttons .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .service-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 640px) {
  .container {
    width: 95%;
    padding: 0 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .service-card,
  .post {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 0.75rem 1.5rem;
  }
}

/* ========================================
   IMAGE SHOWCASE
======================================== */
.image-showcase img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-showcase > div > div:hover img {
  transform: scale(1.05);
}

/* ========================================
   FORM STYLES
======================================== */
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form select,
.contact-form textarea {
  font-family: inherit;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 70, 127, 0.1);
}

.contact-form label {
  cursor: pointer;
}

/* ========================================
   UTILITY CLASSES
======================================== */
.text-center { text-align: center; }
.text-white { color: white; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
