/* ============================================
   KTC Roomster - Custom Styles
   ============================================ */

/* Color Variables - KTC Brand Colors */
:root {
  --primary-charcoal: #2C2C2C;
  --brand-red: #DC2626;
  --brand-red-dark: #B91C1C;
  --brand-red-light: #EF4444;
  --secondary-blue: #1E3A8A;
  --accent-gold: #C9A24D;
  --bg-white: #FFFFFF;
  --bg-off-white: #F8FAFC;
  --bg-cream: #FAF9F6;
  --text-heading: #2C2C2C;
  --text-body: #374151;
  --text-muted: #6B7280;
  --border-light: #E5E7EB;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-body);
  line-height: 1.75;
  font-size: 17px;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  line-height: 1.25;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1.3;
}

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

.lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.6;
  letter-spacing: -0.01em;
  font-weight: 400;
}

/* Buttons */
.btn-primary-custom {
  background-color: var(--primary-charcoal);
  color: white;
  border: none;
  border-radius: 0;
  padding: 16px 36px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary-custom::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s;
}

.btn-primary-custom:hover::before {
  left: 100%;
}

.btn-primary-custom:hover {
  background-color: var(--brand-red-dark);
  color: white;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary-custom {
  background-color: transparent;
  color: var(--primary-charcoal);
  border: 2px solid var(--primary-charcoal);
  border-radius: 0;
  padding: 14px 34px;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.btn-secondary-custom:hover {
  background-color: var(--primary-charcoal);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Navigation */
.navbar {
  background-color: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s ease;
}

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

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--primary-charcoal) !important;
  letter-spacing: -0.02em;
  position: relative;
  padding: 0;
  display: flex;
  align-items: center;
  text-decoration: none;
}

.navbar-brand img {
  max-height: 45px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand:hover img {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .navbar-brand img {
    max-height: 38px;
  }
}

.navbar-nav .nav-link {
  color: var(--text-body) !important;
  font-weight: 500;
  font-size: 15px;
  margin: 0 0.75rem;
  padding: 0.5rem 0 !important;
  letter-spacing: 0.3px;
  position: relative;
  transition: color 0.3s ease;
}

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

.navbar-nav .nav-link:hover {
  color: var(--brand-red) !important;
}

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

.navbar .btn-primary-custom {
  margin-left: 1rem;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-white) 50%, var(--bg-off-white) 100%);
  padding: 100px 0 60px;
  min-height: 60vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  right: -10%;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.03) 0%, transparent 100%);
  pointer-events: none;
}

.hero-section.hero-with-cover {
  background-image: linear-gradient(rgba(44, 44, 44, 0.75), rgba(220, 38, 38, 0.4)), url('../images/cover.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
}

.hero-section.hero-with-cover h1,
.hero-section.hero-with-cover .lead {
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-section.hero-with-cover .text-muted-custom {
  color: rgba(255, 255, 255, 0.9) !important;
}

.hero-section h1 {
  margin-bottom: 1.75rem;
  position: relative;
}

.hero-section .lead {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--text-body);
  margin-bottom: 2.5rem;
  max-width: 90%;
  font-weight: 400;
}

@media (min-width: 992px) {
  .hero-section .lead {
    max-width: 85%;
  }
}

/* Trust Indicators */
.trust-indicators {
  background: linear-gradient(to bottom, var(--bg-white) 0%, var(--bg-off-white) 100%);
  padding: 80px 0;
  position: relative;
}

.trust-indicators::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}

.trust-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: white;
  border-radius: 0;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  height: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.trust-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.trust-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-red);
}

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

.trust-card .number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brand-red);
  margin-bottom: 0.5rem;
}

.trust-card .label {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Section Spacing */
.section {
  padding: 100px 0;
  position: relative;
}

.section-alt {
  background: linear-gradient(to bottom, var(--bg-off-white) 0%, var(--bg-cream) 100%);
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
}

/* Process Steps */
.process-step {
  text-align: center;
  padding: 2rem;
}

.process-step {
  position: relative;
  padding-top: 1rem;
}

.process-step .step-number {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  color: white;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0 auto 2rem;
  box-shadow: var(--shadow-md);
  transition: all 0.4s ease;
  position: relative;
}

.process-step .step-number::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 2px solid var(--brand-red);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.process-step:hover .step-number {
  transform: scale(1.1) rotate(5deg);
  box-shadow: var(--shadow-lg);
}

.process-step:hover .step-number::after {
  opacity: 0.3;
}

.process-step h4 {
  margin-bottom: 1rem;
}

/* About Section */
.about-section {
  padding: 80px 0;
}

.about-image {
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 0 1px rgba(0, 0, 0, 0.05);
  width: 100%;
  height: auto;
  border: 4px solid var(--primary-charcoal);
  padding: 8px;
  background: white;
  transition: all 0.3s ease;
  display: block;
}

.about-image:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-color: var(--brand-red);
}

.about-content {
  padding-left: 3rem;
}

/* Comparison Table */
.comparison-table {
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comparison-table thead {
  background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
  color: white;
}

.comparison-table th,
.comparison-table td {
  padding: 1.25rem;
  border-bottom: 1px solid #e5e7eb;
}

.comparison-table tbody tr:hover {
  background-color: var(--bg-off-white);
}

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

.portfolio-card {
  background: white;
  border-radius: 0;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-light);
  position: relative;
}

.portfolio-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-dark));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
  z-index: 1;
}

.portfolio-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--brand-red);
}

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

.portfolio-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.portfolio-card-body {
  padding: 1.5rem;
}

/* Before/After Section Styling */
.portfolio-card img {
  transition: transform 0.3s ease;
}

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

/* Contact Form */
.contact-form {
  background: white;
  padding: 3.5rem;
  border-radius: 0;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-light);
  position: relative;
}

