/* =========================================================
   GLOBAL.CSS
   Dynamic School / Academy Website
   ========================================================= */


/* =========================================================
   1. CSS VARIABLES
   ========================================================= */

:root {
    --primary: #14532d;
    --primary-dark: #0b3d21;
    --primary-light: #22c55e;

    --secondary: #f59e0b;
    --secondary-dark: #d97706;

    --accent: #0ea5e9;

    --dark: #0f172a;
    --dark-soft: #1e293b;

    --text: #334155;
    --text-light: #64748b;
    --muted: #94a3b8;

    --white: #ffffff;

    --bg: #f8fafc;
    --bg-soft: #f1f5f9;

    --border: #e2e8f0;

    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --info: #0284c7;

    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    --container-width: 1240px;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --radius-full: 999px;

    --shadow-sm:
        0 2px 10px rgba(15, 23, 42, 0.06);

    --shadow-md:
        0 10px 30px rgba(15, 23, 42, 0.10);

    --shadow-lg:
        0 20px 50px rgba(15, 23, 42, 0.14);

    --shadow-3d:
        0 25px 50px rgba(15, 23, 42, 0.16),
        0 10px 20px rgba(15, 23, 42, 0.08);

    --transition:
        all 0.3s ease;

    --transition-fast:
        all 0.2s ease;
}


/* =========================================================
   2. RESET
   ========================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;

    font-family: var(--font-primary);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;

    color: var(--text);
    background: var(--bg);

    overflow-x: hidden;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
    overflow: hidden;
}


/* =========================================================
   3. BASIC ELEMENTS
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    font-weight: 700;
    line-height: 1.25;
}

p {
    margin-bottom: 1rem;
}

p:last-child {
    margin-bottom: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

ul,
ol {
    list-style: none;
}

table {
    border-collapse: collapse;
    width: 100%;
}


/* =========================================================
   4. SELECTION
   ========================================================= */

::selection {
    background: var(--primary);
    color: var(--white);
}


/* =========================================================
   5. SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 9px;
}

::-webkit-scrollbar-track {
    background: var(--bg-soft);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}


/* =========================================================
   6. CONTAINER
   ========================================================= */

.container {
    width: min(
        calc(100% - 40px),
        var(--container-width)
    );

    margin-left: auto;
    margin-right: auto;
}

.container-fluid {
    width: 100%;
    padding-left: 30px;
    padding-right: 30px;
}


/* =========================================================
   7. MAIN CONTENT
   ========================================================= */

main {
    position: relative;
    min-height: 50vh;
}


/* =========================================================
   8. SECTION
   ========================================================= */

.section {
    position: relative;
    padding: 90px 0;
}

.section-sm {
    padding: 60px 0;
}

.section-lg {
    padding: 120px 0;
}

.section-white {
    background: var(--white);
}

.section-soft {
    background: var(--bg-soft);
}

.section-dark {
    background: var(--dark);
    color: var(--white);
}


/* =========================================================
   9. SECTION HEADER
   ========================================================= */

.section-header {
    max-width: 760px;
    margin: 0 auto 50px;
    text-align: center;
}

.section-subtitle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    margin-bottom: 12px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-subtitle::before,
.section-subtitle::after {
    content: "";

    width: 25px;
    height: 2px;

    background: var(--secondary);
    border-radius: 10px;
}

.section-title {
    margin-bottom: 15px;

    font-size: clamp(
        28px,
        4vw,
        46px
    );

    letter-spacing: -1px;
}

.section-description {
    max-width: 650px;
    margin: 0 auto;

    color: var(--text-light);
    font-size: 16px;
}


/* =========================================================
   10. GRID SYSTEM
   ========================================================= */

.grid {
    display: grid;
    gap: 25px;
}

.grid-2 {
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}


