/* Base Styles */
body {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
  scroll-behavior: smooth;
}

p,
a,
button {
  font-family: "Poppins", sans-serif !important;
  font-weight: 400;
  font-style: normal;
}

span {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: normal;
}

h2,
h3,
h4,
h5,
h6 {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: normal;
}

h3.font-medium {
  font-weight: 500 !important;
  font-style: normal;
}

/* Navigation Styles */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: #dc2626;
  transition: width 0.3s ease;
}

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

/* Mobile Navigation */
.mobile-nav-link {
  transition: color 0.3s ease;
}

/* Smooth scrolling for anchor links */
html {
  scroll-behavior: smooth;
}

/* Section transitions */
section {
  transition: all 0.3s ease;
}

/* Card hover effects */
.card-hover {
  transition: all 0.3s ease;
}

.card-hover: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);
}

/* Button animations */
.btn-primary {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

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

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

/* Form styles */
input, textarea, select {
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Loading animation */
.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

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

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

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-link::after {
    display: none;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Custom styles for DIMAS website */

/* Frosted Glass Effect */
.frosted-glass {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.frosted-glass-card {
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.2);
  transition: all 0.3s ease;
}

.frosted-glass-card:hover {
  background: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px 0 rgba(31, 38, 135, 0.25);
}

.frosted-glass-icon {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.9), rgba(51, 65, 85, 0.9));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 15px 0 rgba(0, 0, 0, 0.2);
}

/* Liquid Glass Background */
.liquid-glass-bg {
  position: relative;
  overflow: hidden;
}

.liquid-glass-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, 
    rgba(255, 255, 255, 0.1) 0%, 
    rgba(255, 255, 255, 0.05) 50%, 
    rgba(255, 255, 255, 0.1) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: inherit;
}

.liquid-glass-bg::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, 
    rgba(255, 255, 255, 0.1) 0%, 
    transparent 70%);
  animation: liquid-shift 8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes liquid-shift {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(10px, -10px) rotate(1deg);
  }
  50% {
    transform: translate(-5px, 5px) rotate(-1deg);
  }
  75% {
    transform: translate(-10px, -5px) rotate(0.5deg);
  }
}

