/* Storm Knight Architecture Studio CSS */

/* CSS Variables */
:root {
  --primary-color: #2C3E50;
  --secondary-color: #E74C3C;
  --dark-primary: #1a252f;
  --light-primary: #34495e;
  --accent-light: #f39c12;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --medium-gray: #6c757d;
  --dark-gray: #343a40;
  --text-dark: #2c3e50;
  --text-light: #ffffff;
  --shadow: rgba(44, 62, 80, 0.1);
  --shadow-dark: rgba(44, 62, 80, 0.3);
  --transition: all 0.3s ease;
  --border-radius: 8px;
  --font-primary: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-secondary: 'Playfair Display', 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);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

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

p {
  margin-bottom: 1rem;
  font-size: 1.1rem;
  color: var(--medium-gray);
}

.lead {
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--light-primary);
}

/* Bootstrap Overrides */
.btn {
  border-radius: var(--border-radius);
  padding: 12px 30px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: var(--transition);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

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

.btn-primary:hover {
  background-color: var(--dark-primary);
  border-color: var(--dark-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--shadow-dark);
}

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

.btn-secondary:hover {
  background-color: #c0392b;
  border-color: #c0392b;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(231, 76, 60, 0.3);
}

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

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

/* Navigation */
.navbar {
  background-color: rgba(44, 62, 80, 0.95) !important;
  backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: var(--transition);
  box-shadow: 0 2px 20px var(--shadow);
}

.navbar-scrolled {
  padding: 0.5rem 0;
  background-color: var(--primary-color) !important;
}

.navbar-brand {
  font-family: var(--font-secondary);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.navbar-nav .nav-link {
  color: var(--white) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

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

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

/* Mobile Menu Toggle */
.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
  box-shadow: none;
}

.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");
}

/* Hero Section */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--dark-primary) 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,0 1000,300 1000,1000 0,700"/></svg>') no-repeat center center;
  background-size: cover;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  text-align: center;
}

.hero h1 {
  color: var(--white);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero .btn {
  animation: fadeInUp 1s ease-out 0.4s both;
  margin: 0.5rem;
}

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

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

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

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

.fade-in-left {
  animation: fadeInLeft 0.8s ease-out;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease-out;
}

/* Sections */
.section {
  padding: 5rem 0;
  position: relative;
}

.section-alt {
  background-color: var(--light-gray);
}

.section-dark {
  background-color: var(--primary-color);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6 {
  color: var(--white);
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

/* Cards */
.card {
  border: none;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  height: 100%;
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px var(--shadow-dark);
}

.card-img-top {
  transition: var(--transition);
  height: 250px;
  object-fit: cover;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-color);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--medium-gray);
  line-height: 1.6;
}

/* Portfolio Grid */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 2rem;
}

.portfolio-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  transition: var(--transition);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(44, 62, 80, 0.9);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 0;
  transition: var(--transition);
  text-align: center;
  padding: 2rem;
}

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

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

/* Forms */
.form-control {
  border: 2px solid #e9ecef;
  border-radius: var(--border-radius);
  padding: 12px 16px;
  font-size: 1rem;
  transition: var(--transition);
  background-color: var(--white);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(44, 62, 80, 0.25);
  background-color: var(--white);
}

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

.form-error {
  color: var(--secondary-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
  display: none;
}

.form-control.error {
  border-color: var(--secondary-color);
}

/* Footer */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.footer p,
.footer li {
  color: rgba(255, 255, 255, 0.8);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: var(--transition);
}

.footer a:hover {
  color: var(--white);
  transform: translateX(5px);
}

.footer .list-unstyled li {
  padding: 0.25rem 0;
}

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

/* Social Icons */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-radius: 50%;
  text-decoration: none;
  transition: var(--transition);
  font-size: 1.2rem;
}

.social-icon:hover {
  background-color: var(--secondary-color);
  color: var(--white);
  transform: translateY(-3px);
}

/* Utilities */
.text-primary {
  color: var(--primary-color) !important;
}

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

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

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

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

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

/* Loading Animation */
.loading {
  display: none;
  text-align: center;
  padding: 2rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--light-gray);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scroll to Top Button */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background-color: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  z-index: 1000;
  font-size: 1.2rem;
}

.scroll-top:hover {
  background-color: var(--secondary-color);
  transform: translateY(-3px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .section {
    padding: 3rem 0;
  }
  
  .hero {
    min-height: 70vh;
    text-align: center;
  }
  
  .navbar-nav {
    background-color: rgba(44, 62, 80, 0.98);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-top: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
    margin: 0.25rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  .portfolio-overlay {
    padding: 1rem;
  }
}

@media (max-width: 576px) {
  .hero {
    min-height: 60vh;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .social-icons {
    gap: 0.5rem;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .scroll-top {
    width: 45px;
    height: 45px;
    bottom: 1rem;
    right: 1rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .form-control {
    background-color: var(--white);
    color: var(--text-dark);
  }
}

/* Print styles */
@media print {
  .navbar,
  .scroll-top,
  .btn {
    display: none !important;
  }
  
  .section {
    padding: 1rem 0;
  }
  
  * {
    box-shadow: none !important;
  }
}