/* =========================================
   IDU IMÓVEIS — Design System
   Variáveis globais, reset, tipografia, utilities
   Referência: ai_studio_code.html
   ========================================= */

/* === CSS VARIABLES === */
:root {
    /* Cores primárias (do ai_studio_code.html) */
    --primary-red: #ea3949;
    --primary-red-hover: #c92f3d;
    --primary-red-light: #fdeaea;
    --primary-red-dark: #b71c2b;
    --dark-purple: #1f143c;
    --dark-purple-light: #2d1e56;
    --light-bg: #f4f4f4;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #777777;
    --border-color: #e0e0e0;

    /* Estados */
    --success: #28a745;
    --error: #dc3545;
    --warning: #ffc107;

    /* Sombras (extraídas do ai_studio_code.html) */
    --shadow-header: 0 2px 10px rgba(0, 0, 0, 0.05);
    --shadow-search: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.05);
    --shadow-card-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
    --shadow-about: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-price: 0 5px 15px rgba(0, 0, 0, 0.05);
    --shadow-legal: 0 4px 15px rgba(0, 0, 0, 0.03);

    /* Tipografia */
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --container-max: 1200px;
    --container-padding: 20px;
    --radius-sm: 5px;
    --radius-md: 10px;
    --radius-lg: 15px;
    --radius-pill: 20px;
    --transition: 0.2s ease;

    /* Espaçamento */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
}

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

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    font-family: var(--font);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Inherit font on common elements (FA icons excluded via their own font-family) */
input, textarea, select, button, a {
    font-family: inherit;
}

main {
    flex: 1;
}

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

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: var(--font);
}

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

/* === SKIP TO CONTENT (acessibilidade) === */
.skip-to-content {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--primary-red);
    color: var(--white);
    padding: 10px 20px;
    z-index: 9999;
    font-weight: 600;
    transition: top var(--transition);
}

.skip-to-content:focus {
    top: 0;
}

/* === CONTAINER === */
.container {
    width: 100%;
    max-width: var(--container-max) !important;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* === TIPOGRAFIA === */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-dark);
    line-height: 1.3;
}

h1 { font-size: 28px; font-weight: 600; }
h2 { font-size: 24px; font-weight: 600; }
h3 { font-size: 20px; font-weight: 600; }
h4 { font-size: 16px; font-weight: 600; }

p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-light);
}

/* === FOCUS INDICATORS (acessibilidade) === */
:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* === UTILITIES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-grid { display: grid; }
.d-none { display: none; }
.d-block { display: block; }

.flex-column { flex-direction: column; }
.align-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-4); }
.mt-2 { margin-top: var(--space-8); }
.mt-3 { margin-top: var(--space-12); }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-4); }
.mb-2 { margin-bottom: var(--space-8); }
.mb-3 { margin-bottom: var(--space-12); }

.pt-1 { padding-top: var(--space-4); }
.pt-2 { padding-top: var(--space-8); }
.pb-1 { padding-bottom: var(--space-4); }
.pb-2 { padding-bottom: var(--space-8); }

.w-100 { width: 100%; }

/* === LOADING SKELETON === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 350px;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: 10px;
}

.skeleton-text.short {
    width: 60%;
}

/* === TOAST OVERRIDE (iziToast) === */
.iziToast {
    font-family: var(--font) !important;
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

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

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