/* Enhanced frosted glass for vision section */
.vision-frosted-glass {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.vision-card {
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 4px 16px 0 rgba(31, 38, 135, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.vision-card:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px) scale(1.005);
  box-shadow: 
    0 8px 25px 0 rgba(31, 38, 135, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Simple fixed background */
.parallax-bg {
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* Fade in animations */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-right {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fade-in-delay {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  50% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in animations */
@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scale-in-delay {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  25% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scale-in-delay-2 {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  50% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scale-in-delay-3 {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  75% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Bounce in animation */
@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }
  50% {
    opacity: 1;
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Float animations */
@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.3;
  }
  90% {
    opacity: 0.3;
  }
  100% {
    transform: translateY(-100px) translateX(100px);
    opacity: 0;
  }
}

@keyframes float-delay {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes float-gentle {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-3px);
  }
}

/* Pulse animations */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Apply animations */
.animate-fade-in-up {
  animation: fade-in-up 1s ease-out;
}

.animate-fade-in-left {
  animation: fade-in-left 1s ease-out;
}

.animate-fade-in-right {
  animation: fade-in-right 1s ease-out;
}

.animate-slide-in-left {
  animation: slide-in-left 1s ease-out;
}

.animate-fade-in-delay {
  animation: fade-in-delay 1.5s ease-out;
}

.animate-scale-in {
  animation: scale-in 0.8s ease-out;
}

.animate-scale-in-delay {
  animation: scale-in-delay 1.2s ease-out;
}

.animate-scale-in-delay-2 {
  animation: scale-in-delay-2 1.6s ease-out;
}

.animate-scale-in-delay-3 {
  animation: scale-in-delay-3 2s ease-out;
}

.animate-bounce-in {
  animation: bounce-in 1s ease-out;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-float-delay {
  animation: float-delay 3s ease-in-out infinite;
  animation-delay: 0.5s;
}

.animate-float-gentle {
  animation: float-gentle 4s ease-in-out infinite;
}

.animate-pulse-slow {
  animation: pulse-slow 2s ease-in-out infinite;
}

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

/* Responsive design improvements */
@media (max-width: 768px) {
  /* Particles are now visible on all screen sizes */
}

/* Particle animations */
#particles-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  z-index: 40;
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 4px rgba(255, 255, 255, 0.3);
}

.particle-1 {
  width: 8px;
  height: 8px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
  animation-duration: 25s;
}

.particle-2 {
  width: 12px;
  height: 12px;
  top: 60%;
  left: 80%;
  animation-delay: -5s;
  animation-duration: 30s;
}

.particle-3 {
  width: 6px;
  height: 6px;
  top: 40%;
  left: 60%;
  animation-delay: -10s;
  animation-duration: 22s;
}

.particle-4 {
  width: 10px;
  height: 10px;
  top: 80%;
  left: 20%;
  animation-delay: -15s;
  animation-duration: 28s;
}

.particle-5 {
  width: 8px;
  height: 8px;
  top: 30%;
  left: 90%;
  animation-delay: -7s;
  animation-duration: 26s;
}

.particle-6 {
  width: 12px;
  height: 12px;
  top: 70%;
  left: 40%;
  animation-delay: -12s;
  animation-duration: 32s;
}

/* Additional floating particles for variety */
.particle-7 {
  width: 5px;
  height: 5px;
  top: 15%;
  left: 70%;
  animation-delay: -3s;
  animation-duration: 24s;
  background: rgba(59, 130, 246, 0.4);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.6);
}

.particle-8 {
  width: 9px;
  height: 9px;
  top: 85%;
  left: 85%;
  animation-delay: -18s;
  animation-duration: 29s;
  background: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.6);
}

.particle-9 {
  width: 7px;
  height: 7px;
  top: 50%;
  left: 15%;
  animation-delay: -8s;
  animation-duration: 27s;
  background: rgba(245, 158, 11, 0.4);
  box-shadow: 0 0 11px rgba(245, 158, 11, 0.6);
}

.particle-10 {
  width: 11px;
  height: 11px;
  top: 25%;
  left: 50%;
  animation-delay: -13s;
  animation-duration: 31s;
  background: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.6);
}

/* Particle variations for different sections */
.particle-small {
  width: 4px;
  height: 4px;
  background: rgba(220, 38, 38, 0.3);
  box-shadow: 0 0 8px rgba(220, 38, 38, 0.5);
}

.particle-medium {
  width: 8px;
  height: 8px;
  background: rgba(220, 38, 38, 0.4);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.6);
}

.particle-large {
  width: 12px;
  height: 12px;
  background: rgba(220, 38, 38, 0.5);
  box-shadow: 0 0 16px rgba(220, 38, 38, 0.7);
}

/* Language Toggle Styles */
.lang-toggle {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-toggle-btn {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
}

.lang-toggle-btn.active {
  background: #dc2626;
  color: white;
}

.lang-toggle-btn.inactive {
  color: #6b7280;
  background: transparent;
}

.lang-toggle-btn.inactive:hover {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

/* Hero Video Background */
.hero-video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-video-container video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.hero-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.video-controls {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  z-index: 3;
}

.video-control-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-container video {
    display: none;
  }
}

/* Screen reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  padding: inherit;
  margin: inherit;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Flip Card Styles */
.flip-card {
  perspective: 1000px;
  height: 400px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner,
.flip-card:focus-within .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.flip-card-front {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.flip-card-back {
  background: white;
  color: #1f2937;
  transform: rotateY(180deg);
  border: 2px solid #e5e7eb;
}

/* Mobile: tap to flip */
@media (hover: none) and (pointer: coarse) {
  .flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
  }
}