/* global.css - Global styles and layouts with Fluid Responsive Design */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css');

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    font-family: var(--font-family, 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
    background-color: var(--background, #F0EDE5);
    color: var(--text-primary, #002b29);
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: clip;
}

/* Responsive Image & Video & Canvas Defaults */
img,
video,
iframe,
canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--surface-secondary, #e8e2d5);
}

::-webkit-scrollbar-thumb {
    background: var(--border, #dfd8cb);
    border-radius: var(--radius-sm);
    border: 2px solid var(--surface-secondary, #e8e2d5);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light, #0a5c58);
}

/* Common Layout Utilities with Responsive Container */
.container {
    width: min(100% - 32px, 1280px);
    margin-inline: auto;
    padding-inline: var(--spacing-md);
}

section,
.section,
.stats,
.footer,
footer,
main {
    position: relative;
    z-index: 1;
}

/* Fluid Responsive Typography using clamp() with Poppins styling */
h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(1.6rem, 3.8vw, 2.5rem);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.015em;
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

h4 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

p {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: clamp(0.9rem, 1.5vw, 1.05rem);
}

/* Glow Background Effects */
.bg-glow {
    position: absolute;
    width: min(450px, 80vw);
    height: min(450px, 80vw);
    background: radial-gradient(circle, var(--primary-glow) 0%, rgba(240, 237, 229, 0) 70%);
    border-radius: var(--radius-round);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    animation: drift 20s ease-in-out infinite;
}

.bg-glow-cyan {
    position: absolute;
    width: min(400px, 75vw);
    height: min(400px, 75vw);
    background: radial-gradient(circle, var(--secondary-glow) 0%, rgba(240, 237, 229, 0) 70%);
    border-radius: var(--radius-round);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    animation: drift-reverse 25s ease-in-out infinite;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(50px, -70px) scale(1.15);
    }

    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

@keyframes drift-reverse {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-60px, 40px) scale(0.85);
    }

    66% {
        transform: translate(40px, -30px) scale(1.2);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Center Flex & Utilities */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

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

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

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

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

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

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

/* Table Overflow Wrapper for Responsive Touch Scroll */
.table-responsive,
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   GLOBAL RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1400px) {
    .container {
        max-width: 1200px;
    }
}

@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 1024px) {
    .container {
        width: min(100% - 24px, 920px);
    }
}

@media (max-width: 992px) {
    .container {
        width: min(100% - 24px, 720px);
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100% - 20px, 540px);
    }
}

@media (max-width: 576px) {
    .container {
        width: 100%;
        padding-inline: 12px;
    }
}

@media (max-width: 480px) {
    .container {
        padding-inline: 10px;
    }
}

@media (max-width: 375px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 320px) {
    html {
        font-size: 14px;
    }
}