/* Custom Variables */
:root {
  --primary: #1906a0;
  --primary-dark: #1c4f63;
  --primary-light: #8ad8dc;
  --accent: #ed7219;
  --accent-dark: #d76315;
  --accent-light: #f29649;
  --secondary: #1c4f63;
  --secondary-light: #8ad8dc;
}

/* Global Styles */
html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  line-height: 1.6;
}

/* Utility Classes */
.bg-primary {
  background-color: var(--primary);
}

.bg-primary-dark {
  background-color: var(--primary-dark);
}

.bg-primary-light {
  background-color: var(--primary-light);
}

.bg-accent {
  background-color: var(--accent);
}

.bg-accent-dark {
  background-color: var(--accent-dark);
}

.bg-accent-light {
  background-color: var(--accent-light);
}

.bg-secondary {
  background-color: var(--secondary);
}

.bg-secondary-light {
  background-color: var(--secondary-light);
}

.text-primary {
  color: var(--primary);
}

.text-primary-dark {
  color: var(--primary-dark);
}

.text-primary-light {
  color: var(--primary-light);
}

.text-accent {
  color: var(--accent);
}

.text-accent-dark {
  color: var(--accent-dark);
}

.text-accent-light {
  color: var(--accent-light);
}

.text-secondary {
  color: var(--secondary);
}

.text-secondary-light {
  color: var(--secondary-light);
}

.border-primary {
  border-color: var(--primary);
}

.border-accent {
  border-color: var(--accent);
}

/* Button Hover Effects */
.hover-grow {
  transition: transform 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

.animate-slideUp {
  animation: slideUp 0.6s ease forwards;
}

/* Navbar Animation */
#navbar {
  transition: background-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}

.navbar-scrolled {
  padding-top: 0.5rem !important;
  padding-bottom: 0.5rem !important;
  background-color: rgba(25, 6, 160, 0.95) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

/* Hero Section Gradient */
.hero-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

/* Custom Card Styles */
.custom-card {
  border-radius: 1rem;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.custom-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Testimonial Slider */
.testimonial-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.testimonial-card .content {
  flex-grow: 1;
}

/* Portfolio Item */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(25, 6, 160, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

/* FAQ Accordion */
.faq-question {
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.faq-arrow {
  transition: transform 0.3s ease;
}

.faq-question.active .faq-arrow {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer.show {
  max-height: 500px;
}

/* Input Focus Styles */
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(237, 114, 25, 0.3);
  border-color: var(--accent);
}

/* WhatsApp Button Animation */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-btn {
  animation: pulse 2s infinite;
}

/* Mobile Menu */
#mobile-menu {
  transition: max-height 0.3s ease, opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
}

#mobile-menu.show {
  max-height: 300px;
  opacity: 1;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.25rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .testimonial-card {
    margin-bottom: 2rem;
  }
}

/* Calculator Result Table */
#profit-table {
  border-collapse: collapse;
  width: 100%;
}

#profit-table th,
#profit-table td {
  padding: 0.5rem 1rem;
  text-align: left;
}

#profit-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

#profit-table tbody tr:hover {
  background-color: #f0f0f0;
}

/* Tabs for Profit View */
.period-tab {
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.period-tab.active {
  background-color: var(--primary);
  color: white;
}

/* Customize Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Loading Spinner */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--accent);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Image Styles */
.country-flag {
  height: 40px;
  object-fit: contain;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.country-flag:hover {
  filter: grayscale(0%);
}

/* Chart Container */
.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

/* Success Message */
.success-message {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.success-message.show {
  opacity: 1;
  transform: translateY(0);
}

/* Custom Transition Speeds */
.transition-fast {
  transition-duration: 150ms;
}

.transition-medium {
  transition-duration: 300ms;
}

.transition-slow {
  transition-duration: 500ms;
}

/* Testimonials animation */
.testimonial-slide {
    transition: opacity 0.5s ease;
}

.indicator {
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.indicator.active {
    background-color: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #testimonial-slider {
        width: 100%;
        max-width: 450px;
        margin: 0 auto;
    }
    
    #prev-testimonial, #next-testimonial {
        padding: 8px;
    }
}

@media (min-width: 769px) {
    /* For PC and tablets, align to right side of container */
    #testimonial-slider {
        margin-right: 8%; /* Adjust this value to center the testimonial */
    }
}