/*
Theme Name: Grace Holdings
Theme URI: https://graceholdings.co.ug
Author: Grace Holdings
Author URI: https://graceholdings.co.ug
Description: A modern, professional WordPress theme for Grace Holdings — Uganda's leading integrated construction, engineering, and procurement company. Features a bold hero section, services showcase, portfolio gallery, contact form, and full Customizer support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: graceholdings
Tags: one-column, custom-colors, custom-logo, custom-menu, featured-images, full-width-template, theme-options, translation-ready
*/

/* ============================================
   GRACE HOLDINGS — Custom Styles
   Colors: Brand Blue #4da6ff, Navy #1a1a2e
   ============================================ */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a2e;
  background: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

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

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

/* --- Animations --- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-fade-in-up { animation: fadeInUp 0.6s ease-out forwards; }
.animate-fade-in { animation: fadeIn 0.8s ease-out forwards; }
.animate-delay-100 { animation-delay: 0.1s; }
.animate-delay-200 { animation-delay: 0.2s; }
.animate-delay-400 { animation-delay: 0.4s; }
.animate-delay-500 { animation-delay: 0.5s; }
.animate-bounce { animation: bounce 2s infinite; }
.animate-pulse { animation: pulse 2s infinite; }

/* --- Hero Gradient --- */
.hero-gradient {
  background: linear-gradient(135deg, rgba(26,26,46,0.85) 0%, rgba(26,108,184,0.7) 50%, rgba(77,166,255,0.6) 100%);
}

/* --- Section Pattern --- */
.section-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(77,166,255,0.08) 1px, transparent 0);
  background-size: 40px 40px;
}

/* --- Top Bar --- */
.gh-top-bar {
  background: #1a1a2e;
  color: #fff;
  font-size: 0.875rem;
}

.gh-top-bar a:hover { color: #4da6ff; }

/* --- Navbar --- */
.gh-navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  transition: all 0.3s ease;
}

.gh-navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  border-bottom: 1px solid #f1f5f9;
}

.gh-nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #333;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.gh-nav-link:hover {
  color: #4da6ff;
  background: #e6f3ff;
}

.gh-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #4da6ff;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(77,166,255,0.25);
  font-size: 0.875rem;
}

.gh-btn-primary:hover {
  background: #2d8be0;
  box-shadow: 0 6px 20px rgba(77,166,255,0.35);
  transform: translateY(-1px);
}

.gh-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: #fff;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.875rem;
}

.gh-btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.gh-btn-white {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #fff;
  color: #4da6ff;
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  font-size: 1rem;
}

.gh-btn-white:hover {
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
  transform: translateY(-2px);
}

/* --- Mobile Menu --- */
.gh-mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 320px;
  height: 100vh;
  background: #fff;
  z-index: 100;
  padding: 2rem;
  box-shadow: -5px 0 30px rgba(0,0,0,0.1);
  overflow-y: auto;
}

.gh-mobile-menu.active { display: block; }

.gh-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 99;
}

.gh-mobile-overlay.active { display: block; }

/* --- Sections --- */
.gh-section { padding: 5rem 1rem; }

@media (min-width: 1024px) {
  .gh-section { padding: 7rem 1rem; }
}

.gh-container { max-width: 80rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .gh-container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .gh-container { padding: 0 2rem; } }

/* --- Section Badge --- */
.gh-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #e6f3ff;
  color: #4da6ff;
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.gh-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4da6ff;
}

/* --- Section Header --- */
.gh-section-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (min-width: 640px) {
  .gh-section-title { font-size: 2.25rem; }
}

.gh-section-desc {
  color: #64748b;
  font-size: 1rem;
  max-width: 48rem;
  margin: 0 auto;
}

/* --- Hero --- */
.gh-hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.gh-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.gh-hero-stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #4da6ff;
}

@media (min-width: 640px) {
  .gh-hero-stat-value { font-size: 1.875rem; }
}

/* --- Service Cards --- */
.gh-service-card {
  background: #fff;
  border-radius: 1rem;
  padding: 2rem;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.gh-service-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border-color: rgba(77,166,255,0.2);
  transform: translateY(-4px);
}

.gh-service-icon {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.75rem;
  background: #e6f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.gh-service-card:hover .gh-service-icon {
  background: #4da6ff;
  transform: scale(1.1);
}

