/* Base Styles - Foundation */

/* Reset and Normalize */
*, 
*::before, 
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    outline: 0;
}

html {
    font-size: 16px;
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* Viewport height fix for mobile browsers */
html {
    --vh: 1vh;
}

@supports (-webkit-touch-callout: none) {
    html {
        --vh: 1svh;
    }
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--gray-700);
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-4) 0;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--gray-900);
    letter-spacing: -0.025em;
}

h1 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-extrabold);
}

h2 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
}

h3 {
    font-size: calc(1.2rem + .6vw) !important;
    font-weight: var(--font-weight-semibold);
}

h4 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-semibold);
}

h5 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
}

h6 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
}

p {
    margin: 0 0 var(--space-4) 0;
    line-height: var(--line-height-relaxed);
}

.lead {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--gray-600);
}

/* Links */
a {
    color: var(--abel-red);
    text-decoration: none;
    transition: var(--transition);
    outline: 0 !important;
}

a:hover {
    color: var(--abel-red-dark);
    text-decoration: underline;
    outline: 0 !important;
}

a:focus {
    outline: 0px solid var(--abel-red);
    outline-offset: 0px;
    border-radius: var(--radius-sm);
}

/* Lists */
ul, ol {
    margin: 0 0 var(--space-4) 0;
    padding-left: var(--space-6);
}

li {
    margin-bottom: var(--space-0);
}

ul.reset-list,
ol.reset-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity var(--duration-300) var(--ease-out);
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Forms */
input,
button,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    outline: 0 !important;
}

button:focus, button:active, button:hover, button {
    outline: 0px solid var(--abel-red);
    outline-offset: 0px;
    outline: 0 !important;
}

/* Tables */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    text-align: left;
    padding: var(--space-3);
    border-bottom: 1px solid var(--gray-200);
}

th {
    font-weight: var(--font-weight-semibold);
    color: var(--gray-900);
}

/* Utility Classes */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.fw-light { font-weight: var(--font-weight-light); }
.fw-normal { font-weight: var(--font-weight-normal); }
.fw-medium { font-weight: var(--font-weight-medium); }
.fw-semibold { font-weight: var(--font-weight-semibold); }
.fw-bold { font-weight: var(--font-weight-bold); }
.fw-extrabold { font-weight: var(--font-weight-extrabold); }

.text-muted { color: var(--gray-500); }
.text-white { color: #ffffff; }
.text-white-75 { color: rgba(255, 255, 255, 0.75); }
.text-danger { color: var(--abel-red); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width-7xl);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Grid System Enhancement */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

/*
.col,
[class*="col-"] {
    padding: 0 0.75rem;
    width: 100%;
}
/*

/* Full Height Sections */
.fullscreen-section {
    min-height: calc((var(--vh, 1vh) * 100) - (var(--navbar-height)));
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--section-padding) 0;
    position: relative;
}

.min-vh-100 {
    min-height: 100vh;
    min-height: calc(var(--vh, 1vh) * 100);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--abel-red);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--abel-red-dark);
}

/* Firefox scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: var(--abel-red) var(--gray-100);
}

/* Loading States */
.loading-spinner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-spinner.show {
    opacity: 1;
    visibility: visible;
}

/* Focus Management */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--gray-900);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius);
    z-index: var(--z-tooltip);
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    .navbar,
    .fab-container,
    .scroll-progress,
    .loading-spinner {
        display: none !important;
    }
    
    .fullscreen-section {
        min-height: auto;
        page-break-inside: avoid;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}