/**
 * Homepage/Landing Page CSS - Styles for the main landing page
 * ABIRTEK Web Application
 */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

:root {
  --primary: #1e3a8a;
  --secondary: #1e40af;
  --accent: #0369a1;
  --light: #e0f2fe;
  --dark: #0f172a;
  --gray: #64748b;
  --success: #10b981;
}

body {
  background-color: #ffffff;
  color: var(--dark);
  line-height: 1.6;
}

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

/* ============================================
   SKIP TO CONTENT (ACCESSIBILITY)
   ============================================ */

.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100;
  border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
  top: 0;
}

/* ============================================
   HEADER STYLES
   ============================================ */

header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.nav-links a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

/* HOVER EFFECT  */
.nav-links a:hover {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
}

/* ACTIVE STATE */
.nav-links a.active {
  color: #ffffff;
  background: var(--primary);
  border-color: var(--primary);
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo i {
  color: var(--accent);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 30px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--primary);
  cursor: pointer;
}

/* Mobile Navigation */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: left 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
    z-index: 99;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 10px 0;
  }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  color: var(--dark);
  padding: 120px 20px 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 30px 30px;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 56px;
  margin-bottom: 20px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--dark);
}

.hero-subtitle {
  font-size: 24px;
  margin-bottom: 15px;
  font-weight: 600;
  color: var(--dark);
}

.hero p {
  font-size: 18px;
  margin-bottom: 40px;
  color: var(--gray);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 15px 35px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border: 2px solid var(--primary);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary);
}

.btn-secondary {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background-color: var(--primary);
  color: white;
}

@media (max-width: 768px) {
  .hero {
    padding: 80px 20px 60px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 90%;
    max-width: 300px;
    justify-content: center;
    min-height: 44px; /* Ensure touch-friendly target size */
  }
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats {
  background: #f8fafc;
  padding: 60px 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 10px;
}

.stat-number i {
  font-size: 48px;
}

.stat-label {
  font-size: 16px;
  color: var(--gray);
  font-weight: 600;
}

@media (max-width: 992px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services {
  padding: 100px 20px;
  background: white;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 42px;
  font-weight: 700;
  color: #002b5c;
  margin-bottom: 15px;
}

.section-description {
  font-size: 18px;
  color: var(--gray);
  max-width: 700px;
  margin: 0 auto;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: #f8fafc;
  padding: 40px 30px;
  border-radius: 16px;
  text-align: center;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--primary);
}

.service-icon {
  font-size: 48px;
  margin-bottom: 20px;
  color: var(--primary);
}

.service-card h3 {
  font-size: 24px;
  color: #1e40af;
  margin-bottom: 15px;
  font-weight: 700;
}

.service-card p {
  color: var(--gray);
  margin-bottom: 25px;
  line-height: 1.6;
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: gap 0.3s;
}

.service-link:hover {
  gap: 12px;
}

.service-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 15px;
}

.badge-recurring {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.badge-project {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
}

.service-model {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray);
  margin-bottom: 15px;
  font-style: italic;
}

@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .services {
    padding: 60px 20px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-description {
    font-size: 16px;
  }
}

/* ============================================
   SERVICE COMPARISON SECTION
   ============================================ */

.service-comparison {
  padding: 80px 20px;
  background: white;
}

.comparison-table {
  max-width: 1000px;
  margin: 40px auto 0;
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th {
  background: var(--primary);
  color: white;
  padding: 20px;
  text-align: left;
  font-weight: 700;
  font-size: 16px;
}

.comparison-table td {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  vertical-align: top;
}

.comparison-table tr:last-child td {
  border-bottom: none;
}

.comparison-table td:first-child {
  font-weight: 600;
  color: var(--dark);
  background: #f8fafc;
  width: 30%;
}

.comparison-check {
  color: var(--success);
  font-size: 18px;
  font-weight: bold;
}

.comparison-empty {
  color: #d1d5db;
  font-size: 18px;
}

@media (max-width: 768px) {
  .service-comparison {
    padding: 60px 20px;
  }

  .comparison-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
  }

  .comparison-table table {
    min-width: 600px;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 15px 10px;
    font-size: 14px;
  }

  /* Visual hint that table is scrollable */
  .comparison-table::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.05));
    pointer-events: none;
  }
}

