/* ==============================================
   RESET & BASE STYLES
   ============================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary Colors */
  --primary-blue: #005da3;
  --secondary-blue: #0074c7;
  --light-blue: #e6f2ff;
  --lighter-blue: #cce5ff;
  --dark-blue: #003d6b;

  /* Accent Colors */
  --accent-orange: #ff6b35;
  --accent-green: #06d6a0;
  --accent-yellow: #ffd93d;
  --warning-red: #ef4444;
  --accent-red: #ef4444;
  --whatsapp-green: #25D366;

  /* Neutral Colors */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-light: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-medium: #6b7280;
  --gray-dark: #1f2937;
  --gray-900: #111827;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--gray-dark);
  overflow-x: hidden;
  background: var(--white);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==============================================
   TYPOGRAPHY
   ============================================== */
h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--white), var(--light-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  animation: fadeInUp 1s ease-out;
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--dark-blue);
  text-align: center;
  position: relative;
  opacity: 0;
  transform: translateY(30px);
}

h2.animate {
  animation: fadeInUp 0.8s ease-out forwards;
}

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60px;
  height: 4px;
  background: var(--primary-blue);
  border-radius: 2px;
  transition: transform 0.5s ease;
  will-change: transform;
}

h2.animate::after {
  transform: translateX(-50%) scaleX(1);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--primary-blue);
}

/* ==============================================
   LOADER
   ============================================== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--white);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-logo {
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  animation: bounce 1.2s infinite;
  background: #fff;
  padding: 10px;
}

.loader-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: var(--light-blue);
  border-radius: 2px;
  margin: 20px auto;
  overflow: hidden;
}

.loader-progress {
  width: 0;
  height: 100%;
  background: var(--primary-blue);
  animation: loading 1.8s ease-out forwards;
}

/* ==============================================
   HERO SECTION
   ============================================== */
#hero {
  position: relative;
  height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  padding: 0 2rem;
  margin: 1.3rem;
  margin-top: 90px;
  padding-top: 80px;
  border-radius: 30px;
  border: 3px solid rgba(0, 93, 163, 0.2);
}

.hero-background-picture {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-background {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0.9;
  display: block;
  will-change: transform;
}

#hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: transparent;
  z-index: 1;
  opacity: 0.9;
}

#hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at center,
    transparent 0%,
    rgba(0, 61, 107, 0.2) 100%
  );
  z-index: 1;
  opacity: 0.9;
}

.hero-content {
  z-index: 2;
  text-align: left;
  opacity: 0;
  transform: translateY(50px);
  animation: heroEntry 1.2s ease-out 0.5s forwards;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.hero-content h1 {
  margin-bottom: 1.5rem;
}

.hero-slogan {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  color: var(--white);
  margin: 1.5rem 0;
  max-width: 700px;
  line-height: 1.4;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  letter-spacing: 0.5px;
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 93, 163, 0.4),
    0 0 30px rgba(0, 116, 199, 0.3);
  animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 0 15px rgba(0, 93, 163, 0.3),
      0 0 25px rgba(0, 116, 199, 0.2);
  }
  to {
    text-shadow:
      0 2px 4px rgba(0, 0, 0, 0.3),
      0 0 25px rgba(0, 93, 163, 0.5),
      0 0 40px rgba(0, 116, 199, 0.4),
      0 0 55px rgba(204, 229, 255, 0.3);
  }
}

.hero-subline {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  font-weight: 400;
  color: var(--white);
  margin-bottom: 0.5rem;
  max-width: 650px;
  line-height: 1.6;
  opacity: 0.92;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.hero-buttons .btn-primary,
.hero-buttons .btn-secondary {
  padding: 16px 40px;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: auto;
  min-width: 200px;
  margin: 0;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-buttons .btn-primary {
  background: linear-gradient(135deg, var(--accent-green), #06b392);
  color: var(--white);
  border: 2px solid transparent;
}

.hero-buttons .btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.hero-buttons .btn-primary:hover {
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 15px 35px rgba(6, 214, 160, 0.5);
}

.hero-buttons .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: var(--white);
  transform: translateY(-5px) scale(1.03);
  box-shadow: 0 15px 35px rgba(255, 255, 255, 0.4);
}

.hero-logo {
  width: 200px;
  height: 200px;
  margin: 0 auto 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  padding: 1.2rem;
  animation: float 3s ease-in-out infinite;
}

.hero-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.subheadline {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  margin-top: 1rem;
  color: var(--white);
  animation: fadeIn 1s ease-out 1s forwards;
  opacity: 0;
}

/* ==============================================
   BUTTONS
   ============================================== */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: var(--white);
  padding: 15px 40px;
  border: none;
  border-radius: 50px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
}

.btn-primary:hover::before {
  width: 500px;
  height: 500px;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 93, 163, 0.3);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 10px 25px;
  border: 2px solid var(--white);
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-secondary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--white);
  transform: translate(-50%, -50%);
  transition: width 0.5s, height 0.5s;
  border-radius: 50px;
  z-index: -1;
}

