/* ==============================
   CFP-CAT — Style principal V2
   ============================== */
:root {
  --brand: #b34700;
  --brand-light: #cc5500;
  --brand-lighter: #d35400;
  --primary: #d35400;
  --primary-dark: #a04000;
  --primary-light: #e67e22;
  --secondary: #c0392b;
  --accent: #f39c12;
  --accent-light: #fef3d5;
  --success: #27ae60;
  --info: #3498db;
  --warning: #f1c40f;
  --danger: #c0392b;
  --dark: #212529;
  --gray-50: #fafafa;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --white: #ffffff;
  --body-bg: #ffffff;
  --body-color: #495057;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 50px;
  --shadow: 0 2px 16px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --shadow-xl: 0 12px 48px rgba(0,0,0,0.12);
  --shadow-hover: 0 8px 24px rgba(211,84,0,0.2);
  --transition: all 0.25s ease;
  --transition-slow: all 0.4s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { font-family: var(--font-family); color: var(--body-color); background: var(--body-bg); line-height: 1.7; overflow-x: hidden; }

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }

::selection { background: var(--primary); color: var(--white); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--dark); line-height: 1.3; letter-spacing: -0.02em; }
h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* ===== SCROLL TOP ===== */
.scroll-top {
  position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--white); display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; box-shadow: var(--shadow-md); z-index: 999; transition: var(--transition);
  opacity: 0; visibility: hidden; border: none; cursor: pointer;
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--primary-dark); color: var(--white); transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* ===== SECTIONS ===== */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-eyebrow {
  display: inline-block; color: var(--primary); font-weight: 600; text-transform: uppercase;
  letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 0.5rem; background: rgba(26,82,118,0.08);
  padding: 0.25rem 1rem; border-radius: var(--radius-pill);
}
.section-header h2 { font-size: 2.25rem; margin-bottom: 1rem; }
.section-header p { color: var(--gray-600); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.section-light { background: var(--gray-100); }
.section-dark { background: var(--brand); color: var(--white); }
.section-dark .section-header h2,
.section-dark h3 { color: var(--white); }
.section-dark .section-header p { color: rgba(255,255,255,0.7); }
.section-dark .section-eyebrow { background: rgba(255,255,255,0.12); color: var(--accent); }

/* ===== HERO ===== */
.hero-section {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 50%, var(--primary) 100%);
  color: var(--white); padding: 6rem 0 8rem; position: relative; overflow: hidden;
  min-height: 600px; display: flex; align-items: center;
}
.hero-section::before {
  content: ''; position: absolute; top: -50%; right: -20%; width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%); border-radius: 50%;
}
.hero-section::after {
  content: ''; position: absolute; bottom: -30%; left: -10%; width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%); border-radius: 50%;
}
.hero-content h1 { font-size: 3rem; font-weight: 800; color: var(--white); margin-bottom: 1.5rem; line-height: 1.15; }
.hero-content p { font-size: 1.15rem; opacity: 0.9; margin-bottom: 2rem; max-width: 560px; line-height: 1.7; }
.hero-buttons .btn { padding: 0.8rem 2rem; border-radius: var(--radius-pill); font-weight: 600; margin-right: 0.75rem; margin-bottom: 0.5rem; }
.hero-buttons .btn-primary { background: var(--white); color: var(--brand); border-color: var(--white); }
.hero-buttons .btn-primary:hover { background: rgba(255,255,255,0.9); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.2); }
.hero-buttons .btn-outline-light:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 3rem; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 2rem; font-weight: 800; color: var(--accent); }
.hero-stats span { font-size: 0.85rem; opacity: 0.8; }

/* ===== HERO CAROUSEL ===== */
.hero-carousel-slide { height: 65vh; min-height: 400px; background-size: cover; background-position: center; display: flex; align-items: center; }
.hero-carousel-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(3,22,63,0.85) 0%, rgba(9,34,91,0.7) 100%); }
.hero-carousel-content { position: relative; z-index: 2; color: var(--white); max-width: 650px; }
.hero-carousel-content h1 { color: var(--white); font-size: 3.25rem; font-weight: 800; margin-bottom: 1rem; }
.hero-carousel-content p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 2rem; }

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 50%, var(--primary) 100%);
  color: var(--white); padding: 5rem 0; text-align: center; position: relative; overflow: hidden;
}
.page-header::before {
  content: ''; position: absolute; top: -30%; right: -10%; width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%); border-radius: 50%;
}
.page-header h1 { color: var(--white); font-size: 2.5rem; font-weight: 800; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.page-header p { opacity: 0.85; font-size: 1.1rem; max-width: 600px; margin: 0 auto; position: relative; z-index: 1; }
.page-header .breadcrumb { background: transparent; justify-content: center; margin-bottom: 0; padding: 0; }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }
.page-header .breadcrumb-item a { color: rgba(255,255,255,0.8); }
.page-header .breadcrumb-item.active { color: var(--white); }

/* ===== CARDS ===== */
.card {
  border: none; border-radius: var(--radius); box-shadow: var(--shadow);
  transition: var(--transition); overflow: hidden; background: var(--white);
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card .card-body { padding: 1.5rem; }
.card .card-img-top { height: 200px; object-fit: cover; }
.card-border { border-bottom: 3px solid var(--primary); }

/* ===== SERVICE CARDS ===== */
.service-card {
  border: none; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 2rem; transition: var(--transition); text-align: center;
  height: 100%; background: var(--white); position: relative; overflow: hidden;
}
.service-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--primary), #3b8fc2); }
.service-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-6px); }
.service-card .icon {
  width: 64px; height: 64px; border-radius: 16px; display: flex;
  align-items: center; justify-content: center; margin: 0 auto 1.25rem;
  font-size: 1.5rem; color: var(--white); background: var(--primary);
}
.service-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.75rem; }
.service-card p { color: var(--gray-600); font-size: 0.9rem; line-height: 1.6; }

