/* ==========================================================
   FRAMEWORK.CSS  
   Author: Shaif Ali Khan / GPT-5
   ========================================================== */

/* =============================
   Root Variables
============================= */
:root {
  --primary: #5c2976;
  --success: #79b342;
  --white: #ffffff;
  --gray: #f5f5f5;
  --dark: #222;
  --transition: all 0.3s ease;
}

/* =============================
   RESET
============================= */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
}

/* =============================
   GRID SYSTEM
============================= */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

.container-fluid {
  width: 100%;
  padding-left: 15px;
  padding-right: 15px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -15px;
  margin-right: -15px;
}

[class*="col-"] {
  padding-left: 15px;
  padding-right: 15px;
  flex: 1;
}

/* Column width system */
.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* Responsive breakpoints */
@media (min-width: 576px) {
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 768px) {
  .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 992px) {
  .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}
@media (min-width: 1200px) {
  .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* =============================
   FLEX & DISPLAY UTILITIES
============================= */
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.text-center { text-align: center; }

/* =============================
   SPACING UTILITIES (p/m)
============================= */
[class*="p-"], [class*="m-"] { box-sizing: border-box; }

.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }

.mt-auto { margin-top: auto; }
.mb-auto { margin-bottom: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* =============================
   BUTTONS
============================= */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  padding: 0.6rem 1.5rem;
  font-size: 1rem;
  transition: var(--transition);
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
}

.btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* =============================
   NAVBAR
============================= */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--white);
  padding: 1rem 2rem;
  border-bottom: 1px solid #eee;
  position: relative;
  z-index: 10;
}

.navbar-brand img {
  max-height: 50px;
}

.navbar-nav {
  display: flex;
  gap: 1rem;
}

.nav-item { list-style: none; }

.nav-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--success);
}

/* Toggler button */
.navbar-toggler {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 991px) {
  .navbar-nav {
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--white);
    border-top: 1px solid #ddd;
    display: none;
  }

  .navbar-nav.show {
    display: flex;
  }

  .navbar-toggler {
    display: block;
  }
}

/* =============================
   DROPDOWN
============================= */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  display: none;
  min-width: 180px;
  z-index: 1000;
}

.dropdown-menu.show {
  display: block;
}

.dropdown-item {
  padding: 10px 15px;
  color: var(--dark);
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.dropdown-item:hover {
  background: var(--primary);
  color: var(--white);
}

/* =============================
   COLLAPSE
============================= */
.collapse {
  display: none;
}

.collapse.show {
  display: block;
}

/* =============================
   TABLES
============================= */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px;
  border: 1px solid #ddd;
  text-align: left;
}

.table-striped tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.table-bordered th, .table-bordered td {
  border: 1px solid #ccc;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

/* =============================
   UTILITIES
============================= */
.text-uppercase { text-transform: uppercase; }
.fw-bold { font-weight: 700; }
.fs-1 { font-size: 2.5rem; }
.fs-2 { font-size: 2rem; }
.fs-3 { font-size: 1.75rem; }
.fs-4 { font-size: 1.5rem; }
.fs-5 { font-size: 1.25rem; }
.fs-6 { font-size: 1rem; }

/* =============================
   RESPONSIVE HELPERS
============================= */
@media (max-width: 768px) {
  .text-center-sm { text-align: center; }
}


/* ==========================================================
   INTERACTIVE ELEMENT ANIMATIONS (Dropdown / Collapse / Navbar)
   ========================================================== */

/* Generic smooth transition for show/hide */
.collapse,
.dropdown-menu {
  transition: all 0.35s ease;
  overflow: hidden;
}

/* ============ COLLAPSE (Navbar, Accordion, etc.) ============ */
.collapse {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
}

.collapse.show {
  max-height: 1000px; /* enough for large menus */
  opacity: 1;
  visibility: visible;
}

/* ============ DROPDOWN MENU ============ */
.dropdown-menu {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Dropdown arrow for toggle */
.dropdown-toggle::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.8em;
  transition: transform 0.3s ease;
  display: inline-block;
}

.dropdown-toggle.active::after {
  transform: rotate(180deg);
}

/* ============ NAVBAR COLLAPSE MOBILE MENU ============ */
.navbar-collapse {
  transition: max-height 0.35s ease, opacity 0.35s ease;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  visibility: hidden;
}

.navbar-collapse.show {
  max-height: 800px;
  opacity: 1;
  visibility: visible;
}
