/* =============================================================================
   File        : public/assets/css/frontend/layout.css
   Project     : GyanPeeth Academy
   Framework   : CodeIgniter 4

   Description
   -----------------------------------------------------------------------------
   Global Layout System

   This file contains only layout related styling.

   Contents
   -----------------------------------------------------------------------------

   1. Root Variables
   2. Reset Helpers
   3. HTML & Body
   4. Selection
   5. Scrollbar
   6. Images
   7. Links
   8. Containers
   9. Sections
   10. Grid
   11. Page Wrapper

   NOTE
   -----------------------------------------------------------------------------
   Do NOT add:

   - Header CSS
   - Footer CSS
   - Buttons
   - Alerts
   - Floating Buttons

   Those belong to their own CSS files.

=============================================================================*/

/* =============================================================================
   ROOT VARIABLES
============================================================================= */

:root {
  /* Container */

  --fe-container-xs: 540px;
  --fe-container-sm: 720px;
  --fe-container-md: 960px;
  --fe-container-lg: 1140px;
  --fe-container-xl: 1320px;

  /* Section */

  --fe-section-padding: 90px;

  --fe-section-padding-sm: 70px;

  --fe-section-padding-lg: 120px;

  /* Radius */

  --fe-radius-xs: 6px;

  --fe-radius-sm: 10px;

  --fe-radius-md: 16px;

  --fe-radius-lg: 22px;

  --fe-radius-xl: 30px;

  --fe-radius-full: 999px;

  /* Shadow */

  --fe-shadow-xs: 0 2px 8px rgba(15, 23, 42, 0.05);

  --fe-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);

  --fe-shadow-md: 0 16px 40px rgba(15, 23, 42, 0.1);

  --fe-shadow-lg: 0 30px 60px rgba(15, 23, 42, 0.14);

  /* Transition */

  --fe-transition: all 0.3s ease;

  /* Z Index */

  --fe-z-header: 1000;

  --fe-z-dropdown: 1010;

  --fe-z-overlay: 1020;

  --fe-z-modal: 1100;
}

/* =============================================================================
   RESET HELPERS
============================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;

  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;

  padding: 0;

  min-height: 100vh;
}

/* =============================================================================
   BODY
============================================================================= */

.fe-body {
  font-family: "Poppins", sans-serif;

  font-size: 16px;

  line-height: 1.7;

  font-weight: 400;

  overflow-x: hidden;

  color: var(--color-text);

  background: var(--color-bg);

  text-rendering: optimizeLegibility;

  -webkit-font-smoothing: antialiased;

  -moz-osx-font-smoothing: grayscale;
}

/* =============================================================================
   SELECTION
============================================================================= */

::selection {
  color: #fff;

  background: var(--color-primary);
}

::-moz-selection {
  color: #fff;

  background: var(--color-primary);
}

/* =============================================================================
   SCROLLBAR
============================================================================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-surface);
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);

  border-radius: 50px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-dark);
}

/* =============================================================================
   IMAGES
============================================================================= */

img {
  display: block;

  max-width: 100%;

  height: auto;
}

/* =============================================================================
   LINKS
============================================================================= */

a {
  color: inherit;

  text-decoration: none;

  transition: var(--fe-transition);
}

a:hover {
  text-decoration: none;
}

/* =============================================================================
   LISTS
============================================================================= */

ul,
ol {
  margin: 0;

  padding: 0;

  list-style: none;
}

/* =============================================================================
   BUTTON RESET
============================================================================= */

button {
  border: none;

  background: none;

  cursor: pointer;

  font: inherit;
}

/* =============================================================================
   FORM RESET
============================================================================= */

input,
textarea,
select {
  font: inherit;
}
/* =============================================================================
   PAGE WRAPPER
============================================================================= */

.fe-page-wrapper {
  position: relative;

  display: flex;

  flex-direction: column;

  min-height: 100vh;

  overflow: hidden;

  isolation: isolate;
}

/* =============================================================================
   MAIN CONTENT
============================================================================= */

.fe-main {
  position: relative;

  flex: 1 1 auto;

  width: 100%;

  min-height: 40vh;
}

/* =============================================================================
   CONTAINER SYSTEM
============================================================================= */

.fe-container {
  width: 100%;

  max-width: var(--fe-container-xl);

  margin-inline: auto;

  padding-inline: 1rem;
}

.fe-container-xs {
  max-width: var(--fe-container-xs);
}

.fe-container-sm {
  max-width: var(--fe-container-sm);
}

.fe-container-md {
  max-width: var(--fe-container-md);
}

.fe-container-lg {
  max-width: var(--fe-container-lg);
}

.fe-container-xl {
  max-width: var(--fe-container-xl);
}

/* =============================================================================
   SECTION
============================================================================= */

.fe-section {
  position: relative;

  padding-block: var(--fe-section-padding);
}

.fe-section-sm {
  padding-block: var(--fe-section-padding-sm);
}

