/* ============================================
   Architectural Studio - Thunder Blue & Lightning Orange Theme
   Modern CSS with Bootstrap 5 Overrides
   ============================================ */

/* ===== ROOT VARIABLES ===== */
:root {
  --primary-color: #1565C0;
  --secondary-color: #FF6F00;
  --dark-blue: #0D47A1;
  --light-blue: #42A5F5;
  --dark-orange: #E65100;
  --light-orange: #FFB74D;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --shadow-sm: 0 2px 4px rgba(21, 101, 192, 0.1);
  --shadow-md: 0 4px 12px rgba(21, 101, 192, 0.15);
  --shadow-lg: 0 8px 24px rgba(21, 101, 192, 0.2);
  --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease-in-out;
}

/* ===== GLOBAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-dark) !important;
  line-height: 1.7;
  overflow-x: hidden;
  background-color: #ffffff !important;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: var(--text-dark) !important;
}

.lead {
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  line-height: 1.6 !important;
  color: var(--text-dark) !important;
}

.text-white,
.text-white * {
  color: var(--text-light) !important;
}

.text-white .lead {
  color: rgba(255, 255, 255, 0.9) !important;
}

.text-muted {
  color: #6c757d !important;
}

.text-white-50 {
  color: rgba(255, 255, 255, 0.5) !important;
}

.text-warning {
  color: var(--secondary-color) !important;
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.btn {
  font-weight: 600 !important;
  border-radius: 8px !important;
  transition: var(--transition-base) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.5px !important;
  border: 2px solid transparent !important;
  position: relative !important;
  overflow: hidden !important;
  z-index: 1 !important;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: -1;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-light) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--dark-blue) !important;
  border-color: var(--dark-blue) !important;
  color: var(--text-light) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(21, 101, 192, 0.4) !important;
}

.btn-secondary {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: var(--text-light) !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--dark-orange) !important;
  border-color: var(--dark-orange) !important;
  color: var(--text-light) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 20px rgba(255, 111, 0, 0.4) !important;
}

.btn-outline-primary {
  background-color: transparent !important;
  border-color: var(--primary-color) !important;
  color: var(--primary-color) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  transform: translateY(-2px) !important;
}

.btn-outline-light {
  background-color: transparent !important;
  border-color: var(--text-light) !important;
  color: var(--text-light) !important;
}

.btn-outline-light:hover,
.btn-outline-light:focus,
.btn-outline-light:active {
  background-color: var(--text-light) !important;
  border-color: var(--text-light) !important;
  color: var(--primary-color) !important;
  transform: translateY(-2px) !important;
}

.btn-light {
  background-color: var(--text-light) !important;
  border-color: var(--text-light) !important;
  color: var(--primary-color) !important;
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
  background-color: var(--gray-100) !important;
  border-color: var(--gray-100) !important;
  color: var(--primary-color) !important;
  transform: translateY(-2px) !important;
}

.btn-lg {
  padding: 1rem 2.5rem !important;
  font-size: 1.1rem !important;
}

.btn-sm {
  padding: 0.5rem 1.5rem !important;
  font-size: 0.875rem !important;
}

.badge {
  background-color: var(--secondary-color) !important;
  color: var(--text-light) !important;
  padding: 0.5em 1em !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-white {
  background-color: #ffffff !important;
}

.card {
  border-radius: 12px !important;
  border: none !important;
  transition: var(--transition-base) !important;
  overflow: hidden !important;
}

.card:hover {
  transform: translateY(-5px) !important;
  box-shadow: var(--shadow-lg) !important;
}

.shadow-sm {
  box-shadow: var(--shadow-sm) !important;
}

.shadow {
  box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
  box-shadow: var(--shadow-lg) !important;
}

.rounded {
  border-radius: 12px !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

.alert {
  border-radius: 8px !important;
  border-left: 4px solid var(--secondary-color) !important;
}

/* ===== NAVIGATION ===== */
.navbar {
  padding: 1rem 0 !important;
  transition: var(--transition-base) !important;
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1) !important;
}

.navbar-dark {
  background-color: rgba(21, 101, 192, 0.95) !important;
}

.navbar.sticky-top {
  background-color: var(--primary-color) !important;
}

.navbar-brand {
  font-size: 1.5rem !important;
  color: var(--text-light) !important;
  font-weight: 700 !important;
  transition: var(--transition-base) !important;
  display: flex !important;
  align-items: center !important;
  gap: 0.5rem !important;
}

.navbar-brand:hover {
  color: var(--light-orange) !important;
  transform: scale(1.05) !important;
}

.navbar-brand .bi {
  font-size: 1.8rem !important;
  color: var(--secondary-color) !important;
  animation: lightning-pulse 2s infinite !important;
}

.nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500 !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.25rem !important;
  border-radius: 6px !important;
  transition: var(--transition-base) !important;
  position: relative !important;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--secondary-color);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-light) !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5) !important;
  padding: 0.5rem !important;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25) !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== HERO SECTION ===== */
.hero-section {
  min-height: 100vh !important;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-blue) 100%) !important;
  padding: 120px 0 80px !important;
  position: relative !important;
  overflow: hidden !important;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h100v100H0z" fill="none"/%3E%3Cpath d="M50 10L55 30L75 30L59 42L65 62L50 50L35 62L41 42L25 30L45 30z" fill="rgba(255,255,255,0.03)"/%3E%3C/svg%3E');
  opacity: 0.5;
  z-index: 0;
}

.hero-section .container {
  position: relative !important;
  z-index: 2 !important;
}

.hero-section .text-white h1,
.hero-section .text-white .display-3,
.hero-section .text-white p,
.hero-section .text-white .lead {
  color: var(--text-light) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.lightning-effect {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none !important;
  z-index: 1 !important;
  overflow: hidden !important;
}

.lightning-bolt {
  position: absolute;
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--secondary-color), transparent);
  opacity: 0;
  animation: lightning-strike 4s infinite;
}

.lightning-bolt:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
}

.lightning-bolt:nth-child(2) {
  left: 30%;
  animation-delay: 1.5s;
}

.lightning-bolt:nth-child(3) {
  left: 50%;
  animation-delay: 3s;
}

.lightning-bolt:nth-child(4) {
  left: 70%;
  animation-delay: 2s;
}

.lightning-bolt:nth-child(5) {
  left: 90%;
  animation-delay: 0.5s;
}

/* ===== SERVICE CARDS ===== */
.service-card {
  background: #ffffff !important;
  border-radius: 16px !important;
  padding: 2.5rem !important;
  transition: var(--transition-base) !important;
  border: 2px solid transparent !important;
  position: relative !important;
  overflow: hidden !important;
  height: 100% !important;
}

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

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

.service-card:hover {
  transform: translateY(-10px) !important;
  box-shadow: 0 15px 40px rgba(21, 101, 192, 0.2) !important;
  border-color: var(--primary-color) !important;
}

.service-card .bi {
  font-size: 3rem !important;
  color: var(--primary-color) !important;
  margin-bottom: 1.5rem !important;
  transition: var(--transition-base) !important;
}

.service-card:hover .bi {
  color: var(--secondary-color) !important;
  transform: scale(1.1) rotate(5deg) !important;
}

.service-card h3,
.service-card .h3,
.service-card h4,
.service-card .h4 {
  color: var(--text-dark) !important;
  margin-bottom: 1rem !important;
}

.service-card p {
  color: #666 !important;
  line-height: 1.8 !important;
}

/* ===== FEATURE SECTIONS ===== */
.feature-section {
  padding: 5rem 0 !important;
  background-color: var(--gray-100) !important;
}

.feature-section:nth-child(even) {
  background-color: #ffffff !important;
}

.feature-section .bi {
  font-size: 2.5rem !important;
  color: var(--primary-color) !important;
}

/* ===== GALLERY ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: var(--transition-base);
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-card {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--gray-200);
}

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

.gallery-item:hover .gallery-img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(21, 101, 192, 0.9), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  color: var(--text-light) !important;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-overlay h4,
.gallery-overlay .h4 {
  color: var(--text-light) !important;
  margin-bottom: 0.5rem;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.9) !important;
}

.filter-btn {
  margin: 0.5rem !important;
}

.filter-btn.active {
  background-color: var(--primary-color) !important;
  color: var(--text-light) !important;
  border-color: var(--primary-color) !important;
}

/* ===== MODAL ===== */
.modal-content {
  border-radius: 16px !important;
  border: none !important;
  overflow: hidden !important;
}

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--dark-blue)) !important;
  color: var(--text-light) !important;
  border-bottom: none !important;
  padding: 1.5rem 2rem !important;
}

.modal-title {
  color: var(--text-light) !important;
  font-weight: 700 !important;
}

.modal-body {
  padding: 2rem !important;
}

.btn-close {
  background-color: rgba(255, 255, 255, 0.3) !important;
  opacity: 1 !important;
  border-radius: 50% !important;
  padding: 0.5rem !important;
}

.btn-close:hover {
  background-color: rgba(255, 255, 255, 0.5) !important;
}

/* ===== FORMS ===== */
.form-label {
  font-weight: 600 !important;
  color: var(--text-dark) !important;
  margin-bottom: 0.5rem !important;
}

.form-control,
.form-select {
  border: 2px solid var(--gray-300) !important;
  border-radius: 8px !important;
  padding: 0.75rem 1rem !important;
  transition: var(--transition-base) !important;
  background-color: #ffffff !important;
  color: var(--text-dark) !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 0.2rem rgba(21, 101, 192, 0.15) !important;
  outline: none !important;
}