/* ===== FORMATION CARDS ===== */
.formation-card .card-body { padding: 1.5rem; }
.formation-card .badge { font-weight: 500; padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); margin-bottom: 0.75rem; }
.formation-card h5 { font-weight: 700; margin-bottom: 0.75rem; font-size: 1.1rem; }
.formation-card .card-text { color: var(--gray-600); font-size: 0.9rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.formation-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: var(--gray-600); margin-bottom: 1rem; flex-wrap: wrap; }
.formation-meta span i { margin-right: 0.35rem; }

/* ===== PRODUCT CARDS ===== */
.product-card { border: none; border-radius: var(--radius); box-shadow: var(--shadow); transition: var(--transition); overflow: hidden; background: var(--white); position: relative; }
.product-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.product-card .product-img { height: 220px; object-fit: cover; background: var(--gray-100); }
.product-card .product-badge { position: absolute; top: 12px; left: 12px; z-index: 2; }
.product-card .card-body { padding: 1.25rem; }
.product-card h6 { font-weight: 700; margin-bottom: 0.5rem; }
.product-card .product-price { font-size: 1.2rem; font-weight: 700; color: var(--primary); margin-bottom: 0.5rem; }
.product-card .product-price .old-price { font-size: 0.85rem; color: var(--gray-500); text-decoration: line-through; font-weight: 400; }
.product-card .btn-add-cart { width: 100%; border-radius: var(--radius-pill); padding: 0.5rem; font-weight: 600; }

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: var(--white); border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow);
  text-align: center; margin: 1rem 0; position: relative; border: 1px solid var(--gray-100);
}
.testimonial-card::before { content: '\201C'; position: absolute; top: 0.5rem; left: 1.5rem; font-size: 4rem; color: var(--gray-200); font-family: Georgia, serif; line-height: 1; }
.testimonial-card .avatar { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; margin-bottom: 1rem; border: 3px solid var(--gray-200); }
.testimonial-card .stars { color: var(--accent); margin-bottom: 1rem; }
.testimonial-card blockquote { font-style: italic; color: var(--gray-700); margin-bottom: 1rem; font-size: 0.95rem; }
.testimonial-card h6 { font-weight: 700; margin-bottom: 0.25rem; }
.testimonial-card small { color: var(--gray-500); }

/* ===== BLOG CARDS ===== */
.blog-card { border: none; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: var(--transition); background: var(--white); }
.blog-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.blog-card .blog-img { height: 200px; object-fit: cover; }
.blog-card .card-body { padding: 1.5rem; }
.blog-card .blog-category { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--primary); margin-bottom: 0.5rem; }
.blog-card h5 { font-weight: 700; margin-bottom: 0.75rem; }
.blog-card .blog-meta { font-size: 0.85rem; color: var(--gray-500); display: flex; gap: 1rem; }

/* ===== STATS ===== */
.stat-item { text-align: center; padding: 2rem; }
.stat-item .stat-number { font-size: 2.5rem; font-weight: 800; color: var(--accent); display: block; line-height: 1; margin-bottom: 0.5rem; }
.stat-item .stat-label { color: var(--gray-600); font-weight: 500; }

/* ===== NEWSLETTER ===== */
.newsletter-section { background: linear-gradient(135deg, var(--brand), var(--primary)); color: var(--white); padding: 4rem 0; }
.newsletter-section h3 { color: var(--white); font-weight: 800; }
.newsletter-form .input-group { max-width: 500px; margin: 0 auto; border-radius: var(--radius-pill); overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.15); }
.newsletter-form .form-control { border: none; padding: 0.9rem 1.5rem; font-size: 1rem; }
.newsletter-form .btn { padding: 0.9rem 2rem; font-weight: 600; border-radius: 0; }

/* ===== BUTTONS ===== */
.btn {
  font-weight: 600; padding: 0.6rem 1.5rem; border-radius: var(--radius-pill);
  transition: all 0.25s ease; position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(26,82,118,0.3); }
