/* ===== CSS Variables ===== */
:root {
  --bg: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #0ea5e9;
  --primary-dark: #0284c7;
  --accent: #14b8a6;
  --accent-light: #5eead4;
  --card: #f9fafb;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ===== Utility Classes ===== */
.sr-only {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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

/* ===== Header - Sticky & Mobile Optimized ===== */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: var(--transition);
}

.brand:hover {
  opacity: 0.8;
}

.brand img {
  max-height: 40px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav a:hover {
  color: var(--primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.nav a:hover::after {
  width: 100%;
}

.nav .btn-outline {
  padding: 0.625rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
}

.nav .btn-outline::after {
  display: none;
}

.nav .btn-outline:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: var(--transition);
  border-radius: 2px;
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  background: white;
}

.mobile-nav a {
  padding: 1rem 1.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.mobile-nav a:hover {
  background: var(--card);
  color: var(--primary);
}

.mobile-nav .btn {
  margin: 0.5rem 1.5rem;
}

@media (max-width: 920px) {
  .nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-nav.active {
    display: flex;
  }
}

/* ===== Hero Section - Enhanced ===== */
.hero {
  position: relative;
  padding: 5rem 0 4rem;
  text-align: center;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0fdf4 100%);
  overflow: hidden;
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image: 
    linear-gradient(var(--primary) 1px, transparent 1px),
    linear-gradient(90deg, var(--primary) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
}

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

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  margin: 0 0 1rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--text);
}

.lead {
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 750px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.br-md {
  display: none;
}

.cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.cta-subtext {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* ===== Buttons - Enhanced ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  min-height: 48px; /* Touch-friendly */
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.btn-large {
  padding: 1.125rem 2rem;
  font-size: 1.05rem;
}

.btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

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

/* ===== Sections ===== */
section {
  padding: 4rem 0;
}

section h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
  font-weight: 800;
  text-align: center;
}

.section-intro {
  text-align: center;
  color: var(--muted);
  max-width: 600px;
  margin: -1rem auto 2rem;
}

/* ===== Grids ===== */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

/* ===== Cards - Enhanced ===== */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--primary);
}

.card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: white;
}

.card h3 {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.card p {
  color: var(--muted);
  line-height: 1.6;
}

/* ===== Features Section ===== */
.features {
  padding: 3rem 0;
  background: white;
}

/* ===== Services Section ===== */
.services {
  background: var(--card);
}

.service-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.service-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  font-size: 1.05rem;
}

.list-icon {
  flex-shrink: 0;
  color: var(--accent);
}

.inline-icon {
  vertical-align: middle;
  margin-right: 0.25rem;
  color: var(--primary);
}

.service-figure {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

/* ===== Pricing Section ===== */
.pricing {
  background: white;
}

.price-card {
  position: relative;
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.price-badge {
  position: absolute;
  top: -12px;
  right: 20px;
  background: var(--accent);
  color: white;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price {
  margin: 1rem 0 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}

.price .big {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary);
}

.bullets {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bullets li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.bullets li:last-child {
  border-bottom: none;
}

/* ===== Calculator ===== */
.calc {
  background: white;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.calc h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.calc label {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--text);
}

.check {
  flex-direction: row !important;
  align-items: center;
  gap: 0.75rem;
}

.check input {
  width: auto;
  margin: 0;
  min-width: 20px;
  min-height: 20px;
}

.calc input,
.calc textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.calc input:focus,
.calc textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.calc .note {
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
  color: var(--muted);
}

.calc .result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #f0f9ff, #f0fdf4);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1rem 0 1.5rem;
}

.total {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--primary);
}

/* ===== Testimonials ===== */
.testimonials {
  background: var(--card);
}

.testimonials blockquote {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 0;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.testimonials blockquote:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.stars {
  color: #f59e0b;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonials p {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.testimonials cite {
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
}

/* ===== Projects ===== */
.projects {
  background: white;
}

.project-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  transition: var(--transition);
}

.project-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.project-card h3,
.project-card .project-desc {
  padding: 0 1.25rem;
}

.project-card h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.2rem;
}

.project-desc {
  color: var(--muted);
  font-size: 0.95rem;
  padding-bottom: 1.25rem;
}

.placeholder {
  height: 200px;
  background: linear-gradient(135deg, #e5e7eb, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.thumb {
  display: block;
  cursor: pointer;
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}

.thumb::after {
  content: '🔍';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0;
  transition: var(--transition);
}

.thumb:hover::after {
  opacity: 1;
}

.thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.thumb:hover img {
  transform: scale(1.05);
}

/* ===== FAQ Section ===== */
.faq {
  background: white;
}

.faq-grid {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--card);
  color: var(--primary);
}

.faq-icon {
  flex-shrink: 0;
  transition: transform 0.3s ease;
  color: var(--primary);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer p {
  padding: 0 1.5rem 1.5rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ===== Contact Section ===== */
.contact {
  background: var(--card);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.contact-form label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: var(--text);
}

.contact-form input,
.contact-form textarea {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  font-family: inherit;
  transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.contact-form textarea {
  grid-column: 1 / -1;
  resize: vertical;
  min-height: 120px;
}

.contact-form button {
  grid-column: 1 / -1;
}

.contact-info {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.contact-info h3 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  flex-shrink: 0;
  color: var(--primary);
}

.contact-item strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.contact-item a {
  color: var(--primary);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

.contact-item p {
  margin: 0;
  color: var(--muted);
}

/* WhatsApp Button */
.whatsapp-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 1rem;
  background: #25D366;
  color: white;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  justify-content: center;
  transition: var(--transition);
  margin-top: 1rem;
}

.whatsapp-btn:hover {
  background: #20ba59;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* ===== Modal ===== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius);
  object-fit: contain;
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #fff;
  font-size: 3rem;
  cursor: pointer;
  font-weight: bold;
  user-select: none;
  transition: var(--transition);
  line-height: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
}

.modal-close:hover {
  color: var(--primary);
  background: rgba(0, 0, 0, 0.7);
  transform: rotate(90deg);
}

/* ===== Footer ===== */
.site-footer {
  background: var(--text);
  color: white;
  padding: 3rem 0 1.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo img {
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-logo p {
  color: rgba(255, 255, 255, 0.7);
}

.footer-links h4,
.footer-contact h4 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-links a {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
  padding-left: 0.5rem;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-bottom .link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.footer-bottom .link:hover {
  color: white;
  text-decoration: underline;
}

/* ===== Back to Top Button ===== */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
  z-index: 90;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

.back-to-top.visible {
  display: flex;
}

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

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.fade-in-section {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 920px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .br-md {
    display: inline;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 760px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .contact-form {
    grid-template-columns: 1fr;
  }
  
  .cta {
    flex-direction: column;
    width: 100%;
  }
  
  .cta .btn {
    width: 100%;
  }
  
  section {
    padding: 3rem 0;
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    padding: 3rem 0 2rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .card,
  .price-card,
  .calc,
  .contact-info {
    padding: 1.5rem;
  }
}

/* ===== Utilities ===== */
.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.link:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}
