/* Responsive Styles for Digital Receipt Organizer Template */

/* Mobile First Approach */
@media (max-width: 575.910px) {
  /* Extra small devices (portrait phones) */
  .hero-title {
    font-size: 1.60rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .section-title {
    font-size: 1.44rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .navbar-brand {
    font-size: 1.15rem;
  }
}

@media (min-width: 578px) and (max-width: 767.98px) {
  /* Small devices (landscape phones) */
  .hero-title {
    font-size: 1.80rem;
  }
  
  .section-title {
    font-size: 1.52rem;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  /* Medium devices (tablets) */
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-content {
  padding-top: 50px !important;
    text-align: center;
  }
}

@media (min-width: 996px) and (max-width: 1199.98px) {
  /* Large devices (desktops) */
  .container-fluid {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  /* Extra large devices (large desktops) */
  .container-fluid {
    max-width: var(--container-max-width);
  }
}

/* Grid Responsive Adjustments */
@media (max-width: 991.98px) {
  .row > [class*="col-"] {
    margin-bottom: 2rem;
  }
  
  .row > [class*="col-"]:last-child {
    margin-bottom: 0;
  }
}

/* Navigation Responsive */
@media (max-width: 991.98px) {
  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 0;
    margin: 0;
  }
}

/* Footer Responsive */
@media (max-width: 767.98px) {
  .footer .row > [class*="col-"] {
    text-align: center;
    margin-bottom: 2rem;
  }
}

/* Typography Responsive */
@media (max-width: 575.98px) {
  body {
    font-size: 1.03rem;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .btn {
    font-size: 0.92rem;
    padding: 0.625rem 1.5rem;
  }
}

/* Enhanced Mobile-First Responsive Design */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  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);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% { transform: translateY(0); }
  40%, 43% { transform: translateY(-20px); }
  70% { transform: translateY(-10px); }
  90% { transform: translateY(-6px); }
}

/* Animation classes */
.animate-fade-in {
  animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
  animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
  animation: fadeInRight 0.6s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-bounce {
  animation: bounce 2s infinite;
}

/* Loading animation */
.loading-dots {
  display: inline-block;
}

.loading-dots::after {
  content: '';
  animation: loading-dots 1.4s infinite;
}

@keyframes loading-dots {
  0%, 80%, 100% { opacity: 0; }
  40% { opacity: 1; }
}

/* Back to top button enhancement */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: none;
  z-index: 999;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(51, 124, 255, 0.30);
  transition: all 0.3s ease;
  background: var(--gradient-primary);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(54, 83, 213, 0.40);
}

/* Enhanced navbar scrolled state */
.navbar-scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

/* Form validation styles */
.is-invalid {
  border-color: #d74140;
  box-shadow: 0 0 0 0.2rem rgba(210, 42, 42, 0.25);
}

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.46rem;
  font-size: .875em;
  color: #ce385e;
}

/* Enhanced hover effects */
.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.team-photo:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 30px rgba(57, 104, 240, 0.30);
}

/* Tablet Styles */
@media (max-width: 1025px) {
  .hero-title {
    font-size: 2.61rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  :root {
    --section-padding: 3rem 0;
    --font-size-3xl: 1.75rem;
    --font-size-2xl: 1.5rem;
    --font-size-xl: 1.25rem;
  }
  
  .hero-section h1 {
    padding-top: 150px;
}

.hero-section {
    min-height: 80vh;
    text-align: center;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 1.20rem;
  }
  
  .section-title {
    font-size: 1.82rem;
  }
  
  .contact-form {
    padding: 2rem;
  }
  
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .process-timeline .row > div {
    margin-bottom: 2rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .card {
    margin-bottom: 1.62rem;
  }
  
  /* Mobile navigation */
  .navbar-collapse {
    background: white;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav .nav-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  }
  
  .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
  }
  
  /* Mobile back to top */
  .back-to-top {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
}

/* Small Mobile Styles */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.80rem;
  }
  
  .section-title {
    font-size: 1.56rem;
  }
  
  .contact-form {
    padding: 1.5rem;
  }
  
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  .btn {
    width: 100%;
    margin-bottom: 0.56rem;
  }
  
  .process-item {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .process-number {
    width: 50px;
    height: 50px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .back-to-top,
  .contact-form {
    display: none;
  }
  
  .section {
    page-break-inside: avoid;
  }
  
  .card {
    border: 1px solid #cdcdcd;
    box-shadow: none;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid #000;
  }
  
  .btn-primary {
    background: #310eff;
    border-color: #000bf9;
  }
  
  .text-muted {
    color: #000 !important;
  }
}



/* Focus Management */
*:focus {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-blue);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
  z-index: 10000;
}

.skip-link:focus {
  top: 0;
}

/* Smooth transitions for better UX */
* {
  transition: color 0.3s ease, background-color 0.3s ease, border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

/* Loading states */
.btn.loading {
  position: relative;
  color: transparent !important;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: currentColor;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Enhanced accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  max-width: 400px;
  padding: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Utility classes */
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: var(--gradient-primary);
}

.bg-gradient-secondary {
  background: var(--gradient-secondary);
}

.bg-gradient-accent {
  background: var(--gradient-accent);
}

/* Performance optimizations */
.gpu-accelerated {
  will-change: transform;
  transform: translateZ(0);
}

img {
  max-width: 100%;
  height: auto;
}

/* Lazy loading placeholder */
.lozad {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lozad.loaded {
  opacity: 1;
} 