/* 
 * DK Credit Card Solutions
 * Custom CSS Styles
 */

/* Global Styles */
:root {
  --primary-color: #0056b3;
  --secondary-color: #6c757d;
  --accent-color: #ffc107;
  --light-gray: #f8f9fa;
  --dark-color: #343a40;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --border-radius: 0.25rem;
  --wave-color-1: #0056b3; /* Main blue */
  --wave-color-2: #0067d5; /* Slightly lighter blue */
  --section-spacing: 6rem; /* Added consistent section spacing */
  --element-spacing: 3rem; /* Added consistent element spacing */
}

body {
  font-family: 'Roboto', sans-serif;
  color: #333;
  line-height: 1.6;
  padding-top: 120px;
}

@media (max-width: 768px) {
  body {
    padding-top: 100px;
  }
}

/* Header */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  margin-bottom: var(--element-spacing);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  z-index: 1000;
  background-color: white;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.main-header.scrolled {
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  background-color: rgba(255, 255, 255, 0.95);
}

.header-top {
  background-color: white;
  padding: 10px 0;
  position: relative;
  z-index: 10;
}

.navbar {
  padding: 10px 0;
  background-color: white;
}



.navbar-nav .nav-link {
  color: var(--primary-color) !important;
  font-weight: 600;
  padding: 10px 15px !important;
  position: relative;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: #2979df !important;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15px;
  right: 15px;
  height: 2px;
  background-color: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover::after {
  transform: scaleX(1);
}

/* Colored Sections */
.bg-light-blue {
  background-color: #e9f2ff;
}

.bg-gradient-blue-section {
  background: linear-gradient(135deg, #0056b3 0%, #4285f4 50%, #87ceeb 100%);
  position: relative;
}

.bg-gradient-blue-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #0056b3 0%, #4285f4 50%, #87ceeb 100%);
  opacity: 0.9;
  z-index: 1;
}

.bg-gradient-blue-section .container {
  position: relative;
  z-index: 2;
}

.bg-light-green {
  background-color: #e8f5e9;
}

.bg-light-yellow {
  background-color: #fffde7;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  margin-bottom: 1rem;
}

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

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

/* Hero Section */
.hero {
  background: linear-gradient(to right, #0a3d62, #3c6382);
  color: white;
  padding: 9rem 0 12rem; /* Further increased vertical spacing */
  margin-bottom: var(--section-spacing);
  position: relative;
  overflow: hidden;
}

/* Creates the first downward angle/curve */
.hero::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 65px;
  background-color: white;
  clip-path: polygon(0 100%, 100% 100%, 0 0);
}

/* Creates the second downward angle/curve */
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 85px;
  background-color: white;
  clip-path: polygon(100% 100%, 100% 0, 0 100%);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: white;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: white;
}

.hero .btn {
  margin-top: 1rem;
}

