/* ===== CSS Variables ===== */
:root {
  --navy: #0a2463;
  --navy-dark: #051838;
  --navy-light: #1e3a8a;
  --orange: #fb8500;
  --orange-light: #ffb703;
  --white: #ffffff;
  --gray-light: #f8fafc;
  --gray: #64748b;
  --gray-dark: #334155;
  --shadow: 0 10px 30px rgba(10, 36, 99, 0.1);
  --shadow-lg: 0 20px 60px rgba(10, 36, 99, 0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.6;
  color: var(--gray-dark);
  background: var(--white);
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== Header & Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--white);
  box-shadow: var(--shadow);
  z-index: 1000;
  transition: var(--transition);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 20px;
}

.nav-logo .logo-img {
  height: 40px;
  width: auto;
  transition: var(--transition);
}

.nav-logo .logo-img:hover {
  transform: scale(1.05);
}

/* Fallback for text logo */
.nav-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--navy), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  text-decoration: none;
  color: var(--gray-dark);
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--navy);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-btn {
  background: var(--orange);
  color: var(--white);
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  box-shadow: 0 4px 12px rgba(251, 133, 0, 0.3);
}

.nav-btn:hover {
  background: var(--orange-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(251, 133, 0, 0.4);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background: var(--navy);
  border-radius: 3px;
  transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
  margin-top: 80px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--white);
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: var(--white);
  clip-path: polygon(0 50%, 100% 0, 100% 100%, 0 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
  animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.4s backwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(251, 133, 0, 0.4);
}

.btn-primary:hover {
  background: var(--orange-light);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(251, 133, 0, 0.5);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
}

.btn-secondary:hover {
  background: var(--gray-light);
  transform: translateY(-3px);
}

/* ===== Sections ===== */
section {
  padding: 6rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--gray);
}

/* ===== Services Section ===== */
.services {
  background: var(--gray-light);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--orange-light), var(--orange));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}

.service-card h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--gray);
  line-height: 1.8;
}

/* ===== Packages Section ===== */
.packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.package-card {
  background: var(--white);
  border: 2px solid #e2e8f0;
  border-radius: 20px;
  padding: 2.5rem;
  transition: var(--transition);
  position: relative;
}

.package-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
  border-color: var(--orange);
}

.package-card.featured {
  border-color: var(--orange);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(180deg, var(--white) 0%, #fff7ed 100%);
}

.package-badge {
  position: absolute;
  top: -15px;
  right: 30px;
  background: var(--orange);
  color: var(--white);
  padding: 0.5rem 1.5rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
}

.package-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid #e2e8f0;
}

.package-header h3 {
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 1rem;
}

.package-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.package-price .price {
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange);
}

.package-price .currency {
  font-size: 1.25rem;
  color: var(--gray);
  font-weight: 600;
}

.package-features {
  list-style: none;
  margin-bottom: 2rem;
}

.package-features li {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  color: var(--gray-dark);
}

.package-features svg {
  color: var(--orange);
  flex-shrink: 0;
}

.package-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  background: var(--navy);
  color: var(--white);
  text-align: center;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.package-btn:hover {
  background: var(--orange);
  transform: translateY(-2px);
}

/* ===== SEO Section ===== */
.seo-section {
  background: var(--gray-light);
}

.seo-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.seo-text h2 {
  font-size: 2.5rem;
  color: var(--navy);
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.seo-text p {
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.seo-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.keyword {
  background: var(--white);
  color: var(--navy);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 2px solid var(--orange);
}

.seo-stats {
  display: grid;
  gap: 1.5rem;
}

.stat-card {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  color: var(--white);
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--orange-light);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* ===== Projects Section ===== */
.projects {
  padding: 5rem 0;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.projects-cta {
  text-align: center;
  margin-top: 3rem;
}

.project-card {
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.project-image {
  height: 300px;
  background-color: #f0f0f0;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Placeholder icon for projects without images */
.project-image::before {
  content: "";
  width: 80px;
  height: 80px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.3)' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  position: absolute;
  opacity: 0.4;
  z-index: 0;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 36, 99, 0.95), transparent);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: var(--white);
  opacity: 0;
  transition: var(--transition);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-overlay h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.project-overlay p {
  color: var(--orange-light);
  font-weight: 500;
  margin-bottom: 1rem;
}

.project-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--orange);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  margin-top: 0.5rem;
  transition: var(--transition);
}

.project-view-btn:hover {
  background: var(--orange-light);
  transform: translateX(5px);
}

/* ===== Project Modal ===== */
.project-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 36, 99, 0.9);
  backdrop-filter: blur(5px);
  z-index: 9999;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.project-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 1400px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 2px solid #e2e8f0;
}