.btn-outline-primary { border-color: var(--primary); color: var(--primary); border-radius: var(--radius-pill); }
.btn-outline-primary:hover { background: var(--primary); border-color: var(--primary); color: var(--white); transform: translateY(-2px); }
.btn-success { border-radius: var(--radius-pill); }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn-accent:hover { background: #e67e22; border-color: #e67e22; color: var(--white); transform: translateY(-2px); }
.btn-sm { border-radius: var(--radius-pill); padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 0.8rem 2rem; font-size: 1.05rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.btn-soft-primary { background: rgba(26,82,118,0.1); color: var(--primary); border: none; }
.btn-soft-primary:hover { background: rgba(26,82,118,0.2); color: var(--primary-dark); }
.btn-soft-success { background: rgba(39,174,96,0.1); color: var(--success); border: none; }
.btn-soft-success:hover { background: rgba(39,174,96,0.2); }
.btn-soft-danger { background: rgba(231,76,60,0.1); color: var(--danger); border: none; }
.btn-soft-danger:hover { background: rgba(231,76,60,0.2); }
.btn-soft-warning { background: rgba(243,156,18,0.1); color: #b7950b; border: none; }
.btn-soft-warning:hover { background: rgba(243,156,18,0.2); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: var(--white); }
.btn-brand:hover { background: var(--brand-light); border-color: var(--brand-light); color: var(--white); transform: translateY(-2px); }
.btn-outline-brand { border-color: var(--brand); color: var(--brand); }
.btn-outline-brand:hover { background: var(--brand); border-color: var(--brand); color: var(--white); }

/* ===== FORMS ===== */
.form-control, .form-select {
  border-radius: var(--radius-sm); border: 2px solid var(--gray-200);
  padding: 0.65rem 1rem; font-size: 0.95rem; transition: var(--transition);
}
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(26,82,118,0.15); }
.form-floating > .form-control { border-radius: var(--radius-sm); }
.form-control.is-valid, .was-validated .form-control:valid { border-color: var(--success); }
.form-control.is-invalid, .was-validated .form-control:invalid { border-color: var(--danger); }
.form-label { font-weight: 500; font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.35rem; }
.form-text { font-size: 0.8rem; color: var(--gray-500); }
.input-group .form-control:focus { z-index: 3; }

/* ===== TABLE ===== */
.table-corsain { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.table-corsain thead { background: var(--gray-100); }
.table-corsain th { font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-600); border-bottom: none; padding: 1rem; }
.table-corsain td { padding: 1rem; vertical-align: middle; border-color: var(--gray-100); }
.table-corsain tbody tr { transition: var(--transition); }
.table-corsain tbody tr:hover { background: var(--gray-50); }
.table-corsain tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge { font-weight: 500; padding: 0.35rem 0.75rem; border-radius: var(--radius-pill); font-size: 0.78rem; }
.badge-sm { font-size: 0.7rem; padding: 0.25rem 0.55rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb-corsain { background: transparent; padding: 0; margin-bottom: 1.5rem; }
.breadcrumb-corsain a { color: var(--gray-600); }
.breadcrumb-corsain .active { color: var(--primary); font-weight: 600; }
.breadcrumb { background: transparent; padding: 0; }
.breadcrumb-item a { color: var(--gray-600); }
.breadcrumb-item a:hover { color: var(--primary); }
.breadcrumb-item.active { color: var(--primary); font-weight: 600; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--gray-400); }

/* ===== MODAL ===== */
.modal-content { border: none; border-radius: var(--radius-lg); box-shadow: var(--shadow-xl); }
.modal-header { border-bottom-color: var(--gray-100); padding: 1.25rem 1.5rem; }
.modal-body { padding: 1.5rem; }
.modal-footer { border-top-color: var(--gray-100); padding: 1rem 1.5rem; }
.modal.fade .modal-dialog { transform: scale(0.95); transition: transform 0.2s ease; }
.modal.show .modal-dialog { transform: scale(1); }

/* ===== ALERTS ===== */
.alert { border: none; border-radius: var(--radius); padding: 1rem 1.25rem; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info { background: #d1ecf1; color: #0c5460; }
.alert-dismissible .btn-close { padding: 1.2rem; }

/* ===== PAGINATION ===== */
.pagination { gap: 0.25rem; }
.page-link { border-radius: var(--radius-sm); border: none; color: var(--dark); font-weight: 500; padding: 0.5rem 0.9rem; transition: var(--transition); }
.page-link:hover { background: var(--gray-100); color: var(--primary); }
.page-item.active .page-link { background: var(--primary); color: var(--white); }
.page-item.disabled .page-link { color: var(--gray-400); background: transparent; }

/* ===== PROGRESS ===== */
.progress { height: 8px; border-radius: var(--radius-pill); background: var(--gray-200); }
.progress-bar { background: var(--primary); border-radius: var(--radius-pill); }

/* ===== PRICE DISPLAY ===== */
.price { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.price small { font-size: 0.85rem; font-weight: 400; color: var(--gray-500); }
.old-price { text-decoration: line-through; color: var(--gray-500); font-weight: 400; font-size: 0.9rem; }
.stars { color: var(--accent); }

/* ===== EMPTY STATE ===== */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state i { font-size: 4rem; color: var(--gray-300); margin-bottom: 1.5rem; display: block; }
.empty-state h5 { color: var(--gray-600); margin-bottom: 0.5rem; }
.empty-state p { color: var(--gray-500); max-width: 400px; margin: 0 auto 1.5rem; }

/* ===== TIMELINE ===== */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--gray-200); }
.timeline-item { position: relative; margin-bottom: 2rem; }
.timeline-item::before { content: ''; position: absolute; left: -1.7rem; top: 0.5rem; width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--white); box-shadow: 0 0 0 2px var(--primary); }

/* ===== AUTH PAGES ===== */
.auth-page { min-height: 100vh; display: flex; align-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-light)); padding: 2rem; }
.auth-card { background: var(--white); border-radius: var(--radius-xl); padding: 2.5rem; box-shadow: var(--shadow-xl); width: 100%; max-width: 440px; margin: 0 auto; }
.auth-card .auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-card .auth-logo img { height: 56px; }
.auth-card h4 { font-weight: 800; text-align: center; margin-bottom: 0.5rem; }
.auth-card .auth-subtitle { text-align: center; color: var(--gray-600); margin-bottom: 2rem; }

/* ===== DASHBOARD / ADMIN ===== */
.dashboard-wrapper { display: flex; min-height: 100vh; }
.dashboard-main { flex: 1; padding: 2rem; background: var(--gray-100); min-height: 100vh; }
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.dashboard-header h1 { font-size: 1.5rem; font-weight: 800; margin: 0; }