.form-control::placeholder {
  color: #999 !important;
}

/* ===== ICONS ===== */
.bi {
  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.bi-lightning-charge-fill,
.bi-lightning-fill {
  color: var(--secondary-color) !important;
}

.bi-check-circle-fill {
  color: #28a745 !important;
}

.bi-info-circle-fill {
  color: #17a2b8 !important;
}

.bi-exclamation-triangle-fill {
  color: var(--secondary-color) !important;
}

/* ===== UTILITY CLASSES ===== */
.opacity-25 {
  opacity: 0.25 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.gap-2 {
  gap: 0.5rem !important;
}

.gap-3 {
  gap: 1rem !important;
}

.gap-4 {
  gap: 1.5rem !important;
}

.gap-5 {
  gap: 3rem !important;
}

.border-light {
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.border-bottom {
  border-bottom: 1px solid !important;
}

.list-unstyled {
  list-style: none !important;
  padding-left: 0 !important;
}

.text-decoration-none {
  text-decoration: none !important;
}

.text-decoration-none:hover {
  text-decoration: underline !important;
}

/* ===== ANIMATIONS ===== */
@keyframes lightning-strike {
  0%, 100% {
    opacity: 0;
    transform: translateY(-100%);
  }
  5% {
    opacity: 1;
    transform: translateY(0);
  }
  10% {
    opacity: 0;
    transform: translateY(100%);
  }
}

@keyframes lightning-pulse {
  0%, 100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.1);
    filter: brightness(1.5);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* ===== LOADING STATES ===== */
.loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid var(--primary-color);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1199.98px) {
  .display-3 {
    font-size: 3rem !important;
  }
  
  .display-4 {
    font-size: 2.5rem !important;
  }
  
  .display-5 {
    font-size: 2rem !important;
  }
  
  .display-6 {
    font-size: 1.75rem !important;
  }
}

@media (max-width: 991.98px) {
  .hero-section {
    padding: 100px 0 60px !important;
  }
  
  .display-3 {
    font-size: 2.5rem !important;
  }
  
  .display-4 {
    font-size: 2rem !important;
  }
  
  .navbar-collapse {
    background-color: rgba(21, 101, 192, 0.98) !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-top: 1rem !important;
  }
  
  .nav-link {
    padding: 0.75rem 1rem !important;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
  }
  
  .gallery-item.wide,
  .gallery-item.tall {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .service-card {
    padding: 2rem !important;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    min-height: auto !important;
    padding: 80px 0 40px !important;
  }
  
  .display-3 {
    font-size: 2rem !important;
  }
  
  .display-4 {
    font-size: 1.75rem !important;
  }
  
  .display-5 {
    font-size: 1.5rem !important;
  }
  
  .display-6 {
    font-size: 1.25rem !important;
  }
  
  .btn-lg {
    padding: 0.875rem 2rem !important;
    font-size: 1rem !important;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .service-card {
    padding: 1.5rem !important;
  }
  
  .service-card .bi {
    font-size: 2.5rem !important;
  }
  
  .modal-body {
    padding: 1.5rem !important;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    font-size: 1.25rem !important;
  }
  
  .navbar-brand .bi {
    font-size: 1.5rem !important;
  }
  
  .btn {
    font-size: 0.875rem !important;
    padding: 0.625rem 1.5rem !important;
  }
  
  .btn-lg {
    padding: 0.75rem 1.75rem !important;
    font-size: 0.95rem !important;
  }
  
  .service-card {
    padding: 1.25rem !important;
  }
  
  .service-card .bi {
    font-size: 2rem !important;
  }
  
  .gallery-card {
    min-height: 250px;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar,
  .btn,
  .modal,
  .lightning-effect {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .hero-section {
    background: white !important;
    color: black !important;
  }
}

/* ===== ACCESSIBILITY ===== */
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:focus-visible {
  outline: 3px solid var(--secondary-color) !important;
  outline-offset: 2px !important;
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

a {
  transition: var(--transition-base) !important;
}

img {
  transition: var(--transition-base) !important;
}

/* ===== ADDITIONAL THEME SPECIFIC STYLES ===== */
.service-img-before,
.service-img-after {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
}

.service-img-before::before {
  content: 'BEFORE';
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  z-index: 2;
}

.service-img-after::after {
  content: 'AFTER';
  position: absolute;
  top: 1rem;
  right: 1rem;
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 700;
  z-index: 2;
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--dark-blue);
}

/* ===== SELECTION STYLING ===== */
::selection {
  background-color: var(--secondary-color);
  color: white;
}

::-moz-selection {
  background-color: var(--secondary-color);
  color: white;
}