.btn-secondary:hover::before {
  width: 120%;
  height: 200%;
}

.btn-secondary:hover {
  color: var(--primary-blue);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(255, 255, 255, 0.3);
}

/* ==============================================
   SECTIONS
   ============================================== */
section {
  padding: 100px 0;
  position: relative;
  overflow: hidden;
}

.section-bg {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="50,0 100,50 50,100 0,50" fill="none" stroke="%23005da3" stroke-width="0.5"/></svg>');
  background-size: 50px 50px;
  animation: bgFloat 20s linear infinite;
}

/* ==============================================
   SERVICES SECTION
   ============================================== */
#services {
  background: linear-gradient(135deg, var(--white), var(--light-blue));
  position: relative;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.service-card {
  background: var(--white);
  border-radius: 15px;
  padding: 2rem;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(50px) rotateX(-10deg);
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  will-change: transform, opacity;
}

.service-card.animate {
  opacity: 1;
  transform: translateY(0) rotateX(0);
  will-change: auto;
}

.service-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--primary-blue) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.service-card:hover::before {
  opacity: 0.1;
}

.service-card:hover {
  transform: translateY(-15px) scale(1.05);
  box-shadow: 0 30px 60px rgba(0, 93, 163, 0.15);
  border-color: var(--primary-blue);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 0 1.2rem 0;
  background: linear-gradient(135deg, var(--light-blue), var(--lighter-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: transform 0.5s ease;
  will-change: transform;
}

.service-card:hover .service-icon {
  transform: rotate(360deg) scale(1.1);
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  color: var(--white);
}

.service-card h3 {
  margin-bottom: 0.75rem;
}

.service-card ul {
  padding-left: 1.1rem;
}

.service-card li {
  margin: 0.4rem 0;
}

/* ==============================================
   WHY US SECTION
   ============================================== */
#why-us {
  background: var(--white);
  position: relative;
}

.why-us-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
  perspective: 1000px;
}

.why-us-item {
  text-align: center;
  transition: transform 0.5s ease;
  opacity: 0;
  transform: translateZ(-100px) rotateY(20deg);
}

.why-us-item.animate {
  animation: flipIn 0.8s ease-out forwards;
}

.why-us-item:hover {
  transform: translateZ(50px) scale(1.1);
}

.why-us-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.5rem;
  transition: all 0.5s ease;
  position: relative;
}

.why-us-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--primary-blue);
  animation: pulse 2s ease-in-out infinite;
}

/* ==============================================
   GALLERY SECTION
   ============================================== */
#gallery {
  background: linear-gradient(135deg, var(--light-blue), var(--white));
  position: relative;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.gallery-item {
  position: relative;
  height: 280px;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  opacity: 0;
  transform: scale(0.8) rotate(5deg);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.gallery-item.animate {
  animation: galleryReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gallery-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(0, 93, 163, 0.7));
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.2) rotate(3deg);
}

.gallery-overlay {
  position: absolute;
  bottom: -100%;
  left: 0;
  right: 0;
  background: rgba(0, 93, 163, 0.9);
  color: var(--white);
  padding: 1.5rem;
  transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
}

.gallery-item:hover .gallery-overlay {
  bottom: 0;
}

.gallery-overlay h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.2rem;
  color: var(--white);
}

.gallery-overlay p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ==============================================
   CONTACT SECTION
   ============================================== */
#contact {
  background: var(--white);
  position: relative;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.contact-info {
  opacity: 0;
  transform: translateX(-50px);
}

.contact-info.animate {
  animation: slideInLeft 0.8s ease-out forwards;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: var(--dark-blue);
}