/* =========================================================
   11. FLEX HELPERS
   ========================================================= */

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.flex-wrap {
    flex-wrap: wrap;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.gap-10 {
    gap: 10px;
}

.gap-15 {
    gap: 15px;
}

.gap-20 {
    gap: 20px;
}

.gap-30 {
    gap: 30px;
}


/* =========================================================
   12. BUTTONS
   ========================================================= */

.btn {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 48px;

    padding: 12px 24px;

    border: 1px solid transparent;
    border-radius: var(--radius-md);

    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        background 0.25s ease,
        color 0.25s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(0);
}


/* Primary */

.btn-primary {
    color: var(--white);

    background: linear-gradient(
        135deg,
        var(--primary),
        var(--primary-light)
    );

    box-shadow:
        0 10px 25px
        rgba(20, 83, 45, 0.20);
}

.btn-primary:hover {
    color: var(--white);

    box-shadow:
        0 15px 35px
        rgba(20, 83, 45, 0.30);
}


/* Secondary */

.btn-secondary {
    color: var(--dark);

    background: linear-gradient(
        135deg,
        #fbbf24,
        var(--secondary)
    );

    box-shadow:
        0 10px 25px
        rgba(245, 158, 11, 0.20);
}

.btn-secondary:hover {
    color: var(--dark);
}


/* Outline */

.btn-outline {
    color: var(--primary);
    background: transparent;
    border-color: var(--primary);
}

.btn-outline:hover {
    color: var(--white);
    background: var(--primary);
}


/* White */

.btn-white {
    color: var(--dark);
    background: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    color: var(--primary);
}


/* Sizes */

.btn-sm {
    min-height: 40px;
    padding: 8px 17px;
    font-size: 13px;
}

.btn-lg {
    min-height: 55px;
    padding: 15px 30px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}


/* =========================================================
   13. CARDS
   ========================================================= */

.card {
    position: relative;

    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    overflow: hidden;

    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.card-body {
    padding: 25px;
}


/* =========================================================
   14. GLOBAL 3D CARD
   ========================================================= */

.card-3d {
    position: relative;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(248, 250, 252, 0.96)
        );

    border: 1px solid
        rgba(255, 255, 255, 0.8);

    border-radius: var(--radius-xl);

    box-shadow: var(--shadow-3d);

    transform-style: preserve-3d;

    transition:
        transform 0.35s ease,
        box-shadow 0.35s ease;
}

.card-3d:hover {
    transform:
        perspective(1000px)
        translateY(-8px)
        rotateX(2deg);

    box-shadow:
        0 30px 60px
        rgba(15, 23, 42, 0.18);
}


/* =========================================================
   15. GLASS EFFECT
   ========================================================= */

.glass {
    background:
        rgba(255, 255, 255, 0.75);

    border:
        1px solid
        rgba(255, 255, 255, 0.55);

    -webkit-backdrop-filter:
        blur(18px);

    backdrop-filter:
        blur(18px);

    box-shadow:
        0 15px 40px
        rgba(15, 23, 42, 0.08);
}

.glass-dark {
    background:
        rgba(15, 23, 42, 0.70);

    border:
        1px solid
        rgba(255, 255, 255, 0.10);

    -webkit-backdrop-filter:
        blur(18px);

    backdrop-filter:
        blur(18px);
}


/* =========================================================
   16. BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 6px 12px;

    border-radius: var(--radius-full);

    font-size: 12px;
    font-weight: 700;
}

.badge-primary {
    color: var(--primary);
    background:
        rgba(34, 197, 94, 0.12);
}

.badge-warning {
    color: #92400e;
    background:
        rgba(245, 158, 11, 0.16);
}

.badge-danger {
    color: #991b1b;
    background:
        rgba(220, 38, 38, 0.12);
}

.badge-info {
    color: #075985;
    background:
        rgba(14, 165, 233, 0.12);
}


/* =========================================================
   17. FORM
   ========================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;

    margin-bottom: 8px;

    color: var(--dark);

    font-size: 14px;
    font-weight: 700;
}

.form-label .required {
    color: var(--danger);
}

.form-control,
.form-select {
    display: block;

    width: 100%;
    min-height: 50px;

    padding: 12px 15px;

    color: var(--dark);

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

textarea.form-control {
    min-height: 130px;
    resize: vertical;
}

.form-control::placeholder {
    color: var(--muted);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(34, 197, 94, 0.10);
}

.form-control:disabled,
.form-select:disabled {
    background: var(--bg-soft);
    cursor: not-allowed;
}


/* =========================================================
   18. FORM GRID
   ========================================================= */

.form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   19. ALERTS
   ========================================================= */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    margin-bottom: 20px;
    padding: 14px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-md);

    font-size: 14px;
}

.alert-success {
    color: #166534;
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.alert-danger,
.alert-error {
    color: #991b1b;
    background: #fef2f2;
    border-color: #fecaca;
}

.alert-warning {
    color: #92400e;
    background: #fffbeb;
    border-color: #fde68a;
}

.alert-info {
    color: #075985;
    background: #f0f9ff;
    border-color: #bae6fd;
}


/* =========================================================
   20. PAGE HERO
   ========================================================= */

.page-hero {
    position: relative;

    display: flex;
    align-items: center;

    min-height: 330px;

    padding: 80px 0;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--primary-dark),
            var(--primary)
        );

    overflow: hidden;
}

.page-hero::before {
    content: "";

    position: absolute;

    width: 380px;
    height: 380px;

    top: -180px;
    right: -100px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.08);
}

.page-hero::after {
    content: "";

    position: absolute;

    width: 250px;
    height: 250px;

    bottom: -140px;
    left: 5%;

    border-radius: 50%;

    background:
        rgba(245, 158, 11, 0.12);
}

.page-hero-content {
    position: relative;
    z-index: 2;

    max-width: 750px;
}

.page-hero h1 {
    margin-bottom: 12px;

    color: var(--white);

    font-size: clamp(
        34px,
        6vw,
        58px
    );
}

.page-hero p {
    max-width: 650px;

    color:
        rgba(255, 255, 255, 0.82);
}


/* =========================================================
   21. BREADCRUMB
   ========================================================= */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 20px;

    font-size: 14px;
}

