* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #2ecc71;
  --primary-dark: #27ae60;
  --secondary-color: #e74c3c;
  --text-dark: #2c3e50;
  --text-light: #ecf0f1;
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  html {
    font-size: 14px;
  }
}

body {
  font-family: 'Cairo', sans-serif;
  color: var(--text-dark);
  line-height: 1.6;
  background: #f8f9fa;
  direction: rtl;
  text-align: right;
}

main {
  min-height: calc(100vh - 300px);
}

.navbar-custom {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.brand-text {
  font-size: 1.8rem;
  font-weight: 700;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.brand-text:hover {
  transform: scale(1.05);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.brand-icon {
  font-size: 2rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.nav-link-custom {
  color: white !important;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
}

.nav-link-custom::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  transition: width 0.3s ease;
}

.nav-link-custom:hover::after {
  width: 100%;
}

.nav-link-custom:hover {
  transform: translateY(-3px);
}

.hero-section {
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.8), rgba(39, 174, 96, 0.8)), url('https://images.unsplash.com/photo-1488459716781-31db52d1e113?w=1200&h=800&fit=crop');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.carousel-slide {
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: zoomIn 10s ease-in-out infinite;
}

@keyframes zoomIn {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.4), rgba(39, 174, 96, 0.4));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  color: white;
  animation: fadeInDown 0.8s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  animation: slideInRight 0.8s ease-out 0.2s both;
}

.hero-content p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  animation: slideInLeft 0.8s ease-out 0.4s both;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.btn-custom {
  background: linear-gradient(135deg, var(--secondary-color), #c0392b);
  border: none;
  color: white;
  padding: 0.8rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
  font-weight: 600;
  animation: slideInUp 0.8s ease-out 0.6s both;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-custom:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
  color: white;
  text-decoration: none;
}

.btn-custom:active {
  transform: translateY(-1px);
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-dark);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 0;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: #7f8c8d;
  margin-bottom: 3rem;
}

.card-custom {
  border: none;
  min-width:50px;
  max-width:400px;
  border-radius: var(--border-radius);
  /*overflow: hidden;*/
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  background: white;
  /*position: relative;*/
}

.card-custom:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-custom img {
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.card-custom:hover img {
  transform: scale(1.1);
}

/*.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;*/
  /*background: rgba(46, 204, 113, 0.7);*/
  /*opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}*/

.card-custom:hover .card-overlay {
  opacity: 1;
}

.card-body {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.card-text {
  color: #7f8c8d;
  font-size: 0.95rem;
  line-height: 1.5;
  width:100%;
}

.stats-container {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  padding: 3rem 0;
  margin: 2rem 0;
  border-radius: var(--border-radius);
  color: white;
  text-align: center;
}

.stat-item {
  padding: 1.5rem;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  animation: countUp 2s ease-out;
}

@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-label {
  font-size: 1.1rem;
  font-weight: 500;
}

.contact-form {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.form-control {
  border: 2px solid #ecf0f1;
  border-radius: var(--border-radius);
  padding: 0.8rem;
  font-size: 1rem;
  font-family: 'Cairo', sans-serif;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.form-label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.footer-custom {
  background: linear-gradient(135deg, #2c3e50, #34495e);
  color: var(--text-light);
  padding: 2rem 0 0;
  margin-top: 3rem;
}

.footer-section {
  padding: 1rem;
}

.footer-title {
  color: var(--primary-color);
  font-weight: 700;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.footer-text {
  color: #bdc3c7;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #bdc3c7;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary-color);
  transform: translateX(-5px);
}

.social-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #bdc3c7;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 50px;
  transition: var(--transition);
  font-weight: 500;
}

.social-icon:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.icon-text {
  font-size: 0.9rem;
}

.footer-bottom {
  text-align: center;
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #95a5a6;
  font-size: 0.9rem;
}

.about-hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
  color: white;
  padding: 4rem 2rem;
  border-radius: var(--border-radius);
  margin-bottom: 3rem;
  text-align: center;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-weight: 700;
}

.about-hero p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.feature-card {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.feature-card h3 {
  font-size: 1.3rem;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.feature-card p {
  color: #7f8c8d;
  line-height: 1.6;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-column-gap: 2rem;
  
  margin: 2rem 0;
}

.section-padding {
  padding: 3rem 0;
}

.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .nav-link-custom {
    padding: 0.5rem 0 !important;
  }

  .social-links {
    justify-content: center;
  }

  .hero-section {
    min-height: 60vh;
  }

  .carousel-slide {
    height: 60vh;
  }
}

.spinner-border {
  border-width: 0.3em;
}

.alert {
  border: none;
  border-radius: var(--border-radius);
  border-left: 4px solid;
}

.alert-success {
  border-left-color: var(--primary-color);
  background: rgba(46, 204, 113, 0.1);
  color: var(--primary-color);
}

.alert-danger {
  border-left-color: var(--secondary-color);
  background: rgba(231, 76, 60, 0.1);
  color: var(--secondary-color);
}

.container {
  padding: 2rem 0;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

.loading-animation {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  margin: 0 4px;
  animation: loading 1.4s infinite;
}

.loading-animation:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-animation:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loading {
  0%, 60%, 100% {
    opacity: 0.3;
  }
  30% {
    opacity: 1;
  }
}