/* Feature Boxes */
.feature-box {
  padding: 2rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
  height: 100%;
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature-box i {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

/* Custom SVG Icons */
.feature-icon {
  display: flex;
  justify-content: center;
  align-items: center;
}

.feature-icon svg {
  transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon svg {
  transform: scale(1.1);
}

/* Document Cards */
.document-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
}

.document-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

.document-card .btn {
  margin-top: auto;
}

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

.bg-gradient-success {
  background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
}

.bg-gradient-warning {
  background: linear-gradient(135deg, var(--accent-color) 0%, #fd7e14 100%);
}

.document-icon {
  flex-shrink: 0;
}

/* Ensure text visibility on all devices */
.fade-in {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Desktop text visibility fix */
@media (min-width: 992px) {
  .bg-white, .bg-light-green, .bg-light-yellow, .bg-light-blue {
    color: #333 !important;
  }
  
  .bg-white *, .bg-light-green *, .bg-light-yellow *, .bg-light-blue * {
    color: #333 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .bg-white p, .bg-light-green p, .bg-light-yellow p, .bg-light-blue p,
  .bg-white h2, .bg-light-green h2, .bg-light-yellow h2, .bg-light-blue h2,
  .bg-white h4, .bg-light-green h4, .bg-light-yellow h4, .bg-light-blue h4,
  .bg-white li, .bg-light-green li, .bg-light-yellow li, .bg-light-blue li,
  .bg-white ul, .bg-light-green ul, .bg-light-yellow ul, .bg-light-blue ul,
  .bg-white a, .bg-light-green a, .bg-light-yellow a, .bg-light-blue a {
    color: #333 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
  }
  
  .text-primary {
    color: var(--primary-color) !important;
  }
  
  .text-success {
    color: #198754 !important;
  }
}

/* Product Cards */
.product-card {
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-card:hover {
  transform: translateY(-10px);
}

.product-card img {
  max-height: 200px;
  object-fit: contain;
  padding: 1rem;
}

/* Programs */
.program-item {
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: var(--border-radius);
  transition: all 0.3s ease;
}

.program-item:hover {
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.program-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

/* Buttons */
.btn-primary {
  background-color: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #004494 !important;
  border-color: #004494 !important;
  color: white !important;
}

.btn-primary:focus,
.btn-primary:active,
.btn-primary:visited {
  background-color: #004494 !important;
  border-color: #004494 !important;
  color: white !important;
  box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25) !important;
}

a.btn-primary {
  color: white !important;
  text-decoration: none !important;
}

a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active,
a.btn-primary:visited {
  color: white !important;
  text-decoration: none !important;
}

.btn-accent {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: #333;
}

.btn-accent:hover {
  background-color: #e6af06;
  border-color: #e6af06;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1.1rem;
}

/* Cards */
.card {
  transition: all 0.3s ease;
  margin-bottom: 2rem;
}

.card:hover {
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Sticky Header */
.sticky-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Contact Form */
.contact-form .form-control {
  padding: 0.75rem;
  font-size: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #ced4da;
}

.contact-form .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.25);
}

/* Testimonials */
.testimonial {
  background-color: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.testimonial-author {
  font-weight: bold;
  margin-top: 1rem;
}

/* Call to Action */
.cta-section {
  background-color: var(--primary-color);
  color: white;
  padding: 6rem 0;
  margin: 4rem 0;
  position: relative;
  overflow: hidden;
}

.cta-section h2,
.cta-section p {
  color: white !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cta-section h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
}

.cta-section p {
  font-size: 1.4rem;
  margin-bottom: 2.5rem;
}

/* Footer */
footer a:hover {
  color: var(--accent-color) !important;
}

/* Chat Widget */
.chat-widget {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 350px;
  height: 450px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 5px 25px rgba(0,0,0,0.2);
  display: none;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
}

.chat-header {
  background-color: var(--primary-color);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
}

.chat-body {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
}

.chat-footer {
  padding: 1rem;
  border-top: 1px solid #e9ecef;
  display: flex;
}

.chat-input {
  flex-grow: 1;
  padding: 0.5rem;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius);
  margin-right: 0.5rem;
}

.chat-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 1001;
}

.message {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  max-width: 80%;
}

.user-message {
  background-color: #e9f2ff;
  margin-left: auto;
}

.operator-message {
  background-color: #f8f9fa;
}

/* Animations */
.fade-in {
  opacity: 1;
  transition: opacity 1s ease-in-out;
}

.fade-in.visible {
  opacity: 1;
}

/* Override for desktop to ensure text is always visible */
@media (min-width: 992px) {
  .fade-in {
    opacity: 1 !important;
  }
}

/* Custom gradient backgrounds for document cards */
.bg-gradient-primary-custom {
  background: linear-gradient(135deg, #0056b3 0%, #004494 100%) !important;
  color: white !important;
}

.bg-gradient-primary-custom .btn-light {
  color: #333 !important;
}

.bg-gradient-primary-custom h6,
.bg-gradient-primary-custom small,
.bg-gradient-primary-custom p {
  color: white !important;
}

/* Hero Carousel Styling */
.carousel-slide {
  min-height: 500px;
  padding: 3rem 0;
}

.carousel-content {
  padding: 0 2rem;
}

.carousel-image img {
  transition: transform 0.3s ease;
}

.carousel-item:hover .carousel-image img {
  transform: scale(1.05);
}

/* Carousel navigation circles */
#heroCarousel .carousel-indicators {
  bottom: -60px;
  margin-bottom: 0;
}

#heroCarousel .carousel-indicators button {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  margin: 0 8px;
  background-color: rgba(255, 255, 255, 0.5);
  border: 2px solid white;
  opacity: 1;
  transition: all 0.3s ease;
}

#heroCarousel .carousel-indicators button.active {
  background-color: #ffc107;
  border-color: #ffc107;
  transform: scale(1.2);
}

#heroCarousel .carousel-indicators button:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

/* Carousel controls */
#heroCarousel .carousel-control-prev,
#heroCarousel .carousel-control-next {
  width: 6%;
  opacity: 0.8;
}

#heroCarousel .carousel-control-prev:hover,
#heroCarousel .carousel-control-next:hover {
  opacity: 1;
}

#heroCarousel .carousel-control-prev-icon,
#heroCarousel .carousel-control-next-icon {
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  transition: all 0.3s ease;
}

#heroCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#heroCarousel .carousel-control-next:hover .carousel-control-next-icon {
  background-color: white;
  transform: scale(1.1);
}

/* Custom Spacing Utilities */
.py-6 {
  padding-top: 6rem;
  padding-bottom: 6rem;
}

.py-7 {
  padding-top: 7rem;
  padding-bottom: 7rem;
}

.py-8 {
  padding-top: 8rem;
  padding-bottom: 8rem;
}

.mt-6 {
  margin-top: 6rem;
}

.mb-6 {
  margin-bottom: 6rem;
}

.my-6 {
  margin-top: 6rem;
  margin-bottom: 6rem;
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
  .hero {
    padding: 3rem 0 6rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero::before {
    height: 45px;
  }
  
  .hero::after {
    height: 60px;
  }
  
  .chat-widget {
    width: 300px;
    height: 400px;
    bottom: 20px;
    right: 20px;
  }
  
  .chat-toggle {
    bottom: 20px;
    right: 20px;
  }
}