.gh-service-card:hover .gh-service-icon svg { stroke: #fff; }

/* --- Portfolio Cards --- */
.gh-portfolio-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid #f1f5f9;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.gh-portfolio-card:hover {
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  transform: translateY(-4px);
}

.gh-portfolio-img {
  height: 14rem;
  overflow: hidden;
  position: relative;
}

.gh-portfolio-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gh-portfolio-card:hover .gh-portfolio-img img { transform: scale(1.1); }

.gh-portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26,26,46,0.6), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gh-portfolio-card:hover .gh-portfolio-overlay { opacity: 1; }

.gh-portfolio-category {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  background: #4da6ff;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gh-portfolio-card:hover .gh-portfolio-category { opacity: 1; }

/* --- Category Filter --- */
.gh-filter-btn {
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #f1f5f9;
  color: #333;
}

.gh-filter-btn:hover {
  background: #e6f3ff;
  color: #4da6ff;
}

.gh-filter-btn.active {
  background: #4da6ff;
  color: #fff;
  box-shadow: 0 4px 15px rgba(77,166,255,0.25);
}

/* --- Contact Form --- */
.gh-input,
.gh-textarea,
.gh-select {
  width: 100%;
  height: 2.75rem;
  background: #f8f9fa;
  border: 1px solid #e2e8f0;
  border-radius: 0.375rem;
  padding: 0 0.75rem;
  font-size: 0.875rem;
  color: #1a1a2e;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.gh-input:focus,
.gh-textarea:focus,
.gh-select:focus {
  border-color: #4da6ff;
  box-shadow: 0 0 0 3px rgba(77,166,255,0.15);
}

.gh-textarea {
  height: auto;
  padding: 0.75rem;
  resize: none;
}

.gh-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
  padding-right: 2.5rem;
}

.gh-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #1a1a2e;
  margin-bottom: 0.5rem;
  display: block;
}

/* --- Contact Info Card --- */
.gh-contact-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: #e6f3ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gh-contact-icon svg { stroke: #4da6ff; width: 1.25rem; height: 1.25rem; }

/* --- CTA Banner --- */
.gh-cta-banner {
  background: #4da6ff;
  padding: 3.5rem 1rem;
}

@media (min-width: 1024px) {
  .gh-cta-banner { padding: 4.5rem 1rem; }
}

/* --- Footer --- */
.gh-footer {
  background: #1a1a2e;
  color: #fff;
}

.gh-footer a:hover { color: #4da6ff; }

.gh-social-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.gh-social-icon:hover {
  background: #4da6ff;
  border-color: #4da6ff;
  transform: translateY(-2px);
}

.gh-social-icon svg { width: 1rem; height: 1rem; }

.gh-footer-link {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: color 0.2s ease;
}

.gh-footer-link:hover { color: #4da6ff; }

.gh-footer-link-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(77,166,255,0.5);
  flex-shrink: 0;
}

/* --- About Section --- */
.gh-about-accent {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: #4da6ff;
  color: #fff;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.gh-about-border {
  position: absolute;
  top: -1rem;
  left: -1rem;
  width: 6rem;
  height: 6rem;
  border: 2px solid rgba(77,166,255,0.3);
  border-radius: 1rem;
  z-index: -1;
}

/* --- Contact Success --- */
.gh-success-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: #dcfce7;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

/* --- Grid Helpers --- */
.gh-grid-2 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.gh-grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.gh-grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.gh-grid-5 { display: grid; grid-template-columns: 1fr; gap: 2rem; }

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

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

/* --- SVG Icon Helper --- */
.gh-icon { display: inline-block; vertical-align: middle; }

/* ============================================
   WORDPRESS NAVIGATION
   ============================================ */

.gh-navbar .menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gh-navbar .menu li {
    margin: 0;
    padding: 0;
}

.gh-navbar .menu a {
    display: block;
    padding: 0.65rem 0.9rem;
    text-decoration: none;
    color: #1a1a2e;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.gh-navbar .menu a:hover {
    color: #4da6ff;
}

/* Mobile navigation */
.gh-mobile-menu .menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.gh-mobile-menu .menu li {
    width: 100%;
}

.gh-mobile-menu .menu a {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    text-decoration: none;
    color: #1a1a2e;
}

.gh-mobile-menu .menu a:hover {
    color: #4da6ff;
}