.fe-section-lg {
  padding-block: var(--fe-section-padding-lg);
}

.fe-section-top {
  padding-top: var(--fe-section-padding);
}

.fe-section-bottom {
  padding-bottom: var(--fe-section-padding);
}

/* =============================================================================
   SECTION HEADER
============================================================================= */

.fe-section-header {
  max-width: 760px;

  margin-inline: auto;

  margin-bottom: 60px;

  text-align: center;
}

.fe-section-badge {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 0.5rem;

  padding: 0.55rem 1rem;

  margin-bottom: 1rem;

  border-radius: 999px;

  background: rgba(37, 99, 235, 0.08);

  color: var(--color-primary);

  font-size: 0.9rem;

  font-weight: 600;
}

.fe-section-title {
  margin: 0 0 1rem;

  font-family: "Outfit", sans-serif;

  font-size: clamp(2rem, 5vw, 3rem);

  font-weight: 700;

  line-height: 1.15;

  color: var(--color-heading);
}

.fe-section-description {
  margin: 0;

  font-size: 1.05rem;

  color: var(--color-text-light);
}

/* =============================================================================
   GRID SYSTEM
============================================================================= */

.fe-grid {
  display: grid;

  gap: 30px;
}

.fe-grid-2 {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 30px;
}

.fe-grid-3 {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 30px;
}

.fe-grid-4 {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  gap: 30px;
}

.fe-grid-auto {
  display: grid;

  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));

  gap: 30px;
}

/* =============================================================================
   FLEX HELPERS
============================================================================= */

.fe-flex {
  display: flex;
}

.fe-flex-center {
  display: flex;

  align-items: center;

  justify-content: center;
}

.fe-flex-between {
  display: flex;

  align-items: center;

  justify-content: space-between;
}

.fe-flex-column {
  display: flex;

  flex-direction: column;
}

.fe-flex-wrap {
  flex-wrap: wrap;
}

/* =============================================================================
   GAP HELPERS
============================================================================= */

.fe-gap-xs {
  gap: 0.5rem;
}

.fe-gap-sm {
  gap: 1rem;
}

.fe-gap-md {
  gap: 1.5rem;
}

.fe-gap-lg {
  gap: 2rem;
}

.fe-gap-xl {
  gap: 3rem;
}

/* =============================================================================
   SURFACE
============================================================================= */

.fe-surface {
  background: var(--color-surface);

  border: 1px solid var(--color-border);

  border-radius: var(--fe-radius-lg);

  box-shadow: var(--fe-shadow-sm);
}

.fe-surface-hover {
  transition: var(--fe-transition);
}

.fe-surface-hover:hover {
  transform: translateY(-6px);

  box-shadow: var(--fe-shadow-lg);
}

/* =============================================================================
   GLASSMORPHISM
============================================================================= */

.fe-glass {
  background: rgba(255, 255, 255, 0.65);

  backdrop-filter: blur(20px);

  -webkit-backdrop-filter: blur(20px);

  border: 1px solid rgba(255, 255, 255, 0.35);
}

[data-theme="dark"] .fe-glass {
  background: rgba(15, 23, 42, 0.7);

  border-color: rgba(255, 255, 255, 0.08);
}

/* =============================================================================
   DIVIDER
============================================================================= */

.fe-divider {
  width: 100%;

  height: 1px;

  margin: 2rem 0;

  background: var(--color-border);
}

/* =============================================================================
   BACKGROUND HELPERS
============================================================================= */

.fe-bg-primary {
  background: var(--color-primary);
}

.fe-bg-light {
  background: var(--color-surface);
}

.fe-bg-dark {
  background: var(--color-dark);
}

.fe-bg-gradient {
  background: linear-gradient(
    135deg,
    var(--color-primary),
    var(--color-secondary)
  );
}

/* =============================================================================
   OVERFLOW
============================================================================= */

.fe-overflow-hidden {
  overflow: hidden;
}

.fe-overflow-auto {
  overflow: auto;
}

/* =============================================================================
   POSITION HELPERS
============================================================================= */

.fe-relative {
  position: relative;
}

.fe-absolute {
  position: absolute;
}

.fe-fixed {
  position: fixed;
}

/* =============================================================================
   WIDTH HELPERS
============================================================================= */

.fe-w-100 {
  width: 100%;
}

.fe-h-100 {
  height: 100%;
}

/* =============================================================================
   BORDER RADIUS
============================================================================= */

.fe-rounded {
  border-radius: var(--fe-radius-md);
}

.fe-rounded-lg {
  border-radius: var(--fe-radius-lg);
}

.fe-rounded-full {
  border-radius: 999px;
}

/* =============================================================================
   TYPOGRAPHY
============================================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;

  color: var(--color-heading);

  font-family: "Outfit", sans-serif;

  font-weight: 700;

  line-height: 1.2;
}

h1 {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.25rem);
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.35rem;
}

h5 {
  font-size: 1.15rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin: 0 0 1rem;

  color: var(--color-text);

  line-height: 1.8;
}

small {
  font-size: 0.875rem;

  color: var(--color-text-light);
}

strong {
  font-weight: 700;
}

/* =============================================================================
   TEXT UTILITIES
============================================================================= */