.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.contact-info-item:hover {
  transform: translateX(10px);
}

.contact-info-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--light-blue), var(--lighter-blue));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  margin-right: 1rem;
}

.contact-info-icon img {
  width: 24px;
  height: 24px;
}

.contact-form {
  background: var(--white);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 93, 163, 0.1);
  opacity: 0;
  transform: translateX(50px);
}

.contact-form.animate {
  animation: slideInRight 0.8s ease-out forwards;
}

.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--gray-dark);
  transition: color 0.3s ease;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid var(--light-blue);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: var(--white);
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 5px rgba(0, 93, 163, 0.1);
  transform: translateY(-2px);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* ==============================================
   FOOTER
   ============================================== */
footer {
  background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
  color: var(--white);
  padding: 4rem 0 2rem;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
  background-size: 100px 100px;
  animation: bgFloat 30s linear infinite;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.footer-section {
  opacity: 0;
  transform: translateY(30px);
}

.footer-section.animate {
  animation: fadeInUp 0.8s ease-out forwards;
}

.footer-logo {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.footer-logo:hover {
  background: var(--white);
  transform: rotate(360deg);
}

.footer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.footer-info p {
  margin: 0.5rem 0;
  display: flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.footer-info p:hover {
  transform: translateX(5px);
}

.footer-info p img {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  filter: brightness(0) invert(1);
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
  align-items: center;
}

.social-links a {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: var(--white);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
  z-index: 0;
}

.social-links a:hover::before {
  width: 100%;
  height: 100%;
}

.social-links a:hover {
  color: var(--primary-blue);
  transform: translateY(-5px);
  border-color: var(--white);
}

.social-links a span {
  position: relative;
  z-index: 1;
}

.social-links img {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}

.social-links a:hover img {
  filter: brightness(1) invert(0);
  will-change: filter;
}

/* ==============================================
   PARALLAX ELEMENTS
   ============================================== */
.parallax-element {
  position: absolute;
  opacity: 0.1;
  z-index: 0;
}

.parallax-square {
  width: 100px;
  height: 100px;
  border: 2px solid var(--primary-blue);
  transform: rotate(45deg);
  animation: float 8s ease-in-out infinite;
}

.parallax-circle {
  width: 80px;
  height: 80px;
  border: 2px solid var(--secondary-blue);
  border-radius: 50%;
  animation: float 10s ease-in-out infinite reverse;
}

/* ==============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================== */
.hero-content h1,
.hero-subline,
.hero-buttons {
  will-change: opacity, transform;
}

.hero-content h1.loaded,
.hero-subline.loaded,
.hero-buttons.loaded {
  will-change: auto;
}

/* ==============================================
   ANIMATIONS
   ============================================== */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-14px);
  }
}

@keyframes loading {
  to {
    width: 100%;
  }
}

@keyframes heroEntry {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  to {
    opacity: 0.95;
  }
}

@keyframes bgFloat {
  from {
    transform: translateX(0) translateY(0);
  }
  to {
    transform: translateX(50px) translateY(-50px);
  }
}

