/* Crystal Blue Professional - Architecture Studio Theme */
/* Primary Color: #2C5F7C, Secondary Color: #E8F4F8 */

/* ===== Root Variables ===== */
:root {
  --primary-color: #2C5F7C;
  --primary-dark: #1e4255;
  --primary-light: #3a7a9e;
  --secondary-color: #E8F4F8;
  --secondary-dark: #d1e8f0;
  --accent-color: #4A90B8;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --text-muted: #6c757d;
  --border-color: #dee2e6;
  --shadow-sm: 0 2px 8px rgba(44, 95, 124, 0.1);
  --shadow-md: 0 4px 16px rgba(44, 95, 124, 0.15);
  --shadow-lg: 0 8px 32px rgba(44, 95, 124, 0.2);
  --transition-base: all 0.3s ease;
  --transition-fast: all 0.2s ease;
  --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  --font-heading: 'Georgia', serif;
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  line-height: 1.6;
  background-color: #ffffff;
  overflow-x: hidden;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

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

a:hover {
  color: var(--primary-light);
}

/* ===== Bootstrap 5 Overrides ===== */
.btn {
  padding: 0.75rem 2rem;
  border-radius: 2px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition-base);
  border: none;
  font-size: 0.9rem;
}

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

.btn-primary:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:focus,
.btn-primary:active {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--text-light);
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 124, 0.25);
}

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

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary:focus,
.btn-outline-primary:active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 124, 0.25);
}

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

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

.btn-secondary:focus,
.btn-secondary:active {
  background-color: var(--secondary-dark);
  border-color: var(--secondary-dark);
  color: var(--primary-dark);
}

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

.btn-sm {
  padding: 0.5rem 1.5rem;
  font-size: 0.85rem;
}

/* Form Controls */
.form-control,
.form-select {
  border: 2px solid var(--border-color);
  border-radius: 2px;
  padding: 0.75rem 1rem;
  transition: var(--transition-fast);
  color: var(--text-dark);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 124, 0.15);
  color: var(--text-dark);
}

.form-label {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Cards */
.card {
  border: none;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  overflow: hidden;
}

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

.card-title {
  color: var(--primary-color);
  font-weight: 600;
}

.card-text {
  color: var(--text-dark);
}

/* Navbar */
.navbar {
  background-color: var(--text-light);
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  transition: var(--transition-base);
}

.navbar.scrolled {
  padding: 0.5rem 0;
  box-shadow: var(--shadow-md);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 1px;
}

.navbar-brand:hover {
  color: var(--primary-light);
}

.nav-link {
  color: var(--primary-color);
  font-weight: 500;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  transition: var(--transition-fast);
  position: relative;
}

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

.nav-link:hover {
  color: var(--primary-light);
}

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

.nav-link.active {
  color: var(--primary-dark);
}

.navbar-toggler {
  border: 2px solid var(--primary-color);
  padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(44, 95, 124, 0.25);
}

.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='%232C5F7C' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ===== Header & Hero Section ===== */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--text-light);
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 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.05'%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");
  opacity: 0.5;
}

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

.hero-section h1 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease;
}

.hero-section p {
  color: var(--secondary-color);
  font-size: 1.25rem;
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease 0.2s;
  animation-fill-mode: both;
}

.hero-section .btn {
  animation: fadeInUp 1s ease 0.4s;
  animation-fill-mode: both;
}

/* ===== Section Styles ===== */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

/* Background Variations */
.bg-light-blue {
  background-color: var(--secondary-color);
}

.bg-primary-gradient {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
  color: var(--text-light);
}

.bg-primary-gradient h2,
.bg-primary-gradient h3,
.bg-primary-gradient h4 {
  color: var(--text-light);
}

.bg-primary-gradient p {
  color: var(--secondary-color);
}

/* ===== Portfolio/Projects Grid ===== */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  cursor: pointer;
}

.project-item:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-10px);
}

.project-image {
  width: 100%;
  height: 350px;
  object-fit: cover;
  transition: var(--transition-base);
}

