/* Base Styles */
body {
  font-family: 'Aktiv Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #333;
  padding-top: 0;
  font-size: 12px; 
  line-height: 1.5;
}

/* Navbar */
.navbar {
  transition: all 0.3s;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 5px 0; 
  font-size: 12px; 
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 2px 0; 
}

.navbar-brand {
  font-weight: 700;
}

.nav-link {
  font-weight: 500;
  margin: 0 10px;
  font-size: 12px; 
}


/* Page Header */
.portfolio-hero  {
  background: 
    linear-gradient(rgba(0, 0, 0, 0.6), 
    rgba(0, 0, 0, 0.3)), 
    url('../images/portfolio-hero-bg.jpeg') center/cover no-repeat;
  position: relative;
  color: white;
  min-height: 300px; 
  display: flex;
  align-items: center;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  margin-bottom: 40px; 
}

.portfolio-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.4);
}

.portfolio-hero h1 {
  font-weight: 700;
  color: white;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.text-highlight {
  color: #8B5A2B;
}

/* Filter Controls */
.filter-controls {
  background-color: white;
  padding: 15px;
  border-radius: 50px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.filter-controls li {
  padding: 8px 20px;
  cursor: pointer;
  border-radius: 30px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.filter-controls li:hover,
.filter-controls li.active {
  background-color: #8B5A2B;
  color: white;
}

/* Flip Card Styles */
.flip-card {
  perspective: 1000px;
  height: 350px;
  position: relative;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.flip-card-front {
  background-color: #fff;
}

.flip-card-back {
  background-color: #fff;
  transform: rotateY(180deg);
}

.flip-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Project Info on Front */
.project-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  transform: translateY(0);
  transition: transform 0.3s ease;
}

.flip-card-front:hover .project-info {
  transform: translateY(0);
}

.project-info h4 {
  font-weight: 600;
  margin-bottom: 5px;
}

.project-info p {
  margin-bottom: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Floating Badge */
.floating-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: #8B5A2B;
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  z-index: 2;
}

/* View Fullscreen Button */
.view-fullscreen {
  position: absolute;
  top: 15px;
  right: 15px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-fullscreen:hover {
  background-color: #8B5A2B;
  transform: scale(1.1);
}

/* Modal Styles */
.modal-content {
  border: none;
  border-radius: 0;
}

.modal-body {
  padding: 0;
}

.btn-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  opacity: 1;
  font-size: 1.5rem;
  color: white;
  z-index: 10;
}

/* Footer Styles */
footer {
  background-color: #2c2c2c;
}

footer h5 {
  font-weight: 600;
  margin-bottom: 20px;
  position: relative;
}

footer h5::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: #8B5A2B;
}

.social-links a {
  transition: color 0.3s ease;
}

.social-links a:hover {
  color: #8B5A2B !important;
}

.back-to-top {
  transition: all 0.3s ease;
}

.back-to-top:hover {
  color: #8B5A2B !important;
  transform: translateY(-3px);
}

/* Animations */
.animate-text {
  opacity: 0;
  transform: translateY(20px);
}

.delay-1 {
  animation-delay: 0.3s;
}

.delay-2 {
  animation-delay: 0.6s;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .portfolio-hero {
    height: 50vh;
    background-attachment: scroll;
  }
  
  .filter-controls li {
    padding: 5px 10px;
    font-size: 0.9rem;
  }
  
  .flip-card {
    height: 300px;
  }
}

/* Download Button Styles */
.btn-read-more.download-btn {
  position: relative;
  padding: 12px 24px;
  background-color: #8B4513;
  color: white;
  border-radius: 30px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.3s ease;
  overflow: hidden;
}

.btn-read-more.download-btn:hover {
  background-color: #A0522D;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-read-more.download-btn .file-size-info {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background-color: #333;
  color: white;
  padding: 5px;
  font-size: 12px;
  border-radius: 0 0 30px 30px;
  opacity: 0;
  transition: all 0.3s ease;
  transform: translateY(-10px);
}

.btn-read-more.download-btn:hover .file-size-info {
  opacity: 1;
  transform: translateY(0);
}

/* Ensure smooth transitions when showing/hiding items */
.portfolio-item {
  transition: all 0.3s ease;
}

/* Hide items with d-none class */
.portfolio-item.d-none {
  display: none !important;
}

/* Chat Widget Styles */
  .twilio-chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.15);
    z-index: 9999;
    font-family: 'Aktiv Grotesk', sans-serif;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    height: 500px;
    display: flex;
    flex-direction: column;
  }
  
  .twilio-chat-widget.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .chat-header {
    background: #075E54;
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
  }
  
  .chat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: #f5f5f5;
  }
  
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
  }
  
  .chat-bubble {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 18px;
    margin-bottom: 10px;
    position: relative;
  }
  
  .chat-bubble.received {
    background: white;
    align-self: flex-start;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .chat-bubble.sent {
    background: #DCF8C6;
    align-self: flex-end;
  }
  
  .chat-time {
    display: block;
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 4px;
  }
  
  .chat-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  
  .form-group {
    width: 100%;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
  }
  
  .form-group textarea {
    min-height: 80px;
    resize: none;
  }
  
  .send-button {
    background: #25D366;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
  }
  
  .send-button:hover {
    background: #128C7E;
  }
  
  .chat-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 30px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  .chat-toggle:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  }
  
  .chat-toggle i {
    font-size: 20px;
  }