/*!
* Medilab Bootstrap Template
* Template URL: https://bootstrapmade.com/medilab-free-medical-bootstrap-theme/
* Author: BootstrapMade.com
* License: https://bootstrapmade.com/license/
*/

:root {
  --primary-color: #4154f1;
  --secondary-color: #717981;
  --accent-color: #f68c09;
  --light-color: #f6f9ff;
  --dark-color: #012970;
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --border-radius: 0.5rem;
  --transition: all 0.3s ease;
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: #666;
}

/* Header Styles */
.header {
  background: #fff;
  box-shadow: 0 2px 20px rgba(1, 41, 112, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.topbar {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.branding {
  padding: 1rem 0;
  background: white;
}

.logo .sitename {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

/* Navigation */
.navmenu {
  display: flex;
  align-items: center;
}

.navmenu ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navmenu li {
  margin: 0 1rem;
}

.navmenu a {
  color: #333;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
}

.navmenu a:hover,
.navmenu a.active {
  color: var(--primary-color);
}

/* Hero Section */
.hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.welcome h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.welcome p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Cards and Boxes */
.why-box,
.icon-box,
.service-item {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  height: 100%;
}

.why-box:hover,
.icon-box:hover,
.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.icon-box i {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.icon-box h4 {
  color: var(--dark-color);
  margin-bottom: 1rem;
}

/* Buttons */
.btn,
button {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  display: inline-block;
}

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

.cta-btn {
  background: var(--accent-color);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.cta-btn:hover {
  background: #e67e00;
  color: white;
}

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

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  color: var(--dark-color);
  margin-bottom: 1rem;
}

.section-title p {
  color: #666;
  font-size: 1.1rem;
}

.light-background {
  background: #f8f9fa;
}

/* Stats Section */
.stats {
  background: var(--primary-color);
  color: white;
}

.stats-item {
  text-align: center;
  padding: 2rem 1rem;
}

.stats-item i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.8;
}

.stats-item span {
  font-size: 2.5rem;
  font-weight: 700;
  display: block;
  margin-bottom: 0.5rem;
}

/* Services */
.service-item {
  text-align: center;
  position: relative;
}

.service-item .icon {
  margin-bottom: 1.5rem;
}

.service-item .icon i {
  font-size: 3rem;
  color: var(--primary-color);
}

.service-item h3 {
  color: var(--dark-color);
  margin-bottom: 1rem;
}

/* Departments */
.departments .nav-tabs {
  border: none;
}

.departments .nav-link {
  border: none;
  background: none;
  color: #666;
  padding: 1rem 1.5rem;
  border-radius: var(--border-radius);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.departments .nav-link.active,
.departments .nav-link:hover {
  background: var(--primary-color);
  color: white;
}

.departments .tab-content {
  padding: 2rem 0;
}

/* Doctors */
.team-member {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.team-member:hover {
  transform: translateY(-5px);
}

.team-member .pic {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  margin-right: 1.5rem;
  flex-shrink: 0;
}

.team-member .pic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-member h4 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.team-member span {
  color: var(--primary-color);
  font-weight: 500;
  margin-bottom: 1rem;
  display: block;
}

/* FAQ */
.faq-item {
  background: white;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-item h3 {
  padding: 1.5rem;
  margin: 0;
  background: #f8f9fa;
  cursor: pointer;
  transition: var(--transition);
}

.faq-item:hover h3 {
  background: var(--primary-color);
  color: white;
}

.faq-content {
  padding: 1.5rem;
  display: none;
}

.faq-item.faq-active .faq-content {
  display: block;
}

/* Testimonials */
.testimonial-item {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  text-align: center;
}

.testimonial-img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  overflow: hidden;
}

.testimonial-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stars {
  color: #ffc107;
  margin-bottom: 1rem;
}

/* Gallery */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Contact */
.info-item {
  background: white;
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.info-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-right: 1rem;
  flex-shrink: 0;
}

.info-item h3 {
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

/* Forms */
.form-control {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(65, 84, 241, 0.25);
}

.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-size: 1rem;
  background: white;
  cursor: pointer;
}

/* Footer */
.footer {
  background: var(--dark-color);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-about .sitename {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-links h4 {
  color: white;
  margin-bottom: 1rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #ccc;
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

.social-links a {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--primary-color);
  color: white;
  text-align: center;
  line-height: 40px;
  border-radius: 50%;
  margin-right: 0.5rem;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #333;
  color: #ccc;
}

/* Scroll Top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 50px;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 1000;
}

.scroll-top:hover {
  background: var(--dark-color);
  transform: translateY(-2px);
}

/* Preloader */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease-out;
}

#preloader::after {
  content: '';
  width: 50px;
  height: 50px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

#preloader.loaded {
  opacity: 0;
  pointer-events: none;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 2rem;
  }
  
  .welcome h2 {
    font-size: 2rem;
  }
  
  /* Menu mobile */
  .navmenu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 1001;
    padding: 2rem 0;
  }
  
  .navmenu.mobile-nav-active {
    right: 0;
  }
  
  .navmenu ul {
    flex-direction: column;
    padding: 0 2rem;
  }
  
  .navmenu li {
    margin: 0.5rem 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 0.5rem;
  }
  
  .navmenu a {
    display: block;
    padding: 1rem 0;
    font-size: 1.1rem;
    color: #333;
  }
  
  .navmenu a:hover,
  .navmenu a.active {
    color: var(--primary-color);
    background: none;
  }
  
  .mobile-nav-toggle {
    display: block;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    z-index: 1002;
    position: relative;
  }
  
  /* Overlay pour le menu mobile */
  .navmenu::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: -1;
  }
  
  .navmenu.mobile-nav-active::before {
    opacity: 1;
    visibility: visible;
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .team-member {
    flex-direction: column;
    text-align: center;
  }
  
  .team-member .pic {
    margin: 0 auto 1rem;
  }
  
  /* Ajustements pour les cartes */
  .why-box,
  .icon-box,
  .service-item {
    margin-bottom: 2rem;
  }
  
  /* Hero responsive */
  .hero .container {
    padding: 0 1rem;
  }
  
  .welcome {
    text-align: center;
  }
  
  /* Stats responsive */
  .stats-item {
    margin-bottom: 2rem;
  }
}

/* Mobile très petit */
@media (max-width: 480px) {
  .hero {
    padding: 5rem 0 1rem;
  }
  
  .welcome h2 {
    font-size: 1.5rem;
  }
  
  .welcome p {
    font-size: 1rem;
  }
  
  .navmenu {
    width: 90%;
    max-width: 280px;
  }
  
  .section-title h2 {
    font-size: 1.5rem;
  }
  
  .why-box,
  .icon-box,
  .service-item {
    padding: 1.5rem;
  }
  
  .btn,
  button {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .cta-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-none { display: none; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }

.overflow-hidden { overflow: hidden; }

.img-fluid {
  max-width: 100%;
  height: auto;
}

/* Animation Classes */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

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

.slide-up {
  transform: translateY(30px);
  opacity: 0;
  animation: slideUp 0.8s ease-out forwards;
}

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

.zoom-in {
  transform: scale(0.8);
  opacity: 0;
  animation: zoomIn 0.8s ease-out forwards;
}

@keyframes zoomIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}
