/**
 * Bruna Melgarejo Advocacia Criminal - WordPress Theme Styles
 * Mantém consistência visual com o site principal Next.js
 */

/* CSS Variables - Cores da marca */
:root {
    --brand-dark: #0B132B;
    --brand-gold: #C9A227;
    --brand-ink: #334155;
    --brand-light: #F8FAFC;
    --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
    --font-serif: "Playfair Display", Georgia, serif;
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--brand-ink);
    background-color: #ffffff;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--brand-dark);
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    line-height: 1.8;
    color: var(--brand-ink);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

a:hover {
    color: var(--brand-gold);
}

/* Utility Classes */
.bg-brand-dark {
    background-color: var(--brand-dark);
}

.bg-brand-gold {
    background-color: var(--brand-gold);
}

.bg-brand-light {
    background-color: var(--brand-light);
}

.text-brand-dark {
    color: var(--brand-dark);
}

.text-brand-gold {
    color: var(--brand-gold);
}

.text-brand-ink {
    color: var(--brand-ink);
}

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

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

/* Layout Utilities */
.max-w-4xl {
    max-width: 56rem;
}

.max-w-5xl {
    max-width: 64rem;
}

.max-w-6xl {
    max-width: 72rem;
}

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

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

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

.space-y-8 > * + * {
    margin-top: 2rem;
}

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

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

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

.gap-6 {
    gap: 1.5rem;
}

.gap-10 {
    gap: 2.5rem;
}

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

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

    .md\:flex {
        display: flex;
    }

    .md\:hidden {
        display: none;
    }

    h1 {
        font-size: 3rem;
    }
}

/* Flexbox */
.flex {
    display: flex;
}

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

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

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

/* Spacing */
.mt-20 {
    margin-top: 5rem;
}

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

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

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

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

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

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

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

/* Border */
.border {
    border-width: 1px;
}

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

.border-brand-gold\/20 {
    border-color: rgba(201, 162, 39, 0.2);
}

.border-brand-gold\/40 {
    border-color: rgba(201, 162, 39, 0.4);
}

.border-brand-light {
    border-color: var(--brand-light);
}

.border-white\/10 {
    border-color: rgba(255, 255, 255, 0.1);
}

.border-white\/20 {
    border-color: rgba(255, 255, 255, 0.2);
}

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

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

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

/* Background */
.bg-white {
    background-color: #ffffff;
}

.bg-brand-dark {
    background-color: var(--brand-dark);
}

.bg-brand-light {
    background-color: var(--brand-light);
}

.bg-brand-gold {
    background-color: var(--brand-gold);
}

.bg-brand-dark\/95 {
    background-color: rgba(11, 19, 43, 0.95);
}

/* Text */
.text-white {
    color: #ffffff;
}

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

.text-white\/60 {
    color: rgba(255, 255, 255, 0.6);
}

.text-white\/90 {
    color: rgba(255, 255, 255, 0.9);
}

.text-brand-ink\/60 {
    color: rgba(51, 65, 85, 0.6);
}

.text-brand-ink\/80 {
    color: rgba(51, 65, 85, 0.8);
}

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

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

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

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

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

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

.leading-relaxed {
    line-height: 1.75;
}

/* Prose Styles (para conteúdo de posts) */
.prose {
    max-width: none;
}

.prose h1,
.prose h2,
.prose h3,
.prose h4 {
    font-family: var(--font-serif);
    color: var(--brand-dark);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--brand-ink);
}

.prose a {
    color: var(--brand-gold);
    text-decoration: underline;
    text-decoration-color: rgba(201, 162, 39, 0.3);
    text-underline-offset: 4px;
    transition: text-decoration-color 0.2s ease-in-out;
}

.prose a:hover {
    text-decoration-color: var(--brand-gold);
}

.prose strong {
    color: var(--brand-dark);
    font-weight: 600;
}

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

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

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
    margin: 2rem 0;
}

.prose blockquote {
    border-left: 4px solid var(--brand-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--brand-ink);
}

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

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

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

.ease-in-out {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects */
.hover\:bg-brand-gold\/90:hover {
    background-color: rgba(201, 162, 39, 0.9);
}

.hover\:bg-brand-light:hover {
    background-color: var(--brand-light);
}

.hover\:border-brand-gold\/40:hover {
    border-color: rgba(201, 162, 39, 0.4);
}

.hover\:text-brand-gold:hover {
    color: var(--brand-gold);
}

.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:opacity-90:hover {
    opacity: 0.9;
}

.hover\:scale-110:hover {
    transform: scale(1.1);
}

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

/* Sticky Header */
.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

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

/* Header Scroll Effect */
.site-header.scrolled {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.site-header.scrolled #header-inner {
    height: 72px;
}

.site-header.scrolled #logo-container {
    height: 52px;
    width: 150px;
}

/* Mobile Menu */
#mobile-navigation {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

#mobile-navigation.open {
    max-height: 24rem;
}

#close-icon {
    display: none;
}

#mobile-menu-toggle[aria-expanded="true"] #menu-icon {
    display: none;
}

#mobile-menu-toggle[aria-expanded="true"] #close-icon {
    display: block;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    width: 3.5rem;
    height: 3.5rem;
    background-color: #25D366;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease-in-out;
}

.whatsapp-float:hover {
    background-color: #20BA5A;
    transform: scale(1.1);
}

/* Pagination */
.page-links,
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 0.5rem;
    color: var(--brand-ink);
    transition: all 0.2s ease-in-out;
}

.pagination a:hover {
    background-color: var(--brand-gold);
    color: var(--brand-dark);
    border-color: var(--brand-gold);
}

.pagination .current {
    background-color: var(--brand-gold);
    color: var(--brand-dark);
    border-color: var(--brand-gold);
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--brand-gold);
    outline-offset: 2px;
}

/* Responsive Typography */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }
}

/* Search Form */
.search-form {
    max-width: 100%;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(201, 162, 39, 0.2);
    border-radius: 0.75rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--brand-ink);
    background-color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.search-form input[type="search"]::placeholder {
    color: rgba(51, 65, 85, 0.5);
}

.search-form button[type="submit"] {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    background-color: var(--brand-gold);
    color: var(--brand-dark);
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

.search-form button[type="submit"]:hover {
    background-color: rgba(201, 162, 39, 0.9);
}

/* Utility Classes */
.flex-1 {
    flex: 1 1 0%;
}

.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;
}

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

.block {
    display: block;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.h-48 {
    height: 12rem;
}

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

.aspect-video {
    aspect-ratio: 16 / 9;
}

.relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}

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

/* Post Card Hover Effect */
.post-card {
    transition: all 0.2s ease-in-out;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* SVG and Icon Sizes */
svg {
    display: inline-block;
    vertical-align: middle;
}

.w-4 {
    width: 1rem;
}

.h-4 {
    height: 1rem;
}

.w-5 {
    width: 1.25rem;
}

.h-5 {
    height: 1.25rem;
}

.w-6 {
    width: 1.5rem;
}

.h-6 {
    height: 1.5rem;
}

/* Ensure SVGs don't grow unexpectedly */
.inline-flex svg,
a svg,
button svg {
    flex-shrink: 0;
    max-width: 100%;
    height: auto;
    display: inline-block;
}

/* Hide/Show icons for mobile menu */
#mobile-menu-toggle[aria-expanded="true"] #menu-icon {
    display: none !important;
}

#mobile-menu-toggle[aria-expanded="true"] #close-icon {
    display: block !important;
}