.breadcrumb a {
    color:
        rgba(255, 255, 255, 0.80);
}

.breadcrumb a:hover {
    color: var(--secondary);
}

.breadcrumb-separator {
    color:
        rgba(255, 255, 255, 0.45);
}

.breadcrumb-current {
    color: var(--white);
}


/* =========================================================
   22. IMAGE WRAPPER
   ========================================================= */

.image-wrapper {
    position: relative;

    border-radius: var(--radius-lg);

    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform 0.5s ease;
}

.image-wrapper:hover img {
    transform: scale(1.05);
}


/* =========================================================
   23. EMPTY STATE
   ========================================================= */

.empty-state {
    padding: 60px 25px;

    text-align: center;

    background: var(--white);

    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 75px;
    height: 75px;

    margin: 0 auto 20px;

    color: var(--primary);

    background:
        rgba(34, 197, 94, 0.10);

    border-radius: 50%;

    font-size: 28px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-light);
}


/* =========================================================
   24. PAGINATION
   ========================================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;

    gap: 8px;

    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 42px;
    height: 42px;

    padding: 0 12px;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    transition: var(--transition-fast);
}

.pagination a:hover,
.pagination .active {
    color: var(--white);
    background: var(--primary);
    border-color: var(--primary);
}


/* =========================================================
   25. TABLE
   ========================================================= */

.table-responsive {
    width: 100%;
    overflow-x: auto;

    background: var(--white);

    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.table {
    min-width: 700px;
}

.table th,
.table td {
    padding: 14px 16px;

    text-align: left;

    border-bottom:
        1px solid var(--border);
}

.table th {
    color: var(--dark);

    background: var(--bg-soft);

    font-size: 13px;
    font-weight: 800;
}

.table td {
    font-size: 14px;
}

.table tr:last-child td {
    border-bottom: 0;
}


/* =========================================================
   26. LOADER
   ========================================================= */

.loader {
    width: 42px;
    height: 42px;

    border: 4px solid var(--border);
    border-top-color: var(--primary);

    border-radius: 50%;

    animation:
        globalSpin 0.8s linear infinite;
}

@keyframes globalSpin {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   27. TEXT HELPERS
   ========================================================= */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.text-dark {
    color: var(--dark);
}

.text-muted {
    color: var(--text-light);
}

.text-white {
    color: var(--white);
}

.fw-500 {
    font-weight: 500;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}


/* =========================================================
   28. MARGIN HELPERS
   ========================================================= */

.mt-0 {
    margin-top: 0;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mb-40 {
    margin-bottom: 40px;
}


/* =========================================================
   29. ACCESSIBILITY
   ========================================================= */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;

    padding: 0;
    margin: -1px;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);

    white-space: nowrap;

    border: 0;
}

:focus-visible {
    outline:
        3px solid
        rgba(14, 165, 233, 0.45);

    outline-offset: 3px;
}


/* =========================================================
   30. ANIMATION HELPERS
   ========================================================= */

.fade-up {
    opacity: 0;
    transform: translateY(30px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease;
}

.fade-up.show {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;

    transition:
        opacity 0.7s ease;
}

.fade-in.show {
    opacity: 1;
}


/* =========================================================
   31. MOBILE
   ========================================================= */

@media (max-width: 991px) {

    :root {
        --container-width: 920px;
    }

    .section {
        padding: 75px 0;
    }

    .section-lg {
        padding: 90px 0;
    }

    .grid-4 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .page-hero {
        min-height: 290px;
        padding: 65px 0;
    }
}


/* =========================================================
   32. TABLET / LARGE MOBILE
   ========================================================= */

@media (max-width: 767px) {

    body {
        font-size: 15px;
    }

    .container {
        width: min(
            calc(100% - 30px),
            var(--container-width)
        );
    }

    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-sm {
        padding: 45px 0;
    }

    .section-lg {
        padding: 75px 0;
    }

    .section-header {
        margin-bottom: 35px;
    }

    .section-title {
        font-size: 30px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .page-hero {
        min-height: 250px;
        padding: 55px 0;
    }

    .page-hero h1 {
        font-size: 36px;
    }

    .card-body {
        padding: 20px;
    }
}


/* =========================================================
   33. SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .container {
        width: calc(100% - 24px);
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 27px;
    }

    .section-description {
        font-size: 14px;
    }

    .btn {
        min-height: 46px;
        padding: 11px 18px;
    }

    .btn-lg {
        min-height: 50px;
        padding: 13px 21px;
    }

    .page-hero {
        min-height: 220px;
    }

    .page-hero h1 {
        font-size: 31px;
    }

    .breadcrumb {
        font-size: 12px;
    }
}


/* =========================================================
   34. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;

        transition-duration: 0.01ms !important;
    }
}


/* =========================================================
   35. PRINT
   ========================================================= */

@media print {

    .site-header,
    .site-footer,
    .whatsapp-floating,
    .no-print {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    main {
        min-height: auto;
    }

    .container {
        width: 100%;
        max-width: none;
    }
}