/* ============================================
   WHY CHOOSE US SECTION
   ============================================ */

.why-choose {
  padding: 100px 20px;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 50px auto 0;
}

.feature-item {
  background: white;
  padding: 30px;
  border-radius: 12px;
  display: flex;
  gap: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.feature-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 32px;
  color: var(--primary);
  flex-shrink: 0;
}

.feature-content h4 {
  font-size: 20px;
  color: #0a2540;
  margin-bottom: 10px;
  font-weight: 700;
}

.feature-content p {
  color: var(--gray);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .why-choose {
    padding: 60px 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .feature-item {
    padding: 25px;
  }
}

/* ============================================
   INDUSTRIES SECTION
   ============================================ */

.industries {
  padding: 100px 20px;
  background: white;
}

.industries-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  max-width: 1200px;
  margin: 50px auto 0;
}

.industry-item {
  text-align: center;
  padding: 30px 20px;
  border-radius: 12px;
  background: #f8fafc;
  transition: all 0.3s;
}

.industry-item:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
}

.industry-icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: var(--primary);
}

.industry-item:hover .industry-icon {
  color: white;
}

.industry-item h4 {
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 992px) {
  .industries-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .industries {
    padding: 60px 20px;
  }

  .industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .industries-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta {
  padding: 140px 20px 160px;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta h2 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.cta p {
  font-size: 18px;
  margin-bottom: 40px;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .cta {
    padding: 60px 20px;
  }

  .cta h2 {
    font-size: 32px;
  }

  .cta p {
    font-size: 18px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--primary);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 99;
  border: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
  background: var(--secondary);
  transform: translateY(-5px);
}

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

@media (max-width: 768px) {
  .back-to-top {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
  }
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: #002b5c;
  color: white;
  padding: 60px 20px 30px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 18px;
  margin-bottom: 20px;
  font-weight: 700;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section a {
  color: #add8e6;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: white;
  text-decoration: underline;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #add8e6;
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: white;
  text-decoration: none;
  transition: all 0.3s;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
  }
}

@media (max-width: 480px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  /* Ensure all buttons meet minimum touch target size */
  .btn,
  button,
  .modal-actions .btn {
    min-height: 44px;
    padding: 12px 24px;
  }
}

/* ============================================
   QUOTE REQUEST MODAL
   ============================================ */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  overflow: auto;
  animation: fadeIn 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: #ffffff;
  margin: 20px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 30px;
  border-bottom: 1px solid #e5e7eb;
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  color: white;
  border-radius: 12px 12px 0 0;
}

.modal-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 32px;
  color: white;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.2s;
  padding: 0;
  width: 32px;
  height: 32px;
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
  background-color: #d7edf9;
  border-radius: 0 0 12px 12px;
}

.modal-description {
  color: #374151;
  margin-bottom: 24px;
  font-size: 15px;
}

.modal-body .form-group {
  margin-bottom: 20px;
}

.modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.modal-body label {
  display: block;
  margin-bottom: 8px;
  color: var(--dark);
  font-weight: 500;
  font-size: 14px;
}

.modal-body .required {
  color: #ef4444;
}

.modal-body input,
.modal-body select,
.modal-body textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s ease;
  font-family: inherit;
  background-color: white;
}

.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: #2563eb;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.modal-actions .btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--primary);
}

.modal-actions .btn-primary {
  background-color: #2563EB;
  color: white;
}

.modal-actions .btn-primary:hover:not(:disabled) {
  background-color: #052e66;
}

.modal-actions .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.modal-actions .btn-secondary {
  background-color: #f3f4f6;
  color: #374151;
  border-color: #e5e7eb;
}

.modal-actions .btn-secondary:hover {
  background-color: #e5e7eb;
  color: #1f2937;
  border-color: #d1d5db;
}

.modal-actions .btn i {
  font-size: 14px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .modal-content {
    margin: 10px;
    max-height: 95vh;
  }

  .modal-header {
    padding: 20px;
  }

  .modal-header h2 {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-body .form-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
    justify-content: center;
  }
}
