/* Site Base Styles - Shared across all themes */

/* CSS Custom Properties (defaults) */
:root {
    --color-primary-50: #eff6ff;
    --color-primary-100: #dbeafe;
    --color-primary-200: #bfdbfe;
    --color-primary-300: #93c5fd;
    --color-primary-400: #60a5fa;
    --color-primary-500: #3b82f6;
    --color-primary-600: #2563eb;
    --color-primary-700: #1d4ed8;
    --color-primary-800: #1e40af;
    --color-primary-900: #1e3a8a;

    --color-secondary-500: #10b981;
    --color-secondary-600: #059669;

    --font-heading: inherit;
    --font-body: inherit;

    --section-padding-y: 4rem;
    --section-padding-x: 1rem;

    --border-radius: 0.5rem;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Base Elements */
body {
    font-family: var(--font-body);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

/* Section Base */
.section {
    /* No default padding - each section component controls its own spacing */
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

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

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

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-primary-600);
    color: var(--color-primary-600);
}

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

/* Navigation */
.site-nav {
    transition: all 0.3s ease;
}

.site-nav.scrolled {
    box-shadow: var(--shadow);
}

/* Menu Item Styles */
.menu-item {
    position: relative;
    --menu-hover-color: var(--color-primary-600);
    --menu-border-width: 2px;
}

.menu-item:hover {
    color: var(--menu-hover-color);
}

/* Border bottom hover effect for full-height menu items */
.menu-item-border-bottom {
    position: relative;
    box-sizing: border-box;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.menu-item-border-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--menu-border-width);
    background-color: var(--menu-hover-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.menu-item-border-bottom:hover::after {
    transform: scaleX(1);
}

/* Border bottom hover effect for non-full-height items (underline style) */
.menu-item[style*="--menu-border-width"]:not(.menu-item-border-bottom)::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: var(--menu-border-width);
    background-color: var(--menu-hover-color);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.menu-item[style*="--menu-border-width"]:not(.menu-item-border-bottom):hover::after {
    transform: scaleX(1);
}

/* Prose Overrides for Rich Text */
.prose {
    max-width: none;
}

.prose h2 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* Add list styles for all lists in main content */
main ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

main ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

main li {
    margin-bottom: 0.5rem;
}

.prose a {
    color: var(--color-primary-600);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--color-primary-700);
}

/* Section links inherit text color for proper contrast */
.section a:not(.btn):not(.no-underline) {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
    transition: opacity 0.2s ease;
}

.section a:not(.btn):hover {
    opacity: 0.8;
}

/* Tailwind CSS Extension for Primary Color */
.bg-primary-500 { background-color: var(--color-primary-500); }
.bg-primary-600 { background-color: var(--color-primary-600); }
.bg-primary-700 { background-color: var(--color-primary-700); }
.text-primary-500 { color: var(--color-primary-500); }
.text-primary-600 { color: var(--color-primary-600); }
.text-primary-700 { color: var(--color-primary-700); }
.ring-primary-500 { --tw-ring-color: var(--color-primary-500); }

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: var(--border-radius);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px var(--color-primary-100);
}

/* Animation Classes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

/* Responsive Utilities */
@media (max-width: 768px) {
    :root {
        --section-padding-y: 3rem;
    }
}

/* Accessibility - Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.sr-only:not(:focus):not(:active) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Footer Link Styles */
footer .footer-links a {
    color: var(--footer-link-color, inherit) !important;
    transition: color 0.2s ease;
}

footer .footer-links a:hover {
    color: var(--footer-link-hover-color, inherit) !important;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .site-nav,
    .btn,
    form {
        display: none !important;
    }
}