@keyframes flipIn {
  to {
    opacity: 1;
    transform: translateZ(0) rotateY(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes galleryReveal {
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@keyframes slideInLeft {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

/* ==============================================
   CSS FALLBACKS
   ============================================== */
@supports not (backdrop-filter: blur(10px)) {
  .gallery-overlay {
    background: rgba(0, 93, 163, 0.95);
  }
}

@supports not (font-size: clamp(1rem, 4vw, 2rem)) {
  .hero-content h1 {
    font-size: 2rem;
  }
  @media (min-width: 480px) {
    .hero-content h1 {
      font-size: 2.4rem;
    }
  }
  .hero-subline {
    font-size: 1rem;
  }
  @media (min-width: 480px) {
    .hero-subline {
      font-size: 1.15rem;
    }
  }
}

/* ==============================================
   RESPONSIVE - MOBILE (768px and below)
   ============================================== */
@media (max-width: 768px) {
  /* Typography */
  h1 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
  }
  h2 {
    font-size: clamp(1.6rem, 4.5vw, 2.2rem);
  }
  h3 {
    font-size: clamp(1.2rem, 3.5vw, 1.5rem);
  }
  body {
    font-size: 16px;
    line-height: 1.6;
  }
  p, li {
    line-height: 1.5;
  }
  section {
    padding: 60px 0;
  }


  /* Hero */
  #hero {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 120px 1.5rem 3rem;
    margin: 0;
    border-radius: 0;
    border: none;
    justify-content: center;
    align-items: center;
    display: flex;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  }
  #hero::before {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    opacity: 1;
  }
  .hero-background-picture {
    display: none;
  }
  .hero-background {
    display: none;
    opacity: 0;
  }
  .hero-content {
    text-align: center;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.95) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: heroFadeInUp 0.8s ease-out 0.3s both;
  }
  .hero-subline {
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    animation: heroFadeInUp 0.8s ease-out 0.5s both;
  }
  .hero-buttons {
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 400px;
    margin: 2rem auto 0;
    animation: heroFadeInUp 0.8s ease-out 0.7s both;
  }

  .hero-buttons .btn-primary,
  .hero-buttons .btn-secondary {
    width: 100%;
    min-height: 56px;
    text-align: center;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
  }

  .hero-buttons .btn-primary:active {
    transform: scale(0.97);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  }

  .hero-buttons .btn-secondary:active {
    transform: scale(0.97);
  }
  .hero-logo {
    width: 150px;
    height: 150px;
  }

  /* Contact */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .contact-form {
    padding: 1.5rem;
    border-radius: 16px;
  }
  input,
  textarea {
    min-height: 48px;
    padding: 14px 16px;
    font-size: 16px;
    border-radius: 12px;
    -webkit-appearance: none;
    appearance: none;
  }
  input:focus,
  textarea:focus {
    box-shadow: 0 0 0 4px rgba(0, 93, 163, 0.1);
  }
  textarea {
    min-height: 140px;
  }
  .btn-primary {
    width: 100%;
    min-height: 52px;
    font-size: 1.05rem;
    margin-top: 1rem;
  }

  /* Services */
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
  }
  .service-card {
    padding: 1.75rem;
    min-height: auto;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
  }
  .service-card:active {
    transform: scale(0.98);
  }

  /* Gallery */
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .gallery-item {
    height: 250px;
    border-radius: 12px;
  }
  .gallery-item.active .gallery-overlay {
    bottom: 0;
  }
  .gallery-overlay {
    padding: 1.25rem;
    background: rgba(0, 93, 163, 0.95);
    backdrop-filter: blur(5px);
  }
  .gallery-overlay h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
  }
  .gallery-overlay p {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Why Us */
  .why-us-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer */
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }
  .footer-section {
    padding: 0 1rem;
  }
  .footer-logo {
    margin: 0 auto 1rem;
  }
  .social-links {
    justify-content: center;
    gap: 1.25rem;
  }
  .social-links a {
    width: 48px;
    height: 48px;
  }
  .footer-info p {
    justify-content: center;
  }
}

/* ==============================================
   RESPONSIVE - SMALL MOBILE (480px and below)
   ============================================== */
@media (max-width: 480px) {
  section {
    padding: 50px 0;
  }
  .why-us-grid {
    grid-template-columns: 1fr;
  }
  .hero-buttons {
    align-items: stretch;
  }
  #hero {
    padding: 100px 1.2rem 2.5rem;
  }
  .hero-content h1 {
    font-size: 1.9rem;
    line-height: 1.2;
  }
  .hero-subline {
    font-size: 1rem;
    margin-bottom: 1.8rem;
  }
  .hero-buttons .btn-primary,
  .btn-secondary {
    padding: 12px 25px;
    font-size: 0.95rem;
  }
  .services-grid {
    gap: 1.25rem;
  }
  .service-card {
    padding: 1.5rem;
  }
  .gallery-item {
    height: 220px;
  }
}

/* ==============================================
   RESPONSIVE - EXTRA SMALL (360px and below)
   ============================================== */
@media (max-width: 360px) {
  .container {
    padding: 0 15px;
  }
  h1 {
    font-size: 1.6rem;
  }
  h2 {
    font-size: 1.5rem;
  }
  .hero-content h1 {
    font-size: 1.75rem;
  }
  .hero-subline {
    font-size: 0.95rem;
  }
}

/* ==============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================== */
@media (hover: none) and (pointer: coarse) {
  .service-card:hover {
    transform: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  }
}