.contact-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-red-dark));
}

.form-control {
  border: 1px solid var(--border-light);
  border-radius: 0;
  padding: 14px 18px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: var(--bg-off-white);
}

.form-control:focus {
  border-color: var(--brand-red);
  background: white;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
  outline: none;
}

.form-control:hover {
  border-color: var(--text-muted);
}

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

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-charcoal) 0%, #1A1A1A 50%, var(--brand-red-dark) 100%);
  color: white;
  padding: 4rem 0 2rem;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.1), transparent);
}

.footer h5 {
  color: white;
  margin-bottom: 1rem;
}

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

.footer a:hover {
  color: white;
}

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

/* Sticky CTA */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary-charcoal) 0%, var(--brand-red-dark) 100%);
  color: white;
  padding: 1.25rem;
  text-align: center;
  z-index: 1000;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
  display: none;
  border-top: 2px solid var(--brand-red);
}

.sticky-cta.show {
  display: block;
}

.sticky-cta .btn {
  margin-left: 1rem;
}

/* Responsive */
@media (max-width: 1200px) {
  .section {
    padding: 80px 0;
  }
  
  .hero-section {
    min-height: 50vh;
    padding: 100px 0 60px;
  }
}

@media (max-width: 992px) {
  .section {
    padding: 70px 0;
  }
  
  .hero-section {
    min-height: auto;
    padding: 100px 0 60px;
  }
  
  .about-content {
    padding-left: 0;
    margin-top: 3rem;
  }
  
  .trust-indicators {
    padding: 60px 0;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 16px;
  }
  
  .section {
    padding: 60px 0;
  }
  
  .section-alt {
    padding: 60px 0;
  }
  
  .hero-section {
    padding: 80px 0 40px;
    min-height: auto;
  }
  
  .hero-section.hero-with-cover {
    background-attachment: scroll;
    padding: 80px 0 40px;
  }
  
  .hero-section::before {
    display: none;
  }
  
  .about-content {
    padding-left: 0;
    margin-top: 2.5rem;
  }
  
  .about-section {
    padding: 60px 0;
  }
  
  .contact-form {
    padding: 2rem 1.5rem;
  }
  
  .trust-indicators {
    padding: 50px 0;
  }
  
  .trust-card {
    padding: 2rem 1.5rem;
    margin-bottom: 1rem;
  }
  
  .navbar {
    padding: 1rem 0;
  }
  
  .navbar-brand {
    font-size: 1.4rem;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
    padding: 0.75rem 0 !important;
  }
  
  .navbar .btn-primary-custom {
    margin-left: 0;
    margin-top: 0.75rem;
    width: 100%;
    text-align: center;
  }
  
  .btn-primary-custom,
  .btn-secondary-custom {
    padding: 14px 28px;
    font-size: 14px;
    width: 100%;
    margin-bottom: 0.75rem;
  }
  
  .d-flex.gap-3 {
    flex-direction: column;
    gap: 0.75rem !important;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .process-step {
    margin-bottom: 2.5rem;
  }
  
  .process-step .step-number {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .sticky-cta {
    display: block;
  }
  
  .sticky-cta .btn {
    margin-left: 0;
    margin-top: 0.5rem;
    width: calc(100% - 2rem);
  }
  
  .comparison-table {
    font-size: 14px;
  }
  
  .comparison-table th,
  .comparison-table td {
    padding: 1rem 0.75rem;
  }
}

@media (max-width: 576px) {
  .section {
    padding: 50px 0;
  }
  
  .hero-section {
    padding: 70px 0 30px;
  }
  
  .trust-card {
    padding: 1.75rem 1.25rem;
  }
  
  .contact-form {
    padding: 1.5rem 1.25rem;
  }
  
  .portfolio-card-body {
    padding: 1.25rem;
  }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
}

/* Utility Classes */
.text-muted-custom {
  color: var(--text-muted);
}

.accent-gold {
  color: var(--accent-gold);
}

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

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Additional Refinements */
.container {
  max-width: 1200px;
}

/* Section Dividers */
.section-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border-light), transparent);
  margin: 60px 0;
  border: none;
}

/* Accent Line */
.accent-line {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-red), var(--brand-red-dark));
  margin: 1.5rem 0;
  border: none;
}

/* Logo Styling */
.navbar-brand-logo {
  height: 45px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar-brand-logo:hover {
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .navbar-brand-logo {
    height: 38px;
  }
}

/* Text Refinements */
.text-refined {
  letter-spacing: 0.3px;
  line-height: 1.8;
}

/* Image Container Refinements */
.img-container {
  position: relative;
  overflow: hidden;
}

/* Loading States */
.fade-in {
  animation: fadeIn 0.6s ease-in;
}

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

/* Smart Image Frames */
img {
  border-radius: 0;
}

/* Hero and content images with smart frames */
.hero-section img:not(.portfolio-card img),
.section img:not(.portfolio-card img),
.about-section img:not(.portfolio-card img) {
  border: 4px solid var(--primary-charcoal);
  padding: 8px;
  background: white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 0 1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  display: block;
}

.hero-section img:not(.portfolio-card img):hover,
.section img:not(.portfolio-card img):hover,
.about-section img:not(.portfolio-card img):hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25), 
              0 0 0 1px rgba(255, 255, 255, 0.1) inset,
              0 0 0 1px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
  border-color: var(--brand-red);
}

/* Portfolio images with enhanced frames */
.portfolio-card img {
  border: 3px solid var(--primary-charcoal);
  padding: 6px;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  width: calc(100% - 12px);
  height: calc(250px - 12px);
  margin: 0;
}

.portfolio-card:hover img {
  border-color: var(--brand-red);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