.project-item:hover .project-image {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(44, 95, 124, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  opacity: 0;
  transition: var(--transition-base);
}

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

.project-overlay h3 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.project-overlay p {
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

/* ===== Services Section ===== */
.service-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: var(--text-light);
  border-radius: 2px;
  transition: var(--transition-base);
  height: 100%;
  border: 2px solid transparent;
}

.service-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-light);
  transition: var(--transition-base);
}

.service-card:hover .service-icon {
  transform: rotateY(360deg);
}

.service-card h4 {
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ===== Testimonials ===== */
.testimonial-card {
  background: var(--text-light);
  padding: 2.5rem;
  border-radius: 2px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--primary-color);
  transition: var(--transition-base);
}

.testimonial-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateX(5px);
}

.testimonial-text {
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--secondary-color);
}

.testimonial-info h5 {
  margin-bottom: 0.25rem;
  color: var(--primary-color);
}

.testimonial-info p {
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===== Contact Form ===== */
.contact-form {
  background: var(--text-light);
  padding: 3rem;
  border-radius: 2px;
  box-shadow: var(--shadow-md);
}

.contact-info {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  padding: 3rem;
  border-radius: 2px;
  color: var(--text-light);
  height: 100%;
}

.contact-info h3 {
  color: var(--text-light);
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.25rem;
}

.contact-item-content h5 {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.contact-item-content p {
  color: var(--secondary-color);
  margin-bottom: 0;
}

.contact-item-content a {
  color: var(--secondary-color);
}

.contact-item-content a:hover {
  color: var(--text-light);
}

/* Form Validation Styles */
.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-valid {
  border-color: #28a745;
}

.invalid-feedback {
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.valid-feedback {
  display: block;
  color: #28a745;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ===== Footer ===== */
.footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  color: var(--text-light);
  padding: 4rem 0 2rem;
}

.footer h5 {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.footer p {
  color: var(--secondary-color);
  line-height: 1.8;
}

.footer a {
  color: var(--secondary-color);
  transition: var(--transition-fast);
}

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

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  display: inline-block;
}

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

.social-link {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: var(--transition-fast);
  font-size: 1.25rem;
}

.social-link:hover {
  background: var(--text-light);
  color: var(--primary-color);
  transform: translateY(-3px);
  padding-left: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  padding-top: 2rem;
  text-align: center;
}

.footer-bottom p {
  margin-bottom: 0;
  color: var(--secondary-color);
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: var(--text-light);
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  transition: var(--transition-base);
}

.back-to-top.show {
  display: flex;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

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

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

@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);
  }
}

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

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

.slide-in-left {
  animation: slideInLeft 0.8s ease;
}

.slide-in-right {
  animation: slideInRight 0.8s ease;
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--secondary-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 2rem auto;
}

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

/* ===== Responsive Design ===== */
@media (max-width: 991px) {
  .navbar-collapse {
    background: var(--text-light);
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 2px;
    box-shadow: var(--shadow-md);
  }
  
  .nav-link {
    padding: 0.75rem 1rem;
  }
  
  .nav-link::after {
    display: none;
  }
  
  .hero-section {
    padding: 6rem 0 4rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .contact-form,
  .contact-info {
    margin-bottom: 2rem;
  }
}

@media (max-width: 767px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .hero-section {
    padding: 4rem 0 3rem;
  }
  
  .hero-section p {
    font-size: 1.1rem;
  }
  
  .btn {
    padding: 0.65rem 1.5rem;
    font-size: 0.85rem;
  }
  
  .project-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .project-image {
    height: 250px;
  }
  
  .service-card {
    padding: 2rem 1rem;
  }
  
  .contact-form,
  .contact-info {
    padding: 2rem;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
  }
  
  .section-title {
    margin-bottom: 2rem;
  }
  
  .section-subtitle {
    margin-bottom: 2rem;
  }
}

@media (max-width: 575px) {
  .btn-lg {
    padding: 0.85rem 2rem;
  }
  
  .hero-section .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .testimonial-card {
    padding: 1.5rem;
  }
}

/* ===== Utility Classes ===== */
.text-primary-color {
  color: var(--primary-color);
}

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

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

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

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

.transition-base {
  transition: var(--transition-base);
}

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

*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}