/* ==============================================
   FLOATING WHATSAPP BUTTON
   ============================================== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 9998;
  transition: all 0.3s ease;
  text-decoration: none;
  animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:active {
  transform: scale(0.95);
}

.whatsapp-float svg {
  width: 36px;
  height: 36px;
}

@keyframes pulse-whatsapp {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    left: 20px;
    width: 56px;
    height: 56px;
  }

  .whatsapp-float svg {
    width: 32px;
    height: 32px;
  }
}

/* ==============================================
   SCROLL TO TOP BUTTON
   ============================================== */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: var(--primary-blue);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 93, 163, 0.4);
  z-index: 9997;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: var(--secondary-blue);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 93, 163, 0.6);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.05);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }

  .scroll-to-top svg {
    width: 22px;
    height: 22px;
  }
}

/* ==============================================
   ADVANCED SCROLL REVEAL ANIMATIONS
   ============================================== */

/* Base state for animated elements */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: opacity, transform;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-80px);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(80px);
  transition: all 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Scale up effect */
.reveal-scale {
  opacity: 0;
  transform: scale(0.85);
  transition: all 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Fade in only */
.reveal-fade {
  opacity: 0;
  transition: opacity 1s ease-out;
}

.reveal-fade.active {
  opacity: 1;
}

/* Staggered animations for multiple items */
.reveal-stagger:nth-child(1) { transition-delay: 0.1s; }
.reveal-stagger:nth-child(2) { transition-delay: 0.2s; }
.reveal-stagger:nth-child(3) { transition-delay: 0.3s; }
.reveal-stagger:nth-child(4) { transition-delay: 0.4s; }
.reveal-stagger:nth-child(5) { transition-delay: 0.5s; }
.reveal-stagger:nth-child(6) { transition-delay: 0.6s; }

/* Enhanced card hover effects */
.card-3d {
  transform-style: preserve-3d;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover {
  transform: translateY(-12px) rotateX(2deg) rotateY(-2deg);
  box-shadow:
    0 20px 40px rgba(0, 93, 163, 0.15),
    0 10px 20px rgba(0, 93, 163, 0.1),
    0 0 80px rgba(0, 93, 163, 0.05);
}

/* Glowing border animation */
.glow-border {
  position: relative;
  overflow: hidden;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg,
    var(--primary-blue),
    var(--secondary-blue),
    var(--primary-blue));
  background-size: 400% 400%;
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  animation: glowRotate 3s ease infinite;
  transition: opacity 0.3s ease;
}

.glow-border:hover::before {
  opacity: 1;
}

@keyframes glowRotate {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Floating animation for hero elements */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

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

/* Shimmer effect for loading/hover states */
.shimmer {
  position: relative;
  overflow: hidden;
}

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

.shimmer:hover::after {
  left: 100%;
}

/* Pulse animation for call-to-action elements */
.pulse-cta {
  animation: pulseCta 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulseCta {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(0, 93, 163, 0.7);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(0, 93, 163, 0);
  }
}

/* Smooth entrance for service cards */
.service-card {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.service-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.service-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow:
    0 25px 50px rgba(0, 93, 163, 0.2),
    0 15px 30px rgba(0, 93, 163, 0.15);
}

.service-card:hover::after {
  opacity: 0.05;
}

/* Text gradient animation */
.gradient-text {
  background: linear-gradient(
    90deg,
    var(--primary-blue),
    var(--secondary-blue),
    var(--primary-blue)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s linear infinite;
}

@keyframes gradientShift {
  to { background-position: 200% center; }
}

/* Ripple effect on click */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Counter animation */
.counter {
  font-size: 3rem;
  font-weight: 700;
  color: var(--primary-blue);
  display: inline-block;
}

/* Image zoom on hover */
.image-zoom {
  overflow: hidden;
  border-radius: 15px;
}

.image-zoom img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.image-zoom:hover img {
  transform: scale(1.15) rotate(2deg);
}

/* Parallax effect */
.parallax {
  transition: transform 0.1s ease-out;
  will-change: transform;
}

/* Smooth underline animation */
.underline-animation {
  position: relative;
  display: inline-block;
}

.underline-animation::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--primary-blue);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.underline-animation:hover::after {
  width: 100%;
}

/* Mobile optimization */
@media (max-width: 768px) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    transform: translateY(30px);
  }

  .card-3d:hover {
    transform: translateY(-8px);
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