/* Admin stat cards */
.stat-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow); transition: var(--transition); display: flex; align-items: center; gap: 1rem; }
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card .stat-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--white); flex-shrink: 0; }
.stat-icon.blue { background: linear-gradient(135deg, #3498db, #2980b9); }
.stat-icon.green { background: linear-gradient(135deg, #27ae60, #2ecc71); }
.stat-icon.orange { background: linear-gradient(135deg, #f39c12, #e67e22); }
.stat-icon.red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.stat-icon.purple { background: linear-gradient(135deg, #9b59b6, #8e44ad); }
.stat-icon.teal { background: linear-gradient(135deg, #1abc9c, #16a085); }
.stat-icon.brand { background: linear-gradient(135deg, #b34700, #cc5500); }
.stat-body h3 { font-size: 1.75rem; font-weight: 800; margin: 0; line-height: 1.2; }
.stat-body p { color: var(--gray-600); margin: 0; font-size: 0.9rem; }

/* Admin content area */
.admin-layout { background: var(--gray-100); }
.admin-layout .admin-content { margin-left: 0; }
.admin-layout .navbar { border-bottom: 1px solid var(--gray-200); }

/* ===== FOOTER ===== */
.footer { background: var(--brand); color: rgba(255,255,255,0.8); padding: 4rem 0 0; }
.footer h5 { color: var(--white); font-weight: 700; margin-bottom: 1.25rem; font-size: 1rem; letter-spacing: 0; }
.footer h6 { color: rgba(255,255,255,0.9); font-weight: 600; margin-bottom: 1rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer a { color: rgba(255,255,255,0.65); display: inline-block; padding: 0.2rem 0; transition: var(--transition); font-size: 0.9rem; }
.footer a:hover { color: var(--accent); transform: translateX(4px); }
.footer p { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.footer .social-links a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 0.5rem; transition: var(--transition); padding: 0; font-size: 0.95rem;
}
.footer .social-links a:hover { background: var(--accent); color: var(--white); transform: translateY(-3px); }
.footer hr { border-color: rgba(255,255,255,0.08); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 1.5rem 0; margin-top: 3rem; font-size: 0.85rem; }
.footer-bottom a { font-size: 0.85rem; }

/* Contact info in footer */
.footer-contact li { margin-bottom: 0.6rem; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.5rem; }
.footer-contact li i { margin-top: 0.2rem; flex-shrink: 0; width: 16px; text-align: center; }

/* ===== UTILITY CLASSES ===== */
.text-brand { color: var(--brand); }
.text-brand-light { color: var(--brand-light); }
.bg-brand { background-color: var(--brand); }
.bg-brand-light { background-color: var(--brand-light); }
.bg-soft-primary { background: rgba(26,82,118,0.06); }
.bg-soft-accent { background: rgba(243,156,18,0.06); }
.bg-soft-success { background: rgba(39,174,96,0.06); }
.bg-soft-danger { background: rgba(231,76,60,0.06); }
.bg-gradient-brand { background: linear-gradient(135deg, var(--brand), var(--brand-light)); }

.fw-extra { font-weight: 800; }
.ls-wide { letter-spacing: 0.05em; }
.ls-wider { letter-spacing: 0.1em; }
.op-6 { opacity: 0.6; }
.op-8 { opacity: 0.8; }
.radius-sm { border-radius: var(--radius-sm); }
.radius { border-radius: var(--radius); }
.radius-lg { border-radius: var(--radius-lg); }
.radius-pill { border-radius: var(--radius-pill); }
.shadow-hover { transition: var(--transition); }
.shadow-hover:hover { box-shadow: var(--shadow-hover); }
.translate-up { transition: var(--transition); }
.translate-up:hover { transform: translateY(-4px); }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }

/* ===== RESPONSIVE ===== */

/* Tablets & small laptops (992px and below) */
@media (max-width: 991.98px) {
  .admin-layout .admin-content { margin-left: 0 !important; width: 100%; }
  .offcanvas.d-md-block { position: fixed; }
  .dashboard-sidebar { transform: translateX(-100%); }
  .dashboard-sidebar.show { transform: translateX(0); }
  .dashboard-main { margin-left: 0; }
  .hero-content h1 { font-size: 2.25rem; }
  .page-header { padding: 3.5rem 0; }
  .page-header h1 { font-size: 2rem; }
  .card-img-top { height: 160px; }
  .product-card .product-img { height: 180px; }
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.3rem; }
}

/* Mobile large / tablets (768px and below) */
@media (max-width: 767.98px) {
  .hero-section { padding: 3rem 0 4rem; min-height: auto; }
  .hero-content h1 { font-size: 1.75rem; }
  .hero-stats { gap: 1.5rem; }
  .hero-stats strong { font-size: 1.5rem; }
  .hero-carousel-slide { height: 40vh !important; min-height: 280px !important; }
  .hero-carousel-content h1 { font-size: 2rem; }
  .section { padding: 3rem 0; }
  .section-header h2 { font-size: 1.5rem; }
  .page-header h1 { font-size: 1.75rem; }
  .page-header { padding: 3rem 0; }
  .stat-card { margin-bottom: 1rem; }
  .auth-page { padding: 1rem; }
  .auth-card { padding: 1.5rem; }
  .card-img-top { height: 140px; }
  .product-card .product-img { height: 160px; }
  .blog-card .blog-img { height: 160px; }
  .service-card { padding: 1.5rem; }
  .testimonial-card { padding: 1.5rem; }
  .footer .row > div { margin-bottom: 1.5rem; }
  .dashboard-sidebar { width: 240px; }
  .newsletter-section { padding: 3rem 0; }
  .newsletter-form .input-group { flex-direction: column; border-radius: var(--radius); }
  .newsletter-form .form-control { border-radius: var(--radius) var(--radius) 0 0 !important; }
  .newsletter-form .btn { border-radius: 0 0 var(--radius) var(--radius) !important; width: 100%; }
  .stat-item { padding: 1.25rem; }
  .stat-item .stat-number { font-size: 2rem; }
}

/* Mobile small (576px and below) */
@media (max-width: 575.98px) {
  .hero-content h1 { font-size: 1.35rem; }
  .hero-content p { font-size: 0.95rem; }
  .hero-buttons .btn { width: 100%; margin-right: 0; margin-left: 0; }
  .hero-carousel-content h1 { font-size: 1.5rem; }
  .dashboard-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .card-img-top { height: 120px; }
  .product-card .product-img { height: 140px; }
  .blog-card .blog-img { height: 140px; }
  .page-header h1 { font-size: 1.4rem; }
  .page-header p { font-size: 0.95rem; }
  .section-header h2 { font-size: 1.3rem; }
  .section-header p { font-size: 0.9rem; }
  .auth-card { padding: 1.25rem; }
  .stat-card { flex-direction: column; text-align: center; padding: 1.25rem; }
  .stat-body h3 { font-size: 1.4rem; }
  .dashboard-sidebar { width: 220px; }
  .service-card .icon { width: 52px; height: 52px; font-size: 1.25rem; }
  .service-card h3 { font-size: 1rem; }
  .formation-meta { flex-direction: column; gap: 0.35rem; }
  .empty-state { padding: 2rem 1rem; }
  .empty-state i { font-size: 3rem; }
  .btn { font-size: 0.85rem; padding: 0.5rem 1rem; }
  .form-control, .form-select { font-size: 16px; }
}

/* Very small screens (400px and below) */
@media (max-width: 400px) {
  .hero-carousel-slide { height: 35vh !important; min-height: 240px !important; }
  .hero-content h1 { font-size: 1.15rem; }
  .hero-content p { font-size: 0.85rem; }
  .section-header h2 { font-size: 1.15rem; }
  .dashboard-sidebar { width: 200px; }
  .footer h5 { font-size: 1rem; }
}

/* ===== EXTRA UTILITIES ===== */
.flex-gap-1 { gap: 0.25rem; }
.flex-gap-2 { gap: 0.5rem; }
.flex-gap-3 { gap: 1rem; }
.flex-gap-4 { gap: 1.5rem; }
button, a, .btn, .nav-link, .dropdown-item,
.chatbot-toggle, .whatsapp-float, .facebook-float, .linkedin-float { touch-action: manipulation; cursor: pointer; }

.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }
.gradient-text { background: linear-gradient(135deg, var(--primary), var(--primary-light)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.card-hover-border { border: 2px solid transparent; transition: all 0.3s ease; }
.card-hover-border:hover { border-color: var(--primary); }

.product-thumb { cursor: pointer; border: 2px solid transparent; transition: all 0.3s ease; border-radius: 8px; opacity: 0.6; }
.product-thumb:hover, .product-thumb.active { border-color: var(--primary); opacity: 1; }
.qty-input { width: 60px; text-align: center; border: 2px solid #dee2e6; border-radius: 8px; padding: 6px; font-weight: 600; }
.qty-btn { width: 36px; height: 36px; border-radius: 50%; border: 2px solid #dee2e6; background: white; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; transition: all 0.3s ease; }
.qty-btn:hover { border-color: var(--primary); background: var(--primary); color: white; }

@keyframes slideInRight { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes slideOutRight { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ===== CHATBOT ===== */
.chatbot-toggle {
  position: fixed; right: 20px; bottom: 190px; width: 52px; height: 52px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  z-index: 9998; display: flex; align-items: center; justify-content: center;
  font-size: 24px; cursor: pointer; transition: var(--transition);
}
.chatbot-toggle:hover { transform: scale(1.1); background: var(--primary-dark); }
.chatbot-widget { position: fixed; right: 20px; bottom: 250px; width: 340px; max-height: 60vh; display: none; flex-direction: column; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-xl); border: 1px solid var(--gray-200); z-index: 9999; overflow: hidden; }
.chatbot-widget.open { display: flex; }
.chatbot-header { padding: 12px 16px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: space-between; }
.chatbot-title { font-weight: 600; font-size: 14px; }
.chatbot-messages { padding: 12px; overflow-y: auto; max-height: 40vh; flex: 1; background: #f8f9fa; }
.chatbot-message { display: flex; margin-bottom: 10px; }
.chatbot-message.user { justify-content: flex-end; }
.chatbot-bubble { padding: 10px 14px; border-radius: 16px; max-width: 85%; font-size: 14px; line-height: 1.5; word-break: break-word; }
.chatbot-message.user .chatbot-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chatbot-message.bot { display: flex; align-items: flex-start; gap: 8px; }
.chatbot-bot-avatar { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; margin-top: 4px; }
.chatbot-bot-content { display: flex; flex-direction: column; }
.chatbot-message.bot .chatbot-bubble { background: #fff; color: var(--body-color); border: 1px solid var(--gray-200); border-bottom-left-radius: 4px; animation: bubbleIn 0.3s ease-out; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }
.typing-indicator { display: flex; gap: 4px; padding: 10px 14px; background: #fff; border-radius: 16px; border-bottom-left-radius: 4px; border: 1px solid var(--gray-200); }
.typing-indicator span { width: 8px; height: 8px; border-radius: 50%; background: #ccc; animation: typing 1.4s infinite ease-in-out; }
.typing-indicator span:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator span:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing { 0%, 80%, 100% { transform: scale(0.8); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }
.chatbot-input { padding: 10px; border-top: 1px solid var(--gray-200); display: flex; gap: 8px; background: #fff; }
.chatbot-input .form-control { border-radius: 24px; border: 1px solid var(--gray-300); font-size: 13px; }

/* ===== FLOATING SOCIAL ===== */
.whatsapp-float, .facebook-float, .linkedin-float {
  position: fixed; right: 20px; width: 48px; height: 48px; border-radius: 50%; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 9997; display: flex; align-items: center;
  justify-content: center; font-size: 22px; transition: var(--transition); text-decoration: none;
}
.whatsapp-float:hover, .facebook-float:hover, .linkedin-float:hover { transform: scale(1.1); color: #fff; }
.whatsapp-float { bottom: 130px; background: #25D366; }
.facebook-float { bottom: 70px; background: #1877F2; }
.linkedin-float { bottom: 190px; background: #0A66C2; }

@media (max-width: 767.98px) {
  .whatsapp-float, .facebook-float, .linkedin-float { width: 40px; height: 40px; font-size: 18px; right: 12px; }
  .whatsapp-float { bottom: 120px; } .facebook-float { bottom: 68px; } .linkedin-float { bottom: 172px; }
  .chatbot-toggle { right: 12px; width: 44px; height: 44px; font-size: 20px; }
  .chatbot-widget { width: calc(100vw - 24px); right: 12px; bottom: 230px; max-height: 55vh; }
  .chatbot-messages { max-height: 35vh; }
}
@media (max-width: 575.98px) { .chatbot-widget { bottom: 210px; max-height: 50vh; } }
@media (max-width: 400px) {
  .whatsapp-float, .facebook-float, .linkedin-float { width: 36px; height: 36px; font-size: 16px; }
  .chatbot-toggle { width: 40px; height: 40px; font-size: 18px; }
}

/* ===== RTL SUPPORT ===== */
[dir="rtl"] .ms-auto { margin-left: 0 !important; margin-right: auto !important; }
[dir="rtl"] .me-auto { margin-right: 0 !important; margin-left: auto !important; }

/* ===== RESPONSIVE ENHANCEMENTS V2 ===== */

/* Force all admin tables to scroll horizontally on small screens */
@media (max-width: 767.98px) {
  .table-corsain, .table-responsive-custom { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table-responsive-custom table { min-width: 600px; }
  .table th, .table td { white-space: nowrap; }
}

/* Hero carousel: prevent oversized text on mobile */
@media (max-width: 575.98px) {
  .hero-carousel-content .display-4,
  .hero-carousel-content .display-5,
  .hero-carousel-content h1.display-4,
  .hero-carousel-content h1.display-5 { font-size: 1.6rem !important; }
  .hero-carousel-content .lead { font-size: 0.95rem !important; }
  .hero-carousel-content .btn-lg { padding: 0.5rem 1.25rem; font-size: 0.85rem; }
  .carousel-indicators { bottom: 0; }
}

/* Admin dashboard: stack stat cards better on tiny screens */
@media (max-width: 575.98px) {
  .admin-dashboard .row.g-3 > [class*="col-"] { padding-left: 8px; padding-right: 8px; }
  .admin-dashboard .card .display-6 { font-size: 1.5rem !important; }
  .admin-dashboard .card-body .bg-opacity-25.p-3 { padding: 0.5rem !important; }
  .admin-dashboard .card-body .bg-opacity-25 i { font-size: 1.2rem !important; }
  .admin-content .p-3.p-lg-4 { padding: 0.75rem !important; }
}

/* Admin forms: stack inline groups on mobile */
@media (max-width: 575.98px) {
  .admin-content .row.g-3 > [class*="col-"]:not(.col-12) { flex: 0 0 100%; max-width: 100%; }
}

/* Shop cart: improve mobile layout */
@media (max-width: 575.98px) {
  .cart-page .table th, .cart-page .table td { padding: 0.5rem; font-size: 0.8rem; }
  .cart-page .table img { width: 40px !important; height: 40px !important; }
  .cart-page .input-group-sm .form-control { font-size: 0.8rem; }
  .cart-page .card-body { padding: 1rem; }
  .cart-summary .btn { width: 100%; }
}

/* Checkout: stack columns */
@media (max-width: 767.98px) {
  .checkout-page .row > .col-lg-8,
  .checkout-page .row > .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
}

/* Formation cards grid: 1 column on mobile */
@media (max-width: 575.98px) {
  .formations-grid .col-md-6,
  .formations-grid .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
}

/* Service cards: 1 column on mobile */
@media (max-width: 575.98px) {
  .services-grid .col-md-6,
  .services-grid .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
}

/* Blog grid: 1 column on mobile */
@media (max-width: 575.98px) {
  .blog-grid .col-md-6,
  .blog-grid .col-lg-4 { flex: 0 0 100%; max-width: 100%; }
}

/* Product grid: 2 columns on small, 1 on tiny */
@media (max-width: 575.98px) {
  .products-grid .col-6.col-md-4.col-lg-3 { flex: 0 0 50%; max-width: 50%; }
  .products-grid .card-body { padding: 0.75rem; }
  .products-grid h6 { font-size: 0.85rem; }
  .products-grid .product-price { font-size: 0.95rem; }
  .products-grid .btn-add-cart { font-size: 0.75rem; padding: 0.35rem; }
}
@media (max-width: 400px) {
  .products-grid .col-6.col-md-4.col-lg-3 { flex: 0 0 100%; max-width: 100%; }
}

/* Auth pages: padding fix for very small screens */
@media (max-width: 400px) {
  .auth-page { padding: 0.5rem; }
  .auth-card { padding: 1rem; border-radius: var(--radius); }
  .auth-card .auth-logo img { height: 40px; }
  .auth-card h4 { font-size: 1.1rem; }
}

/* Floating elements: prevent overlap with scroll-top at bottom */
@media (max-width: 575.98px) {
  .scroll-top { bottom: 14px; right: 14px; width: 38px; height: 38px; font-size: 1rem; }
  .whatsapp-float { bottom: 110px; }
  .facebook-float { bottom: 62px; }
  .linkedin-float { bottom: 158px; }
  .chatbot-toggle { bottom: 180px; }
  .chatbot-widget { bottom: 220px; }
}

/* Navbar: better mobile behavior */
@media (max-width: 991.98px) {
  .navbar .container { padding-left: 12px; padding-right: 12px; }
  .navbar .d-flex.align-items-center.gap-2 { flex-wrap: wrap; justify-content: flex-end; gap: 0.35rem !important; }
  .navbar .d-flex.align-items-center.gap-2 .btn-sm { font-size: 0.78rem; padding: 0.3rem 0.6rem; }
  .navbar .d-flex.align-items-center.gap-2 .dropdown .btn-sm { font-size: 0.78rem; }
  .navbar-collapse .navbar-nav .nav-item { border-bottom: 1px solid rgba(255,255,255,0.06); }
  .navbar-collapse .navbar-nav .nav-item:last-child { border-bottom: none; }
  .navbar .navbar-nav .nav-link { padding: 0.6rem 0.75rem !important; }
}

/* Page content: ensure no overflow */
.main-content { overflow-x: hidden; }
.container { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }

/* Footer: improve mobile columns */
@media (max-width: 575.98px) {
  .footer .col-lg-4,
  .footer .col-lg-2 { flex: 0 0 100%; max-width: 100%; }
  .footer .footer-bottom { flex-direction: column !important; text-align: center; gap: 0.75rem; }
  .footer .footer-bottom .d-flex { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
  .footer .social-links { text-align: center; }
}

/* ===== RESPONSIVE IMPROVEMENTS ===== */
@media (max-width: 575.98px) {
  h1, .h1 { font-size: 1.5rem; }
  h2, .h2 { font-size: 1.25rem; }
  h3, .h3 { font-size: 1.1rem; }
  h4, .h4 { font-size: 1rem; }
  .display-1 { font-size: 2rem; }
  .display-2 { font-size: 1.75rem; }
  .display-3 { font-size: 1.5rem; }
  .display-4 { font-size: 1.25rem; }
  .container, .container-fluid { padding-left: 12px; padding-right: 12px; }
  .card-body { padding: 1rem; }
  .table-responsive-stack > thead { display: none; }
  .table-responsive-stack > tbody > tr {
    display: block;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    background: var(--white);
    box-shadow: var(--shadow);
  }
  .table-responsive-stack > tbody > tr > td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.85rem;
  }
  .table-responsive-stack > tbody > tr > td:last-child { border-bottom: none; }
  .table-responsive-stack > tbody > tr > td::before {
    content: attr(data-label);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-600);
    min-width: 90px;
    margin-right: 8px;
  }
  .admin-content { padding: 0.75rem !important; }
  .admin-content .container-fluid { padding: 0; }
  .stat-card { margin-bottom: 0.75rem; }
  .stat-card .card-body { padding: 0.75rem; }
  .stat-card .num { font-size: 1.25rem !important; }
  .row.g-4 > [class*="col-"] { padding-bottom: 0; }
  .btn { font-size: 0.85rem; padding: 0.35rem 0.75rem; }
  .btn-sm { font-size: 0.75rem; padding: 0.25rem 0.5rem; }
  .modal-dialog { margin: 0.5rem; }
  .modal-body { padding: 1rem; }
  .dropdown-menu { min-width: auto !important; }
  .navbar .megamenu { min-width: auto !important; }
  .page-loader .loader-text { margin-top: 16px; }
  .page-loader .loader-text-inner { letter-spacing: 0.12em; }
  .loader-dots span { font-size: 1em; }
  .page-loader { background: linear-gradient(160deg, #b34700 0%, #cc5500 50%, #d35400 100%); }
  form .row.g-3 > [class*="col-"] { margin-bottom: 0; }
  img:not(.navbar-brand-logo):not(.card-img-top):not(.loader-logo) { max-width: 100%; height: auto; }
  .breadcrumb { font-size: 0.8rem; flex-wrap: wrap; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  h1, .h1 { font-size: 1.75rem; }
  h2, .h2 { font-size: 1.4rem; }
  .container, .container-fluid { padding-left: 16px; padding-right: 16px; }
  .card-body { padding: 1.25rem; }
  .admin-content { padding: 1rem !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .container, .container-fluid { padding-left: 20px; padding-right: 20px; }
  .admin-content { padding: 1.25rem !important; }
}

@media (max-width: 991.98px) {
  .navbar .navbar-nav { padding-top: 0.5rem; }
  .navbar .nav-link { padding: 0.5rem 0.75rem; border-radius: 8px; }
  .navbar .dropdown-menu { border: none; background: transparent; padding: 0 0 0 0.75rem; box-shadow: none; }
  .navbar .dropdown-menu .dropdown-item { color: rgba(255,255,255,0.85); padding: 0.4rem 0.75rem; font-size: 0.85rem; border-radius: 6px; }
  .navbar .dropdown-menu .dropdown-item:hover { background: rgba(255,255,255,0.1); }
  .navbar .dropdown-menu .dropdown-header { color: rgba(255,255,255,0.5); }
  .navbar .megamenu .row > div { margin-bottom: 0.5rem; }
  .navbar .d-flex.align-items-center.gap-2 { flex-wrap: wrap; justify-content: flex-start; padding: 0.5rem 0; }
  .navbar .d-flex.align-items-center.gap-2 .btn { flex: 0 0 auto; }
  .chatbot-widget { width: calc(100% - 20px) !important; right: 10px !important; bottom: 80px !important; border-radius: 16px !important; }
  .whatsapp-float, .facebook-float, .linkedin-float { width: 40px !important; height: 40px !important; font-size: 1.1rem !important; }
  .whatsapp-float { bottom: 20px !important; right: 20px !important; }
  .facebook-float { bottom: 68px !important; right: 20px !important; }
  .linkedin-float { bottom: 116px !important; right: 20px !important; }
  .scroll-top { bottom: 20px !important; left: 20px !important; width: 38px !important; height: 38px !important; }
  .toast-container { width: calc(100% - 20px); left: 10px; right: 10px; bottom: 10px; }
}

.table-responsive { -webkit-overflow-scrolling: touch; }
.table-responsive > .table { margin-bottom: 0; }

@media (max-width: 767.98px) {
  .card-footer .d-flex { flex-direction: column; gap: 0.5rem; }
  .card-footer .d-flex .btn { width: 100%; }
  .pagination { flex-wrap: wrap; justify-content: center; }
  .pagination .page-link { font-size: 0.8rem; padding: 0.3rem 0.6rem; }
  .list-group-item.d-flex { flex-direction: column; gap: 0.5rem; }
  .list-group-item .btn-group { width: 100%; }
  .list-group-item .btn-group .btn { flex: 1; }
  .nav-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav-tabs .nav-item { white-space: nowrap; }
  .nav-tabs .nav-link { padding: 0.4rem 0.75rem; font-size: 0.8rem; }
  .input-group > .form-control { min-width: 0; }
  .card-img-top { max-height: 200px; object-fit: cover; }
  footer .row > div { margin-bottom: 1rem; }
}

/* ===== ADMIN SIDEBAR ===== */
/* Desktop: offcanvas becomes a fixed sidebar */
@media (min-width: 992px) {
  #sidebarOffcanvas.offcanvas-start {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    transform: none !important;
    visibility: visible !important;
    z-index: 1000;
    border: none;
    border-radius: 0;
    background: #212529 !important;
  }
  .admin-layout .admin-content {
    margin-left: 250px;
  }
  /* Hide the mobile offcanvas backdrop on desktop */
  #sidebarOffcanvas ~ .offcanvas-backdrop.d-md-block {
    display: none !important;
    opacity: 0 !important;
  }
}

/* Mobile: offcanvas overlay */
@media (max-width: 991.98px) {
  #sidebarOffcanvas.offcanvas-start {
    width: 280px !important;
  }
  #sidebarOffcanvas .offcanvas-body.p-0.bg-dark {
    background: #212529 !important;
  }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .btn, .nav-link, .dropdown-item, a { min-height: 44px; display: inline-flex; align-items: center; }
  .btn-sm { min-height: 36px; }
  input, select, textarea { font-size: 16px !important; }
  .form-control, .form-select { font-size: 16px !important; }
}

/* ===== BACKGROUND ANIMATIONS ===== */

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes floatUp {
  0%   { transform: translateY(0) scale(1); opacity: .12; }
  50%  { transform: translateY(-20px) scale(1.05); opacity: .22; }
  100% { transform: translateY(0) scale(1); opacity: .12; }
}

@keyframes floatDrift {
  0%   { transform: translate(0, 0); }
  50%  { transform: translate(15px, -20px); }
  100% { transform: translate(0, 0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: .08; transform: scale(1); }
  50%      { opacity: .18; transform: scale(1.15); }
}

@keyframes morphBlob {
  0%   { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
  25%  { border-radius: 60% 40% 50% 50% / 40% 60% 40% 60%; }
  50%  { border-radius: 40% 60% 40% 60% / 60% 40% 60% 40%; }
  75%  { border-radius: 50% 50% 60% 40% / 50% 50% 40% 60%; }
  100% { border-radius: 50% 50% 50% 50% / 50% 50% 50% 50%; }
}

/* Animated gradient background — for sections like stats, CTA */
.bg-animated-gradient {
  background: linear-gradient(135deg, #b34700 0%, #d35400 25%, #e67e22 50%, #cc5500 75%, #b34700 100%) !important;
  background-size: 300% 300% !important;
  animation: gradientShift 10s ease infinite;
}

/* Subtle morphing blob overlay — for featured sections (why choose, etc.) */
.bg-animated-mesh {
  position: relative;
  overflow: hidden;
}

.bg-animated-mesh::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(ellipse at 20% 30%, rgba(230,126,34,.05) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 70%, rgba(179,71,0,.04) 0%, transparent 50%),
              radial-gradient(ellipse at 40% 80%, rgba(204,85,0,.03) 0%, transparent 50%);
  animation: morphBlob 18s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.bg-animated-mesh > * { position: relative; z-index: 1; }

/* Floating orbs container — for hero slides */
.bg-hero-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}

.bg-hero-orbs .orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
  pointer-events: none;
}

.bg-hero-orbs .orb:nth-child(1) {
  width: 350px; height: 350px;
  top: -100px; left: -80px;
  animation: floatUp 14s ease-in-out infinite;
}

.bg-hero-orbs .orb:nth-child(2) {
  width: 200px; height: 200px;
  top: 55%; right: -60px;
  background: radial-gradient(circle, rgba(230,126,34,.1), transparent 70%);
  animation: floatUp 12s ease-in-out infinite 2s;
}

.bg-hero-orbs .orb:nth-child(3) {
  width: 120px; height: 120px;
  bottom: 15%; left: 10%;
  background: radial-gradient(circle, rgba(255,255,255,.08), transparent 70%);
  animation: floatUp 10s ease-in-out infinite 4s;
}

.bg-hero-orbs .orb:nth-child(4) {
  width: 160px; height: 160px;
  top: 15%; right: 25%;
  background: radial-gradient(circle, rgba(230,126,34,.08), transparent 70%);
  animation: floatDrift 16s ease-in-out infinite 1s;
}

.bg-hero-orbs .orb:nth-child(5) {
  width: 80px; height: 80px;
  bottom: 35%; right: 15%;
  background: radial-gradient(circle, rgba(255,255,255,.06), transparent 70%);
  animation: pulseGlow 6s ease-in-out infinite 3s;
}

.bg-hero-orbs .orb:nth-child(6) {
  width: 250px; height: 250px;
  bottom: -80px; left: 40%;
  background: radial-gradient(circle, rgba(204,85,0,.06), transparent 70%);
  animation: floatDrift 20s ease-in-out infinite 5s;
}

/* ===== PRINT STYLES ===== */
@media print {
  .navbar, .footer, .chatbot-toggle, .chatbot-widget,
  .whatsapp-float, .facebook-float, .linkedin-float,
  .scroll-top, .btn, .no-print { display: none !important; }
  body { font-size: 12pt; color: #000; background: #fff; }
  .container { max-width: 100%; padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}
