/*
 * Genio Case Theme Styles
 * Converted from the original Tailwind CSS design tokens
 */

/* CSS Variables */
:root {
    --color-primary: #0a0a0a;
    --color-primary-foreground: #ffffff;
    --color-secondary: #ee6c37;
    --color-secondary-foreground: #ffffff;
    --color-background: #ffffff;
    --color-foreground: #0a0a0a;
    --color-muted: #f5f5f5;
    --color-muted-foreground: #525252;
    --color-card: #ffffff;
    --color-card-foreground: #0a0a0a;
    --color-border: #e5e5e5;
    --radius: 0.75rem;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --color-primary: #fafafa;
        --color-primary-foreground: #171717;
        --color-background: #0a0a0a;
        --color-foreground: #fafafa;
        --color-muted: #171717;
        --color-muted-foreground: #a3a3a3;
        --color-card: #171717;
        --color-card-foreground: #fafafa;
        --color-border: #262626;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-background);
    color: var(--color-foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.font-heading {
    font-family: var(--font-heading);
}

/* Layout */
.container-custom {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container-custom {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-custom {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

.section-padding {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Colors */
.bg-primary { background-color: var(--color-primary); }
.text-primary { color: var(--color-primary); }
.bg-secondary { background-color: var(--color-secondary); }
.text-secondary { color: var(--color-secondary); }
.bg-background { background-color: var(--color-background); }
.text-foreground { color: var(--color-foreground); }
.bg-muted { background-color: var(--color-muted); }
.text-muted-foreground { color: var(--color-muted-foreground); }
.bg-card { background-color: var(--color-card); }
.border-border { border-color: var(--color-border); }

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

/* Hero gradient */
.bg-gradient-warm {
    background: linear-gradient(135deg, #fff7ed 0%, #ffffff 100%);
}

/* Grid */
.grid {
    display: grid;
}

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

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .md\:flex-row { flex-direction: row; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .lg\:flex { display: flex; }
    .lg\:hidden { display: none; }
}

@media (min-width: 1280px) {
    .xl\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.gap-16 { gap: 4rem; }

/* Flex */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-grow { flex-grow: 1; }
.flex-wrap { flex-wrap: wrap; }

/* Spacing */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Buttons */
.inline-flex {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Form styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background-color: var(--color-background);
    color: var(--color-foreground);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(238, 108, 55, 0.2);
}

/* Header */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(229, 229, 229, 0.5);
    position: sticky;
    top: 0;
    z-index: 50;
}

header nav ul {
    list-style: none;
}

header nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(10, 10, 10, 0.8);
    transition: color 0.2s;
}

header nav a:hover {
    color: var(--color-secondary);
}

/* Footer */
footer {
    background-color: var(--color-primary);
    color: var(--color-primary-foreground);
}

footer a {
    transition: color 0.2s;
}

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

/* Hero slider */
.hero-slide > div:first-child {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
}

/* WordPress menu helpers */
.menu {
    list-style: none;
}

.nav-menu .menu-item a {
    display: block;
}

.nav-menu .current-menu-item a {
    color: var(--color-secondary);
}

/* Prose / content */
.prose {
    color: var(--color-foreground);
}

.prose p {
    margin-bottom: 1.25rem;
    line-height: 1.75;
}

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

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

.prose ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

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

/* Utility helpers */
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: var(--radius); }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.shadow-medium {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.shadow-strong {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.backdrop-blur-md { backdrop-filter: blur(12px); }
.backdrop-blur-lg { backdrop-filter: blur(16px); }

.text-center { text-align: center; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.leading-tight { line-height: 1.25; }
.leading-relaxed { line-height: 1.625; }

.tracking-wide { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }
.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }

/* Sizing */
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-12 { height: 3rem; }
.h-14 { height: 3.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-32 { height: 8rem; }
.h-48 { height: 12rem; }
.h-\[500px\] { height: 500px; }
.h-\[85vh\] { height: 85vh; }
.min-h-\[600px\] { min-height: 600px; }

.w-3 { width: 0.75rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-7 { width: 1.75rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-12 { width: 3rem; }
.w-14 { width: 3.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-32 { width: 8rem; }
.w-48 { width: 12rem; }
.w-full { width: 100%; }
.w-8 { width: 2rem; }
.w-auto { width: auto; }
.w-\[8\] { width: 2rem; }

.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-none { max-width: none; }
.max-w-xl { max-width: 36rem; }

.aspect-video { aspect-ratio: 16 / 9; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-\[4\/3\] { aspect-ratio: 4 / 3; }

.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* Transitions */
.transition-colors { transition-property: color, background-color, border-color; transition-duration: 0.2s; }
.transition-transform { transition-property: transform; transition-duration: 0.3s; }
.transition-shadow { transition-property: box-shadow; transition-duration: 0.3s; }
.transition-all { transition-property: all; transition-duration: 0.3s; }
.duration-300 { transition-duration: 0.3s; }
.duration-500 { transition-duration: 0.5s; }
.duration-700 { transition-duration: 0.7s; }

.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }
.hover\:-translate-y-2:hover { transform: translateY(-0.5rem); }

.hover\:bg-primary:hover { background-color: var(--color-primary); }
.hover\:bg-secondary:hover { background-color: var(--color-secondary); }
.hover\:bg-secondary\/20:hover { background-color: rgba(238, 108, 55, 0.2); }
.hover\:bg-secondary\/90:hover { background-color: rgba(238, 108, 55, 0.9); }
.hover\:text-white:hover { color: #ffffff; }
.hover\:text-secondary:hover { color: var(--color-secondary); }
.hover\:shadow-medium:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1); }
.hover\:shadow-strong:hover { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12); }
.hover\:underline:hover { text-decoration: underline; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Cursor */
.cursor-not-allowed { cursor: not-allowed; }

/* Z-index helpers for slider */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }

/* Line clamp */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 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: 0;
}

/* WordPress alignments */
.alignwide { max-width: 1280px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100vw; margin-left: calc(-50vw + 50%); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    color: var(--color-foreground);
    transition: all 0.2s;
}

.pagination a:hover,
.pagination .current {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: #ffffff;
}

/* Mobile menu */
#mobile-menu {
    display: none;
}

#mobile-menu.active {
    display: block;
}

#mobile-menu ul {
    list-style: none;
}

#mobile-menu a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
}

/* Admin bar fix */
body.admin-bar header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar header {
        top: 46px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