.modal-header h3 {
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 700;
}

.modal-close {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--gray-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  color: var(--gray-dark);
}

.modal-close:hover {
  background: #ffe5d4;
  color: var(--orange);
  transform: rotate(90deg);
}

.modal-body {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: var(--gray-light);
}

.iframe-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--white);
  z-index: 1;
}

.iframe-loader.hidden {
  display: none;
}

.loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #e2e8f0;
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.iframe-loader p {
  color: var(--gray);
  font-weight: 500;
}

#projectFrame {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 2px solid #e2e8f0;
  display: flex;
  justify-content: center;
}

/* ===== Modal Animations ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Contact Section ===== */
.contact {
  background: var(--gray-light);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--orange);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  flex-shrink: 0;
}

.contact-item h4 {
  color: var(--navy);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-item a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.contact-item a:hover {
  color: var(--orange-light);
}

.contact-item p {
  color: var(--gray);
}

.contact-form {
  background: var(--white);
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--orange);
}

.form-group textarea {
  resize: vertical;
}

/* ===== Footer ===== */
.footer {
  background: var(--navy-dark);
  color: var(--white);
  padding: 4rem 0 2rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-col h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--orange-light);
}

.footer-col h4 {
  margin-bottom: 1rem;
  color: var(--orange-light);
}

.footer-col p {
  opacity: 0.8;
  line-height: 1.8;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col a {
  color: var(--white);
  text-decoration: none;
  opacity: 0.8;
  transition: var(--transition);
}

.footer-col a:hover {
  opacity: 1;
  color: var(--orange-light);
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  background: var(--orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--orange-light);
  transform: translateY(-3px);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0.7;
}

/* ===== WhatsApp Float ===== */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 100%;
    max-width: 300px;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    align-items: flex-start;
    gap: 1.5rem;
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .seo-content,
  .contact-content {
    grid-template-columns: 1fr;
  }

  .services-grid,
  .packages-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 5rem 0 4rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  section {
    padding: 4rem 0;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
  }

  .project-modal {
    padding: 1rem;
  }

  .modal-content {
    height: 85vh;
    border-radius: 12px;
  }

  .modal-header {
    padding: 1rem 1.5rem;
  }

  .modal-header h3 {
    font-size: 1.1rem;
  }

  .modal-footer {
    padding: 1rem 1.5rem;
  }

  .modal-footer .btn {
    font-size: 0.9rem;
    padding: 0.8rem 1.5rem;
  }
}

/* ===== Page Header (for inner pages) ===== */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: var(--white);
  padding: 8rem 0 4rem;
  text-align: center;
  margin-top: 80px;
}

.page-header h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.page-header p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 1.5rem;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  opacity: 0.8;
}

.breadcrumb a {
  color: var(--white);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  color: var(--orange);
}

.breadcrumb span:last-child {
  color: var(--orange-light);
  font-weight: 600;
}

.all-projects {
  background: var(--gray-light);
  padding: 5rem 0;
}

.nav-link.active {
  color: var(--orange);
  font-weight: 600;
}

@media (max-width: 768px) {
  .page-header {
    padding: 6rem 0 3rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .page-header p {
    font-size: 1rem;
  }
}

/* ===== Toast Notification System ===== */
.toast {
  position: fixed;
  bottom: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: var(--white);
  padding: 1rem 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 300px;
  max-width: 500px;
  text-align: center;
}

.toast.show {
  bottom: 30px;
  opacity: 1;
}

.toast.success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.toast.error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

@media (max-width: 768px) {
  .toast {
    min-width: calc(100% - 40px);
    max-width: calc(100% - 40px);
    padding: 0.9rem 1.5rem;
    font-size: 0.9rem;
  }

  .toast.show {
    bottom: 20px;
  }
}
