/*
Theme Name: Directory of AI
Theme URI: https://directoryofai.com
Author: Directory of AI
Author URI: https://directoryofai.com
Description: A modern AI tools directory theme with brown palette, SEO built-in, and Kit.com newsletter integration.
Version: 2.0.0
License: GPL v2 or later
Text Domain: saasdir
*/

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: #171717;
    background-color: #FAFAFA;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

button {
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}

/* ============================================
   WORDPRESS REQUIRED CLASSES
   ============================================ */

.alignleft {
    float: left;
    margin-right: 1.5rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
}

.aligncenter {
    clear: both;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: #737373;
    text-align: center;
    margin-top: 0.5rem;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ============================================
   LAYOUT UTILITIES (Tailwind-like)
   ============================================ */

.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.max-w-4xl {
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
}

.max-w-7xl {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* ============================================
   SPACING
   ============================================ */

.pt-24 {
    padding-top: 6rem;
}

.pb-16 {
    padding-bottom: 4rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.pt-16 {
    padding-top: 4rem;
}

.pb-8 {
    padding-bottom: 2rem;
}

.pt-8 {
    padding-top: 2rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-12 {
    margin-bottom: 3rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

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

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid {
    display: grid;
}

.flex {
    display: flex;
}

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

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

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

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

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

/* ============================================
   FLEXBOX UTILITIES
   ============================================ */

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

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

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

.flex-col {
    flex-direction: column;
}

.flex-grow {
    flex-grow: 1;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.gap-8 {
    gap: 2rem;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

.bg-white\/80 {
    background-color: rgba(255, 255, 255, 0.8);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}

.border-b {
    border-bottom: 1px solid #E5E5E5;
}

.h-16 {
    height: 4rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

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

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

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

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

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

.font-normal {
    font-weight: 400;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-tighter {
    letter-spacing: -0.05em;
}

.leading-\[1\.1\] {
    line-height: 1.1;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   COLORS
   ============================================ */

.text-gray-400 {
    color: #A3A3A3;
}

.text-gray-500 {
    color: #737373;
}

.text-gray-600 {
    color: #525252;
}

.text-gray-900 {
    color: #171717;
}

.text-white {
    color: #FFFFFF;
}

.text-indigo-600 {
    color: #4F46E5;
}

.text-emerald-600 {
    color: #059669;
}

.text-orange-600 {
    color: #EA580C;
}

.text-amber-400 {
    color: #FBBF24;
}

.text-amber-500 {
    color: #F59E0B;
}

.text-green-500 {
    color: #22C55E;
}

.text-blue-500 {
    color: #3B82F6;
}

.bg-gray-50 {
    background-color: #FAFAFA;
}

.bg-gray-100 {
    background-color: #F5F5F5;
}

.bg-gray-200 {
    background-color: #E5E5E5;
}

.bg-gray-900 {
    background-color: #171717;
}

.bg-white {
    background-color: #FFFFFF;
}

.bg-indigo-50 {
    background-color: #EEF2FF;
}

.bg-emerald-50 {
    background-color: #ECFDF5;
}

.bg-orange-50 {
    background-color: #FFF7ED;
}

.bg-neutral-900 {
    background-color: #171717;
}

/* ============================================
   BORDERS
   ============================================ */

.border {
    border: 1px solid #E5E5E5;
}

.border-t {
    border-top: 1px solid #E5E5E5;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* ============================================
   SHADOWS
   ============================================ */

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* ============================================
   FORMS & INPUTS
   ============================================ */

.block {
    display: block;
}

.w-full {
    width: 100%;
}

.h-11 {
    height: 2.75rem;
}

.h-14 {
    height: 3.5rem;
}

.pl-4 {
    padding-left: 1rem;
}

.pl-12 {
    padding-left: 3rem;
}

.pr-3 {
    padding-right: 0.75rem;
}

.pr-4 {
    padding-right: 1rem;
}

.pr-20 {
    padding-right: 5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-1\.5 {
    padding-top: 0.375rem;
    padding-bottom: 0.375rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.focus\:outline-none:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px rgba(23, 23, 23, 0.1);
}

/* ============================================
   HOVER STATES
   ============================================ */

.hover\:text-gray-900:hover {
    color: #171717;
}

.hover\:bg-gray-50:hover {
    background-color: #FAFAFA;
}

.hover\:bg-gray-100:hover {
    background-color: #F5F5F5;
}

.hover\:bg-gray-800:hover {
    background-color: #262626;
}

.hover\:border-gray-300:hover {
    border-color: #D4D4D4;
}

.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.group:hover .group-hover\:text-indigo-600 {
    color: #4F46E5;
}

.group:hover .group-hover\:text-gray-600 {
    color: #4B5563;
}

.group:hover .group-hover\:text-emerald-600 {
    color: #059669;
}

.group:hover .group-hover\:text-orange-600 {
    color: #EA580C;
}

/* ============================================
   TRANSITIONS
   ============================================ */

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

/* ============================================
   HIDDEN ELEMENTS
   ============================================ */

.hidden {
    display: none;
}

@media (min-width: 640px) {
    .sm\:flex {
        display: flex;
    }
    
    .sm\:block {
        display: block;
    }
    
    .sm\:hidden {
        display: none;
    }
}

@media (min-width: 768px) {
    .md\:flex {
        display: flex;
    }
    
    .md\:hidden {
        display: none;
    }
    
    .md\:flex-row {
        flex-direction: row;
    }
    
    .md\:mb-0 {
        margin-bottom: 0;
    }
    
    .md\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
    
    .lg\:grid-cols-5 {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* ============================================
   ABSOLUTE POSITIONING (Search)
   ============================================ */

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.inset-y-0 {
    top: 0;
    bottom: 0;
}

.left-0 {
    left: 0;
}

.right-0 {
    right: 0;
}

.pointer-events-none {
    pointer-events: none;
}

/* ============================================
   Z-INDEX
   ============================================ */

.z-10 {
    z-index: 10;
}

.z-\[60\] {
    z-index: 60;
}

/* ============================================
   WHITESPACE
   ============================================ */

.whitespace-nowrap {
    white-space: nowrap;
}

/* ============================================
   PROSE (Article Content)
   ============================================ */

.prose {
    color: #525252;
    max-width: 65ch;
}

.prose p {
    margin-bottom: 1.25em;
}

.prose h2 {
    color: #171717;
    font-weight: 600;
    font-size: 1.5em;
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h3 {
    color: #171717;
    font-weight: 600;
    font-size: 1.25em;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.prose ul {
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    list-style-type: disc;
    padding-left: 1.625em;
}

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

.prose-lg {
    font-size: 1.125rem;
    line-height: 1.7777778;
}

/* ============================================
   CARD STYLES
   ============================================ */

.h-full {
    height: 100%;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.pt-4 {
    padding-top: 1rem;
}

.border-t {
    border-top-width: 1px;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-px {
    width: 1px;
}

.h-4 {
    height: 1rem;
}

.w-2 {
    width: 0.5rem;
}

.h-2 {
    height: 0.5rem;
}

.w-1\.5 {
    width: 0.375rem;
}

.h-1\.5 {
    height: 0.375rem;
}

/* ============================================
   KBD (Keyboard Shortcut)
   ============================================ */

kbd {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.font-sans {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.tracking-tight {
    letter-spacing: -0.025em;
}

.inline-flex {
    display: inline-flex;
}

/* ============================================
   DIVIDE (Footer Grid)
   ============================================ */

.divide-y > * + * {
    border-top: 1px solid #E5E5E5;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* ============================================
   RESPONSIVE CONTAINER
   ============================================ */

@media (max-width: 767px) {
    .max-w-7xl,
    .max-w-4xl {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .no-print {
        display: none !important;
    }
}
/* ============================================
   TYPOGRAPHY SYSTEM
   ============================================ */

/* Headings — Playfair Display (loaded in header.php) */
h1, h2, h3, h4, h5, h6,
.font-heading {
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: -0.025em;
}

/* Body / UI — Inter */
p, span, a, li, td, th, label,
input, textarea, select, button,
.font-body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Italic accent — Playfair italic for style */
.it {
    font-style: italic;
    font-family: 'Playfair Display', Georgia, serif;
}
