/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Cairo', 'Tajawal', 'Arial', sans-serif;
  direction: rtl;
  line-height: 1.7;
  color: #333;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* Mobile body fixes */
@media (max-width: 768px) {
  body {
    width: 100% !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  
  /* Remove any default margins from viewport */
  html, body {
    position: relative;
    width: 100%;
    max-width: 100%;
  }
}

/* Container - Fixed for mobile */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Mobile container override */
@media (max-width: 768px) {
  .container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 5px !important;
    margin: 0 !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 3px !important;
  }
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin: -15px;
  width: 100%;
}

.col-12 { 
  width: 100%; 
  padding: 15px; 
}

.col-6 { 
  width: 50%; 
  padding: 15px; 
}

.col-3 { 
  width: 25%; 
  padding: 15px; 
}

/* Header Styles */
.header {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  box-shadow: 0 4px 20px rgba(44, 90, 160, 0.3);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  min-height: 70px;
}

.logo h1 a {
  color: white;
  text-decoration: none;
  font-size: 1.8rem;
  font-weight: 800;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav ul {
  display: flex;
  list-style: none;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

.nav ul li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 25px;
  transition: all 0.3s ease;
}

.nav ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Page Header */
.page-header {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
  padding: 60px 0;
  text-align: center;
  width: 100%;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.page-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.95;
}

/* Price Table - Completely Redesigned for Mobile */
.price-table {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0,0,0,0.1);
  margin: 30px 0;
  width: 100%;
}

/* Desktop Price Table */
.price-table-desktop {
  display: block;
  width: 100%;
}

.price-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap: 0;
  align-items: center;
  width: 100%;
}

.price-row.header-row {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
  font-weight: 700;
}

.price-cell {
  padding: 20px 15px;
  text-align: center;
  border-bottom: 1px solid #f8f9fa;
}

/* Mobile Price Cards */
.price-table-mobile {
  display: none;
  width: 100%;
}

.mobile-price-card {
  background: white;
  border-radius: 15px;
  margin-bottom: 20px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  overflow: hidden;
  width: 100%;
}

.mobile-card-header {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
  padding: 20px;
  text-align: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.mobile-card-body {
  padding: 15px;
}

.mobile-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-price-row:last-child {
  border-bottom: none;
}

.mobile-price-label {
  font-weight: 600;
  color: #666;
}

.mobile-price-value {
  font-weight: 700;
  color: #2c5aa0;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2c5aa0 0%, #1e3a8a 100%);
  color: white;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
}

/* Sections */
.py-5 {
  padding: 60px 0;
  width: 100%;
}

.bg-white {
  background: white;
}

.text-center {
  text-align: center;
}

/* Cards */
.card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  margin-bottom: 20px;
  width: 100%;
}

.card-header {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  padding: 20px 25px;
}

.card-body {
  padding: 25px;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 50px 0 30px;
  margin-top: 60px;
  width: 100%;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section {
  padding: 0 15px;
}

.footer-section h3 {
  color: #25d366;
  margin-bottom: 20px;
  font-size: 1.3rem;
  font-weight: 700;
}

.footer-section p,
.footer-section ul {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  color: #25d366;
  padding-right: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
}

.social-links {
  margin-top: 15px;
}

.social-links .btn {
  margin: 5px 0;
  display: inline-block;
  width: auto;
}

/* WhatsApp Float Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  left: 30px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  font-size: 1.5rem;
  z-index: 1000;
}

/* Responsive Design - Mobile First Approach */
@media (max-width: 768px) {
  /* Container adjustments */
  .container {
    padding: 0 5px;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
  
  body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  
  html {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* Force full width for all major containers */
  .header,
  .page-header,
  .py-5,
  .footer,
  .price-table,
  .card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  
  /* Header mobile */
  .header-content {
    flex-direction: column;
    gap: 10px;
    padding: 0.5rem 0;
  }
  
  .logo h1 a {
    font-size: 1.5rem;
  }
  
  .nav ul {
    justify-content: center;
    gap: 8px;
  }
  
  .nav ul li a {
    padding: 6px 12px;
    font-size: 0.85rem;
  }
  
  /* Hide desktop price table, show mobile cards */
  .price-table-desktop {
    display: none;
  }
  
  .price-table-mobile {
    display: block;
  }
  
  /* Grid columns mobile */
  .col-6,
  .col-3 {
    width: 100%;
    padding: 10px;
  }
  
  .row {
    margin: -10px;
  }
  
  /* Page header mobile */
  .page-header {
    padding: 40px 0;
  }
  
  .page-header h1 {
    font-size: 1.8rem;
    line-height: 1.2;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  /* Sections mobile */
  .py-5 {
    padding: 40px 0;
  }
  
  /* Cards mobile */
  .card,
  .card-header,
  .card-body {
    padding: 15px;
  }
  
  /* Buttons mobile */
  .btn {
    width: 100%;
    max-width: 280px;
    margin: 0 auto 10px auto;
    display: block;
  }
  
  /* WhatsApp button mobile */
  .whatsapp-float {
    bottom: 20px;
    left: 20px;
    width: 55px;
    height: 55px;
  }
  
  /* Footer mobile */
  .footer {
    padding: 30px 0 20px;
    margin-top: 40px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .footer-section {
    padding: 0 10px;
  }
  
  .footer-section h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
  }
  
  .footer-section p,
  .footer-section ul {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 3px;
    max-width: 100%;
    width: 100%;
    margin: 0;
  }
  
  /* Remove any margins that might cause gaps */
  body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
  }
  
  /* Ensure all sections take full width */
  .header,
  .page-header,
  .py-5,
  .footer,
  .price-table,
  .card,
  .row {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .page-subtitle {
    font-size: 0.9rem;
  }
  
  .py-5 {
    padding: 30px 0;
  }
  
  .mobile-card-header {
    padding: 15px;
    font-size: 1rem;
  }
  
  .mobile-card-body {
    padding: 12px;
  }
  
  .mobile-price-row {
    padding: 10px 0;
  }
  
  .whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    left: 15px;
  }
  
  /* Footer small mobile */
  .footer {
    padding: 20px 0 15px;
    margin-top: 30px;
  }
  
  .footer-content {
    gap: 15px;
  }
  
  .footer-section {
    padding: 0 5px;
  }
  
  .footer-section h3 {
    font-size: 1rem;
    margin-bottom: 10px;
  }
  
  .footer-section p,
  .footer-section ul {
    font-size: 0.85rem;
    line-height: 1.5;
  }
  
  .social-links .btn {
    font-size: 0.85rem;
    padding: 8px 16px;
  }
}

/* Force full width and prevent horizontal scroll */
html, body {
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Ensure all containers and sections use full width */
.row, 
.container, 
.header, 
.page-header, 
.py-5, 
.footer,
.price-table,
.bg-white,
.bg-primary {
  max-width: 100%;
  overflow-x: hidden;
  width: 100%;
}

/* Additional mobile-specific fixes */
@media (max-width: 768px) {
  * {
    box-sizing: border-box;
  }
  
  .container {
    padding-left: 5px !important;
    padding-right: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 480px) {
  .container {
    padding-left: 3px !important;
    padding-right: 3px !important;
  }
}