.fe-text-center {
  text-align: center;
}

.fe-text-left {
  text-align: left;
}

.fe-text-right {
  text-align: right;
}

.fe-text-primary {
  color: var(--color-primary);
}

.fe-text-secondary {
  color: var(--color-secondary);
}

.fe-text-success {
  color: var(--color-success);
}

.fe-text-danger {
  color: var(--color-danger);
}

.fe-text-warning {
  color: var(--color-warning);
}

.fe-text-light {
  color: var(--color-text-light);
}

.fe-text-white {
  color: #fff;
}

.fe-fw-400 {
  font-weight: 400;
}

.fe-fw-500 {
  font-weight: 500;
}

.fe-fw-600 {
  font-weight: 600;
}

.fe-fw-700 {
  font-weight: 700;
}

.fe-fw-800 {
  font-weight: 800;
}

/* =============================================================================
   SPACING UTILITIES
============================================================================= */

.fe-m-0 {
  margin: 0;
}

.fe-mt-1 {
  margin-top: 0.5rem;
}

.fe-mt-2 {
  margin-top: 1rem;
}

.fe-mt-3 {
  margin-top: 1.5rem;
}

.fe-mt-4 {
  margin-top: 2rem;
}

.fe-mb-1 {
  margin-bottom: 0.5rem;
}

.fe-mb-2 {
  margin-bottom: 1rem;
}

.fe-mb-3 {
  margin-bottom: 1.5rem;
}

.fe-mb-4 {
  margin-bottom: 2rem;
}

.fe-p-0 {
  padding: 0;
}

.fe-pt-1 {
  padding-top: 0.5rem;
}

.fe-pt-2 {
  padding-top: 1rem;
}

.fe-pt-3 {
  padding-top: 1.5rem;
}

.fe-pb-1 {
  padding-bottom: 0.5rem;
}

.fe-pb-2 {
  padding-bottom: 1rem;
}

.fe-pb-3 {
  padding-bottom: 1.5rem;
}

/* =============================================================================
   DISPLAY UTILITIES
============================================================================= */

.fe-block {
  display: block;
}

.fe-inline {
  display: inline;
}

.fe-inline-block {
  display: inline-block;
}

.fe-hidden {
  display: none !important;
}

.fe-visible {
  display: block !important;
}

/* =============================================================================
   ACCESSIBILITY
============================================================================= */

.fe-skip-link {
  position: absolute;

  left: -9999px;

  top: 1rem;

  z-index: 99999;

  padding: 0.85rem 1.2rem;

  border-radius: var(--fe-radius-md);

  background: var(--color-primary);

  color: #fff;

  font-weight: 600;

  transition: all 0.3s ease;
}

.fe-skip-link:focus {
  left: 1rem;
}

:focus-visible {
  outline: 3px solid var(--color-primary);

  outline-offset: 3px;
}

/* =============================================================================
   VISIBILITY HELPERS
============================================================================= */

.fe-hide {
  display: none !important;
}

.fe-show {
  display: block !important;
}

.fe-opacity-0 {
  opacity: 0;
}

.fe-opacity-100 {
  opacity: 1;
}

/* =============================================================================
   CURSOR HELPERS
============================================================================= */

.fe-pointer {
  cursor: pointer;
}

.fe-not-allowed {
  cursor: not-allowed;
}

/* =============================================================================
   SHADOW UTILITIES
============================================================================= */

.fe-shadow-xs {
  box-shadow: var(--fe-shadow-xs);
}

.fe-shadow-sm {
  box-shadow: var(--fe-shadow-sm);
}

.fe-shadow-md {
  box-shadow: var(--fe-shadow-md);
}

.fe-shadow-lg {
  box-shadow: var(--fe-shadow-lg);
}

/* =============================================================================
   TRANSITIONS
============================================================================= */

.fe-transition {
  transition: var(--fe-transition);
}

/* =============================================================================
   OBJECT FIT
============================================================================= */

.fe-object-cover {
  object-fit: cover;
}

.fe-object-contain {
  object-fit: contain;
}

/* =============================================================================
   Z-INDEX HELPERS
============================================================================= */

.fe-z-header {
  z-index: var(--fe-z-header);
}

.fe-z-overlay {
  z-index: var(--fe-z-overlay);
}

.fe-z-modal {
  z-index: var(--fe-z-modal);
}

/* =============================================================================
   ANIMATION READY
============================================================================= */

.fe-reveal {
  opacity: 0;

  transform: translateY(40px);
}

.fe-loaded .fe-reveal {
  opacity: 1;

  transform: none;

  transition: 0.8s ease;
}

/* =============================================================================
   PRINT
============================================================================= */

@media print {
  .fe-no-print {
    display: none !important;
  }
}
